[FFmpeg-trac] #7831(avformat:new): remuxing to HLS using "hls_segment_size" creates corrupted segments

FFmpeg trac at avcodec.org
Mon Apr 8 13:17:44 EEST 2019


#7831: remuxing to HLS using "hls_segment_size" creates corrupted segments
------------------------------------+------------------------------------
             Reporter:  barsnick    |                    Owner:
                 Type:  defect      |                   Status:  new
             Priority:  normal      |                Component:  avformat
              Version:  git-master  |               Resolution:
             Keywords:  hls         |               Blocked By:
             Blocking:              |  Reproduced by developer:  0
Analyzed by developer:  0           |
------------------------------------+------------------------------------

Comment (by stevenliu):

 {{{
 MacBook:dash StevenLiu$ ./ffmpeg -t 60 -f lavfi -i testsrc -vcodec libx264
 -an -hls_list_size 0 -hls_segment_size 300000 -f hls badmux_encode.m3u8
 ffmpeg version N-93512-g8eca42e632 Copyright (c) 2000-2019 the FFmpeg
 developers
   built with Apple LLVM version 10.0.0 (clang-1000.11.45.5)
   configuration: --enable-libass --enable-opengl --enable-libx264
 --enable-libmp3lame --enable-gpl --enable-nonfree --prefix=/usr/local
 --enable-libtesseract --enable-libspeex --enable-libfreetype --enable-
 libfontconfig --enable-libfdk-aac --enable-videotoolbox --enable-libxml2
 --enable-librsvg --enable-libvmaf --enable-version3
   libavutil      56. 26.100 / 56. 26.100
   libavcodec     58. 48.100 / 58. 48.100
   libavformat    58. 26.101 / 58. 26.101
   libavdevice    58.  7.100 / 58.  7.100
   libavfilter     7. 48.100 /  7. 48.100
   libswscale      5.  4.100 /  5.  4.100
   libswresample   3.  4.100 /  3.  4.100
   libpostproc    55.  4.100 / 55.  4.100
 Input #0, lavfi, from 'testsrc':
   Duration: N/A, start: 0.000000, bitrate: N/A
     Stream #0:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24, 320x240
 [SAR 1:1 DAR 4:3], 25 tbr, 25 tbn, 25 tbc
 Stream mapping:
   Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
 Press [q] to stop, [?] for help
 [libx264 @ 0x7fbe8c00f400] using SAR=1/1
 [libx264 @ 0x7fbe8c00f400] using cpu capabilities: MMX2 SSE2Fast SSSE3
 SSE4.2 AVX AVX2 FMA3 LZCNT BMI2
 [libx264 @ 0x7fbe8c00f400] profile High 4:4:4 Predictive, level 1.3, 4:4:4
 8-bit
 [libx264 @ 0x7fbe8c00f400] 264 - core 133 r2334M a3ac64b - H.264/MPEG-4
 AVC codec - Copyleft 2003-2013 - 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=4 threads=6
 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
 [hls @ 0x7fbe8c00de00] Opening 'badmux_encode0.ts' for writing
 Output #0, hls, to 'badmux_encode.m3u8':
   Metadata:
     encoder         : Lavf58.26.101
     Stream #0:0: Video: h264 (libx264), yuv444p, 320x240 [SAR 1:1 DAR
 4:3], q=-1--1, 25 fps, 90k tbn, 25 tbc
     Metadata:
       encoder         : Lavc58.48.100 libx264
     Side data:
       cpb: bitrate max/min/avg: 0/0/0 buffer size: 0 vbv_delay: -1
 [hls @ 0x7fbe8c00de00] Opening 'badmux_encode.m3u8.tmp' for writing
 [hls @ 0x7fbe8c00de00] Opening 'badmux_encode.m3u8.tmp' for
 writingeed=19.9x
 [hls @ 0x7fbe8c00de00] Opening 'badmux_encode.m3u8.tmp' for
 writingeed=23.5x
 [hls @ 0x7fbe8c00de00] Opening 'badmux_encode1.ts' for writing/A
 speed=24.7x
 [hls @ 0x7fbe8c00de00] Opening 'badmux_encode.m3u8.tmp' for writing
     Last message repeated 1 times
 [hls @ 0x7fbe8c00de00] Opening 'badmux_encode.m3u8.tmp' for
 writingeed=25.3x
 frame= 1500 fps=644 q=-1.0 Lsize=N/A time=00:00:59.92 bitrate=N/A
 speed=25.7x
 video:267kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
 muxing overhead: unknown
 [libx264 @ 0x7fbe8c00f400] frame I:6     Avg QP:20.34  size:  3299
 [libx264 @ 0x7fbe8c00f400] frame P:453   Avg QP:14.64  size:   444
 [libx264 @ 0x7fbe8c00f400] frame B:1041  Avg QP:14.17  size:    50
 [libx264 @ 0x7fbe8c00f400] consecutive B-frames:  7.3%  0.1%  0.8% 91.7%
 [libx264 @ 0x7fbe8c00f400] mb I  I16..4: 48.4% 21.8% 29.8%
 [libx264 @ 0x7fbe8c00f400] mb P  I16..4:  1.8%  1.5%  0.8%  P16..4:  7.3%
 3.7%  2.5%  0.0%  0.0%    skip:82.3%
 [libx264 @ 0x7fbe8c00f400] mb B  I16..4:  0.2%  0.1%  0.0%  B16..8:  4.1%
 0.1%  0.0%  direct: 0.1%  skip:95.5%  L0:49.0% L1:46.6% BI: 4.3%
 [libx264 @ 0x7fbe8c00f400] 8x8 transform intra:33.9% inter:40.5%
 [libx264 @ 0x7fbe8c00f400] coded y,u,v intra: 10.0% 10.5% 9.0% inter: 0.8%
 0.8% 0.7%
 [libx264 @ 0x7fbe8c00f400] i16 v,h,dc,p: 52% 29%  3% 16%
 [libx264 @ 0x7fbe8c00f400] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 65%  4% 31%  0%
 0%  0%  0%  0%  0%
 [libx264 @ 0x7fbe8c00f400] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 30% 56% 11%  1%
 1%  1%  0%  1%  0%
 [libx264 @ 0x7fbe8c00f400] Weighted P-Frames: Y:0.0% UV:0.0%
 [libx264 @ 0x7fbe8c00f400] ref P L0: 68.8%  6.7% 20.2%  4.3%
 [libx264 @ 0x7fbe8c00f400] ref B L0: 58.5% 37.2%  4.3%
 [libx264 @ 0x7fbe8c00f400] ref B L1: 97.1%  2.9%
 [libx264 @ 0x7fbe8c00f400] kb/s:36.43
 MacBook:dash StevenLiu$ ./ffmpeg -i badmux_encode.m3u8 -f null -
 ffmpeg version N-93512-g8eca42e632 Copyright (c) 2000-2019 the FFmpeg
 developers
   built with Apple LLVM version 10.0.0 (clang-1000.11.45.5)
   configuration: --enable-libass --enable-opengl --enable-libx264
 --enable-libmp3lame --enable-gpl --enable-nonfree --prefix=/usr/local
 --enable-libtesseract --enable-libspeex --enable-libfreetype --enable-
 libfontconfig --enable-libfdk-aac --enable-videotoolbox --enable-libxml2
 --enable-librsvg --enable-libvmaf --enable-version3
   libavutil      56. 26.100 / 56. 26.100
   libavcodec     58. 48.100 / 58. 48.100
   libavformat    58. 26.101 / 58. 26.101
   libavdevice    58.  7.100 / 58.  7.100
   libavfilter     7. 48.100 /  7. 48.100
   libswscale      5.  4.100 /  5.  4.100
   libswresample   3.  4.100 /  3.  4.100
   libpostproc    55.  4.100 / 55.  4.100
 [hls,applehttp @ 0x7fe90d00aa00] Opening 'badmux_encode0.ts' for reading
 Input #0, hls,applehttp, from 'badmux_encode.m3u8':
   Duration: 00:01:00.00, start: 1.480000, bitrate: 0 kb/s
   Program 0
     Metadata:
       variant_bitrate : 0
     Stream #0:0: Video: h264 (High 4:4:4 Predictive) ([27][0][0][0] /
 0x001B), yuv444p, 320x240 [SAR 1:1 DAR 4:3], 25 fps, 25 tbr, 90k tbn, 50
 tbc
     Metadata:
       variant_bitrate : 0
 Stream mapping:
   Stream #0:0 -> #0:0 (h264 (native) -> wrapped_avframe (native))
 Press [q] to stop, [?] for help
 Output #0, null, to 'pipe:':
   Metadata:
     encoder         : Lavf58.26.101
     Stream #0:0: Video: wrapped_avframe, yuv444p, 320x240 [SAR 1:1 DAR
 4:3], q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc
     Metadata:
       variant_bitrate : 0
       encoder         : Lavc58.48.100 wrapped_avframe
 [hls,applehttp @ 0x7fe90d00aa00] Opening 'badmux_encode0.ts' for reading
     Last message repeated 2 times
 [hls,applehttp @ 0x7fe90d00aa00] Opening 'badmux_encode1.ts' for reading
     Last message repeated 1 times
 frame= 1323 fps=0.0 q=-0.0 Lsize=N/A time=00:01:00.00 bitrate=N/A speed=
 204x
 video:693kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
 muxing overhead: unknown
 MacBook:dash StevenLiu$
 }}}

--
Ticket URL: <https://trac.ffmpeg.org/ticket/7831#comment:5>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list