This post assumes you have a working Kaltura CE 4.0 server. To easily install CE4 check out “How to setup Kaltura CE 4.0 VMWare image in 15 minutes“.
Welcome to the second video tutorial in our video posts series on installing and using Kaltura CE 4.0.
In this post, we show how to use a webcam to capture video using the Kaltura Contribution Wizard in CE 4 and the open source Red5 media server. As always we try to keep the knowledge and steps as general as we can so the guide will fit any Kaltura installation (VMWare, Cloud, Install, On Prem, etc.).
Note, that different Linux distributions (Debian or Fedora) behave differently and often use different commands. While the below installation steps are the same, the specific commands may vary between distros (for example, in CentOS we use yum to install packages, while in Ubuntu the command will most likely be apt-get).
This video tutorial will guide you through installation of the Red5server and its configuration in Kaltura CE 4.0 for enabling webcam recording.
Part 1 – Installing Red5
Red5 is an open source Media Server capable of RTMP streaming and Flash webcam recording. To install Red5 on CentOS follow the steps below:
Make sure that your hosts file is configured correctly. If you’re using the VMWare image;
Insert this line at the end: 127.0.0.1 kaltura
Restart Apache: service httpd restart
Install the Java SDK;
yum -y install java-1.6.0-openjdk java-1.6.0-openjdk-devel
Download and install the Red5 server:
tar xvfz red5-0.9.1.tar.gz
mv red5-0.9.1 red5
mv red5 /usr/share/
Test Red5 is executing:
Hit Ctrl+C when the “Installer Service Created” message is shown
Create an init script for Red5:
And add to it the following file contents –
Enable executable permission & start the service:
chmod +x /etc/init.d/red5
Check Red5 server status:
If the screen shows: “red5 (pid XXXXX) is running…” – then we’re good to go!
To open the Red5 Ports (if necessary), run the following commands:
/sbin/iptables -I RH-Firewall-1-INPUT -p tcp -m tcp --dport 1935 -j ACCEPT
/sbin/iptables -I RH-Firewall-1-INPUT -p tcp -m tcp --dport 8088 -j ACCEPT
/sbin/iptables -I RH-Firewall-1-INPUT -p tcp -m tcp --dport 5080 -j ACCEPT
/sbin/iptables -I RH-Firewall-1-INPUT -p tcp -m tcp --dport 1936 -j ACCEPT
/sbin/service iptables save
To check that the ports are open, visit: http://www.yougetsignal.com/tools/open-ports/
Enter your server ip and in the port number: 5080, 1935, 8088, 1936
Click the “Check” button. If the flag is green, the port is open
Test the RED5 installation by opening following URL in browser
Part 2 – Configuration
Adding Webcam support –
Head to: http://yourip:5080/
Click on “Install a ready-made application”
Select “oflaDemo” and click on “install”
To verify the oflaDemo is running well, do the following:
Go to: http://your.server.com:5080/demos/ofla_demo.html
In the server address above the connect button enter:
And click “connect” and watch the video play
If the video plays well – you’re good to go!
Configure Kaltura to use your brand new Red5:
mv streams streams_x
ln -s /opt/kaltura/web/content/webcam ./streams – adding webcam and streams save location
ln -s /opt/kaltura/web/content /usr/share/red5/webapps/oflaDemo/streams
Adjust the Kaltura Contribution Wizard uiConf file:
Add the RTMP URL of your site (search for “rtmp” in the file):
change to “<serverUrl>rtmp://yourip/oflaDemo</serverUrl>”
Configure Kaltura to use your brand new Red5 –
To record using the webcam log in to KMC->content tab, upload sub tab and in KCW select webcam as the upload method.
Stay tuned for the next video of enabling RTMP delivery via Red5 and live streaming option. Please share any other use cases you wish to use on top of Red5 or other FMS This post was able to complete thank to these two great posts: Install Red5 on Centos, Install Red5 on Ubuntu *Note they might contain different steps, codes and problems than what we describe in this post.
To enable live stream and RTMP using CE4 and Red5 read: RTMP VOD and Live Stream using Red5