If you are trying to setup a solution to be low cost and effective, you can look at combining Wowza as an origin and NGINX as an edge. Below I depict one way to set it all up. Here I assume you are new to NGINX but have a solid Wowza grounding. This very basic tutorial is demonstrating an install on a CentOS 6.5 x64 linux distribution.
1. Install NGINX/RTMP module
Install some other pre-reqs since we will be compiling from source:
Get the latest rtmp module via git:
Obtain the latest nginx version and extract:
Compile & install NGINX:
Start your nginx service:
Note: You may need to add types_hash_bucket_size 64; to your /etc/nginx/nginx.conf file
Some other useful commands:
#restart
service nginx restart
#stop
service nginx stop
#start
service nginx start
#sometimes residual processes to not close properly, try the following
killall nginx
2. Setup Wowza
Simply setup a basic Wowza install and publish a stream to it.
3. Setup on-demand configuration
You will need to modify your nginx.conf to set this part up. Simply define the following:
application pullfromwowza { live on; pull rtmp://[your-wowza-ip]:1935/[app]; }
This should do a dynamic pull based on demand. Once this modification has been made, reload nginx (see above command). Then you can playback as follows:
This should do a dynamic pull based on demand. As a complete basic nginx.conf file, it would look something like:
worker_processes 1; events { worker_connections 1024; } rtmp { server { listen 1935; application pullfromwowza { live on; pull rtmp://[your-wowza-ip]:1935/[app]; } } }
Note: This will only work via RTMP from nginx.