OBS and Nginx for streaming @ home
EDIT: After a few misfortunes with jwplayer (constant breaks), I switched to the promising videojs. Post updated accordingly.
libssl-dev
pibpcre++-dev
wget http://nginx.org/download/nginx-1.8.0.tar.gz
tar xf nginx-1.8.0.tar.gz
cd nginx-1.8.0
wget https://github.com/arut/nginx-rtmp-module/archive/master.zip
unzip master.zip
./configure --with-http_ssl_module --add-module=./nginx-rtmp-module-master
make
sudo make install
In the ‘server’ section:
listen 8000; # Or whatever port suits you
- rtmp {
- server {
- listen 1935;
- chunk_size 4096;
- application live { # Application name, could have been pony or menakedinmaroomlol
- live on;
- record off;
- }
- }
- }
Then launch the server:
usr/local/nginx/sbin/nginx
Then, you’ll need a Web player to stream the content. I chose videojs, but any player should do the trick. You’ll of course need a web server to host it somewhere. Apache is fine. SimpleHTTPServer is fine too.
unzip video-js-5.10.4.zip
cp -R videojs-5.10.4 /var/www/ # or whatever folder suits you
- <html>
- <head>
- </head>
- <body>
- <link href=“videojs/video-js.min.css” rel=“stylesheet”>
- <script src=“videojs/video.min.js”></script>
- <script>
- videojs.options.flash.swf = “videojs/video-js.swf”
- </script>
- <video id=“example_video_1” class=“video-js vjs-default-skin vjs-big-play-centered”
- controls preload=“auto” width=“640” height=“360”
- poster=“pony.jpg”
- data-setup=‘{“example_option”:true}’>
- <source src=“rtmp://192.X.X.X/live/test” type=“rtmp/mp4” />
- <p class=“vjs-no-js”>To view this video please enable JavaScript, and consider upgrading to a web browser that <a href=“http://videojs.com/html5-video-support/” target=“_blank”>supports HTML5 video</a></p>
- </video>
- </body>
- </html>
Streaming Service : Custom
Server : rtmp://192.X.X.X/live
Play Path/Stream Key : test