SRS支持的各种HTTP直播流(FLV、TS、MP3、AAC)
WIKI: https://github.com/simple-rtmp-server/srs/wiki/v2_CN_DeliveryHttpStream
注意,必须要使用SRS自带的Http Server
一、HTTP FLV Live Stream
http_server { enabled on; listen 8080; } vhost your_vhost { http_remux { enabled on; mount [vhost]/[app]/[stream].flv; } }
二、HTTP TS Live Stream
http_server { enabled on; listen 8080; } vhost your_vhost { http_remux { enabled on; mount [vhost]/[app]/[stream].ts; } }
三、HTTP MP3 Live Stream
http_server { enabled on; listen 8080; } vhost your_vhost { http_remux { enabled on; fast_cache 30; mount [vhost]/[app]/[stream].mp3; } }
四、HTTP AAC Live Stream
http_server { enabled on; listen 8080; } vhost your_vhost { http_remux { enabled on; fast_cache 30; mount [vhost]/[app]/[stream].aac; } }
五、HTTP 直播流虚拟主机配置说明
注意一定要开启SRS自带的http_server
vhost your_vhost { http_remux { # vhost直播流开关 # default: off enabled on; # the fast cache for audio stream(mp3/aac), # to cache more audio and send to client in a time to . # @remark # @remark 0 to disable fast cache for http audio stream. # default: 0 fast_cache 30; # the stream mout for rtmp to remux to live streaming. # typical mount to [vhost]/[app]/[stream].flv # the variables: # [vhost] current vhost for http live stream. # [app] current app for http live stream. # [stream] current stream for http live stream. # @remark the [vhost] is optional, used to mount at specified vhost. # the extension: # .flv mount http live flv stream, use default gop cache. # .ts mount http live ts stream, use default gop cache. # .mp3 mount http live mp3 stream, ignore video and audio mp3 codec required. # .aac mount http live aac stream, ignore video and audio aac codec required. # for example: # mount to [vhost]/[app]/[stream].flv # access by http://ossrs.net:8080/live/livestream.flv # mount to /[app]/[stream].flv # access by http://ossrs.net:8080/live/livestream.flv # or by http://192.168.1.173:8080/live/livestream.flv # mount to [vhost]/[app]/[stream].mp3 # access by http://ossrs.net:8080/live/livestream.mp3 # mount to [vhost]/[app]/[stream].aac # access by http://ossrs.net:8080/live/livestream.aac # mount to [vhost]/[app]/[stream].ts # access by http://ossrs.net:8080/live/livestream.ts # @remark the port of http is specified by http_server section. # default: [vhost]/[app]/[stream].flv mount [vhost]/[app]/[stream].flv; # whether http stream trigger rtmp stream source when no stream available, # for example, when encoder has not publish stream yet, # user can play the http flv stream and wait for stream. # default: on hstrs on; } }
郑重声明:本站内容如果来自互联网及其他传播媒体,其版权均属原媒体及文章作者所有。转载目的在于传递更多信息及用于网络分享,并不代表本站赞同其观点和对其真实性负责,也不构成任何其他建议。