[FFmpeg-trac] #9327(avformat:new): HLS muxer produces broken fMP4 segments
FFmpeg
trac at avcodec.org
Tue Jul 20 06:35:41 EEST 2021
#9327: HLS muxer produces broken fMP4 segments
--------------------------------------+------------------------------------
Reporter: maichelmann | Owner: (none)
Type: defect | Status: new
Priority: normal | Component: avformat
Version: unspecified | Resolution:
Keywords: hls h264 mp4 | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
--------------------------------------+------------------------------------
Comment (by Steven Liu):
{{{
(base) liuqi05:ufbuild liuqi$ ./ffmpeg -threads 4 -re -f lavfi -i
testsrc=size=1280x720:decimals=0:rate=50 -map 0:v:0 -c:v libx264 -b:v
5120K -maxrate 7168K -bufsize 5120K -g 50 -preset fast -f hls
-hls_segment_type fmp4 -hls_time 1s -hls_list_size 60 -var_stream_map
"v:0,name:video" -master_pl_name master.m3u8 hls/%v.m3u8
ffmpeg version N-103013-g05c9f6f4ef Copyright (c) 2000-2021 the FFmpeg
developers
built with Apple clang version 12.0.5 (clang-1205.0.22.11)
configuration: --prefix=/usr/local/ --libdir=/usr/local/lib/ --cc=clang
--quiet --enable-htmlpages --enable-libx264 --enable-libxml2 --enable-gpl
--extra-ldflags='-I/usr/local/opt/openssl/include/ -O0 -g3
-fsanitize=address -Wno-error -fPIC -I/usr/local/include' --extra-
ldflags='-O0 -g3 -fsanitize=address -Wno-error -fPIC -L/usr/local/lib
-L/usr/local/opt/openssl/lib' --enable-libfreetype --enable-fontconfig
--enable-libspeex --enable-libopus --enable-libzmq --enable-libx265
--enable-libass --enable-videotoolbox --disable-optimizations --enable-
audiotoolbox --enable-opengl --disable-stripping --samples=../../fate-
suite/ --enable-encoder=hevc_videotoolbox --enable-
hwaccel=hevc_videotoolbox --enable-hwaccel=h264_videotoolbox --enable-
openssl --enable-nonfree --disable-shared --enable-libfdk_aac
libavutil 57. 0.101 / 57. 0.101
libavcodec 59. 3.102 / 59. 3.102
libavformat 59. 4.101 / 59. 4.101
libavdevice 59. 0.100 / 59. 0.100
libavfilter 8. 0.103 / 8. 0.103
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 'testsrc=size=1280x720:decimals=0:rate=50':
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], 50 tbr, 50 tbn
Stream mapping:
Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
Press [q] to stop, [?] for help
[libx264 @ 0x619000003280] using SAR=1/1
[libx264 @ 0x619000003280] using cpu capabilities: MMX2 SSE2Fast SSSE3
SSE4.2 AVX FMA3 BMI2 AVX2
[libx264 @ 0x619000003280] profile High 4:4:4 Predictive, level 3.2,
4:4:4, 8-bit
[libx264 @ 0x619000003280] 264 - core 161 r3018 db0d417 - H.264/MPEG-4 AVC
codec - Copyleft 2003-2020 - http://www.videolan.org/x264.html - options:
cabac=1 ref=2 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=6 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=18
lookahead_threads=3 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=1 keyint=50 keyint_min=5
scenecut=40 intra_refresh=0 rc_lookahead=30 rc=abr mbtree=1 bitrate=5120
ratetol=1.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 vbv_maxrate=7168
vbv_bufsize=5120 nal_hrd=none filler=0 ip_ratio=1.40 aq=1:1.00
[hls @ 0x616000012980] Opening 'hls/init.mp4' for writing
Output #0, hls, to 'hls/%v.m3u8':
Metadata:
encoder : Lavf59.4.101
Stream #0:0: Video: h264, yuv444p(tv, progressive), 1280x720 [SAR 1:1
DAR 16:9], q=2-31, 5120 kb/s, 50 fps, 12800 tbn
Metadata:
encoder : Lavc59.3.102 libx264
Side data:
cpb: bitrate max/min/avg: 7168000/0/5120000 buffer size: 5120000
vbv_delay: N/A
[hls @ 0x616000012980] Opening 'hls/video0.m4s' for writing=N/A
speed=0.467x
[hls @ 0x616000012980] Opening 'hls/video.m3u8.tmp' for writing
[hls @ 0x616000012980] Opening 'hls/master.m3u8' for writing
[hls @ 0x616000012980] Opening 'hls/video1.m4s' for writing=N/A
speed=0.643x
[hls @ 0x616000012980] Opening 'hls/video.m3u8.tmp' for writing
[hls @ 0x616000012980] Opening 'hls/video2.m4s' for writing=N/A
speed=0.734x
[hls @ 0x616000012980] Opening 'hls/video.m3u8.tmp' for writing
[hls @ 0x616000012980] Opening 'hls/video3.m4s' for writing=N/A
speed=0.762x
[hls @ 0x616000012980] Opening 'hls/video.m3u8.tmp' for writing
[hls @ 0x616000012980] Opening 'hls/video4.m4s' for writing=N/A
speed=0.808x
[hls @ 0x616000012980] Opening 'hls/video.m3u8.tmp' for writing
[hls @ 0x616000012980] Opening 'hls/video5.m4s' for writing=N/A
speed=0.835x
[hls @ 0x616000012980] Opening 'hls/video.m3u8.tmp' for writing
[hls @ 0x616000012980] Opening 'hls/video6.m4s' for writing=N/A
speed=0.858x
[hls @ 0x616000012980] Opening 'hls/video.m3u8.tmp' for writing
[hls @ 0x616000012980] Opening 'hls/video7.m4s' for writing=N/A
speed=0.875x
[hls @ 0x616000012980] Opening 'hls/video.m3u8.tmp' for writing
[hls @ 0x616000012980] Opening 'hls/video8.m4s' for writing=N/A
speed=0.889x
[hls @ 0x616000012980] Opening 'hls/video.m3u8.tmp' for writing
[hls @ 0x616000012980] Opening 'hls/video9.m4s' for writing=N/A speed=
0.9x
[hls @ 0x616000012980] Opening 'hls/video.m3u8.tmp' for writing
[hls @ 0x616000012980] Opening 'hls/video10.m4s' for writingN/A
speed=0.908x
[hls @ 0x616000012980] Opening 'hls/video.m3u8.tmp' for writing
[hls @ 0x616000012980] Opening 'hls/video11.m4s' for writingN/A
speed=0.916x
[hls @ 0x616000012980] Opening 'hls/video.m3u8.tmp' for writing
[hls @ 0x616000012980] Opening 'hls/video12.m4s' for writingN/A
speed=0.921x
[hls @ 0x616000012980] Opening 'hls/video.m3u8.tmp' for writing
[hls @ 0x616000012980] Opening 'hls/video13.m4s' for writingN/A
speed=0.928x
[hls @ 0x616000012980] Opening 'hls/video.m3u8.tmp' for writing
[hls @ 0x616000012980] Opening 'hls/video14.m4s' for writingN/A
speed=0.931x
[hls @ 0x616000012980] Opening 'hls/video.m3u8.tmp' for writing
[hls @ 0x616000012980] Opening 'hls/video15.m4s' for writingN/A
speed=0.936x
[hls @ 0x616000012980] Opening 'hls/video.m3u8.tmp' for writing
[hls @ 0x616000012980] Opening 'hls/video16.m4s' for writingN/A
speed=0.939x
[hls @ 0x616000012980] Opening 'hls/video.m3u8.tmp' for writing
[hls @ 0x616000012980] Opening 'hls/video17.m4s' for writingN/A
speed=0.943x
[hls @ 0x616000012980] Opening 'hls/video.m3u8.tmp' for writing
[hls @ 0x616000012980] Opening 'hls/video18.m4s' for writingN/A
speed=0.946x
[hls @ 0x616000012980] Opening 'hls/video.m3u8.tmp' for writing
[hls @ 0x616000012980] Opening 'hls/video19.m4s' for writingN/A
speed=0.948x
[hls @ 0x616000012980] Opening 'hls/video.m3u8.tmp' for writing
[hls @ 0x616000012980] Opening 'hls/video20.m4s' for writingN/A
speed=0.95x
[hls @ 0x616000012980] Opening 'hls/video.m3u8.tmp' for writing
[hls @ 0x616000012980] Opening 'hls/video21.m4s' for writingN/A
speed=0.953x
[hls @ 0x616000012980] Opening 'hls/video.m3u8.tmp' for writing
[hls @ 0x616000012980] Opening 'hls/video22.m4s' for writingN/A
speed=0.955x
[hls @ 0x616000012980] Opening 'hls/video.m3u8.tmp' for writing
[hls @ 0x616000012980] Opening 'hls/video23.m4s' for writingN/A
speed=0.957x
[hls @ 0x616000012980] Opening 'hls/video.m3u8.tmp' for writing
[hls @ 0x616000012980] Opening 'hls/video24.m4s' for writingN/A
speed=0.959x
[hls @ 0x616000012980] Opening 'hls/video.m3u8.tmp' for writing
[hls @ 0x616000012980] Opening 'hls/video25.m4s' for writingN/A
speed=0.96x
[hls @ 0x616000012980] Opening 'hls/video.m3u8.tmp' for writing
[hls @ 0x616000012980] Opening 'hls/video26.m4s' for writingN/A
speed=0.962x
[hls @ 0x616000012980] Opening 'hls/video.m3u8.tmp' for writing
[hls @ 0x616000012980] Opening 'hls/video27.m4s' for writing
[hls @ 0x616000012980] Opening 'hls/video.m3u8.tmp' for writing
[hls @ 0x616000012980] Opening 'hls/video28.m4s' for writing
[hls @ 0x616000012980] Opening 'hls/video.m3u8.tmp' for writing
frame= 1401 fps= 50 q=-1.0 Lsize=N/A time=00:00:27.98 bitrate=N/A
speed=0.994x
video:4356kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: unknown
[libx264 @ 0x619000003280] frame I:29 Avg QP: 0.61 size: 17311
[libx264 @ 0x619000003280] frame P:626 Avg QP: 0.39 size: 1826
[libx264 @ 0x619000003280] frame B:746 Avg QP: 1.54 size: 3773
[libx264 @ 0x619000003280] consecutive B-frames: 24.1% 2.0% 37.9% 36.0%
[libx264 @ 0x619000003280] mb I I16..4: 91.4% 2.2% 6.4%
[libx264 @ 0x619000003280] mb P I16..4: 8.9% 0.7% 0.2% P16..4: 3.5%
0.8% 0.1% 0.0% 0.0% skip:85.9%
[libx264 @ 0x619000003280] mb B I16..4: 4.1% 0.3% 0.0% B16..8: 4.2%
0.5% 0.0% direct: 5.1% skip:85.8% L0:54.2% L1:39.9% BI: 5.9%
[libx264 @ 0x619000003280] 8x8 transform intra:6.0% inter:7.9%
[libx264 @ 0x619000003280] coded y,u,v intra: 2.1% 4.0% 4.2% inter: 0.6%
3.1% 2.8%
[libx264 @ 0x619000003280] i16 v,h,dc,p: 99% 1% 1% 0%
[libx264 @ 0x619000003280] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 96% 1% 3% 0%
0% 0% 0% 0% 0%
[libx264 @ 0x619000003280] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 31% 39% 25% 2%
1% 1% 0% 2% 0%
[libx264 @ 0x619000003280] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x619000003280] ref P L0: 74.7% 25.3%
[libx264 @ 0x619000003280] ref B L0: 64.6% 35.4%
[libx264 @ 0x619000003280] ref B L1: 96.9% 3.1%
[libx264 @ 0x619000003280] kb/s:1273.31
(base) liuqi05:ufbuild liuqi$ ./ffplay hls/
init.mp4 video0.m4s video11.m4s video14.m4s video17.m4s
video2.m4s video22.m4s video25.m4s video28.m4s video5.m4s
video8.m4s
master.m3u8 video1.m4s video12.m4s video15.m4s video18.m4s
video20.m4s video23.m4s video26.m4s video3.m4s video6.m4s
video9.m4s
video.m3u8 video10.m4s video13.m4s video16.m4s video19.m4s
video21.m4s video24.m4s video27.m4s video4.m4s video7.m4s
(base) liuqi05:ufbuild liuqi$ ./ffplay hls/master.m3u8
ffplay version N-103013-g05c9f6f4ef Copyright (c) 2003-2021 the FFmpeg
developers
built with Apple clang version 12.0.5 (clang-1205.0.22.11)
configuration: --prefix=/usr/local/ --libdir=/usr/local/lib/ --cc=clang
--quiet --enable-htmlpages --enable-libx264 --enable-libxml2 --enable-gpl
--extra-ldflags='-I/usr/local/opt/openssl/include/ -O0 -g3
-fsanitize=address -Wno-error -fPIC -I/usr/local/include' --extra-
ldflags='-O0 -g3 -fsanitize=address -Wno-error -fPIC -L/usr/local/lib
-L/usr/local/opt/openssl/lib' --enable-libfreetype --enable-fontconfig
--enable-libspeex --enable-libopus --enable-libzmq --enable-libx265
--enable-libass --enable-videotoolbox --disable-optimizations --enable-
audiotoolbox --enable-opengl --disable-stripping --samples=../../fate-
suite/ --enable-encoder=hevc_videotoolbox --enable-
hwaccel=hevc_videotoolbox --enable-hwaccel=h264_videotoolbox --enable-
openssl --enable-nonfree --disable-shared --enable-libfdk_aac
libavutil 57. 0.101 / 57. 0.101
libavcodec 59. 3.102 / 59. 3.102
libavformat 59. 4.101 / 59. 4.101
libavdevice 59. 0.100 / 59. 0.100
libavfilter 8. 0.103 / 8. 0.103
libswscale 6. 0.100 / 6. 0.100
libswresample 4. 0.100 / 4. 0.100
libpostproc 56. 0.100 / 56. 0.100
[hls @ 0x61600004fe80] Skip ('#EXT-X-VERSION:7')
[hls @ 0x61600004fe80] Opening 'hls/video.m3u8' for reading
[hls @ 0x61600004fe80] Skip ('#EXT-X-VERSION:7')
[hls @ 0x61600004fe80] Opening 'hls/init.mp4' for reading
[hls @ 0x61600004fe80] Opening 'hls/video0.m4s' for reading
Input #0, hls, from 'hls/master.m3u8':
Duration: 00:00:28.02, start: 0.080000, bitrate: 0 kb/s
Program 0
Metadata:
variant_bitrate : 5632000
Stream #0:0: Video: h264 (High 4:4:4 Predictive) (avc1 / 0x31637661),
yuv444p, 1280x720 [SAR 1:1 DAR 16:9], 721 kb/s, 50 fps, 50 tbr, 12800 tbn
(default)
Metadata:
variant_bitrate : 5632000
compatible_brands: iso5iso6mp41
major_brand : iso5
minor_version : 512
encoder : Lavf59.4.101
[hls @ 0x61600004fe80] Opening 'hls/video1.m4s' for reading
[hls @ 0x61600004fe80] Opening 'hls/video2.m4s' for reading f=0/0
[hls @ 0x61600004fe80] Opening 'hls/video3.m4s' for reading f=0/0
[hls @ 0x61600004fe80] Opening 'hls/video4.m4s' for reading f=0/0
[hls @ 0x61600004fe80] Opening 'hls/video5.m4s' for reading f=0/0
[hls @ 0x61600004fe80] Opening 'hls/video6.m4s' for reading f=0/0
[hls @ 0x61600004fe80] Opening 'hls/video7.m4s' for reading f=0/0
[hls @ 0x61600004fe80] Opening 'hls/video8.m4s' for reading f=0/0
[hls @ 0x61600004fe80] Opening 'hls/video9.m4s' for reading f=0/0
[hls @ 0x61600004fe80] Opening 'hls/video10.m4s' for readingf=0/0
[hls @ 0x61600004fe80] Opening 'hls/video11.m4s' for readingf=0/0
[hls @ 0x61600004fe80] Opening 'hls/video12.m4s' for readingf=0/0
[hls @ 0x61600004fe80] Opening 'hls/video13.m4s' for readingf=0/0
[hls @ 0x61600004fe80] Opening 'hls/video14.m4s' for readingf=0/0
[hls @ 0x61600004fe80] Opening 'hls/video15.m4s' for readingf=0/0
[hls @ 0x61600004fe80] Opening 'hls/video16.m4s' for readingf=0/0
[hls @ 0x61600004fe80] Opening 'hls/video17.m4s' for readingf=0/0
[hls @ 0x61600004fe80] Opening 'hls/video18.m4s' for readingf=0/0
[hls @ 0x61600004fe80] Opening 'hls/video19.m4s' for readingf=0/0
[hls @ 0x61600004fe80] Opening 'hls/video20.m4s' for readingf=0/0
[hls @ 0x61600004fe80] Opening 'hls/video21.m4s' for readingf=0/0
[hls @ 0x61600004fe80] Opening 'hls/video22.m4s' for readingf=0/0
[hls @ 0x61600004fe80] Opening 'hls/video23.m4s' for readingf=0/0
[hls @ 0x61600004fe80] Opening 'hls/video24.m4s' for readingf=0/0
[hls @ 0x61600004fe80] Opening 'hls/video25.m4s' for readingf=0/0
[hls @ 0x61600004fe80] Opening 'hls/video26.m4s' for readingf=0/0
[hls @ 0x61600004fe80] Opening 'hls/video27.m4s' for readingf=0/0
[hls @ 0x61600004fe80] Opening 'hls/video28.m4s' for readingf=0/0
2021-07-20 11:34:37.852 ffplay[31375:70963049] TSM
AdjustCapsLockLEDForKeyTransitionHandling -
_ISSetPhysicalKeyboardCapsLockLED Inhibit
(base) liuqi05:ufbuild liuqi$
}}}
--
Ticket URL: <https://trac.ffmpeg.org/ticket/9327#comment:2>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list