[FFmpeg-trac] #9276(avformat:new): Can't keep segments larger than twice +1 the list size?

FFmpeg trac at avcodec.org
Thu Jun 3 13:04:38 EEST 2021


#9276: Can't keep segments larger than twice +1 the list size?
----------------------------------+--------------------------------------
             Reporter:  nicol     |                     Type:  defect
               Status:  new       |                 Priority:  normal
            Component:  avformat  |                  Version:  git-master
             Keywords:            |               Blocked By:
             Blocking:            |  Reproduced by developer:  0
Analyzed by developer:  0         |
----------------------------------+--------------------------------------
 Summary of the bug: I'm trying to keep segments using
 **-hls_delete_threshold** option, but can not keep segments larger than
 twice +1 the list size.

 **-hls_list_size 5 -hls_delete_threshold 6** keeps 5 + 6 = 11 segments.
 (output13.ts - output23.ts)
 **-hls_list_size 5 -hls_delete_threshold 7** not keeps 5 + 7 = 12 but
 keeps 5 + 6 = 11 segments. (output13.ts - output23.ts)

 How to reproduce:
 {{{
 % ffmpeg -f lavfi -i color=d=240:r=25 -c:v libx264 -f hls -hls_list_size 5
 -hls_flags +delete_segments -hls_delete_threshold 7 tmp/output.m3u8
 ffmpeg version 2021-06-02-git-071930de72-full_build-www.gyan.dev Copyright
 (c) 2000-2021 the FFmpeg developers
   built with gcc 10.3.0 (Rev2, Built by MSYS2 project)
   configuration: --enable-gpl --enable-version3 --enable-static --disable-
 w32threads --disable-autodetect --enable-fontconfig --enable-iconv
 --enable-gnutls --enable-libxml2 --enable-gmp --enable-lzma --enable-
 libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh
 --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca
 --enable-sdl2 --enable-libdav1d --enable-libzvbi --enable-librav1e
 --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265
 --enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx
 --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi
 --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf
 --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec
 --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-
 libglslang --enable-vulkan --enable-opencl --enable-libcdio --enable-
 libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb
 --enable-libmp3lame --enable-libshine --enable-libtheora --enable-
 libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm
 --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-
 libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-
 libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint
   libavutil      57.  0.100 / 57.  0.100
   libavcodec     59.  1.100 / 59.  1.100
   libavformat    59.  2.101 / 59.  2.101
   libavdevice    59.  0.100 / 59.  0.100
   libavfilter     8.  0.101 /  8.  0.101
   libswscale      6.  0.100 /  6.  0.100
   libswresample   4.  0.100 /  4.  0.100
   libpostproc    56.  0.100 / 56.  0.100
 Input #0, lavfi, from 'color=d=240:r=25':
   Duration: N/A, start: 0.000000, bitrate: N/A
   Stream #0:0: Video: rawvideo (I420 / 0x30323449), yuv420p, 320x240 [SAR
 1:1 DAR 4:3], 25 tbr, 25 tbn
 Stream mapping:
   Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
 Press [q] to stop, [?] for help
 [libx264 @ 000002b983fc8740] using SAR=1/1
 [libx264 @ 000002b983fc8740] using cpu capabilities: MMX2 SSE2Fast SSSE3
 SSE4.2 AVX FMA3 BMI2 AVX2
 [libx264 @ 000002b983fc8740] profile High, level 1.3, 4:2:0, 8-bit
 [libx264 @ 000002b983fc8740] 264 - core 163 r3059 b684ebe - H.264/MPEG-4
 AVC codec - Copyleft 2003-2021 - http://www.videolan.org/x264.html -
 options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7
 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1
 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=7
 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0
 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1
 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25
 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=23.0
 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
 Output #0, hls, to 'tmp/output.m3u8':
   Metadata:
     encoder         : Lavf59.2.101
   Stream #0:0: Video: h264, yuv420p(progressive), 320x240 [SAR 1:1 DAR
 4:3], q=2-31, 25 fps, 90k tbn
     Metadata:
       encoder         : Lavc59.1.100 libx264
     Side data:
       cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: N/A
 [hls @ 000002b983fc58c0] Opening 'tmp/output0.ts' for writing/A speed=N/A
 [hls @ 000002b983fc58c0] Opening 'tmp/output.m3u8.tmp' for writing
 [hls @ 000002b983fc58c0] Opening 'tmp/output1.ts' for writing
 [hls @ 000002b983fc58c0] Opening 'tmp/output.m3u8.tmp' for writing
 [hls @ 000002b983fc58c0] Opening 'tmp/output2.ts' for writing
 [hls @ 000002b983fc58c0] Opening 'tmp/output.m3u8.tmp' for writing
 [hls @ 000002b983fc58c0] Opening 'tmp/output3.ts' for writing
 [hls @ 000002b983fc58c0] Opening 'tmp/output.m3u8.tmp' for writing
 [hls @ 000002b983fc58c0] Opening 'tmp/output4.ts' for writing
 [hls @ 000002b983fc58c0] Opening 'tmp/output.m3u8.tmp' for writing
 [hls @ 000002b983fc58c0] Opening 'tmp/output5.ts' for writing
 [hls @ 000002b983fc58c0] Opening 'tmp/output.m3u8.tmp' for writing
 [hls @ 000002b983fc58c0] Opening 'tmp/output6.ts' for writing
 [hls @ 000002b983fc58c0] Opening 'tmp/output.m3u8.tmp' for writing
 [hls @ 000002b983fc58c0] Opening 'tmp/output7.ts' for writing
 [hls @ 000002b983fc58c0] Opening 'tmp/output.m3u8.tmp' for writing
 [hls @ 000002b983fc58c0] Opening 'tmp/output8.ts' for writing
 [hls @ 000002b983fc58c0] Opening 'tmp/output.m3u8.tmp' for writing
 [hls @ 000002b983fc58c0] Opening 'tmp/output9.ts' for writing
 [hls @ 000002b983fc58c0] Opening 'tmp/output.m3u8.tmp' for writing
 [hls @ 000002b983fc58c0] Opening 'tmp/output10.ts' for writing
 [hls @ 000002b983fc58c0] Opening 'tmp/output.m3u8.tmp' for writing
 [hls @ 000002b983fc58c0] Opening 'tmp/output11.ts' for writing
 [hls @ 000002b983fc58c0] Opening 'tmp/output.m3u8.tmp' for writing
 [hls @ 000002b983fc58c0] Opening 'tmp/output12.ts' for writing
 [hls @ 000002b983fc58c0] Opening 'tmp/output.m3u8.tmp' for writing
 [hls @ 000002b983fc58c0] Opening 'tmp/output13.ts' for writing
 [hls @ 000002b983fc58c0] Opening 'tmp/output.m3u8.tmp' for writing
 [hls @ 000002b983fc58c0] Opening 'tmp/output14.ts' for writing
 [hls @ 000002b983fc58c0] Opening 'tmp/output.m3u8.tmp' for writing
 [hls @ 000002b983fc58c0] Opening 'tmp/output15.ts' for writing
 [hls @ 000002b983fc58c0] Opening 'tmp/output.m3u8.tmp' for writing
 [hls @ 000002b983fc58c0] Opening 'tmp/output16.ts' for writing/A speed=
 338x
 [hls @ 000002b983fc58c0] Opening 'tmp/output.m3u8.tmp' for writing
 [hls @ 000002b983fc58c0] Opening 'tmp/output17.ts' for writing
 [hls @ 000002b983fc58c0] Opening 'tmp/output.m3u8.tmp' for writing
 [hls @ 000002b983fc58c0] Opening 'tmp/output18.ts' for writing
 [hls @ 000002b983fc58c0] Opening 'tmp/output.m3u8.tmp' for writing
 [hls @ 000002b983fc58c0] Opening 'tmp/output19.ts' for writing
 [hls @ 000002b983fc58c0] Opening 'tmp/output.m3u8.tmp' for writing
 [hls @ 000002b983fc58c0] Opening 'tmp/output20.ts' for writing
 [hls @ 000002b983fc58c0] Opening 'tmp/output.m3u8.tmp' for writing
 [hls @ 000002b983fc58c0] Opening 'tmp/output21.ts' for writing
 [hls @ 000002b983fc58c0] Opening 'tmp/output.m3u8.tmp' for writing
 [hls @ 000002b983fc58c0] Opening 'tmp/output22.ts' for writing
 [hls @ 000002b983fc58c0] Opening 'tmp/output.m3u8.tmp' for writing
 [hls @ 000002b983fc58c0] Opening 'tmp/output23.ts' for writing
 [hls @ 000002b983fc58c0] Opening 'tmp/output.m3u8.tmp' for writing
 frame= 6000 fps=0.0 q=-1.0 Lsize=N/A time=00:03:59.92 bitrate=N/A speed=
 341x
 video:100kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
 muxing overhead: unknown
 [libx264 @ 000002b983fc8740] frame I:24    Avg QP: 6.12  size:    64
 [libx264 @ 000002b983fc8740] frame P:1512  Avg QP: 9.07  size:    23
 [libx264 @ 000002b983fc8740] frame B:4464  Avg QP:12.67  size:    15
 [libx264 @ 000002b983fc8740] consecutive B-frames:  0.8%  0.0%  0.0% 99.2%
 [libx264 @ 000002b983fc8740] mb I  I16..4: 100.0%  0.0%  0.0%
 [libx264 @ 000002b983fc8740] mb P  I16..4:  0.0%  0.0%  0.0%  P16..4:
 0.0%  0.0%  0.0%  0.0%  0.0%    skip:100.0%
 [libx264 @ 000002b983fc8740] mb B  I16..4:  0.0%  0.0%  0.0%  B16..8:
 0.0%  0.0%  0.0%  direct: 0.0%  skip:100.0%
 [libx264 @ 000002b983fc8740] 8x8 transform intra:0.0%
 [libx264 @ 000002b983fc8740] coded y,uvDC,uvAC intra: 0.0% 0.0% 0.0%
 inter: 0.0% 0.0% 0.0%
 [libx264 @ 000002b983fc8740] i16 v,h,dc,p: 93%  0%  7%  0%
 [libx264 @ 000002b983fc8740] i8c dc,h,v,p: 100%  0%  0%  0%
 [libx264 @ 000002b983fc8740] Weighted P-Frames: Y:0.0% UV:0.0%
 [libx264 @ 000002b983fc8740] kb/s:3.39
 ffmpeg version
 built on ...
 }}}
 Patches should be submitted to the ffmpeg-devel mailing list and not this
 bug tracker.
-- 
Ticket URL: <https://trac.ffmpeg.org/ticket/9276>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list