[FFmpeg-trac] #8037(avformat:new): Incorrect HLS segment duration after 64350th frame with -hls_init_time

FFmpeg trac at avcodec.org
Wed Jul 24 18:27:52 EEST 2019


#8037: Incorrect HLS segment duration after 64350th frame with -hls_init_time
-------------------------------------+-------------------------------------
             Reporter:  DusanBrejka  |                     Type:  defect
               Status:  new          |                 Priority:  normal
            Component:  avformat     |                  Version:  git-
                                     |  master
             Keywords:  hls mpegts   |               Blocked By:
             Blocking:               |  Reproduced by developer:  0
Analyzed by developer:  0            |
-------------------------------------+-------------------------------------
 == What I'm trying to do ==
 Create HLS live playlist with keyframe every 30 frames, segment duration
 of 4 seconds and 1 second initial target segment length. However once
 segmenter reaches 64350th frame (2145th second) it unexpectedly changes
 the segment duration back to 1 second instead of 4.

 Removing hls_time or hls_init_time options prevents this issue from
 appearing.


 == FFMPEG command ==
 {{{
 % ffmpeg -v 9 -loglevel 99 -report \
   -f lavfi -i testsrc=size=5x5:rate=30:duration=2200 \
   -g 30 -f hls -hls_time 4 -hls_init_time 1 \
   -hls_segment_filename "hls/%03d.ts" "hls/master.m3u8"
 }}}
 (note: I'm using testsrc as it's easier to reproduce this bug - any input
 results in the same bug)

 ----
 '''Expected files to be created:'''
 - one master.m3u8 playlist
 - several (6) initial segments with 1s duration
 - all other segments with duration of 4s


 '''Actual files created:'''
 - one master.m3u8 playlist
 - several (6) initial segments with 1s duration
 - '''534 segments with 4s duration'''
 - '''all following segments with 1s duration'''
 ----



 == FFMPEG versions tried ==

 Reproduced on FFMPEG 4.1.4 on Ubuntu 18.04
 {{{
 ffmpeg version 4.1.4-0york1~18.04 Copyright (c) 2000-2019 the FFmpeg
 developers
 built with gcc 7 (Ubuntu 7.4.0-1ubuntu1~18.04.1)
 configuration: --prefix=/usr --extra-version='0york1~18.04'
 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu
 --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl
 --disable-stripping --enable-avresample --disable-filter=resample
 --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom
 --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca
 --enable-libcdio --enable-libcodec2 --enable-libflite --enable-
 libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme
 --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa
 --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-
 libpulse --enable-librsvg --enable-librubberband --enable-libshine
 --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libssh
 --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-
 libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-
 libx265 --enable-libxml2 --enable-libxvid --enable-libzmq --enable-libzvbi
 --enable-lv2 --enable-omx --enable-openal --enable-opengl --enable-sdl2
 --enable-nonfree --enable-libfdk-aac --enable-libdc1394 --enable-libdrm
 --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264
 --enable-shared
 libavutil      56. 22.100 / 56. 22.100
 libavcodec     58. 35.100 / 58. 35.100
 libavformat    58. 20.100 / 58. 20.100
 libavdevice    58.  5.100 / 58.  5.100
 libavfilter     7. 40.101 /  7. 40.101
 libavresample   4.  0.  0 /  4.  0.  0
 libswscale      5.  3.100 /  5.  3.100
 libswresample   3.  3.100 /  3.  3.100
 libpostproc    55.  3.100 / 55.  3.100
 }}}

 And latest static build of FFMPEG on Win 10
 {{{
 ffmpeg version N-94383-g3883c9d147 Copyright (c) 2000-2019 the FFmpeg
 developers
 built with gcc 9.1.1 (GCC) 20190716
 configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-
 fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-
 libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame
 --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg
 --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr
 --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack
 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2
 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-
 libvidstab --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa
 --enable-libspeex --enable-libxvid --enable-libaom --enable-libmfx
 --enable-amf --enable-ffnvcodec --enable-cuvid --enable-d3d11va --enable-
 nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt
 libavutil      56. 32.100 / 56. 32.100
 libavcodec     58. 55.100 / 58. 55.100
 libavformat    58. 30.100 / 58. 30.100
 libavdevice    58.  9.100 / 58.  9.100
 libavfilter     7. 58.100 /  7. 58.100
 libswscale      5.  6.100 /  5.  6.100
 libswresample   3.  6.100 /  3.  6.100
 libpostproc    55.  6.100 / 55.  6.100
 }}}

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


More information about the FFmpeg-trac mailing list