arut / nginx-rtmp-module

NGINX-based Media Streaming Server
http://nginx-rtmp.blogspot.com
BSD 2-Clause "Simplified" License
13.35k stars 3.5k forks source link

hls multibitrate support #129

Open tanero opened 11 years ago

tanero commented 11 years ago

I couldn't have a success for live hls multi-bitrate setup.

My setup as below;

I couldn't find any information for this subject. I wondered if multi-bitrate hls supported on your modul or not?

arut commented 11 years ago

You're right. The module only creates independent m3u8 files. However you can manually create multi-bitrate m3u8 referencing those 3 playlists. Then just play that playlist.

Her's an example from section 8.5 of http://tools.ietf.org/html/draft-pantos-http-live-streaming-08#section-6.2.4

#EXTM3U
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=1280000
http://example.com/low.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=2560000
http://example.com/mid.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=7680000
http://example.com/hi.m3u8
#EXT-X-STREAM-INF:PROGRAM-ID=1,BANDWIDTH=65000,CODECS="mp4a.40.5"
http://example.com/audio-only.m3u8
tanero commented 11 years ago

First, thanks for your quick return. Worked as you described. I also wonder, if the vod hls and with multi-bitrate vod hls are supported?

arut commented 11 years ago

VOD HLS is not supported. Mp4 can be played directly on mobile device with html5 video tag.

vodcms commented 11 years ago

mp4 play is slow on mobile device with html5 video tag.

arut commented 11 years ago

I'm now writing a proprietary vod/hls/mp4 module. I'll post the details later in blog

vodcms commented 11 years ago

i love you.

mhzbg commented 11 years ago

The multibitrate variance does not work reliably for me. The different bitrates seem a bit out of sync in terms of segmets and JW Player halts after playing the first segment from variant playlist. IOS devices pause and resume. See my issue https://github.com/arut/nginx-rtmp-module/issues/146 for complete explanation. Does it work reliable for you, specially with JW player with HLS support ?

tanero commented 10 years ago

You should also consider to calculate sound bandwith correctly.

redgrasss commented 6 years ago

Sorry to use this issue ticket for a different question: @tanero I am trying to do the same: ingest 3 streams with afmle but only the last stream (highest number) gets segemented in the hls app. Could you share your config so I could figure out what I missed?