Various HTTP live streams supported by SRS (FLV, TS, MP3, AAC)

Source: Internet
Author: User

Wiki:https://github.com/simple-rtmp-server/srs/wiki/v2_cn_deliveryhttpstream

Note that you must use the HTTP Server that the SRS comes with

One, HTTP FLV Live Stream


Http_server {enabled on; Listen 8080;}        Vhost Your_vhost {http_remux {enabled on;    Mount [vhost]/[app]/[stream].flv; }}
Second, HTTP TS Live Stream


Http_server {enabled on; Listen 8080;}        Vhost Your_vhost {http_remux {enabled on;    Mount [Vhost]/[app]/[stream].ts; }}
Third, 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; }}
Iv. 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; }}
Five, HTTP live streaming virtual host configuration instructions

Note Be sure to turn on the SRS Http_server

vhost your_vhost {    http_remux {         # vhost Live stream Switch         # 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       &nBsp [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;     }}


Various HTTP live streams supported by SRS (FLV, TS, MP3, AAC)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.