id,summary,reporter,owner,description,type,status,priority,component,version,resolution,keywords,cc,blockedby,blocking,reproduced,analyzed
2172,ffmpeg 1.1 breaks hls live streaming,devr,,"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
}}}


",defect,closed,normal,avformat,1.1.1,fixed,hls m3u8 segment,,,,1,1
