總結有福利
C++實現RTSP/RTP流媒體服務器,同時支持linux和windows編譯環境。使用VLC客戶端測試通過。實現RTSP的OPTIONS、DESCRIBE、SETUP、PLAY、PAUSE、TEARDOWN,實現SDP生成,實現RTP打包,實現TS文件解析。有相應的源碼分析文檔。
新增功能
一別名
別名主要是替換URL中真實的文件名和路徑。使用別名,Helix Universal Server管理員可以偽裝真實的資源在發布的URL中,這樣做可以使URL更友好,更短。
二內容緩存
內容緩存可以使兩臺以上的Helix Universal Server傳輸多媒體文件,這樣做有兩個好處:
第一:緩存改進了客戶播放內容的品質
第二:內容緩存節約了傳送成本,直接將內容緩存至離客戶最近的網絡。
三定制日志
定制日志是系統生成報告的一個靈活功能。這里使用了模板功能,它定義了哪些信息被捕捉,什么時候去捕捉。你可以使用默認的模板也可以創建你自己的模板。
四模仿直播傳輸代理 SLTA (Simulated Live Transfer Agent )
SLTA可以像直播那樣傳輸一個流媒體片度,它使RealNetworks下一代的工具。SLTA像上一代技術G2SLTA一樣支持很多的流媒體格式,它提供了一種發布流媒體的更強勁的方式,像一臺直播機一樣,將一個流媒體發布到接受者那里。
五RTSP 緩存指示
在默認的情況下,一個代理可能緩存所有的點播內容和直播內容在一臺Helix Universal Server上。但是可能你不想緩存其中的一些內容。RTSP緩存指示可以告訴那些緩存的 Helix Universal Server 應該緩存什么內容,不應該緩存什么內容。RTSP所賦予你更大的靈活性。
六冗余服務
本功能可以使你為內容發布添加等級。默認的情況下,RealOne Player在中斷后,將向Helix Universal Server重新申請連接。不論如何,你可以指定另外一個服務器來讓RealOne Player連接。
七Windows Media 流媒體支持
Helix Universal Server可以使用MMS協議或者HTTP協議向Windows Media Player傳輸Windows Media格式的流媒體。它也可以通過HTTP方式與Windows Media Encoder連接,允許傳輸Windows Media 的廣播到其他的Helix Unviersal Servers.因此,你可以使用一個統一的流媒體網絡來發布多種格式的流媒體,例如:RealMedia,Windows Media 以及QuickTime。
八MPEG 流媒體支持
Helix Universal Server可以發布MPEG-1,MPEG-2,MP3,以及MPEG-4格式的內容。詳細內容參見“MPEG音頻與視頻”
九智能流
Helix Universal Serve可以幫助在保證帶寬的情況下進行Real音頻或者Real視頻的廣播。使用智能流你可以先從服務器端發送測試包到接受者那里,不管客戶端使用什么樣的流媒體碼率,在智能流的控制下,只有一個適合客戶端的碼率可以被接受。
十RealOne Player 的統計
新的客戶統計狀態類型4,可以更好的返回RealOne Player的信息,包含每一個流信息包,帶寬等信息,以便可以更好的根據返回結果使用TurboPlay功能.
架設網絡直播電視

支持多種流媒體文件:
音頻文件:RealAudio.Wav.Au.MPEG-1.MPEG-2.MP3
視頻文件:RealVideo.AVI.QuickTime.
其他類型:RealPix.RealText.GIF.JPEG.SMIL.Real G2 with Flash
等等.
但Helix SERver不支持所有的流媒體文件,所以還要一些軟件支持,因此Helix Universal Platform提供了一功能強大的工具---Helix Producer.它可以將Helix Server 不支持的流媒體文件轉換成它支持的流媒體文件.
Helix Server提供了多種類型服務:
1).點播(On-Demand)
任何時候,用戶都可以通過單擊Helix Server管理員公布的web連接,向Helix Server提出播放流媒體文件的要求,服務器再按照用戶的要求,以"流"的方式不斷地把數據傳給用戶.用戶就可以像播放本地流媒體文件一樣,隨意控制文件播放.
2).直播(Live)
網絡直播和現實生活中的電視直播方式是類似的.直播的過程大致如下:
1.在現場使用攝像機,話筒等媒體采集工具采集實況信號.
2.用數/模轉換設備如視頻采集卡將采集的模擬信號轉換成數字信號.
3.數字信號經壓縮編碼軟件如Helix Producer轉換成流媒體數據流,并送往Helix Server/
4.用戶單擊web連接時,Helix Server將接收到的數據流發送給用戶.和點播不同的是,用戶收看的是實時信號,用戶不能控制快進,暫停.
3).模擬直播(Simulated Live)
模擬直播的過程如下:
1.流媒體文件儲存在服務器或其他PC機上.
2.利用Helix Server提供的輔助工具"SLTA",將流媒體文件以數據流的形式發送給Helix Server.
3.用戶單擊wen連接時,Helix Server將接收到的數據流發送給用戶.用戶看到的是事先制作好的流媒體文件,就像是日常生活中通過電視收看故事片一樣.
二、Linux環境下安裝配置
HelixServer安裝[root@localhost data]# ls
DistributedLicensing.lic HelixServer ISP-Hosting.lic setup.tar.gz
[root@localhost data]# tar -zxvf setup.tar.gz #解壓HelixServer Unlimited 11
helix-server-retail-11.01-rhel4-setup.bin
[root@localhost data]# ls
DistributedLicensing.lic helix-server-retail-11.01-rhel4-setup.bin setup.tar.gz
HelixServer ISP-Hosting.lic
[root@localhost data]# chmod 700 helix-server-retail-11.01-rhel4-setup.bin # 添加執行權限
[root@localhost data]# ./helix-server-retail-11.01-rhel4-setup.bin #安裝HelixServer Unlimited 11
Extracting files for Helix installation........................
Welcome to the Helix Server 11.0 (11.0.1.1884) Setup for UNIX
Setup will help you get Helix Server running on your computer.
Press [Enter] to continue...
If a Helix Server license key file has been sent to you,
please enter its directory path below. If you have not
received a Helix Server license key file, then this server
WILL NOT OPERATE until a license key file is placed in
the servers License directory. Please obtain a free
Basic Helix Server license or purchase a commercial license
from our website at http://www.real.com/. If you need
further assistance, please visit our on-line support area
at http://service.real.com/.
License Key File: []: #添加許可證文件 此步先確認,等HelixServer安裝完畢之后再添加文件。
Installation and use of Helix Server requires
acceptance of the following terms and conditions:
Press [Enter] to display the license text... #列出許可協議
REALNETWORKS, INC.
END USER LICENSE AGREEMENT
HELIX(tm) BASIC SERVER FROM
REALNETWORKS(r)
redisTRIBUTION NOT PERMITTED
Software License for Helix(tm) Basic
Server from RealNetworks(r)
IMPORTANT -- READ CAREFULLY: This
RealNetworks License Agreement ("License
Agreement") is a legal agreement between
you (either an individual or an entity)
and RealNetworks, Inc. and its suppliers
and licensors (collectively "RN") for
RNs Helix Basic Server, which includes
computer software and associated media
and printed materials, whether provided
in physical form or received on-line in
electronic form ("Software"). You may
install only ONE copy of the Software.
By choosing "Accept," installing,
copying or otherwise using the Software,
you agree to be bound by the terms of
this License Agreement. If you do not
agree to the terms of this License
--More--(4%)
Choose "Accept" to accept the terms of this
license agreement and continue with Helix Server setup.
If you do not accept these terms, enter "No"
and installation of Helix Server will be cancelled.
I accept the above license: [Accept]: #回車,接受許可協議
Enter the complete path to the directory where you want
Helix Server to be installed. You must specify the full
pathname of the directory and have write privileges to
the chosen directory.
Directory: [/data]: /data/HelixServer #輸入安裝目錄
Please enter a username and password that you will use
to access the web-based Helix Server Administrator and monitor.
Username []: admin #輸入web登錄管理員名稱
Password []: # 輸入web登錄管理員密碼
Confirm Password []: #再次輸入登錄管理員密碼
Please enter a port on which Helix Server will listen for
RTSP connections. These connections have URLs that begin
with "rtsp://"
Port [554]: #設置RTSP連接端口,保持默認。
Please enter a port on which Helix Server will listen for
HTTP connections. These connections have URLs that begin
with "http://"
Port [80]: 8088 #設置HTTP連接端口,為避免和Apache沖突,建議更改。
Please enter a port on which Helix Server will listen for
MMS connections. These connections have URLs that begin
with "mms://"
Port [1755]: #設置MMS連接端口,保持默認。
Helix Server will listen for Administrator requests on the
port shown. This port has been initialized to a random value
for security. Please verify now that this pre-assigned port
will not interfere with ports already in use on your system;
you can change it if necessary.
Port [27465]: 10000 #設置HelixServer遠程管理端口,建議更改以便記憶。
You have selected the following Helix Server configuration:
Admin User/Password: admin/****
Encoder User/Password: admin/****
Monitor Password: ****
RTSP Port: 554
HTTP Port: 8088
MMS Port: 1755
Admin Port: 10000
Destination: /data/HelixServer
Enter [F]inish to begin copying files, or [P]revious to go
back to the previous prompts: [F]: #如果前面配置沒有問題,按"Enter"鍵復制文件,若想修改前面配置參數,按"P"鍵返回修改。
Copying Helix Server files....
Helix Server installation is complete.
If at any time you should require technical
assistance, please visit our on-line support area
at http://service.real.com/.
Cleaning up installation files...
Done.
[root@localhost data]#
[root@localhost data]# cp *.lic /data/HelixServer/License/ #復制許可證文件
HelixServer 漢化包
[root@localhost HelixAdministrator_CHS]# cp -rf * /data/HelixServer/HelixAdministrator/ #復制漢化包文件到HelixAdministrator目錄中
[root@localhost data]# cd HelixServer/
[root@localhost HelixServer]# ls
adm_b_db cdi_b_db default.cfg enc_w_db Lib master.cfg Secure
Bin Commerce enc_b_db HelixAdministrator License Plugins slta.cfg
Cache Content enc_r_db helixserver.my Logs rmserver.cfg
HelixServer 服務啟用和停用
[root@localhost HelixServer]# ./Bin/rmserver rmserver.cfg & #后臺啟動HelixServer
[1] 6868
[root@localhost HelixServer]# Helix Server (c) 1995-2005 RealNetworks, Inc. All rights reserved.
Version: Helix Server 11.0 (11.0.1.1884) (Build 74277/5688)
Platform: linux-rhel4-i686
Using Config File: rmserver.cfg
Linux kernel version 2.6.9-78.EL detected [glibc 2.3.4/NPTL 2.3.4]
Starting PID 6869 TID 3086890688/6869, procnum 0 (controller)
Creating Server Space...
Server has allocated 256 megabytes of memory
Starting TID 3084909440/6871, procnum 1 (timer)
Calibrating timers...
Interval timer enabled (10ms resolution).
Starting TID 3082812288/6872, procnum 2 (core)
Starting Helix Server 11.0 Core...
1 CPU Detected...
Testing File Descriptors...
Setting per-process descriptor capacity to 672(1003), 21...
Testing Mutex...(421.50 ops/usec)
Testing AtomicOps...(61.73 ops/usec)
I: Loading Plugins from /data/HelixServer/Plugins...
I: slicensepln.so 0xb50ec0 RealNetworks Licensing Plugin
I: svrbascauth.so 0x3b9cc0 RealNetworks Basic Authenticator
I: rn5auth.so 0x11dc40 RealNetworks RN5 Authenticator
I: rn5auth.so 0x11dc40 RealNetworks Digest Authenticator
I: rncache.so 0x43c880 RealNetworks Cache Plugin
I: redbcplin.so 0x6f10a0 RealNetworks Broadcast Redundancy Plugin
I: encoplin.so 0x13f8f0 RealNetworks Encoder Broadcast Plugin
I: swfformat.so 0x1ffc30 RealNetworks macromedia Flash 4 File Format Plugin
I: snmpplin.so 0x23fe00 RealNetworks Snmp Plugin (Version 11.0.0.0)
I: miiplin.so 0x2e00e0 RealNetworks Media Import Plugin
I: xmlcfg.so 0x9fa780 RealNetworks XML Configuration Plugin
I: audplin.so 0xce14c0 RealNetworks G.7xx Renderer Plugin
I: audplin.so 0xce14c0 Helix PCM Audio Renderer Plugin
I: audplin.so 0xce14c0 RealNetworks AU File Format Plugin
I: audplin.so 0xce14c0 Helix WAVE File Format Plugin
I: audplin.so 0xce14c0 Helix AIFF File Format Plugin
I: audplin.so 0xce14c0 RealNetworks DVI4 Renderer Plugin
I: meiffpln.so 0x35f3b0 RealNetworks Media Export File Format Plugin
I: smonplin.so 0x91d820 RealNetworks System Monitor
I: ramplin.so 0x36df70 RealNetworks Ramgen File System
I: ppvmsql.so 0x4fea10 RealNetworks Mini SQL PPV Database Plugin
I: wmmcastpln.so 0x3933b0 RealNetworks Windows Media Multicast Plugin
I: allow.so 0x3a6d00 RealNetworks Basic Allowance Plugin
I: mp3fformat.so 0x3c8ea0 RealNetworks MP3 File Format Plugin
I: adminfs.so 0x872920 RealNetworks Admin File System
I: avifformat.so 0xad7050 RealNetworks AVI File Format Plugin
I: imgfformat.so 0x45f150 Helix JPEG File Format Plugin
I: imgfformat.so 0x45f150 Helix GIF File Format Plugin
I: imgfformat.so 0x45f150 Helix PNG File Format Plugin
I: imgfformat.so 0x45f150 Helix RealPix Format Plugin
I: imgfformat.so 0x45f150 Helix RealPix JPEG File Format Codec Plugin
I: imgfformat.so 0x45f150 Helix RealPix GIF File Format Codec Plugin
I: imgfformat.so 0x45f150 Helix RealPix PNG File Format Codec Plugin
I: imgfformat.so 0x45f150 Helix WBMP File Format Plugin
I: wmsrcpln.so 0x3e4000 RealNetworks Windows Media Live Broadcast Source Plugin
I: smlfformat.so 0xaf3330 RealNetworks SMIL File Format Plugin
I: asxplin.so 0x375f60 RealNetworks Asxgen File System
I: cdistpln.so 0x6cbec0 RealNetworks Content Distribution Plugin
I: isphoster.so 0xd430c0 RealNetworks ISP hosting plugin
I: shelfsys.so 0xc28e60 RealNetworks Shell File System
I: mp4fformat.so 0x535d30 RealNetworks Mpeg4 File Format Plugin
I: encfs.so 0x405e10 RealNetworks Encoder Administration File System Plugin
I: ppvbasic.so 0x95cfd0 RealNetworks FlatFile Database Plugin
I: asfwmpln.so 0xc4ecd0 RealNetworks Active Stream Format Version 1 Plugin
I: dbmgr.so 0x40d670 RealNetworks Database Manager
I: ppvallow.so 0x422980 RealNetworks Pay Per View Allowance Plugin
I: pplyplin.so 0xb78160 RealNetworks Scalable Multicast Plugin
I: authmgr.so 0x9c2bf0 Helix Authentication Manager
I: meiplin.so 0x58a400 RealNetworks Media Export Interface Plugin
I: asncfsys.so 0x5a8490 RealNetworks Network Optimized File System
I: qtbcplin.so 0x5bdde0 RealNetworks QuickTime Live Broadcast Plugin
I: smplfsys.so 0x69fcb0 RealNetworks Local File System
I: plusplin.so 0xd95070 RealNetworks PlusURL File Format Plugin
I: hxsdp.so 0xde0180 RealNetworks SDP Stream Description Plugin
I: sdpgenfsys.so 0xe5cac0 RealNetworks Dynamic SDP Generation Plugin
I: bdstplin.so 0x70cc50 RealNetworks Broadcast Distribution Plugin
I: tmplgpln.so 0xd4d3b0 RealNetworks Custom Logging Plugin
I: rmfformat.so 0x7449c0 RealNetworks RealMedia File Format Plugin
I: brcvplin.so 0x7d8910 RealNetworks Broadcast Reception Plugin
I: cdadplin.so 0xdc6000 RealNetworks Content Distribution Advise Plugin
I: tagfsys.so 0xe71730 RealNetworks XMLTagFileSystem
I: rtfformat.so 0x83ffe0 Helix RealText File Format Plugin
I: archplin.so 0xa25500 RealNetworks Live Archiver Plugin
I: httpfsys.so 0x8bed90 RealNetworks HTTP File System with CHTTP Support
I: httpfsys.so 0x8bed90 RealNetworks RFC 2397 Data Scheme File System
I: vsrcplin.so 0x96ed10 RealNetworks View Source Tag Replacement Plugin
I: vsrcplin.so 0x96ed10 RealNetworks View Source Allowance Plugin
I: vsrcplin.so 0x96ed10 RealNetworks View Source File System
Starting TID 3080715136/6873, procnum 3 (rmplug)
Loading Helix Server License Files...
Starting TID 3078617984/6874, procnum 4 (rmplug)
Starting TID 3076520832/6875, procnum 5 (rmplug)
Starting TID 3074423680/6876, procnum 6 (rmplug)
Starting TID 3072326528/6877, procnum 7 (rmplug)
Starting TID 3070229376/6878, procnum 8 (rmplug)
Starting TID 3068132224/6879, procnum 9 (rmplug)
Starting TID 3066035072/6880, procnum 10 (rmplug)
Starting TID 3063937920/6881, procnum 11 (rmplug)
Starting TID 3061840768/6882, procnum 12 (rmplug)
Starting TID 3059743616/6883, procnum 13 (rmplug)
Starting TID 3057646464/6884, procnum 14 (rmplug)
Starting TID 3055549312/6885, procnum 15 (rmplug)
Starting TID 3053452160/6886, procnum 16 (rmplug)
Starting TID 3051355008/6887, procnum 17 (rmplug)
Starting TID 3049257856/6888, procnum 18 (rmplug)
Starting TID 3047160704/6889, procnum 19 (rmplug)
Starting TID 3045063552/6890, procnum 20 (memreap)
Starting TID 3042966400/6891, procnum 21 (streamer)
[root@localhost HelixServer]# ps -ef|grep rmserver #查看當前rmserver進程
root 6868 6309 0 10:37 pts/1 00:00:00 ./Bin/rmserver rmserver.cfg
root 6869 6868 6 10:37 ? 00:00:00 ./Bin/rmserver rmserver.cfg
root 6870 6868 0 10:37 ? 00:00:00 ./Bin/rmserver rmserver.cfg
root 6893 6309 0 10:37 pts/1 00:00:00 grep rmserver
[root@localhost HelixServer]# cat ./Logs/rmserver.pid #查看 HelixServer進程號
6984
[root@localhost HelixServer]# kill 6984 #停止HelixServer服務
訪問HelixServer管理界面在Web瀏覽器中輸入http://HelixServer 域名或IP:端口號/admin/index.html,如http://192.168.1.90:10000/admin/index.html將彈出"用戶驗證"對話框,在該對話框中輸入HelixServer管理員名稱和密 碼。

用戶驗證通過后即可進入到HelixServer服務器管理界面


IP地址綁定:當HelixServer被安裝在一個擁有多個IP地址的系統上,需要指定服務器監 聽的IP。

加載點配置:加載點出現在Helix Server的每一個連接中.它是一個到文件實際存放位置的訪問指向.下面的頁面中將顯示所有加載點以及它們所對應的實際存放路徑.

服務器連接控制:當服務器的帶寬有限時,可以根據需要限制服務器的同時連接數量,以保留一定帶寬,確保用戶的連接速度。如果連接數量過大,后面 用戶發起的連接將會失敗,并會收到服務器返回錯誤信信息。
最大連接數"0"表示不限制連接

訪問控制:通過在服務器中建立訪問控制規則,能有效的控制客戶端在訪問服務器時,允許或拒絕來自某一IP或某臺機器對某個端口的訪問請求。

服務器監控:通過服務器監可以動態的顯示服務器的當前性能,及連接數量。

總結;
通過這個RTMP流的優勢是,可以避免視頻文件被瀏覽器通過http方式進行下載
所有流服務器存儲媒體文件的方式都是將文件放在指定目錄下面,且磁盤系統絕大部分I/O都是讀操作,寫操作只會發生在上傳和更新媒體文件過程中。對于這種I/O操作特性,建議選擇RAID 5用于中小規模的視頻點播服務。這樣可以提供比獨立磁盤更高的數據安全性和讀取速度,同時將成本控制在較小的范圍內。實際可用容量為(N-1)個磁盤。
文檔 +問題 +交流 +學習+資料視頻+源碼分享 可以后臺私信‘資料’
內容包括:C/C++,Linux,Nginx,golang,ZeroMQ,MySQL,Redis,fastdfs,MongoDB,ZK,ffmpeg,流媒體, 音視頻,CDN,P2P,K8S,Docker,Golang,TCP/IP,協程,嵌入式,ARM,DPDK等等。。。