您的位置首页  散文杂谈

永久免费linux服务器(windows视频点播服务器)居然可以这样

实现RTSP的OPTIONS、DESCRIBE、SETUP、PLAY、PAUSE、TEARDOWN,实现SDP生成,实现RTP打包,实现TS文件

永久免费linux服务器(windows视频点播服务器)居然可以这样

 

总结有福利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 keyfile has been sent to you,   please enter its directorypath below. If you have not   received a Helix

Server license keyfile, then this server   WILL NOT OPERATE until a license keyfileis placed in   the servers License directory.  Please obtain a free   Basic Helix

Server license or purchase a commercial license   from our website athttp://www.real.com/.  If you need   further assistance, please visit our

on-line support area   athttp://service.real.com/.   License KeyFile: []:   #添加许可证文件 此步先确认,等HelixServer安装完毕之后再添加文件。

  Installation anduseof Helix Server requires   acceptance of the following terms and conditions:   Press [Enter]

to display the license text...  #列出许可协议   REALNETWORKS, INC.   ENDUSER LICENSE AGREEMENT   HELIX(tm) BASIC

SERVERFROM   REALNETWORKS(r)   REDISTRIBUTION NOT PERMITTED   Software License for Helix(tm) Basic   

Serverfrom 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   inphysicalformor received on-line in

  electronic form ("Software").  You may   installonly ONE copy of the Software.   By choosing "Accept,"

installing,   copying or otherwise using the Software,   you agree to be boundby the terms of   this License Agreement. 

If you donot   agree to the terms of this License   --More--(4%)Choose"Accept"toaccept the terms of this   license agreement

and continue with Helix Server setup.   If you donotaccept these terms, enter "No"and installation of

Helix Server will be cancelled.   I accept the above license: [Accept]:     #回车,接受许可协议   Enter the complete

pathto the directorywhere you want   Helix Serverto be installed.  You must specify the full   pathname

of the directoryand have write privilegesto   the chosen directory.   Directory:  [/data]: /data/HelixServer   

#输入安装目录   Please enter a username andpassword that you will usetoaccess the web-based Helix Server Administrator

and monitor.   Username []: admin#输入web登录管理员名称Password []:                   # 输入web登录管理员密码ConfirmPassword

[]:       #再次输入登录管理员密码   Please enter a port on which Helix Server will listen for   RTSP connections.  These connections have URLs that

beginwith"rtsp://"   Port [554]:            #设置RTSP连接端口,保持默认   Please enter a port on which Helix Server。

will listen forHTTP connections.  These connections have URLs that beginwith"http://"   Port [80]: 8088

#设置HTTP连接端口,为避免和apache冲突,建议更改   Please enter a port on which Helix Server will listen for   MMS connections.  These connections have URLs that 。

beginwith"mms://"   Port [1755]:         #设置MMS连接端口,保持默认 Helix Server will listen for Administrator requests 。

on the   port shown.  This port has been initializedto a random valuefor security.  Please verifynow that this pre-assigned port   will

not interfere with ports already inuseon your system;   you can change it if necessary.   Port [27465

]: 10000#设置HelixServer远程管理端口,建议更改以便记忆   You have selected the following Helix Server configuration:   。

AdminUser/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"键返回修改CopyingHelixServer。

files....HelixServerinstallationiscomplete.Ifatanytimeyoushouldrequiretechnicalassistance,pleasevisit

ouron-linesupportareaathttp://service.real.com/.Cleaningupinstallationfiles...Done.[root@localhostdata]#

[root@localhostdata]#cp*.lic/data/HelixServer/License/#复制许可证文件HelixServer汉化包[root@localhostHelixAdministrator_CHS]#

cp-rf*/data/HelixServer/HelixAdministrator/#复制汉化包文件到HelixAdministrator目录中[root@localhostdata]#cdHelixServer/

[root@localhostHelixServer]#lsadm_b_dbcdi_b_dbdefault.cfgenc_w_dbLibmaster.cfgSecureBinCommerceenc_b_db

HelixAdministratorLicensePluginsslta.cfgCacheContentenc_r_dbhelixserver.myLogsrmserver.cfgHelixServer

服务启用和停用[root@localhostHelixServer]#./Bin/rmserverrmserver.cfg&#后台启动HelixServer[1]6868[root@localhostHelixServer]#

HelixServer(c)1995-2005RealNetworks,Inc.Allrightsreserved.Version:HelixServer11.0(11.0.1.1884)(Build74277

/5688)Platform:linux-rhel4-i686Using Config File:rmserver.cfgLinuxkernelversion2.6.9-78.ELdetected[glibc

2.3.4/NPTL2.3.4]StartingPID6869TID3086890688/6869,procnum0(controller)CreatingServerSpace...Serverhas

allocated256megabytesofmemoryStartingTID3084909440/6871,procnum1(timer)Calibratingtimers...Intervaltimer

enabled(10msresolution).StartingTID3082812288/6872,procnum2(core)StartingHelixServer11.0Core...1CPUDetected...

TestingFileDescriptors...Settingper-processdescriptorcapacityto672(1003),21...TestingMutex...(421.50ops/usec)

TestingAtomicOps...(61.73ops/usec)I:LoadingPluginsfrom/data/HelixServer/Plugins...I:slicensepln.so0xb50ec0

RealNetworksLicensingPluginI:svrbascauth.so0x3b9cc0RealNetworksBasicAuthenticatorI:rn5auth.so0x11dc40

RealNetworksRN5AuthenticatorI:rn5auth.so0x11dc40RealNetworksDigestAuthenticatorI:rncache.so0x43c880RealNetworks

CachePluginI:redbcplin.so0x6f10a0RealNetworksBroadcastRedundancyPluginI:encoplin.so0x13f8f0RealNetworks

EncoderBroadcastPluginI:swfformat.so0x1ffc30RealNetworksMacromediaFlash4FileFormatPluginI:snmpplin.so

0x23fe00RealNetworksSnmpPlugin(Version11.0.0.0)I:miiplin.so0x2e00e0RealNetworksMediaImportPluginI:xmlcfg.so

0x9fa780RealNetworksXMLConfigurationPluginI:audplin.so0xce14c0RealNetworksG.7xxRendererPluginI:audplin.so

0xce14c0HelixPCMAudioRendererPluginI:audplin.so0xce14c0RealNetworksAUFileFormatPluginI:audplin.so0xce14c0

HelixWAVEFileFormatPluginI:audplin.so0xce14c0HelixAIFFFileFormatPluginI:audplin.so0xce14c0RealNetworks

DVI4RendererPluginI:meiffpln.so0x35f3b0RealNetworksMediaExportFileFormatPluginI:smonplin.so0x91d820RealNetworks

SystemMonitorI:ramplin.so0x36df70RealNetworksRamgenFileSystemI:ppvmsql.so0x4fea10RealNetworksMiniSQLPPV

DatabasePluginI:wmmcastpln.so0x3933b0RealNetworksWindowsMediaMulticastPluginI:allow.so0x3a6d00RealNetworks

BasicAllowancePluginI:mp3fformat.so0x3c8ea0RealNetworksMP3FileFormatPluginI:adminfs.so0x872920RealNetworks

AdminFileSystemI:avifformat.so0xad7050RealNetworksAVIFileFormatPluginI:imgfformat.so0x45f150HelixJPEG

FileFormatPluginI:imgfformat.so0x45f150HelixGIFFileFormatPluginI:imgfformat.so0x45f150HelixPNGFileFormat

PluginI:imgfformat.so0x45f150HelixRealPixFormatPluginI:imgfformat.so0x45f150HelixRealPixJPEGFileFormat

CodecPluginI:imgfformat.so0x45f150HelixRealPixGIFFileFormatCodecPluginI:imgfformat.so0x45f150HelixRealPix

PNGFileFormatCodecPluginI:imgfformat.so0x45f150HelixWBMPFileFormatPluginI:wmsrcpln.so0x3e4000RealNetworks

WindowsMediaLiveBroadcastSourcePluginI:smlfformat.so0xaf3330RealNetworksSMILFileFormatPluginI:asxplin.so

0x375f60RealNetworksAsxgenFileSystemI:cdistpln.so0x6cbec0RealNetworksContentDistributionPluginI:isphoster.so

0xd430c0RealNetworksISPhostingpluginI:shelfsys.so0xc28e60RealNetworksShellFileSystemI:mp4fformat.so0x535d30

RealNetworksMpeg4FileFormatPluginI:encfs.so0x405e10RealNetworksEncoderAdministrationFileSystemPluginI:

ppvbasic.so0x95cfd0RealNetworksFlatFileDatabasePluginI:asfwmpln.so0xc4ecd0RealNetworksActiveStreamFormat

Version1PluginI:dbmgr.so0x40d670RealNetworksDatabaseManagerI:ppvallow.so0x422980RealNetworksPayPerView

AllowancePluginI:pplyplin.so0xb78160RealNetworksScalableMulticastPluginI:authmgr.so0x9c2bf0HelixAuthentication

ManagerI:meiplin.so0x58a400RealNetworksMediaExportInterfacePluginI:asncfsys.so0x5a8490RealNetworksNetwork

OptimizedFileSystemI:qtbcplin.so0x5bdde0RealNetworksQuickTimeLiveBroadcastPluginI:smplfsys.so0x69fcb0

RealNetworksLocalFileSystemI:plusplin.so0xd95070RealNetworksPlusURLFileFormatPluginI:hxsdp.so0xde0180

RealNetworksSDPStreamDescriptionPluginI:sdpgenfsys.so0xe5cac0RealNetworksDynamicSDPGenerationPluginI:

bdstplin.so0x70cc50RealNetworksBroadcastDistributionPluginI:tmplgpln.so0xd4d3b0RealNetworksCustomLogging

PluginI:rmfformat.so0x7449c0RealNetworksRealMediaFileFormatPluginI:brcvplin.so0x7d8910RealNetworksBroadcast

ReceptionPluginI:cdadplin.so0xdc6000RealNetworksContentDistributionAdvisePluginI:tagfsys.so0xe71730RealNetworks

XMLTagFileSystemI:rtfformat.so0x83ffe0HelixRealTextFileFormatPluginI:archplin.so0xa25500RealNetworksLive

ArchiverPluginI:httpfsys.so0x8bed90RealNetworksHTTPFileSystemwithCHTTPSupportI:httpfsys.so0x8bed90RealNetworks

RFC2397DataSchemeFileSystemI:vsrcplin.so0x96ed10RealNetworksViewSourceTagReplacementPluginI:vsrcplin.so

0x96ed10RealNetworksViewSourceAllowancePluginI:vsrcplin.so0x96ed10RealNetworksViewSourceFileSystemStarting

TID3080715136/6873,procnum3(rmplug)LoadingHelixServerLicenseFiles...StartingTID3078617984/6874,procnum

4(rmplug)StartingTID3076520832/6875,procnum5(rmplug)StartingTID3074423680/6876,procnum6(rmplug)Starting

TID3072326528/6877,procnum7(rmplug)StartingTID3070229376/6878,procnum8(rmplug)StartingTID3068132224/6879,

procnum9(rmplug)StartingTID3066035072/6880,procnum10(rmplug)StartingTID3063937920/6881,procnum11(rmplug)

StartingTID3061840768/6882,procnum12(rmplug)StartingTID3059743616/6883,procnum13(rmplug)StartingTID3057646464

/6884,procnum14(rmplug)StartingTID3055549312/6885,procnum15(rmplug)StartingTID3053452160/6886,procnum

16(rmplug)StartingTID3051355008/6887,procnum17(rmplug)StartingTID3049257856/6888,procnum18(rmplug)Starting

TID3047160704/6889,procnum19(rmplug)StartingTID3045063552/6890,procnum20(memreap)StartingTID3042966400

/6891,procnum21(streamer)[root@localhostHelixServer]#ps-ef|greprmserver#查看当前rmserver进程root68686309010

:37pts/100:00:00./Bin/rmserverrmserver.cfgroot68696868610:37?00:00:00./Bin/rmserverrmserver.cfgroot6870

6868010:37?00:00:00./Bin/rmserverrmserver.cfgroot68936309010:37pts/100:00:00greprmserver[root@localhost

HelixServer]#cat./Logs/rmserver.pid#查看 HelixServer进程号6984[root@localhostHelixServer]#kill6984#停止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等等。

免责声明:本站所有信息均搜集自互联网,并不代表本站观点,本站不对其真实合法性负责。如有信息侵犯了您的权益,请告知,本站将立刻处理。联系QQ:1640731186