RTSP服務端。通過RTSP協議發送H264和AAC文件。

運行截圖

RtspService.exe 命令行使用幫助

Syntax: RtspSerivce -bindip <string | integer> -bindport <integer> -videofile <string> -audiofile <string>
-bindip <string | integer>  Specify the bind ip address.
                                Can be input string or integer.
                                If the input is string,
                                it will be used to bind the IP address.
                                If the input is integer,
                                the IP address of the n-th NIC will be bound,
                                where n is the value of the input.
                                Dafelut use the 1th NIC's ip address.
-bindport <integer>         Specify the bind port.
                                Dafelut bind port is 554.
-videofile <string>         Specify the video file path.
                                Dafelut file path is "oh_yeah.h264".
-audiofile <string>         Specify the audio file path.
                                Dafelut file path is "oh_yeah.aac".

Example:

RtspSerivce -bindip 192.168.0.1 -bindport 554 -videofile c:\xx\xx.h264 -audiofile c:\xx\xx.aac

===================================
客戶端播放地址:rtsp://xxx.xxx.xxx.xxx/live
注意最後需要live的會話名稱。
 

===================================
下載地址:http://down.51cto.com/data/171024

===================================
最後更新:

20110107
所有核心代碼均可以再上述開源項目代碼中找到。因此,此版本不在公開提供源碼。確實需要源碼作爲學習用途,可以贊助一點支持費用另行提供。贊助費¥20.00元(是¥20.00,不是$20.00),你的支持,是我持續的動力。

淘寶地址:
http://item.taobao.com/item.htm?id=8717871014&ad_id=&am_id=&cm_id=&pm_id=

因爲前段時間撰寫的ParseSDPInfo,和修改新版的TsMux的關係,完成了AAC的解析和PTS同步部分的代碼(基本核心代碼也是從VLC和Live555以及FFMpeg中參考、剝離)。準備將這部分代碼植入到RtspService,加入支持AAC文件,把RtspService做成一個獨立的服務端軟件,而不是一個代碼示例。
至於RtspClient部分,我自己保留用來做測試,同樣不再開放源碼。


未來的計劃是:設計一個對外透明的遠程控制協議,用於控制RtspService加入、刪除、管理數據文件和數據流,實現一套完整的流媒體服務端軟件。會加入更多格式的數據源解析,例如TS、MP4等等。沒準還考慮支持其他種類的數據源,比如網絡數據源、攝像頭、採集設備等...
僅僅是計劃...

20101126
修正RTSP協議中,錯誤的生成了profile-level-id和sprop-parameter-sets信息的問題。

20100701
實現Service部分,發送H264文件的Demo工程樣例。AAC文件發送支持尚未加入。而且H264文件支持部分也不完善,還有很多問題。僅供參考。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章