陳文進臺灣大學:資訊工程學研究所邱盈創Chiou, Ying-ChuangYing-ChuangChiou2007-11-262018-07-052007-11-262018-07-052007http://ntur.lib.ntu.edu.tw//handle/246246/53638由於硬體的限制,使得線上串流服務單一伺服器有其服務人數的上限,所以往往 需要由許多機器來做負載的分散,提高單一時間能服務的人數能夠滿足使用者的 人數。而本篇論文基於RTSP的標準實做一負載分散伺服器,透過RTSP中所定義 的“303 See Other”來做導向,希望提供一個結構鬆散的伺服器群來提高視訊串流 服務的延展性(scalability),並透過伺服器狀態監控(monitor)來增加系統服務的可 靠性,同時在有聰明的客戶端程式的支援下,也可以結合不同類型的伺服器來組 成這個結構鬆散的伺服器群。 此外我們也提供了在Darwin Streaming Server中的MPEG-2 TS支援,讓目前 內容供應商擁有的影音資源可以直接經由Darwin Streaming Server來進行隨選視 訊串流的服務,而不需要經過繁雜的轉檔程序,讓使用者與系統供應商各蒙其 利。Because the limitations of hardware, a streaming server has the limitation of its service. In order to provide the scalability, the system provider must build a group of large servers to serve the customers. This thesis provides the implementation of a load distributed server based on RTSP. In this system, the master server uses the “303 See Other” response in RTSP to redirect the clients. Using the mechanism, we provide a loose architecture for scalable. We also add a monitoring mechanism to make the system reliable. If this system collaborates with smart clients, it can also group the variant servers as our loose architecture of servers. Additionally we make the Darwin Streaming Server can process the MPEG-2 TS file and streaming it. The benefit is to accelerate the clip online. Because the the multimedia owned by content providers are MPEG-2 TS, the system provider can immediately use those files without transcoding.論文口試委員審定書 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . i 誌謝 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ii 中文摘要 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iii 英文摘要 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iv 目錄 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . v 表目錄 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii 圖目錄 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . viii 1 簡介 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 2 相關研究 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 2.1 Darwin Streaming Server . . . . . . . . . . . . . . . . . . . . . . . . . 2 2.1.1 Darwin Streaming Server的系統架構 . . . . . . . . . . . . . . 2 2.1.2 Core Server . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 2.1.3 Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2.1.4 QTSSAdminModule . . . . . . . . . . . . . . . . . . . . . . . 5 2.2 RTSP、RTCP、RTP、以及SDP . . . . . . . . . . . . . . . . . . . . 5 2.2.1 RTSP(Real Time Streaming Protocol) . . . . . . . . . . . . . 6 2.2.2 RTP(Real-time Transport Protocol) . . . . . . . . . . . . . . 7 2.2.3 RTCP(Real Time Control Protocol) . . . . . . . . . . . . . . 7 2.2.4 SDP(Session Description Protocol) . . . . . . . . . . . . . . . 8 2.3 MPEG-2 TS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 3 系統架構 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 3.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 3.1.1 Redirecting System . . . . . . . . . . . . . . . . . . . . . . . . 10 3.1.2 MPEG-2 TS Support . . . . . . . . . . . . . . . . . . . . . . . 10 3.2 Redirecting System . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 3.2.1 Redirecting Procedure . . . . . . . . . . . . . . . . . . . . . . 12 3.2.2 Server Status Reporter . . . . . . . . . . . . . . . . . . . . . . 13 3.2.3 Server Status Monitor Task . . . . . . . . . . . . . . . . . . . 13 3.2.4 Target Server Selection . . . . . . . . . . . . . . . . . . . . . . 14 3.3 MPEG-2 TS Support . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 3.3.1 Open File . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 3.3.2 Send the Packets . . . . . . . . . . . . . . . . . . . . . . . . . 16 4 結論與未來展望 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 結論 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 4.1 未來展望 4.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 參考文獻 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 附錄一:PostgreSQL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201568168 bytesapplication/pdfen-US達爾文串流伺服器串流伺服器RTSPMPEG-2 TSDarwin Streaming ServerDSSStreaming Server基於RTSP之負載分散伺服器及達爾文伺服器之MPEG-2 TS支援A Load Distributed Server based on RTSP and The MPEG-2 TS Support in DSSthesishttp://ntur.lib.ntu.edu.tw/bitstream/246246/53638/1/ntu-96-R94922151-1.pdf