So, this is pretty much what it took me to use the PPA repository:
This was a fresh Ubuntu Server install. So, I'm starting from that point. I didn't keep perfect notes, so I can't make any promises that I didn't leave something out. However, the parts that gave me problems should be detailed and correct.
I start off by elevating to root and installing SSH, updating and installing some other stuff I needed.
Code:
sudo /bin/bash
apt-get install openssh-server
aptitude update
aptitude install python-software-properties
aptitude upgrade
aptitude install nano
nano /etc/ssh/sshd_config
Add line at the end:
Be sure you replace [username] with whatever your username is. So, if your login is bob, it would be:
Now you, and only you, can SSH in. You'll probably want to use "sudo /bin/bash" again, if you connect through SSH at this point.
This is where I start things for adding the module to the source.
Code:
apt-get install dpkg-dev
add-apt-repository ppa:nginx/development
aptitude install init-system-helpers
aptitude install unzip
aptitude update
apt-get source nginx
apt-get build-dep nginx
cd nginx-1.7.0/debian/modules
wget https://github.com/arut/nginx-rtmp-module/archive/master.zip
unzip master.zip
cd ..
cd ..
nano debian/rules
Add "--add-module=$(MODULESDIR)/nginx-rtmp-module-master \" and "--with-http_ssl_module \" to full_configure_flags and extras_configure_flags and naxsi_configure_flags
Change "libgd2-noxpm-dev" to "libgd2-xpm-dev" to resolve a conflict.
Code:
dpkg-buildpackage -b
cd ..
dpkg --install nginx-common_1.7.0-1+precise0_all.deb nginx-full_1.7.0-1+precise0_amd64.deb
nano /etc/nginx/nginx.conf
Now, as with your guide, just add a function to the end of nginx.conf:
Code:
rtmp {
server {
listen 1935;
chunk_size 4096;
application live {
live on;
record off;
}
}
}
Alternatively, you could use something like this:
Code:
rtmp {
server {
listen 1935;
chunk_size 4086;
application live {
live on;
push_reconnect 5s;
#access_log /var/my_records/logs/rtmp_access.log;
interleave on;
meta on;
publish_notify on;
wait_key on;
wait_video on;
recorder audio {
record audio;
record_unique on;
record_path XXXXX;
record_suffix .audio.flv;
}
recorder chunked {
record all;
record_unique on;
record_interval 240m;
record_path XXXXX;
}
# Twitch.TV
push rtmp://live.twitch.tv/app/XXXXX;
# YouTube Live # push rtmp:// ;
# HASHD.TV #
push "rtmp://ingest-dal1.hashd.tv/live/XXXXXX?key=XXXXXX";
# USTREAM.TV # name=incomingstreamname is whatever you're specifying as your streamname. So if you use rtmp://yourserver:1935/live/test then the name would be "test"
push rtmp://1.XXXXXXX.fme.ustream.tv app=ustreamVideo/XXXXXXX name=incomingstreamname playPath=ustreamsessionkey;
}
}
}
Now, to reload nginx, add jwplayer and add a test page.
Code:
/etc/init.d/nginx reload
cd /usr/share/nginx/html
wget http://www.longtailvideo.com/download/jwplayer-3359.zip
unzip jwplayer-3359.zip
nano test.html
HTML Code:
Code:
<!DOCTYPE html>
<html>
<head>
<title>The Page for Testing</title>
<style>
body {
width: 35em;
margin: 0 auto;
font-family: Tahoma, Verdana, Arial, sans-serif;
}
</style>
</head>
<body>
<h1>Test Page</h1>
<br>
<script type="text/javascript" src="/jwplayer/jwplayer.js"></script>
<div id="myElement">Loading the player...</div>
<script type="text/javascript">
jwplayer("myElement").setup({
file: "rtmp://your.ip/live/test",
height: 480,
width: 720
});
</script>
</body>
</html>
At this point, if you visit your.ip/test.html, you should be able to see your own stream. This was a bit more complicated than your guide but now nginx autostarts and aptitude should recognize the install.
The only problem with the instructions is that it'll be somewhat obsolete when they release a new version.