标签:
WIKI: https://github.com/simple-rtmp-server/srs/wiki/v2_CN_DeliveryHttpStream
注意,必须要使用SRS自带的Http Server
http_server { enabled on; listen 8080; } vhost your_vhost { http_remux { enabled on; mount [vhost]/[app]/[stream].flv; } }
http_server { enabled on; listen 8080; } vhost your_vhost { http_remux { enabled on; mount [vhost]/[app]/[stream].ts; } }
http_server { enabled on; listen 8080; } vhost your_vhost { http_remux { enabled on; fast_cache 30; mount [vhost]/[app]/[stream].mp3; } }
http_server { enabled on; listen 8080; } vhost your_vhost { http_remux { enabled on; fast_cache 30; mount [vhost]/[app]/[stream].aac; } }
注意一定要开启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; } }
SRS支持的各种HTTP直播流(FLV、TS、MP3、AAC)
标签:
原文地址:http://my.oschina.net/fengjihu/blog/416751