自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

Ubuntu下架設流媒體服務器的基本流程

系統(tǒng) Linux
本文介紹如何在Ubuntu下使用Darwin Streaming Server實現(xiàn)流媒體服務器搭建。主要分三大搭建步驟,這三部分別是軟件安裝,配置與在線播放。

目前主流的流媒體服務器有微軟的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使用標準的實時傳輸協(xié)議/實時流媒體協(xié)議(RTP/RTSP),通過互聯(lián)網實時傳送媒體。Darwin Streaming Server 也能提供對傳送 H.264、MPEG-4 和3GPP 文件的固有支持——因此,你可以在 Mac 和 Linux、Windows上的任何與標準兼容的媒體播放器上執(zhí)行你的內容,當然還包括手機和接收盒等各種兼容標準的設備。不僅如此,它還允許你使用 Icecast兼容協(xié)議,通過 HTTP 傳送標準的 MP3 文件到 MP3 客戶端。

一、軟件安裝

首先上http://dss.macosforge.org/下載源代碼,當前最新版本為6.0.3,但我選擇了5.5.5版本,因為這個版本提供了針對linux的安裝腳本。下載DarwinStreamingSrvr5.5.5-Linux.tar.gz文件后,解壓縮,然后運行如下命令安裝:

 

  1. ~/tmp/DarwinStreamingSrvrlinux-Linux$ chmod +x Install   
  2. ~/tmp/DarwinStreamingSrvrlinux-Linux$ sudo ./Install  
  3. [sudo] password for keensword007:   
  4. Installing Darwin Streaming Server  
  5. Checking for and Killing currently running Darwin Streaming Server  
  6. Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html  
  7. Warning: bad ps syntax, perhaps a bogus '-'? See http://procps.sf.net/faq.html  
  8. Removing previous versions of Darwin Streaming Server  
  9. Backing up previous config files  
  10. Inserting path to perl into scripts..  
  11. Creating unprivileged user to run the server = "qtss".  
  12. copying DarwinStreamingServer to /usr/local/sbin/DarwinStreamingServer  
  13. copying PlaylistBroadcaster to /usr/local/bin/PlaylistBroadcaster  
  14. copying MP3Broadcaster to /usr/local/bin/MP3Broadcaster  
  15. copying qtpasswd to /usr/local/bin/qtpasswd  
  16. creating /usr/local/sbin/StreamingServerModules directory  
  17. copying createuserstreamingdir to /usr/local/bin/createuserstreamingdir  
  18. creating /etc/streaming directory  
  19. Generating a new prefs file at /etc/streaming/streamingserver.xml  
  20. INFO: Module Loaded...QTSSRefMovieModule [dynamic]  
  21. INFO: Module Loaded...QTSSHomeDirectoryModule [dynamic]  
  22. INFO: Module Loaded...QTSSFileModule [static]  
  23. INFO: Module Loaded...QTSSReflectorModule [static]  
  24. INFO: Module Loaded...QTSSRelayModule [static]  
  25. INFO: Module Loaded...QTSSAccessLogModule [static]  
  26. INFO: Module Loaded...QTSSFlowControlModule [static]  
  27. INFO: Module Loaded...QTSSPosixFileSysModule [static]  
  28. INFO: Module Loaded...QTSSAdminModule [static]  
  29. INFO: Module Loaded...QTSSMP3StreamingModule [static]  
  30. INFO: Module Loaded...QTSSAccessModule [static]  
  31. WARNING: No users file found at /etc/streaming/qtusers.  
  32. WARNING: No groups file found at /etc/streaming/qtgroups.  
  33. chown: invalid user: `qtss'  
  34. copying relayconfig.xml-Sample to /etc/streaming/relayconfig.xml-Sample  
  35. copying qtusers to /etc/streaming/qtusers  
  36. chown: invalid user: `qtss'  
  37. copying qtgroups to /etc/streaming/qtgroups  
  38. chown: invalid user: `qtss'  
  39. copying readme.txt to /var/streaming/readme.txt  
  40. copying 3rdPartyAcknowledgements.rtf to /var/streaming/3rdPartyAcknowledgements.rtf  
  41. creating /usr/local/movies directory  
  42. creating /var/streaming/playlists directory  
  43. copying sample_100kbit.mov into /usr/local/movies/sample_100kbit.mov  
  44. copying sample_300kbit.mov into /usr/local/movies/sample_300kbit.mov  
  45. copying sample_100kbit.mp4 into /usr/local/movies/sample_100kbit.mp4  
  46. copying sample_300kbit.mp4 into /usr/local/movies/sample_300kbit.mp4  
  47. copying sample.mp3 into /usr/local/movies/sample.mp3  
  48. copying sample_50kbit.3gp into /usr/local/movies/sample_50kbit.3gp  
  49. copying sample_h264_100kbit.mp4 into /usr/local/movies/sample_h264_100kbit.mp4  
  50. copying sample_h264_300kbit.mp4 into /usr/local/movies/sample_h264_300kbit.mp4  
  51. copying sample_h264_1mbit.mp4 into /usr/local/movies/sample_h264_1mbit.mp4  
  52. copying StreamingLoadTool to /usr/local/bin/StreamingLoadTool  
  53. copying streamingloadtool.conf to /etc/streaming/streamingloadtool.conf  
  54. copying streamingadminserver.pl into /usr/local/sbin/streamingadminserver.pl  
  55. copying Admin HTML to /var/streaming/AdminHtml directory  
  56. chown: invalid user: `qtss'  
  57. chown: invalid user: `qtss'  
  58. chown: invalid user: `qtss'  
  59. Launching streamingadminserver.pl  
  60. Cannot switch to group qtss  
  61. Installation Complete  
  62. Darwin Streaming Server Setup  
  63. 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].  
  64. Please enter a new administrator user name: keensword007  
  65. 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].  
  66. Please enter a new administrator Password:   
  67. Re-enter the new administrator password:   
  68. Adding userName keensword007  
  69. chown: invalid user: `qtss'  
  70. Setup Complete! 

 

從提示信息上看,應該是qtss用戶未能創(chuàng)建造成的,查看了一下Install腳本,發(fā)現(xiàn)創(chuàng)建用戶的腳本是這樣的:

  1. if [ $INSTALL_OS = "Linux" ]; then  
  2. /usr/sbin/useradd -M qtss > /dev/null 2>&1  
  3. else  
  4. /usr/sbin/useradd qtss > /dev/null 2>&1  
  5. fi 

但是useradd并沒有-M的命令行參數(shù),應該為-m,將-M修改成-m后,再執(zhí)行Install腳本,安裝成功。此時服務已經啟動,可以使用如下命令確定服務是否已經啟動:

 

  1. ~/tmp/DarwinStreamingSrvrlinux-Linux$ ps aux | grep Darwin  
  2. root 10963 0.0 0.0 4368 456 ? Ss 21:23 0:00 /usr/local/sbin/DarwinStreamingServer  
  3. qtss 10964 0.0 0.0 38032 2456 ? Sl 21:23 0:00 /usr/local/sbin/DarwinStreamingServer  
  4. 1000 11003 0.0 0.0 3004 760 pts/1 R+ 21:24 0:00 grep Darwin 

 

如果希望機器啟動后自動運行流媒體服務器,輸入如下命令:

 

  1. ~/tmp/DarwinStreamingSrvrlinux-Linux$ cd /etc/rc3.d  
  2. /etc/rc3.d$ sudo ln -s /usr/local/sbin/streamingadminserver.pl s20streamingserver 

 

如果要手動啟動服務,運行streamingadminserver.pl程序。

二、配置

Darwin Streaming Server采用了web管理模式,可以在本機的瀏覽器中輸入:http://127.0.0.1:1220 。然后輸入在安裝流媒體服務器時設置的用戶名稱和密碼。

第一次登錄時,接著會出現(xiàn)設置向導。首先是一個MP3 廣播密碼設置對話框,在其“New Password”和“Re-enter New Password”輸入自己想設置的密碼。然后點擊“Next”按鈕繼續(xù)。

為了保證數(shù)據(jù)傳輸?shù)陌踩枰梢栽谶@里鉤選“Secure Administration(SSL)”(安全管理),前提是您已經有了可用的SSL 證書。一般可以不選。直接點擊“Next”按鈕繼續(xù)。

接下來要設置的是媒體文件的存放主目錄。這個目錄要記住,在服務器中以后添加媒體文件時就要加在這個目錄中。設置完畢點擊“Next”按鈕繼續(xù)。

最后設置默認傳輸端口,如果設置了“Streaming on Port80”則此服務器的訪問可以突破防火墻,但如果您在此服務器上同時建有Apache 等占用80端口的服務。則建議您不要設置此端口。這里如果您沒有什么特殊要求的話,使用缺省配置即可。直接點擊“Finish”按鈕。

自此流媒體服務器的設置就告一段落,如果您要作進一步的設置,可以通過此管理頁面,在其左側點擊相應的選項,進行設置。也可以通過此對前面所做的設置進行更改。

三、在線播放

流媒體服務器部署完畢后,我們就可以使用自己喜歡的播放器在線播放了。例如,在本機上打開Movie Player, 在地址欄輸入:

 

  1. rtsp://127.0.0.1/sample_100kbit.mp4 

就可以看到一段QuickTime演示視頻。

【編輯推薦】

  1. Server 2008中流媒體服務器的部署與應用
  2. 詳解gnump3d架設流媒體服務器于Linux環(huán)境之中
  3. 喜歡Ubuntu 10.04的十大理由
  4. 一個Ubuntu體驗者的工作使用手記
  5. Ubuntu不得不分享的24條使用經驗
責任編輯:張浩 來源: 博客園
相關推薦

2010-01-04 13:26:51

Ubuntu安裝

2010-05-06 14:15:02

流媒體服務器負載均衡

2009-12-22 16:59:17

Linux環(huán)境

2023-03-12 09:22:58

2022-01-08 19:18:57

OBSLinux實時流媒體服務器

2023-10-12 19:46:26

Nginx服務器

2011-03-11 10:39:04

2010-05-04 14:10:00

Media Servi

2009-06-11 11:13:01

LinuxWeb服務器

2009-02-10 15:38:00

ApacheLinuxWeb服務器

2011-07-14 14:01:29

網絡服務器配置服務器

2010-05-06 14:30:29

流媒體服務器負載均衡

2010-05-18 17:50:57

Subversion服

2010-05-31 10:09:32

2012-02-27 14:09:39

媒體服務器Ubuntu

2010-04-30 17:30:21

Server 2008流媒體

2010-05-31 19:17:38

2010-05-31 19:07:41

SVN服務器

2009-11-20 15:02:06

2011-08-08 13:52:32

服務器
點贊
收藏

51CTO技術棧公眾號