I use this and it works correctly. (Ubuntu 12.04 TLS server)
Step by step:
sudo apt-get install build-essential libpcre3 libpcre3-dev libssl-dev wget http://nginx.org/download/nginx-1.6.0.tar.gz wget https://github.com/arut/nginx-rtmp-module/archive/master.zip tar -zxvf nginx-1.6.0.tar.gz unzip master.zip cd nginx-1.6.0 ./configure
NGINX configuration: (/usr/local/nginx/conf/nginx.conf)
#user nobody; worker_processes 1;
Save the configuration file and:
sudo /usr/local/nginx/sbin/nginx -s stop sudo /usr/local/nginx/sbin/nginx
Next ... Create two directories:
mkdir /var/flvs mkdir /var/mp4s
You need to copy the mp4 file to the mp4s directory. For example: sample.mp4
Finaly
sudo /usr/local/nginx/sbin/nginx -s stop sudo /usr/local/nginx/sbin/nginx
Try:
rtmp:
(suppose you are using a VLC media player)
or html code
<html> <head> <title>RTMP Video</title> <script src="http://releases.flowplayer.org/js/flowplayer-3.2.12.min.js"></script> </head> <body> <div id="player" style="width:644px;height:480;margin:0 auto;text-align:center"> <img src="images/background.jpg" height="480" width="644" /></div> <script> $f("player", "http://releases.flowplayer.org/swf/flowplayer-3.2.16.swf", { clip: { url: 'sample.mp4', scaling: 'fit', provider: 'hddn' }, plugins: { hddn: { url: "swf/flowplayer.rtmp-3.2.13.swf", </script> </body> </html>
source share