Darwin Streaming Server has not been updated in many years and is dated compared to modern streaming technology.
If you still need QuickTime and RTSP streaming, the following steps will walk you through setting up a working Darwin Streaming Server on RHEL 6.0 - 6.3.
Install Darwin Streaming Server
Install the following repository packages:
yum install gcc gcc-c++ make git
Create the qtss system user and group:
adduser --system qtss
Clone the source code (the following GitHub repository contains the original Darwin Streaming Server 6.0.3 source code along with three patches):
git clone https://github.com/jameswthorne/dss
Change into the cloned directory:
cd ~/dss/
Begin installation:
./Buildit
./Install
Kill the streaming server and web server front end:
killall DarwinStreamingServer
killall streamingadminserver.pl
To fix RTSP streams not working over HTTP, copy the QTSSHomeDirectoryModule and QTSSRefMovieModule modules to /usr/local/sbin/StreamingServerModules:
cp ~/DarwinStreamingSrvr6.0.3-Source/APIModules/QTSSHomeDirectoryModule/QTSSHomeDirectoryModule /usr/local/sbin/StreamingServerModules
cp ~/DarwinStreamingSrvr6.0.3-Source/APIModules/QTSSRefMovieModule/QTSSRefMovieModule /usr/local/sbin/StreamingServerModules
Add the following to the end of /etc/streaming/streamingserver.xml just before the last tag to use the modules above:
<MODULE NAME="QTSSHomeDirectoryModule" >
<PREF NAME="enabled" TYPE="Bool16" >false</PREF>
<PREF NAME="movies_directory" >/Sites/Streaming/</PREF>
<PREF NAME="max_num_conns_per_home_directory" TYPE="UInt32" >0</PREF>
<PREF NAME="max_bandwidth_kbps_per_home_directory" TYPE="UInt32" >0</PREF>
</MODULE>
<MODULE NAME="QTSSRefMovieModule" >
<PREF NAME="refmovie_xfer_enabled" TYPE="Bool16" >true</PREF>
<PREF NAME="refmovie_rtsp_port" TYPE="UInt16" >0</PREF>
</MODULE>
Copy binary createuserstreamingdir to /usr/local/bin:
cp ~/dss/APIModules/QTSSHomeDirectoryModule/createuserstreamingdir /usr/local/bin/
Start Darwin Streaming Server with the following command:
DarwinStreamingServer
Start the Darwin Streaming Server Web front end with the following command:
streamingadminserver.pl
iptables Configuration
Below is an example iptables configuration in /etc/sysconfig/iptables to accept all connections on port 80 and only allow 192.168.0.192 to connect to the Darwin Streaming Server Web front end on port 1220:
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [1990:392294]
:HTTP - [0:0]
:QTSSADMIN - [0:0]
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 80 -j HTTP
-A INPUT -p tcp -m state --state NEW -m tcp --dport 1220 -j QTSSADMIN
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
-A HTTP -j ACCEPT
-A QTSSADMIN -s 192.168.0.192/32 -j ACCEPT
-A QTSSADMIN -j DROP
COMMIT
It may be necessary to open port 554 to allow RTSP streaming.
After any changes, restart iptables to apply the new configuration:
service iptables restart
init.d Scripts
Darwin Streaming Server does not come with any init.d scripts.
Copy the following two init.d scripts into /etc/init.d/DarwinStreamingServer and /etc/init.d/streamingadminserver, respectively, so you can use the service
command to control Darwin Streaming Server:
DarwinStreamingServer init.d Script
#!/bin/bash
#
# chkconfig: 345 95 5
# description: Runs DarwinStreamingServer
# processname: DarwinStreamingServer
# Source function library.
. /etc/init.d/functions
test -x /usr/local/sbin/DarwinStreamingServer || exit 0RETVAL=0
PROG="Darwin Streaming Server"
PROC=/var/lock/subsys/DarwinStreamingServer
BIN=/usr/local/sbin/DarwinStreamingServer
start()
{
# Check if Daemon is already running
if [ ! -f $PROC ]
then
echo -n $"Starting $PROG: "
daemon $BIN
RETVAL=$?
[ $RETVAL -eq 0 ] && touch $PROC
echo
fi
return $RETVAL
}
stop()
{
echo -n $"Stopping $PROG: "
killproc $BIN
RETVAL=$?
[ $RETVAL -eq 0 ] && rm -f $PROC
echo
return $RETVAL
}
restart()
{
stop
start
}
reload()
{
restart
}
status_at()
{
status $BIN
}
case "$1" in
start)
start
;;
stop)
stop
;;
reload|restart)
restart
;;
condrestart)
if [ -f $PROC ]
then
restart
fi
;;
status)
status_at
;;
*)
echo $"Usage: $0 {start|stop|restart|condrestart|status}"
exit 1
esac
exit $?
exit $RETVAL
streamingadminserver init.d Script
#!/bin/bash
#
# chkconfig: 345 95 5
# description: Runs streamingadminserver.pl
# processname: streamingadminserver
# Source function library.
. /etc/init.d/functions
test -x /usr/local/sbin/streamingadminserver.pl || exit 0RETVAL=0
PROG="streamingadminserver"
PROC=/var/lock/subsys/streamingadminserver
BIN=/usr/local/sbin/streamingadminserver.pl
start()
{
# Check if Daemon is already running
if [ ! -f $PROC ]
then
echo -n $"Starting $PROG: "
daemon $BIN
RETVAL=$?
[ $RETVAL -eq 0 ] && touch $PROC
echo
fi
return $RETVAL
}
stop()
{
echo -n $"Stopping $PROG: "
killproc $BIN
RETVAL=$?
[ $RETVAL -eq 0 ] && rm -f $PROC
echo
return $RETVAL
}
restart()
{
stop
start
}
reload()
{
restart
}
status_at()
{
status $BIN
}
case "$1" in
start)
start
;;
stop)
stop
;;
reload|restart)
restart
;;
condrestart)
if [ -f $PROC ]
then
restart
fi
;;
status)
status_at
;;
*)
echo $"Usage: $0 {start|stop|restart|condrestart|status}"
exit 1
esac
exit $?
exit $RETVAL
Set init.d Scripts Permissions
chmod 755 /etc/init.d/DarwinStreamingServer
chmod 755 /etc/init.d/streamingadminserver
Enable Services
chkconfig DarwinStreamingServer on
chkconfig streamingadminserver on
Further Configuration via Web Interface
Assuming your Darwin Streaming Server’s hostname is dss.example.com, open a web browser and go to http://dss.example.com:1220. Follow the steps to setup additional passwords, SSL, and the directory where your streaming videos will be stored.
Viewing the Videos
By default, Darwin Streaming Server has a few sample movies available. As long as QuickTime Player is installed on Windows or OS X, you can open any web browser and go to http://dss.example.com/sample_h264_1mbit.mp4 to verify Darwin Streaming Server is working properly.