Private RTMP server (preconfigured virtualbox image)

jhn123

New Member
Private RTMP server using nginx 1.4.1 -- Preconfigured VirtualBox Image

This VirtualBox image hosts a password protected jwplayer website that OBS can stream to. Alternatively, you can playback the live stream from an Android device with MX player.

3hyc.png

This is an example of my setup. Stream PC is optional.
pjgn.png



Image:
https://www.dropbox.com/s/69t6qx9cz...86-Desktop-RELEASE-[VirtualBoxImages.com].rar

USER: adminuser
PASS: adminuser

Download VirtualBox 4.2.16 for Windows hosts
https://www.virtualbox.org/wiki/Downloads

If you have an intel cpu, enable intel virtualization technology in the bios first.

1. In virtualbox, go to Machine>Add>ubuntu-13.04-desktop-i386.vbox.

2. Go to settings>network, use the settings below.
3gj.png


3. Start the image. Open terminal type "ifconfig" at the top it will say inet addr:Ubuntu IP
4. Add Ubuntu IP to OBS. Open OBS, go to settings>broadcast settings.
h6jp.png


5. Open terminal type sudo nano /var/www/live/index.html
type adminuser for the password.

6. Go to http://www.whatismyip.com add your IP address and stream key on line 28.
{file: "rtmp://IPADDRESSHERE/live/flv:STREAMKEYHERE.flv"}

7. Hit Ctrl+O to save, hit enter and Ctrl+X to exit nano.

8. Restart nginx in terminal type: sudo /etc/init.d/nginx stop
sudo /etc/init.d/nginx start
Note: Nginx automatically starts on boot.

9. If you're behind a router, you might have to port forward tcp 80 and tcp 1935. Put in your Ubuntu IP where it says internal IP address.
1877.png


10. Start OBS Stream.

11. Go to http://IPADDRESSHERE
Note: This site is password protected. User: livestream Password: livestream

OR

Watch Stream from Android Device:
MX Player Pro>Network Stream

rtmp://UbuntuIPHere/live/STREAMKEYHERE(Watch stream over wifi.)

Done!
 

Jack0r

The Helping Squad
Thanks a lot for your work :) And glad you found a good hoster!
Will give it a try when I find some more time.
 

mkdr

New Member
What does the stream pc do in your line of setup? How do you capture from game pc to the stream pc? Just asking because curious. Is it hardware capture or, like does the stream pc has a hdmi in streaming pcie card or what.
 

wedre

New Member
This works great! I was wondering if you could give some hints as to how to set it up on ubuntu manually. My comp is really slow and running windows 7 and ubuntu at the same time causes a lot of lag on the server. I installed nginx before but had some trouble getting the rtmp module to work. Any help would be awesome.
 

mrgreaper

Member
excellent guide but need to know two things for security minded

1) how do we change the password of the adminuser?
2)how do we change the password of the livestream (the one you enter on the webpage)

thanks
 

mkdr

New Member
People using Windows, I guess 99% do, should run a win32 build of nginx instead of this "workaround". It's running great for me since weeks together with JWPlayer. Rtmpdump and ffmpeg do not work though.
 

paladzin

New Member
Thanks.
Using this vm for transcoding 1080>720p, and restreaming.
Install -> ffmpeg/x264 ppa
Code:
sudo add-apt-repository ppa:jon-severinsson/ffmpeg
sudo apt-get update && apt-get install ffmpeg x264

Transcoding example:
Code:
                     application live_orig {
                        live on;
                        record off;
                        push rtmp://sreaming.url/paladzin;
                        exec_static ffmpeg -re -i rtmp://localhost/live_orig -vcodec libx264 -vprofile baseline -preset veryfast -g 10 -s 1280x720 -acodec copy -f flv rtmp://streaming.url/paladzin~720p;
                                           }
Works great.
 

paladzin

New Member
mrgreaper said:
1) how do we change the password of the adminuser?
2)how do we change the password of the livestream (the one you enter on the webpage)
1) sudo passwd adminuser
2) nginx/conf/htpasswd
 

mrgreaper

Member
paladzin said:
mrgreaper said:
1) how do we change the password of the adminuser?
2)how do we change the password of the livestream (the one you enter on the webpage)
1) sudo passwd adminuser
2) nginx/conf/htpasswd

cool thank you.

can i ask a further question, at the moment i have xsplit(i know this is obs forum but obs wont work with my laptop and hardware :( ) record the stream as it streams so i can later upload the heighlights or episodes of a lets play to youtube..... however it only records the file as a flv (which is very hard to edit and cut with out converting it), seeing the transcoding stuff above (which partly goes over my head i must admit) is there a way to have the vmbox record the stream as a mp4 or mpeg (something i can easierly be loaded into virtualdub)?
 

pervokur

New Member
How can i use it on 1 pc w/o router? ( Ubuntu has no internet access, but i can watch my stream in VLC on my pc [bridged adapter])
Sorry for my bad english.
 

makkaan

Member
Hello, Is there anyone that can help me with this? OBS is connected and i can go to the webpage but the stream says "could not connect to server".

What to do?
 

MarkKing

New Member
jhn123 said:
Port forward Ubuntu IP. Look at step 9.

paladzin said:

Thanks for this guide!
I followed all the steps correctly and I'm able to view the stream using MXplayer on my Android phone but it doesn't work when I go to my IP address directly. What I'm trying to do is embed the stream into JWplayer for my joomla site. I also need to know how can I set up a flash & an html5 stream.

I'd appreciate if anyone can help me with this because I've been searching and reading a lot for about 3 days and still can't find a solution. Thanks in advance!
 

Jack0r

The Helping Squad
Guys: Flash/HTML5 is the rendering method/plugin. You will always stream with rtmp if you use nginx + rtmp and OBS. So it just depends on the support of the browser you use for playback.

Now to your problem: The HTML files can be used anywhere. You just have to make sure your server can be accessed from this location and the IP addresses have to be configured correctly of course. (As mentioned in the other thread)

PS: JWplayer might want to be hosted on a webserver to work.
 
Top