[FFmpeg-trac] #2172(undetermined:new): ffmpeg 1.1 breaks hls live streaming

FFmpeg trac at avcodec.org
Tue Jan 22 23:55:46 CET 2013


#2172: ffmpeg 1.1 breaks hls live streaming
--------------------------------------+----------------------------------
             Reporter:  devr          |                     Type:  defect
               Status:  new           |                 Priority:  normal
            Component:  undetermined  |                  Version:  1.1.1
             Keywords:  hls m3u8      |               Blocked By:
             Blocking:                |  Reproduced by developer:  0
Analyzed by developer:  0             |
--------------------------------------+----------------------------------
 Summary of the bug:
 ffmpeg 1.1 fails to produce a valid hls m3u8 live stream for iOS devices.

 What happens:
 The iOS device stops playing the video after the end of the current m3u8
 file is reached.

 What should happen(this is the behaviour in version 1.0.3):
 The ios device  checks cyclic for new content in m3u8 and plays the next
 segments and recalculates the length of the current stream.

 How to reproduce:
 Start streaming a video and begin watching '''while''' encoding happens.
 Video will only play as far as the current progress of the encoding has
 been at the time of starting playing the file.
 iOS Device does not seem to realize that new "content" has been added and
 stream length has changed while watching the video.


 {{{
 ffmpeg  -i  myvideo.avi  -acodec libfaac -ar 48000  -vcodec libx264
 -async 2  -map 0:0 -map 0:1 -f segment -segment_format mpegts
 -segment_list /tmp/video/output.m3u8 -segment_list_flags +live
 -segment_wrap 1080 -segment_time 10 out%03d.ts
 ffmpeg version:
 ffmpeg version git-2012-10-27-a9d97e1 Copyright (c) 2000-2012 the FFmpeg
 developers
   built on Oct 27 2012 01:47:25 with gcc 4.6 (Ubuntu/Linaro
 4.6.3-1ubuntu5)
   configuration: --enable-gpl --enable-libfaac --enable-libfdk-aac
 --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb
 --enable-librtmp --enable-libtheora --enable-libvorbis --enable-libvpx
 --enable-x11grab --enable-libx264 --enable-nonfree --enable-version3

 }}}

 This problem does '''not''' exist with:

 {{{
 ffmpeg version 1.0.3 Copyright (c) 2000-2012 the FFmpeg developers
   built on Jan 22 2013 23:09:49 with gcc 4.6 (Ubuntu/Linaro
 4.6.3-1ubuntu5)
   configuration: --enable-gpl --enable-libfaac --enable-libfdk-aac
 --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb
 --enable-librtmp --enable-libtheora --enable-libvorbis --enable-libvpx
 --enable-x11grab --enable-libx264 --enable-nonfree --enable-version3

 }}}

 Example m3u8 file with version 1.0.3('''working''' as expected)

 {{{
 #EXTM3U
 #EXT-X-VERSION:3
 #EXT-X-MEDIA-SEQUENCE:0
 #EXT-X-ALLOWCACHE:1
 #EXT-X-TARGETDURATION:10
 #EXTINF:12.501333,
 out000.ts
 #EXTINF:12.502667,
 out001.ts
 #EXTINF:12.504000,
 out002.ts
 .
 .
 .
 .
 #EXTINF:12.520000,
 out014.ts
 #EXTINF:1.400000,
 out015.ts
 #EXT-X-ENDLIST

 }}}

 Example m3u8 file with version 1.1(not working)


 {{{

 #EXTM3U
 #EXT-X-VERSION:3
 #EXT-X-MEDIA-SEQUENCE:0
 #EXT-X-ALLOWCACHE:1
 #EXT-X-TARGETDURATION:11
 #EXTINF:10.432000,
 out000.ts
 #EXTINF:10.426000,
 out001.ts
 #EXTINF:10.420000,
 out002.ts
 #EXTINF:10.435333,
 out003.ts
 #EXTINF:10.429333,
 out004.ts
 #EXTINF:10.423333,
 out005.ts
 #EXTINF:10.417333,
 out006.ts
 #EXTINF:10.432667,
 out007.ts
 #EXTINF:1.850667,
 out008.ts
 #EXT-X-ENDLIST
 }}}

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/2172>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list