MOVING TO NEW FORUM link https://telestreamforum.forumbee.com This forum will become READ ONLY on Wednesday May 25, 2016

Telestream Community Forum
Decrease font size
Increase font size
Topic Title: CRTMPServer on Ubuntu HOWTO
Topic Summary: A guide to using CRTMPServer on Ubuntu with Wirecast
Created On: 6/15/2012 3:23 PM
Status Read Only
Linear : Threading : Single : Branch
Topic Tools Search Topic
Topic Tools Topic Tools
View topic in raw text format. Print this topic.
Answer This question was answered by watkinsp, on Friday, June 15, 2012 4:23 PM

Answer:
This isn't a question. It's a guide I wrote. I just set up CRTMPServer on an Ubuntu server and I thought I'd share how I did it (also, I know I'll forget how I did it and hopefully Google will send me here). There are several RTMP servers out there--CRTMPServer is a free open-source one. Evostream Media Server is its commercial cousin--you get support and some extra features with that one.

Introduction
This is a HOWTO for installing crtmpserver on Ubuntu Server. crtmpserver is a free open-source RTMP server that runs on Linux. Wirecast can broadcast a Flash RTMP stream to it, and others can connect to the server to watch the stream. For this HOWTO, I’m using Ubuntu server 12.04. As newer versions of crtmpserver and Ubuntu server come out, this HOWTO will become more out-of-date. I’ll assume that you’re going to connect your server to your network with Ethernet. Wireless on Ubuntu Server is more involved.

Download and Install Ubuntu Server
Ubuntu comes in at least two flavors—Desktop and Server. The server version doesn’t come with a GUI by default (all you get is a terminal on your screen). This is fine for us since crtmpserver doesn’t have a GUI anyway.
1. Download the Ubuntu Server ISO and burn it to a CD
2. Install Ubuntu Server on a PC. I used a Core2 Duo-based machine and am having no problems with performance. Ensure that your PC is connected to a network (and the Internet) before you start. The install is pretty self-explanatory.
3. Choose a name for your server during the install. Remember this name because that’s the server name Wirecast will connect to. I’ll use the example name, “myserver”. So wherever you see the text, “myserver”, replace that with what you named yours.
4. Once the server has restarted after the install, log in with the username and password you specified during the install.

Install CRTMPServer
Ubuntu maintains a repository of packages (programs). If you want to use a package from the repository, you can just tell Ubuntu to download and install it, you don’t have to go to some web site and download it first. We’ll install packages with the “apt-get” command. The syntax is “apt-get install <package name>”. However, your user doesn’t have permission to modify the system and install new software by default—you’re just a user. To give yourself permission to run commands as the administrator (root), prefix the command you want to run with “sudo”. So, run the following command:

sudo apt-get install crtmpserver

Ubuntu will ask you for your password. Enter it to run the apt-get command with root permissions. Next apt-get will ask you if you want to download and install additional packages that crtmpserver depends on—you do want to. crtmpserver will install and start.

Determine if DNS is Working Properly
Depending on how your network is set up, you may be able to use the host name you specified for your server, or you may have to use the IP address. On the Wirecast workstation, open a command prompt and try to ping your new server:

ping myserver

If you get a response, you can use the DNS name of your server. If not, you’ll have to determine the IP address of your server. To do this, run the following command on your server:

ifconfig

You should see several addresses, you’re looking for the one next to “inet addr:”. If you have a single Ethernet interface, look in the block of text labeled “eth0”.

Set up Wirecast to Connect to CRTMPServer
I’ll assume that you’re familiar with editing broadcast settings in Wirecast.You can use any of the Flash presets or make your own. These are the settings you should use:
Destination: RTMP Flash Server
Address: rtmp://myserver/flvplayback
Stream: live
User Agent: FMLE/3.0
Set Credentials -> Username: broadcast
Set Credentials -> Password: vbrick

If you determined that you have to use your server’s IP address to access it from your Wirecast workstation, use that IP address instead of the server name in the address line.
The application (flvplayback), username, password, and user agent are all configurable in crtmpserver. These just happen to be the defaults that crtmpserver ships with. “live” is an arbitrary stream name that you specify—just make sure you use the same stream name when you connect with your RTMP client.

Connect to Your Steam with JW Player
I’m going to be brief in this section—I’ll assume you know how to set up streaming video clients on your web server. I’ll also assume that you know HTML, CSS, JavaScript, etc. Download and install JW Player onto your web server. On your web page, add the following example code:

<div id="container">Loading the player ...</div>
<script type="text/javascript">
jwplayer("container").setup({
flashplayer: "mediaplayer/player.swf",
streamer: "rtmp://myserver/flvplayback/",
file: "live"
});
</script>

Here you are instantiating a JW Player and replacing the div with the “container” ID with your new JW Player. Depending on where you installed JW Player on your web server, you’ll have to change the “flashplayer” path. Notice the "rtmp://myserver/flvplayback/" URL. If you have to use an IP address instead of a DNS name, put the IP address in here. Also notice the “live” stream name. If you specified a different stream name in Wirecast, you’ll have to put that name here too.
There’s one more piece of code you’ll need to add to your web page. Put the following in the page’s HEAD section:

<script type="text/javascript" src="mediaplayer/jwplayer.js"></script>

Depending on where you installed JW Player on your web server, you’ll have to change the “src” path.

Test the Server
Now navigate to your web page from a web browser. You should see the player. Click the play button to start watching the stream. If Wirecast is broadcasting, you should see your broadcast.

Start and Stop the Server
If you change the server configuration, you may need to restart the server. To stop the server, use the following command:

sudo /etc/init.d/crtmpserver stop

To start it again, use:

sudo /etc/init.d/crtmpserver start


If it doesn’t work…
Post a reply to this message if something doesn’t work (post a message if it does, too). I’ll try to help. It may help to look at crtmpserver’s log on your server. The log is located at “/var/log/crtmpserver/main.log”. You can view the log with the “less” program:

less /var/log/crtmpserver/main.log

Use the up and down arrow keys to scroll.
 6/15/2012 3:23 PM
User is offline View Users Profile Print this message

Author Icon
watkinsp

Posts: 57
Joined: 7/14/2011

Answer Answer
This isn't a question. It's a guide I wrote. I just set up CRTMPServer on an Ubuntu server and I thought I'd share how I did it (also, I know I'll forget how I did it and hopefully Google will send me here). There are several RTMP servers out there--CRTMPServer is a free open-source one. Evostream Media Server is its commercial cousin--you get support and some extra features with that one.

Introduction
This is a HOWTO for installing crtmpserver on Ubuntu Server. crtmpserver is a free open-source RTMP server that runs on Linux. Wirecast can broadcast a Flash RTMP stream to it, and others can connect to the server to watch the stream. For this HOWTO, I’m using Ubuntu server 12.04. As newer versions of crtmpserver and Ubuntu server come out, this HOWTO will become more out-of-date. I’ll assume that you’re going to connect your server to your network with Ethernet. Wireless on Ubuntu Server is more involved.

Download and Install Ubuntu Server
Ubuntu comes in at least two flavors—Desktop and Server. The server version doesn’t come with a GUI by default (all you get is a terminal on your screen). This is fine for us since crtmpserver doesn’t have a GUI anyway.
1. Download the Ubuntu Server ISO and burn it to a CD
2. Install Ubuntu Server on a PC. I used a Core2 Duo-based machine and am having no problems with performance. Ensure that your PC is connected to a network (and the Internet) before you start. The install is pretty self-explanatory.
3. Choose a name for your server during the install. Remember this name because that’s the server name Wirecast will connect to. I’ll use the example name, “myserver”. So wherever you see the text, “myserver”, replace that with what you named yours.
4. Once the server has restarted after the install, log in with the username and password you specified during the install.

Install CRTMPServer
Ubuntu maintains a repository of packages (programs). If you want to use a package from the repository, you can just tell Ubuntu to download and install it, you don’t have to go to some web site and download it first. We’ll install packages with the “apt-get” command. The syntax is “apt-get install <package name>”. However, your user doesn’t have permission to modify the system and install new software by default—you’re just a user. To give yourself permission to run commands as the administrator (root), prefix the command you want to run with “sudo”. So, run the following command:

sudo apt-get install crtmpserver

Ubuntu will ask you for your password. Enter it to run the apt-get command with root permissions. Next apt-get will ask you if you want to download and install additional packages that crtmpserver depends on—you do want to. crtmpserver will install and start.

Determine if DNS is Working Properly
Depending on how your network is set up, you may be able to use the host name you specified for your server, or you may have to use the IP address. On the Wirecast workstation, open a command prompt and try to ping your new server:

ping myserver

If you get a response, you can use the DNS name of your server. If not, you’ll have to determine the IP address of your server. To do this, run the following command on your server:

ifconfig

You should see several addresses, you’re looking for the one next to “inet addr:”. If you have a single Ethernet interface, look in the block of text labeled “eth0”.

Set up Wirecast to Connect to CRTMPServer
I’ll assume that you’re familiar with editing broadcast settings in Wirecast.You can use any of the Flash presets or make your own. These are the settings you should use:
Destination: RTMP Flash Server
Address: rtmp://myserver/flvplayback
Stream: live
User Agent: FMLE/3.0
Set Credentials -> Username: broadcast
Set Credentials -> Password: vbrick

If you determined that you have to use your server’s IP address to access it from your Wirecast workstation, use that IP address instead of the server name in the address line.
The application (flvplayback), username, password, and user agent are all configurable in crtmpserver. These just happen to be the defaults that crtmpserver ships with. “live” is an arbitrary stream name that you specify—just make sure you use the same stream name when you connect with your RTMP client.

Connect to Your Steam with JW Player
I’m going to be brief in this section—I’ll assume you know how to set up streaming video clients on your web server. I’ll also assume that you know HTML, CSS, JavaScript, etc. Download and install JW Player onto your web server. On your web page, add the following example code:

<div id="container">Loading the player ...</div>
<script type="text/javascript">
jwplayer("container").setup({
flashplayer: "mediaplayer/player.swf",
streamer: "rtmp://myserver/flvplayback/",
file: "live"
});
</script>

Here you are instantiating a JW Player and replacing the div with the “container” ID with your new JW Player. Depending on where you installed JW Player on your web server, you’ll have to change the “flashplayer” path. Notice the "rtmp://myserver/flvplayback/" URL. If you have to use an IP address instead of a DNS name, put the IP address in here. Also notice the “live” stream name. If you specified a different stream name in Wirecast, you’ll have to put that name here too.
There’s one more piece of code you’ll need to add to your web page. Put the following in the page’s HEAD section:

<script type="text/javascript" src="mediaplayer/jwplayer.js"></script>

Depending on where you installed JW Player on your web server, you’ll have to change the “src” path.

Test the Server
Now navigate to your web page from a web browser. You should see the player. Click the play button to start watching the stream. If Wirecast is broadcasting, you should see your broadcast.

Start and Stop the Server
If you change the server configuration, you may need to restart the server. To stop the server, use the following command:

sudo /etc/init.d/crtmpserver stop

To start it again, use:

sudo /etc/init.d/crtmpserver start


If it doesn’t work…
Post a reply to this message if something doesn’t work (post a message if it does, too). I’ll try to help. It may help to look at crtmpserver’s log on your server. The log is located at “/var/log/crtmpserver/main.log”. You can view the log with the “less” program:

less /var/log/crtmpserver/main.log

Use the up and down arrow keys to scroll.


-------------------------
Dell Optiplex 790
CPU: Quad Core Intel i7 3.40Ghz
OS: Windows 7 x64 SP1 with all updates installed
RAM: 8 GB
Graphics: AMD Radeon HD 6350 512MB DDR3 with driver version 8.83
Video Injest: AVerMedia C027 PCIe HDP Capture Device with driver version 1.12.64.43
Wirecast: 4.1.4
Audio Card: Realtek High Definition Audio (on motherboard) with driver version 6.0.1.5883
HD: Two 2TB 7200 RPM SATA drives RAID 0

Edited: 6/15/2012 at 3:35 PM by watkinsp
 6/15/2012 4:23 PM
User is offline View Users Profile Print this message

Author Icon
CraigS

Posts: 54277
Joined: 4/4/2007

Thanks for this.

-------------------------
CraigS
Telestream Desktop Forum Moderator
 7/13/2012 12:34 PM
User is offline View Users Profile Print this message

Author Icon
nictopn

Posts: 2
Joined: 7/13/2012

Thank you for this very helpful guide, I was wondering if you know how to configure crtmp server to not require user credentials. My rtmp client (flme) does not support credentials and unfortunately I can not afford wirecast as of right now.

Thank you for your time.

nictopn
 7/13/2012 1:58 PM
User is offline View Users Profile Print this message

Author Icon
nictopn

Posts: 2
Joined: 7/13/2012

Hello again, I found a forum answer on crtmp's forum, the url is here,

Google Groups

Thank you again for this wonderful guide.
 9/15/2014 2:15 PM
User is offline View Users Profile Print this message

Author Icon
Worker73

Posts: 1
Joined: 9/15/2014

Hi! Thanks for the HowTo....
Works Fine... but one little Problem....
Iam Broadcasting from an Cam via Cerevo Live Shell > Ubuntu CRTMP Server and then to my Cerevo Dashboard. Works fine... But when i want to Open the Stream in VLC (Or Livestream Studio via RTMP URL) that doesnt work.
Error on "Livestream Studio" is "Connected but no Stream Found"....
Any Idea where is the Problem?

FuseTalk Basic Edition v4.0 - © 1999-2018 FuseTalk Inc. All rights reserved.

MOVING TO NEW FORUM link https://telestreamforum.forumbee.com This forum will become READ ONLY on Wednesday May 25, 2016