成功版本ubuntu9.10/8.04
轉載時請註明出處和作者連絡方式
文章出處:http://blog.csdn.com/keensword007
作者連絡方式:琴劍 <keensword007 at sina dot com>
目前主流的流媒體伺服器有微軟的windows media
server、RealNetworks的Helixserver和蘋果公司的Darwin Streaming Server. 微軟的windows
media server只能在windows2000 server和windows 2003
server下使用,不在考慮之列。RealNetworks的Helixserver是一款跨平台的軟體,功能也很強大,但並非免費軟體,只能cut掉
了。蘋果公司的Darwin
StreamingServer是一款跨平台的開源流媒體伺服器軟體,由蘋果公司出品,其品質不用懷疑了,而且還免費。所以在架設流媒體伺服器時就選擇了
DarwinStreaming Server.
Darwin Streaming
Server使用標準的即時傳輸協議/即時資料流媒體協議(RTP/RTSP),通過互連網即時傳送媒體。Darwin Streaming Server
也能提供對傳送 H.264、MPEG-4 和3GPP 檔案的固有支援——因此,你可以在 Mac 和
Linux、Windows上的任何與標準相容的媒體播放器上執行你的內容,當然還包括手機和接收盒等各種相容標準的裝置。不僅如此,它還允許你使用
Icecast相容協議,通過 HTTP 傳送標準的 MP3 檔案到 MP3 用戶端。
一、軟體安裝
首先上http://dss.macosforge.org/下載原始碼,
當前最新版本為6.0.3,但我選擇了5.5.5版本,因為這個版本提供了針對linux的安裝指令碼。下載了
DarwinStreamingSrvr5.5.5-Linux.tar.gz檔案後,解壓縮,然後運行如下命令安裝:
~/tmp/DarwinStreamingSrvrlinux-Linux$ chmod +x Install
~/tmp/DarwinStreamingSrvrlinux-Linux$ sudo ./Install
[sudo] password for keensword007:
Installing Darwin Streaming Server
Checking for and Killing currently running Darwin Streaming Server
Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
Removing previous versions of Darwin Streaming Server
Backing up previous config files
Inserting path to perl into scripts..
Creating unprivileged user to run the server = "qtss".
copying DarwinStreamingServer to /usr/local/sbin/DarwinStreamingServer
copying PlaylistBroadcaster to /usr/local/bin/PlaylistBroadcaster
copying MP3Broadcaster to /usr/local/bin/MP3Broadcaster
copying qtpasswd to /usr/local/bin/qtpasswd
creating /usr/local/sbin/StreamingServerModules directory
copying createuserstreamingdir to /usr/local/bin/createuserstreamingdir
creating /etc/streaming directory
Generating a new prefs file at /etc/streaming/streamingserver.xml
INFO: Module Loaded...QTSSRefMovieModule [dynamic]
INFO: Module Loaded...QTSSHomeDirectoryModule [dynamic]
INFO: Module Loaded...QTSSFileModule [static]
INFO: Module Loaded...QTSSReflectorModule [static]
INFO: Module Loaded...QTSSRelayModule [static]
INFO: Module Loaded...QTSSAccessLogModule [static]
INFO: Module Loaded...QTSSFlowControlModule [static]
INFO: Module Loaded...QTSSPosixFileSysModule [static]
INFO: Module Loaded...QTSSAdminModule [static]
INFO: Module Loaded...QTSSMP3StreamingModule [static]
INFO: Module Loaded...QTSSAccessModule [static]
WARNING: No users file found at /etc/streaming/qtusers.
WARNING: No groups file found at /etc/streaming/qtgroups.
chown: invalid user: `qtss'
copying relayconfig.xml-Sample to /etc/streaming/relayconfig.xml-Sample
copying qtusers to /etc/streaming/qtusers
chown: invalid user: `qtss'
copying qtgroups to /etc/streaming/qtgroups
chown: invalid user: `qtss'
copying readme.txt to /var/streaming/readme.txt
copying 3rdPartyAcknowledgements.rtf to /var/streaming/3rdPartyAcknowledgements.rtf
creating /usr/local/movies directory
creating /var/streaming/playlists directory
copying sample_100kbit.mov into /usr/local/movies/sample_100kbit.mov
copying sample_300kbit.mov into /usr/local/movies/sample_300kbit.mov
copying sample_100kbit.mp4 into /usr/local/movies/sample_100kbit.mp4
copying sample_300kbit.mp4 into /usr/local/movies/sample_300kbit.mp4
copying sample.mp3 into /usr/local/movies/sample.mp3
copying sample_50kbit.3gp into /usr/local/movies/sample_50kbit.3gp
copying sample_h264_100kbit.mp4 into /usr/local/movies/sample_h264_100kbit.mp4
copying sample_h264_300kbit.mp4 into /usr/local/movies/sample_h264_300kbit.mp4
copying sample_h264_1mbit.mp4 into /usr/local/movies/sample_h264_1mbit.mp4
copying StreamingLoadTool to /usr/local/bin/StreamingLoadTool
copying streamingloadtool.conf to /etc/streaming/streamingloadtool.conf
copying streamingadminserver.pl into /usr/local/sbin/streamingadminserver.pl
copying Admin HTML to /var/streaming/AdminHtml directory
chown: invalid user: `qtss'
chown: invalid user: `qtss'
chown: invalid user: `qtss'
Launching streamingadminserver.pl
Cannot switch to group qtss
Installation Complete
Darwin Streaming Server Setup
Inorder to administer the Darwin
Streaming Server you must create anadministrator user [Note: The
administrator user name cannot containspaces, or single or double quote
characters, and cannot be more than255 characters long].
Please enter a new administrator user name: keensword007
Youmust also enter a password for
the administrator user [Note: Theadministrator password cannot contain
spaces, or quotes, either singleor double, and cannot be more than 80
characters long].
Please enter a new administrator Password:
Re-enter the new administrator password:
Adding userName keensword007
chown: invalid user: `qtss'
Setup Complete!
從提示資訊上看,應該是qtss使用者未能建立造成的,查看了一下Install指令碼,發現建立使用者的指令碼是這樣的:
if [ $INSTALL_OS = "Linux" ]; then
/usr/sbin/useradd -M qtss > /dev/null 2>&1
else
/usr/sbin/useradd qtss > /dev/null 2>&1
fi
但是useradd並沒有-M的命令列參數,應該為-m,將-M修改成-m後,再執行Install指令碼,安裝成功。此時服務已經啟動,可以使用如下命令確定服務是否已經啟動:
~/tmp/DarwinStreamingSrvrlinux-Linux$ ps aux | grep Darwin
root 10963 0.0 0.0 4368 456 ? Ss 21:23 0:00 /usr/local/sbin/DarwinStreamingServer
qtss 10964 0.0 0.0 38032 2456 ? Sl 21:23 0:00 /usr/local/sbin/DarwinStreamingServer
1000 11003 0.0 0.0 3004 760 pts/1 R+ 21:24 0:00 grep Darwin
如果希望機器啟動後自動運行流媒體伺服器,輸入如下命令:
~/tmp/DarwinStreamingSrvrlinux-Linux$ cd /etc/rc3.d
/etc/rc3.d$ sudo ln -s /usr/local/sbin/streamingadminserver.pl s20streamingserver
。如果要手動啟動服務,運行streamingadminserver.pl程式。
二、配置
Darwin Streaming Server採用了web管理員模式,可以在原生瀏覽器中輸入:http://127.0.0.1:1220 。然後輸入在安裝流媒體伺服器時設定的使用者名稱稱和密碼。
第一次登入時,接著會出現設定嚮導。首先是一個的MP3 廣播密碼設定對話方塊,在其“New Password”和“Re-enter New Password”輸入自己想設定的密碼。然後點擊“Next”按鈕繼續。
為了保證資料轉送的安全需要您可以在這裡鉤選“Secure Administration(SSL)”(安全管理),前提是您已經有了可用的SSL 憑證。一般可以不選, 所示。直接點擊“Next”按鈕繼續。
接下來要設定的是媒體檔案的存放主目錄, 其預設的目錄為“。這個目錄要記住,在伺服器中以後添加媒體檔案時就要加在這個目錄中。設定完畢點擊“Next”按鈕繼續。
最後設定預設傳輸連接埠,如果設定了“Streaming on
Port80”則此伺服器的訪問可以突破防火牆,但如果您在此伺服器上同時建有Apache
等佔用80連接埠的服務。則建議您不要設定此連接埠。這裡如果您沒有什麼特殊要求的話,使用預設配置即可,9 所示。直接點擊“Finish”按鈕。
自此流媒體伺服器的設定就告一段落,如果您要作進一步的設定,可以通過此管理頁面,在其左側點擊相應的選項,進行設定。也可以通過此對前面所做的設定變更。
三、線上播放
流媒體伺服器部署完畢後,我們就可以使用自己喜歡的播放器線上播放了。例如,在本機上開啟Movie Player, 在地址欄輸入:
rtsp://127.0.0.1/sample_100kbit.mp4
就可以看到一段QuickTime示範視頻。
成功版本ubuntu9.10/8.04
轉載時請註明出處和作者連絡方式
文章出處:http://blog.csdn.com/keensword007
作者連絡方式:琴劍 <keensword007 at sina dot com>
目前主流的流媒體伺服器有微軟的windows media
server、RealNetworks的Helixserver和蘋果公司的Darwin Streaming Server. 微軟的windows
media server只能在windows2000 server和windows 2003
server下使用,不在考慮之列。RealNetworks的Helixserver是一款跨平台的軟體,功能也很強大,但並非免費軟體,只能cut掉
了。蘋果公司的Darwin
StreamingServer是一款跨平台的開源流媒體伺服器軟體,由蘋果公司出品,其品質不用懷疑了,而且還免費。所以在架設流媒體伺服器時就選擇了
DarwinStreaming Server.
Darwin Streaming
Server使用標準的即時傳輸協議/即時資料流媒體協議(RTP/RTSP),通過互連網即時傳送媒體。Darwin Streaming Server
也能提供對傳送 H.264、MPEG-4 和3GPP 檔案的固有支援——因此,你可以在 Mac 和
Linux、Windows上的任何與標準相容的媒體播放器上執行你的內容,當然還包括手機和接收盒等各種相容標準的裝置。不僅如此,它還允許你使用
Icecast相容協議,通過 HTTP 傳送標準的 MP3 檔案到 MP3 用戶端。
一、軟體安裝
首先上http://dss.macosforge.org/下載原始碼,
當前最新版本為6.0.3,但我選擇了5.5.5版本,因為這個版本提供了針對linux的安裝指令碼。下載了
DarwinStreamingSrvr5.5.5-Linux.tar.gz檔案後,解壓縮,然後運行如下命令安裝:
~/tmp/DarwinStreamingSrvrlinux-Linux$ chmod +x Install
~/tmp/DarwinStreamingSrvrlinux-Linux$ sudo ./Install
[sudo] password for keensword007:
Installing Darwin Streaming Server
Checking for and Killing currently running Darwin Streaming Server
Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html
Removing previous versions of Darwin Streaming Server
Backing up previous config files
Inserting path to perl into scripts..
Creating unprivileged user to run the server = "qtss".
copying DarwinStreamingServer to /usr/local/sbin/DarwinStreamingServer
copying PlaylistBroadcaster to /usr/local/bin/PlaylistBroadcaster
copying MP3Broadcaster to /usr/local/bin/MP3Broadcaster
copying qtpasswd to /usr/local/bin/qtpasswd
creating /usr/local/sbin/StreamingServerModules directory
copying createuserstreamingdir to /usr/local/bin/createuserstreamingdir
creating /etc/streaming directory
Generating a new prefs file at /etc/streaming/streamingserver.xml
INFO: Module Loaded...QTSSRefMovieModule [dynamic]
INFO: Module Loaded...QTSSHomeDirectoryModule [dynamic]
INFO: Module Loaded...QTSSFileModule [static]
INFO: Module Loaded...QTSSReflectorModule [static]
INFO: Module Loaded...QTSSRelayModule [static]
INFO: Module Loaded...QTSSAccessLogModule [static]
INFO: Module Loaded...QTSSFlowControlModule [static]
INFO: Module Loaded...QTSSPosixFileSysModule [static]
INFO: Module Loaded...QTSSAdminModule [static]
INFO: Module Loaded...QTSSMP3StreamingModule [static]
INFO: Module Loaded...QTSSAccessModule [static]
WARNING: No users file found at /etc/streaming/qtusers.
WARNING: No groups file found at /etc/streaming/qtgroups.
chown: invalid user: `qtss'
copying relayconfig.xml-Sample to /etc/streaming/relayconfig.xml-Sample
copying qtusers to /etc/streaming/qtusers
chown: invalid user: `qtss'
copying qtgroups to /etc/streaming/qtgroups
chown: invalid user: `qtss'
copying readme.txt to /var/streaming/readme.txt
copying 3rdPartyAcknowledgements.rtf to /var/streaming/3rdPartyAcknowledgements.rtf
creating /usr/local/movies directory
creating /var/streaming/playlists directory
copying sample_100kbit.mov into /usr/local/movies/sample_100kbit.mov
copying sample_300kbit.mov into /usr/local/movies/sample_300kbit.mov
copying sample_100kbit.mp4 into /usr/local/movies/sample_100kbit.mp4
copying sample_300kbit.mp4 into /usr/local/movies/sample_300kbit.mp4
copying sample.mp3 into /usr/local/movies/sample.mp3
copying sample_50kbit.3gp into /usr/local/movies/sample_50kbit.3gp
copying sample_h264_100kbit.mp4 into /usr/local/movies/sample_h264_100kbit.mp4
copying sample_h264_300kbit.mp4 into /usr/local/movies/sample_h264_300kbit.mp4
copying sample_h264_1mbit.mp4 into /usr/local/movies/sample_h264_1mbit.mp4
copying StreamingLoadTool to /usr/local/bin/StreamingLoadTool
copying streamingloadtool.conf to /etc/streaming/streamingloadtool.conf
copying streamingadminserver.pl into /usr/local/sbin/streamingadminserver.pl
copying Admin HTML to /var/streaming/AdminHtml directory
chown: invalid user: `qtss'
chown: invalid user: `qtss'
chown: invalid user: `qtss'
Launching streamingadminserver.pl
Cannot switch to group qtss
Installation Complete
Darwin Streaming Server Setup
Inorder to administer the Darwin
Streaming Server you must create anadministrator user [Note: The
administrator user name cannot containspaces, or single or double quote
characters, and cannot be more than255 characters long].
Please enter a new administrator user name: keensword007
Youmust also enter a password for
the administrator user [Note: Theadministrator password cannot contain
spaces, or quotes, either singleor double, and cannot be more than 80
characters long].
Please enter a new administrator Password:
Re-enter the new administrator password:
Adding userName keensword007
chown: invalid user: `qtss'
Setup Complete!
從提示資訊上看,應該是qtss使用者未能建立造成的,查看了一下Install指令碼,發現建立使用者的指令碼是這樣的:
if [ $INSTALL_OS = "Linux" ]; then
/usr/sbin/useradd -M qtss > /dev/null 2>&1
else
/usr/sbin/useradd qtss > /dev/null 2>&1
fi
但是useradd並沒有-M的命令列參數,應該為-m,將-M修改成-m後,再執行Install指令碼,安裝成功。此時服務已經啟動,可以使用如下命令確定服務是否已經啟動:
~/tmp/DarwinStreamingSrvrlinux-Linux$ ps aux | grep Darwin
root 10963 0.0 0.0 4368 456 ? Ss 21:23 0:00 /usr/local/sbin/DarwinStreamingServer
qtss 10964 0.0 0.0 38032 2456 ? Sl 21:23 0:00 /usr/local/sbin/DarwinStreamingServer
1000 11003 0.0 0.0 3004 760 pts/1 R+ 21:24 0:00 grep Darwin
如果希望機器啟動後自動運行流媒體伺服器,輸入如下命令:
~/tmp/DarwinStreamingSrvrlinux-Linux$ cd /etc/rc3.d
/etc/rc3.d$ sudo ln -s /usr/local/sbin/streamingadminserver.pl s20streamingserver
。如果要手動啟動服務,運行streamingadminserver.pl程式。
二、配置
Darwin Streaming Server採用了web管理員模式,可以在原生瀏覽器中輸入:http://127.0.0.1:1220 。然後輸入在安裝流媒體伺服器時設定的使用者名稱稱和密碼。
第一次登入時,接著會出現設定嚮導。首先是一個的MP3 廣播密碼設定對話方塊,在其“New Password”和“Re-enter New Password”輸入自己想設定的密碼。然後點擊“Next”按鈕繼續。
為了保證資料轉送的安全需要您可以在這裡鉤選“Secure Administration(SSL)”(安全管理),前提是您已經有了可用的SSL 憑證。一般可以不選, 所示。直接點擊“Next”按鈕繼續。
接下來要設定的是媒體檔案的存放主目錄, 其預設的目錄為“。這個目錄要記住,在伺服器中以後添加媒體檔案時就要加在這個目錄中。設定完畢點擊“Next”按鈕繼續。
最後設定預設傳輸連接埠,如果設定了“Streaming on
Port80”則此伺服器的訪問可以突破防火牆,但如果您在此伺服器上同時建有Apache
等佔用80連接埠的服務。則建議您不要設定此連接埠。這裡如果您沒有什麼特殊要求的話,使用預設配置即可,9 所示。直接點擊“Finish”按鈕。
自此流媒體伺服器的設定就告一段落,如果您要作進一步的設定,可以通過此管理頁面,在其左側點擊相應的選項,進行設定。也可以通過此對前面所做的設定變更。
三、線上播放
流媒體伺服器部署完畢後,我們就可以使用自己喜歡的播放器線上播放了。例如,在本機上開啟Movie Player, 在地址欄輸入:
rtsp://127.0.0.1/sample_100kbit.mp4
就可以看到一段QuickTime示範視頻。