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

FFmpeg trac at avcodec.org
Mon Apr 8 13:22:17 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=s=1280x720
 -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=s=1280x720':
   Duration: N/A, start: 0.000000, bitrate: N/A
     Stream #0:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24, 1280x720
 [SAR 1:1 DAR 16:9], 25 tbr, 25 tbn, 25 tbc
 Stream mapping:
   Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
 Press [q] to stop, [?] for help
 [libx264 @ 0x7fb55600ca00] using SAR=1/1
 [libx264 @ 0x7fb55600ca00] using cpu capabilities: MMX2 SSE2Fast SSSE3
 SSE4.2 AVX AVX2 FMA3 LZCNT BMI2
 [libx264 @ 0x7fb55600ca00] profile High 4:4:4 Predictive, level 3.1, 4:4:4
 8-bit
 [libx264 @ 0x7fb55600ca00] 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 @ 0x7fb55600ae00] 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, 1280x720 [SAR 1:1 DAR
 16:9], 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 @ 0x7fb55600ae00] Opening 'badmux_encode.m3u8.tmp' for
 writingeed=1.99x
 [hls @ 0x7fb55600ae00] Opening 'badmux_encode1.ts' for writing/A
 speed=2.03x
 [hls @ 0x7fb55600ae00] Opening 'badmux_encode.m3u8.tmp' for writing
 [hls @ 0x7fb55600ae00] Opening 'badmux_encode.m3u8.tmp' for
 writingeed=2.11x
 [hls @ 0x7fb55600ae00] Opening 'badmux_encode2.ts' for writing/A
 speed=2.13x
 [hls @ 0x7fb55600ae00] Opening 'badmux_encode.m3u8.tmp' for writing
 [hls @ 0x7fb55600ae00] Opening 'badmux_encode.m3u8.tmp' for
 writingeed=2.16x
 [hls @ 0x7fb55600ae00] Opening 'badmux_encode.m3u8.tmp' for
 writingeed=2.17x
 frame= 1500 fps= 55 q=-1.0 Lsize=N/A time=00:00:59.92 bitrate=N/A speed=
 2.2x
 video:905kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
 muxing overhead: unknown
 [libx264 @ 0x7fb55600ca00] frame I:6     Avg QP:15.82  size:  7870
 [libx264 @ 0x7fb55600ca00] frame P:1494  Avg QP:15.88  size:   588
 [libx264 @ 0x7fb55600ca00] mb I  I16..4: 67.9% 27.6%  4.5%
 [libx264 @ 0x7fb55600ca00] mb P  I16..4:  2.7%  0.4%  0.0%  P16..4:  4.5%
 0.3%  0.0%  0.0%  0.0%    skip:92.0%
 [libx264 @ 0x7fb55600ca00] 8x8 transform intra:14.5% inter:79.9%
 [libx264 @ 0x7fb55600ca00] coded y,u,v intra: 1.0% 0.8% 0.9% inter: 0.1%
 0.2% 0.1%
 [libx264 @ 0x7fb55600ca00] i16 v,h,dc,p: 76% 18%  0%  5%
 [libx264 @ 0x7fb55600ca00] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 70%  9% 20%  0%
 0%  0%  0%  0%  0%
 [libx264 @ 0x7fb55600ca00] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 15% 49% 32%  1%
 0%  1%  0%  1%  1%
 [libx264 @ 0x7fb55600ca00] Weighted P-Frames: Y:0.0% UV:0.0%
 [libx264 @ 0x7fb55600ca00] ref P L0: 60.1%  1.2% 28.4% 10.3%
 [libx264 @ 0x7fb55600ca00] kb/s:123.53
 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 @ 0x7fde85000000] 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, 1280x720 [SAR 1:1 DAR 16:9], 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, 1280x720 [SAR 1:1 DAR
 16:9], q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc
     Metadata:
       variant_bitrate : 0
       encoder         : Lavc58.48.100 wrapped_avframe
 [hls,applehttp @ 0x7fde85000000] Opening 'badmux_encode0.ts' for reading
 [hls,applehttp @ 0x7fde85000000] Opening 'badmux_encode1.ts' for
 reading5.5x
 [h264 @ 0x7fde85811800] error while decoding MB 75 33, bytestream -5
 [h264 @ 0x7fde85811800] concealing 934 DC, 934 AC, 934 MV errors in P
 frame
 [hls,applehttp @ 0x7fde85000000] Opening 'badmux_encode1.ts' for reading
 [hls,applehttp @ 0x7fde85000000] Opening 'badmux_encode2.ts' for reading
 [h264 @ 0x7fde8580e800] concealing 865 DC, 865 AC, 865 MV errors in P
 frame
 [hls,applehttp @ 0x7fde85000000] Opening 'badmux_encode2.ts' for reading
 40x
 frame= 1158 fps=683 q=-0.0 Lsize=N/A time=00:01:00.00 bitrate=N/A
 speed=35.4x
 video:606kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
 muxing overhead: unknown
 MacBook:dash StevenLiu$
 }}}

 reproduced.

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


More information about the FFmpeg-trac mailing list