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

Share this page:

30 Comment(s)

Add comment

Comments

From: Anonymous at: 2009-05-16 03:08:34

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?

From: Anonymous at: 2009-09-03 05:54:39

Hi

Anything Issues?

 

From: Anonymous at: 2010-02-05 04:52:32

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.

From: Expert Enterprises & Technologies Ltd. at: 2009-04-18 08:17:46

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

 

 

From: Don Peek at: 2009-04-09 04:34:40

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

 

From: Anonymous at: 2010-05-06 18:04:32

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

From: Anonymous at: 2009-03-27 19:45:17

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.

From: JV at: 2010-03-04 05:19:08

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.

From: Anonymous at: 2009-03-27 19:32:41

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]

From: René at: 2008-11-04 12:12:01

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.

From: Anonymous at: 2009-01-12 00:36:28

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.

From: Adam at: 2009-05-27 18:56:20

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
 

From: RHEL5 user at: 2009-02-10 18:14:22

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. 

 

From: Aimee at: 2009-06-08 13:14:13

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

From: eric at: 2009-09-06 06:37:00

hi,

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

From: Mahendra at: 2010-01-22 11:22:51

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
 

From: thegeek at: 2010-08-13 13:36:22

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.

From: Ben Zemm at: 2011-08-11 06:45:35

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.

From: backtogeek at: 2011-09-13 09:57:48

I just finished the new CentOS installer its on my blog: http://backtogeek.com/2011/09/13/dss-darwin-streaming-server-centos-installer/

From: Anonymous at: 2011-12-14 05:54:03

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.

From: Matthias at: 2009-05-06 14:30:23

This tutorial worked great for me. Although I'd prefer Opensuse over CentOS, I set up a server, following these instructions and it worked out of the box. The hinting routine described above can/needs also be used for streaming 3gp files.

One additional tip from me: If you do this, you are running Darwin under the user account, not as root.I found by adding the user to the qtss group, Darwin starts to populate the access logs :-)

Thanks again!

From: gral10 at: 2009-03-26 14:19:40

same here =(

From: Anonymous at: 2009-09-02 10:19:19

make sure your file location

From: Anonymous at: 2010-05-11 18:44:54

Same problem.  It only worked when using ffplay and streamed from 127.0.0.1 address like this

ffplay rtsp://127.0.0.1/sample_100kbit.mov

 I have checked and made sure the firewall and SELinux were both off. 

Does anyone have an idea what was wrong here?

 

From: Anonymous at: 2010-05-19 20:08:18

The problem may be if you are using NAT to access your server from the internet.

 

There is a configuration file in /etc/dss/

edit /etc/dss/streamingserver.xml

add your external NAT IP to the following:

<PREF NAME="alt_transport_src_ipaddr" ></PREF>

 

like this

<PREF NAME="alt_transport_src_ipaddr" >xxx.xxx.xxx.xxx</PREF>

 

then restart DSS 

/etc/init.d/dss restart

 

This worked for me. 

good luck. 

From: David at: 2010-05-20 02:10:04

I had the same problem and then spent a day or two learning more about hinting.  Once I started to correctly hint my mp4 files everything seemed to work.

From: Anonymous at: 2013-09-26 08:20:53

how did you solve it?.....I cann't solve......

From: Ken at: 2009-01-19 11:35:58

I have followed this instructions and the install worked brilliantly. But when trying to stream the sample videos I got "Not Found" message on Quick time. I did google and found several people encountering the same problem. Any ideas why this could be happening?

From: clackend at: 2009-03-20 00:29:41

I have the same error occurs.
"not found"

From: Anonymous at: 2013-09-26 11:32:54

this command is not running in my PC.
rpm -Uhv http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm

 error shown :

Retriving http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm

error: skiping http://apt.sw.be/redhat/el5/en/i386/rpmforge/RPMS/rpmforge-release-0.3.6-1.el5.rf.i386.rpm - transfer failed - unknown or unexpected error

warning: u 0*912b928 ctrl 0*912c740 nrefs!=0(apt.sw.be http)

could anyone please give me any solution?