2009年11月26日 星期四

Darwin Streaming Server playlists

Video Playlists 範例:

rtsp://(your_server_ip)/(Mount_Point)
rtsp://127.0.0.1/mytv.sdp



MP3 Playlists 範例:

http://(your_server_ip):7070/(Mount_Point)
http://127.0.0.1:7070/mp3

ubuntu 9.10 + Darwin Streaming Server 自動啟動設定

步驟一:新增 /etc/init.d/dss 檔案,內容如下:

#!/bin/sh
#
# chkconfig: 35 92 12
# description: Quicktime Streaming Media Server
#
# Slight tweak of file create by Larry Underhill 05/20/02
#
# init script to start up the quicktime (Darwin) streaming server
# tested on Redhat 7.2, Fedora Core 4 and CentOS-4.3

# source function library
#. /etc/rc.d/init.d/functions

case "$1" in
start)
if test -r /var/lock/dssd
then
echo "Lockfile /var/lock/dssd exists. Server not started."
failure
else
echo "Starting Darwin Streaming Server: "
/usr/local/sbin/DarwinStreamingServer && touch /var/lock/dssd
echo "Starting DSS Admin Console: "
/usr/local/sbin/streamingadminserver.pl
echo "DSS and DSS Admin Console started…"
fi
;;

stop)
echo "Stopping Darwin Streaming Server: "
[ -f /var/lock/dssd ] || exit 0
echo "stopping…"
killall DarwinStreamingServer && killall streamingadminserver.pl
#ps ax | awk ‘{print $1" " $5}’ | awk ‘/DarwinStreamingServer/ {print $1}’ | xargs -r kill -9 && success || failure
#echo "Stopping DSS Admin Console: "
#ps ax | awk ‘/streamingadminserver.pl/ {print $1}’ | xargs -r kill -9 && success || failure
rm -f /var/lock/dssd
echo
;;

restart)
$0 stop
sleep 1
$0 start
;;
*)
echo "Usage: $0 [start|stop|restart]"
exit 1
esac
exit 0


步驟二:
chmod +x /etc/init.d/dss

步驟三:設定系統開機時自動載入 DSS
update-rc.d dss defaults

步驟四:手動啟動 Darwin Streaming Server
/etc/init.d/dss start

完成了~