Apple’s Darwin Streaming Server On Centos 5.2

Want to support HowtoForge? Become a subscriber!
 
Submitted by Jam3s (Contact Author) (Forums) on Mon, 2008-09-29 17:28. :: CentOS

Apple’s Darwin Streaming Server On Centos 5.2

Introduction

This tutorial will run you through the installation, configuration and preparation of media for Apple’s Darwin QuickTime Streaming Server on Centos/RHEL 5.2. Darwin QuickTime Streaming Server is capable of serving H.264 and mpeg4 file formats via the RTP/RTSP streaming protocols.

 

Prerequisites

  1. CentOS 5.2 x86 installed
  2. Development tools must be installed (can be installed after install with

    yum groupinstall "Development Tools"

    )
  3. Static IP address and hostname; I used 192.168.0.10 and example.org as my hostname
  4. Disable firewall and SELinux (configure later)

Installing Darwin Streaming Server 6.0.3

Currently there are no official binary packages of the current version so we will grab a source RPM. Apple’s current source package dose not compile on a Linux system without being patched. Enter the following command by command!

su -
wget http://www.abrahamsson.com/DarwinStreamingServer-6.0.3-2.src.rpm
rpm -i DarwinStreamingServer-6.0.3-2.src.rpm
cd /usr/src/redhat/SPECS/
rpmbuild -bb DarwinStreamingServer.spec
cd /usr/src/redhat/RPMS/i386/
yum –y install perl-Net-SSLeay
rpm -U DarwinStreamingServer*

When installing the RPMs the install hangs when trying to start Darwin so wait a few minutes then open another terminal session using Alt + F2 and run the following as root:

killall -9 DarwinStreamingServer

To change the administrator account from the default password of “password” use the following command:

qtpasswd administrator

So DSS starts at boot up run the following:

chkconfig --level 345 dss on

 

Configuring Darwin Streaming Server

Now open a browser and point the address to http://yourserverip:1220 and log in with the username administrator and the password you choose when running qtpasswd.

Login Image

After logging in you will be asked for an mp3 broadcast password:

Mp3 Password Image

Next you are asked if you want to use SSL for the administration web GUI; I used the default, as I didn’t have a certificate to hand.

SSL Option Image

The next question you will be asked if you want to stream on port 80. Do not use this option if you are planning to run or are running a web server on the same machine.

Stream on Port 80 Image

Next you will be asked to specify a path where your media is stored; leave this as the default for now. The current directory has some sample files that are useful for testing your installation.

Path for media image

You should now see the main administrator page as shown below:

Stream on Port 80 Image

You can now test your install by opening QuickTime on a client (either Windows or the Mac) and using one of the sample files installed by Darwin.

File > Open URL and type rtsp://yourip/sample_300kbit.mov

RTSP STREAMING IMAGE

The following video should be streamed with sound:

RTSP STREAMING IMAGE


Please do not use the comment function to ask for help! If you need help, please use our forum.
Comments will be published after administrator approval.
Submitted by Anonymous (not registered) on Wed, 2011-12-14 06:54.

Hi,

Thanks for the article.The installation works seamlessly using the above steps.But I have an issue opening the stream in the QTPlayer.I am able to see the movie Info but the stream does not start.The Iptable is OFF on the linux machine and the firewall is also turned off in the local windows machine where the stream is being accessed.

Is there something that need to be configured to make it run smoothly.

Thanks.

Submitted by Ben Zemm (not registered) on Thu, 2011-08-11 07:45.

I just installed this on my CentOS 5 VPS (MediaTemple dv 3.5). One detail was that the sample files weren't copied, so there is one extra command required:

cp /usr/src/redhat/BUILD/DarwinStreamingSrvr6.0.3-Source/sample* /var/dss/movies/

It all seems to work for me now! Not sure if anything else should be copied as well.

Submitted by backtogeek (not registered) on Tue, 2011-09-13 10:57.
I just finished the new CentOS installer its on my blog: http://backtogeek.com/2011/09/13/dss-darwin-streaming-server-centos-installer/
Submitted by thegeek (not registered) on Fri, 2010-08-13 14:36.

This guide is great although a few things have changed now in the install.

I have modified the installers etc to work with just about any CentOS install and should work fine with Fedora and Ubuntu server.

http://backtogeek.wordpress.com/2010/07/20/darwin-streaming-server-centos-5-5-x86_64/

Should make it very very easy for those with little experience to work with.

Submitted by eric (not registered) on Sun, 2009-09-06 07:37.

hi,

working great.  but iphone is not working?  any help please

Submitted by Mahendra (not registered) on Fri, 2010-01-22 12:22.

iphone do not support rtsp proto by default.

 QT player do support mov , .3gp files but streaming as live broadcast is not feasible.

iphone seems more bullish for not being supporting rtsp. but Quick Lime do download n play the file at same time.. still its not streaming !!

 correct me if wrong. suggestion welcome.

 

btw.. how to help is really perfect to start DSS. Need more focus on firewall, iptable rules to get right ports opened in firewall.. 

 

below should help u a bit :

 -A INPUT -p tcp -m tcp --dport 554 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 7070 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 1220 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 8000 -j ACCEPT
-A INPUT -p tcp -m tcp --dport 8001 -j ACCEPT
-A INPUT -p udp -m udp --dport 554 -j ACCEPT

-A OUTPUT -p tcp -m tcp --dport 80 -j ACCEPT
-A OUTPUT -p tcp -m tcp --dport 554 -j ACCEPT
-A OUTPUT -p tcp -m tcp --dport 7070 -j ACCEPT
-A OUTPUT -p tcp -m tcp --dport 1220 -j ACCEPT
-A OUTPUT -p tcp -m tcp --dport 8000 -j ACCEPT
-A OUTPUT -p tcp -m tcp --dport 8001 -j ACCEPT
 

Submitted by Expert Enterpri... (not registered) on Sat, 2009-04-18 09:17.

Hello.

Thank you for the great tutorial that helped me to successfully install DSS.

Here are my notes for this tutorial adjustment for Cent OS 5.3 :

 1. change 'cd /usr/src/redhat/SPECS/' to 'cd /usr/src/redhat/BUILD/DarwinStreamingSrvr6.0.3-Source'

2. change  'cd /usr/src/redhat/RPMS/i386/' to 'cd /usr/src/redhat/RPMS/x86_64'

 Cheers,

Arthur

 

 

Submitted by RHEL5 user (not registered) on Tue, 2009-02-10 19:14.

I am confused by this instruction:

You can now test your install by opening QuickTime on a client (either Windows or the Mac) and using one of the sample files installed by Darwin.

File > Open URL and type rtsp://yourip/sample_300kbit.mov

 I have tried using 'yourip' aka my client ip, the darwin server IP, and the server name.  All have the same results: Unable to open blahblahblah.

 Darwin installed without errors.  I have access to the admin page - everything looks great. 

 

Submitted by Aimee (not registered) on Mon, 2009-06-08 14:14.

If you answered no to streaming on port 80, you will need to specify the port when connecting, i.e.

rtsp://yourip:554/sample_300kbit.mov

Submitted by Don Peek (not registered) on Thu, 2009-04-09 05:34.

It could be a firewall issue..  

Try adding the next two line to the /etc/sysconfig/iptables file and restart iptables..

 -A INPUT -p tcp -m tcp --dport 1220 -j ACCEPT

-A INPUT -p tcp -m tcp --dport rtsp -j ACCEPT

 

Submitted by Anonymous (not registered) on Thu, 2010-05-06 19:04.

Dear All,

I'm using Centos 5.4 with the below iptables entries but still can't access the sample_300kbit.move.  Wrose than that, I don't even see any activities from the log.

Please help.

--Wo

# Firewall configuration written by system-config-securitylevel
# Manual customization of this file is not recommended.
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
:RH-Firewall-1-INPUT - [0:0]
-A INPUT -j RH-Firewall-1-INPUT
-A FORWARD -j RH-Firewall-1-INPUT
-A RH-Firewall-1-INPUT -i lo -j ACCEPT
-A RH-Firewall-1-INPUT -p icmp --icmp-type any -j ACCEPT
-A RH-Firewall-1-INPUT -p 50 -j ACCEPT
-A RH-Firewall-1-INPUT -p 51 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp --dport 5353 -d 224.0.0.251 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp -m udp --dport 631 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m tcp --dport 631 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 22 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 80 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 554 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 1220 -j ACCEPT
-A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport rtsp -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m tcp --dport 554 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m tcp --dport 7070 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m tcp --dport 8000 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m tcp --dport 8001 -j ACCEPT
-A RH-Firewall-1-INPUT -p tcp -m tcp --dport 4536 -j ACCEPT
-A RH-Firewall-1-INPUT -p udp -m udp --dport 554 -j ACCEPT
-A OUTPUT -p tcp -m tcp --dport 80 -j ACCEPT
-A OUTPUT -p tcp -m tcp --dport 554 -j ACCEPT
-A OUTPUT -p tcp -m tcp --dport 7070 -j ACCEPT
-A OUTPUT -p tcp -m tcp --dport 1220 -j ACCEPT
-A OUTPUT -p tcp -m tcp --dport 8000 -j ACCEPT
-A OUTPUT -p tcp -m tcp --dport 8001 -j ACCEPT
-A OUTPUT -p tcp -m tcp --dport 4536 -j ACCEPT
-A OUTPUT -p tcp -m tcp --dport rtsp -j ACCEPT
-A RH-Firewall-1-INPUT -j REJECT --reject-with icmp-host-prohibited
COMMIT

Submitted by Anonymous (not registered) on Fri, 2009-03-27 20:45.
Some more info on this, I'm running centos 5.2 x86_64 for the server, running wireshark on this it looks like the RTSP reply to the initial DESCRIBE has malformed SDP, running the same test against DSS on an xserve the SDP is valid and it works as expected.
Submitted by JV (not registered) on Thu, 2010-03-04 06:19.

I'm seeing the same error(Malformed Packet: SDP) in RTSP/SDP reply from DSS. If you found any fix.. Please help me ..

Thanks,

JV.

Submitted by Anonymous (not registered) on Fri, 2009-03-27 20:32.

I have also followed these instructions and have the same problem.  Everything installed correctly, when I try to connect to a sample movie, nothing happens.  I've checked the dss logs there is nothing in here.   I did notice that the logs seem to show a service startup everytime I try to load a movie.


# Streaming STARTUP 2009-03-27 20:19:52

2009-03-27 20:19:53: INFO: Module Loaded...QTSSRefMovieModule [dynamic]

2009-03-27 20:19:53: INFO: Module Loaded...QTSSRawFileModule [dynamic]

2009-03-27 20:19:53: INFO: Module Loaded...QTSSHomeDirectoryModule [dynamic]

2009-03-27 20:19:53: INFO: Module Loaded...QTSSFileModule [static]

2009-03-27 20:19:53: INFO: Module Loaded...QTSSReflectorModule [static]

2009-03-27 20:19:53: INFO: Module Loaded...QTSSRelayModule [static]

2009-03-27 20:19:53: INFO: Module Loaded...QTSSAccessLogModule [static]

2009-03-27 20:19:53: INFO: Module Loaded...QTSSFlowControlModule [static]

2009-03-27 20:19:53: INFO: Module Loaded...QTSSPosixFileSysModule [static]

2009-03-27 20:19:53: INFO: Module Loaded...QTSSAdminModule [static]

2009-03-27 20:19:53: INFO: Module Loaded...QTSSMP3StreamingModule [static]

2009-03-27 20:19:53: INFO: Module Loaded...QTSSAccessModule [static]

Submitted by Anonymous (not registered) on Sat, 2009-05-16 04:08.
Did you get this error working? I have set up DSS on CentOS using this guide and everything went fine.. Except when I try to stream a video, it doesn't stream at all, I tried a web player, VLC and Quicktime.. But when I try to open the file using a browser, I get to download the file .mp4 with text inside it rtsp://blahblahblah  .. What do you think is wrong with it?
Submitted by Anonymous (not registered) on Thu, 2009-09-03 06:54.

Hi

Anything Issues?

 

Submitted by Anonymous (not registered) on Fri, 2010-02-05 05:52.
Anyone know how to fix this? Did a brand new install and it won't work. All it does is restarts the service everytime. I even have the firewall off and it makes no difference.
Submitted by René (not registered) on Tue, 2008-11-04 13:12.

Thank you for patching and sharing this!

I noticed some errors. I started off from a CentOS 5.2 minimum install. I noticed that rpmbuild is not in "Development Tools" included:

yum install rpm-build

 

Then I run  rpmbuild -bb DarwinStreamingServer.spec  with the following errors:

+ install -d /var/tmp/DarwinStreamingServer-buildroot/usr/share/man/man8
+ install -d /var/tmp/DarwinStreamingServer-buildroot/usr/share/doc/DarwinStreamingServer-6.0.3
+ install -m755 DarwinStreamingServer /var/tmp/DarwinStreamingServer-buildroot/usr/sbin/
install: cannot stat `DarwinStreamingServer': No such file or directory
error: Bad exit status from /var/tmp/rpm-tmp.52951 (%install)


RPM build errors:
    Bad exit status from /var/tmp/rpm-tmp.52951 (%install)

Please indicate how to proceed.

Submitted by Anonymous (not registered) on Mon, 2009-01-12 01:36.

try

# yum -y install gcc-c++

The error "error: Bad exit status from /var/tmp/rpm-tmp.52951" can be traced to a previous error "error trying to exec 'cc1plus': execvp" because g++ is not installed.

Submitted by Adam (not registered) on Wed, 2009-05-27 19:56.

Never rebuild packages as root.

 Go to the centos wiki and setup a rpmbuild setup for regular users.

 Also, you might need the lzma package from rpmforge to rebuild this source rpm.

 There is another SRPM for mandriva which worked fined for me in CentOS 5.3 x86_64:

ftp://mirror.switch.ch/pool/3/mirror/mandrake/official/2009.0/SRPMS/
contrib/release/darwinstreamingserver-6.0.3-1mdv2009.0.src.rpm