#9327 closed defect (worksforme)
HLS muxer produces broken fMP4 segments
Reported by: | maichelmann | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | avformat |
Version: | unspecified | Keywords: | hls h264 mp4 |
Cc: | Blocked By: | ||
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description (last modified by )
Hi,
I'm using the following command to produce a fMP4 HLS live stream using the hls muxer:
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 /mnt/hls/%v.m3u8
The produced files are served by an nginx server.
When playing this stream using ffplay while it is being produced, I get a lot of decoding errors:
https @ 0x7fedb0076ac0] Opening 'https://xxx/hls/video.m3u8' for reading [hls @ 0x7fedb0000bc0] Skip ('#EXT-X-VERSION:7') [https @ 0x7fedb075be80] Opening 'https://xxx/hls/init.mp4' for reading [hls @ 0x7fedb0000bc0] Opening 'https://xxx/hls/video15.m4s' for reading [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7fedb05d0680] Found duplicated MOOV Atom. Skipped it [h264 @ 0x7fedb0726480] Invalid NAL unit 0, skipping. 0B f=8/4 Last message repeated 6 times [h264 @ 0x7fedb0726480] error while decoding MB 35 34, bytestream -15 Invalid UE golomb code [h264 @ 0x7fedb0726480] pps_id 3199971767 out of range [h264 @ 0x7fedb0726480] concealing 894 DC, 894 AC, 894 MV errors in P frame [h264 @ 0x7fedb009e940] Invalid NAL unit size (1635019119 > 2456). [h264 @ 0x7fedb009e940] Error splitting the input into NAL units. [h264 @ 0x7fedb000b280] Invalid NAL unit size (598384111 > 1404). [h264 @ 0x7fedb000b280] Error splitting the input into NAL units. [h264 @ 0x7fedb0601940] Invalid NAL unit size (1974256614 > 1487). [h264 @ 0x7fedb0601940] Error splitting the input into NAL units. [h264 @ 0x7fedb0096fc0] Invalid NAL unit size (1877212017 > 4483). [h264 @ 0x7fedb0096fc0] Error splitting the input into NAL units. [h264 @ 0x7fedb06b2c80] Invalid NAL unit size (-757222362 > 1737). [h264 @ 0x7fedb06b2c80] Error splitting the input into NAL units. [h264 @ 0x7fedb06cfa80] Invalid NAL unit size (-478417025 > 1497). [h264 @ 0x7fedb06cfa80] Error splitting the input into NAL units. [h264 @ 0x7fedb06ec880] Invalid NAL unit 1, skipping. [h264 @ 0x7fedb06ec880] Invalid NAL unit size (-544932471 > 2751). [h264 @ 0x7fedb06ec880] Error splitting the input into NAL units. [h264 @ 0x7fedb0709680] Invalid NAL unit size (-438317624 > 2926). [h264 @ 0x7fedb0709680] Error splitting the input into NAL units. [h264 @ 0x7fedb0726480] Invalid NAL unit size (251642793 > 2983). [h264 @ 0x7fedb0726480] Error splitting the input into NAL units. [h264 @ 0x7fedb009e940] Invalid NAL unit size (-358754295 > 3120). [h264 @ 0x7fedb009e940] Error splitting the input into NAL units. [h264 @ 0x7fedb000b280] Invalid NAL unit size (2063513878 > 2778). [h264 @ 0x7fedb000b280] Error splitting the input into NAL units. [h264 @ 0x7fedb0601940] Invalid NAL unit size (-1199990998 > 3583). [h264 @ 0x7fedb0601940] Error splitting the input into NAL units. [h264 @ 0x7fedb0096fc0] Invalid NAL unit size (-1126628412 > 3314). [h264 @ 0x7fedb0096fc0] Error splitting the input into NAL units. [h264 @ 0x7fedb06b2c80] Invalid NAL unit size (-607626371 > 3359). [h264 @ 0x7fedb06b2c80] Error splitting the input into NAL units. [h264 @ 0x7fedb06cfa80] Invalid NAL unit size (1694413392 > 4192). [h264 @ 0x7fedb06cfa80] Error splitting the input into NAL units. [h264 @ 0x7fedb06ec880] Invalid NAL unit size (-1987969726 > 2397). [h264 @ 0x7fedb06ec880] Error splitting the input into NAL units. [h264 @ 0x7fedb0709680] Invalid NAL unit size (-726262102 > 3678). [h264 @ 0x7fedb0709680] Error splitting the input into NAL units. [h264 @ 0x7fedb0726480] Invalid NAL unit size (1327110259 > 3563). [h264 @ 0x7fedb0726480] Error splitting the input into NAL units. [h264 @ 0x7fedb009e940] Invalid NAL unit size (-2132502877 > 1262). [h264 @ 0x7fedb009e940] Error splitting the input into NAL units. [https @ 0x7fedb0076ac0] Opening 'https://xxx/hls/video.m3u8' for reading ... ...
These errors repeat every second, but ffplay still seems to decode it correctly. In VLC this stream isn't even playable.
This is also reproducible with libx265 and hevc_nvenc encoders.
When stopping the ffmpeg encoding process and playing the remaining streaming files again, such errors appear only for the first segment.
ffmpeg version: release/4.4
Full log:
ffmpeg:
# 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 /mnt/hls/%v.m3u8 ffmpeg version 5cfc0e433e Copyright (c) 2000-2021 the FFmpeg developers built with gcc 9 (Ubuntu 9.3.0-17ubuntu1~20.04) configuration: --extra-libs=-lpthread --extra-libs=-lm --enable-gpl --enable-nonfree --enable-cuda --enable-cuvid --enable-nvdec --enable-nvenc --enable-libnpp --enable-cuda-nvcc --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64./configure --enable-cuda --enable-cuvid --enable-nvdec --enable-nvenc --enable-nonfree --enable-libnpp --enable-cuda-nvcc --enable-libfdk-aac --enable-libx265 --enable-libx264 --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64 --nvccflags='-gencode arch=compute_61,code=sm_61 -O2' libavutil 56. 70.100 / 56. 70.100 libavcodec 58.134.100 / 58.134.100 libavformat 58. 76.100 / 58. 76.100 libavdevice 58. 13.100 / 58. 13.100 libavfilter 7.110.100 / 7.110.100 libswscale 5. 9.100 / 5. 9.100 libswresample 3. 9.100 / 3. 9.100 libpostproc 55. 9.100 / 55. 9.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, 50 tbc Stream mapping: Stream #0:0 -> #0:0 (rawvideo (native) -> h264 (libx264)) Press [q] to stop, [?] for help [libx264 @ 0x55e9f54a4480] using SAR=1/1 [libx264 @ 0x55e9f54a4480] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2 [libx264 @ 0x55e9f54a4480] profile High 4:4:4 Predictive, level 3.2, 4:4:4 8-bit [libx264 @ 0x55e9f54a4480] 264 - core 155 r2917 0a84d98 - H.264/MPEG-4 AVC codec - Copyleft 2003-2018 - http://www.videolan.org/x264.html - options: cabac=1 ref=2 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=6 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=0 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=4 threads=22 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 @ 0x55e9f54a0e40] Opening '/mnt/hls/init.mp4' for writing Output #0, hls, to '/mnt/hls/%v.m3u8': Metadata: encoder : Lavf58.76.100 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 : Lavc58.134.100 libx264 Side data: cpb: bitrate max/min/avg: 7168000/0/5120000 buffer size: 5120000 vbv_delay: N/A [hls @ 0x55e9f54a0e40] Opening '/mnt/hls/video0.m4s' for writing [hls @ 0x55e9f54a0e40] Opening '/mnt/hls/video.m3u8.tmp' for writing [hls @ 0x55e9f54a0e40] Opening '/mnt/hls/master.m3u8' for writing [hls @ 0x55e9f54a0e40] Opening '/mnt/hls/video1.m4s' for writing [hls @ 0x55e9f54a0e40] Opening '/mnt/hls/video.m3u8.tmp' for writing [hls @ 0x55e9f54a0e40] Opening '/mnt/hls/video2.m4s' for writing [hls @ 0x55e9f54a0e40] Opening '/mnt/hls/video.m3u8.tmp' for writing [hls @ 0x55e9f54a0e40] Opening '/mnt/hls/video3.m4s' for writing [hls @ 0x55e9f54a0e40] Opening '/mnt/hls/video.m3u8.tmp' for writing [hls @ 0x55e9f54a0e40] Opening '/mnt/hls/video4.m4s' for writing [hls @ 0x55e9f54a0e40] Opening '/mnt/hls/video.m3u8.tmp' for writing [hls @ 0x55e9f54a0e40] Opening '/mnt/hls/video5.m4s' for writing [hls @ 0x55e9f54a0e40] Opening '/mnt/hls/video.m3u8.tmp' for writing [hls @ 0x55e9f54a0e40] Opening '/mnt/hls/video6.m4s' for writing [hls @ 0x55e9f54a0e40] Opening '/mnt/hls/video.m3u8.tmp' for writing [hls @ 0x55e9f54a0e40] Opening '/mnt/hls/video7.m4s' for writing [hls @ 0x55e9f54a0e40] Opening '/mnt/hls/video.m3u8.tmp' for writing [hls @ 0x55e9f54a0e40] Opening '/mnt/hls/video8.m4s' for writing [hls @ 0x55e9f54a0e40] Opening '/mnt/hls/video.m3u8.tmp' for writing [hls @ 0x55e9f54a0e40] Opening '/mnt/hls/video9.m4s' for writing [hls @ 0x55e9f54a0e40] Opening '/mnt/hls/video.m3u8.tmp' for writing [hls @ 0x55e9f54a0e40] Opening '/mnt/hls/video10.m4s' for writing [hls @ 0x55e9f54a0e40] Opening '/mnt/hls/video.m3u8.tmp' for writing [hls @ 0x55e9f54a0e40] Opening '/mnt/hls/video11.m4s' for writing [hls @ 0x55e9f54a0e40] Opening '/mnt/hls/video.m3u8.tmp' for writing [hls @ 0x55e9f54a0e40] Opening '/mnt/hls/video12.m4s' for writing [hls @ 0x55e9f54a0e40] Opening '/mnt/hls/video.m3u8.tmp' for writing [hls @ 0x55e9f54a0e40] Opening '/mnt/hls/video13.m4s' for writing [hls @ 0x55e9f54a0e40] Opening '/mnt/hls/video.m3u8.tmp' for writing [hls @ 0x55e9f54a0e40] Opening '/mnt/hls/video14.m4s' for writing [hls @ 0x55e9f54a0e40] Opening '/mnt/hls/video.m3u8.tmp' for writing [hls @ 0x55e9f54a0e40] Opening '/mnt/hls/video15.m4s' for writing [hls @ 0x55e9f54a0e40] Opening '/mnt/hls/video.m3u8.tmp' for writing [hls @ 0x55e9f54a0e40] Opening '/mnt/hls/video16.m4s' for writing [hls @ 0x55e9f54a0e40] Opening '/mnt/hls/video.m3u8.tmp' for writing [hls @ 0x55e9f54a0e40] Opening '/mnt/hls/video17.m4s' for writing [hls @ 0x55e9f54a0e40] Opening '/mnt/hls/video.m3u8.tmp' for writing [hls @ 0x55e9f54a0e40] Opening '/mnt/hls/video18.m4s' for writing [hls @ 0x55e9f54a0e40] Opening '/mnt/hls/video.m3u8.tmp' for writing [hls @ 0x55e9f54a0e40] Opening '/mnt/hls/video19.m4s' for writing [hls @ 0x55e9f54a0e40] Opening '/mnt/hls/video.m3u8.tmp' for writing frame= 979 fps= 50 q=-1.0 Lsize=N/A time=00:00:19.54 bitrate=N/A speed=0.992x video:3021kB audio:0kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown [libx264 @ 0x55e9f54a4480] frame I:20 Avg QP: 0.76 size: 17200 [libx264 @ 0x55e9f54a4480] frame P:435 Avg QP: 0.53 size: 1876 [libx264 @ 0x55e9f54a4480] frame B:524 Avg QP: 1.71 size: 3688 [libx264 @ 0x55e9f54a4480] consecutive B-frames: 23.7% 1.8% 38.9% 35.5% [libx264 @ 0x55e9f54a4480] mb I I16..4: 93.6% 0.0% 6.4% [libx264 @ 0x55e9f54a4480] mb P I16..4: 9.4% 0.0% 0.2% P16..4: 3.6% 0.8% 0.1% 0.0% 0.0% skip:86.0% [libx264 @ 0x55e9f54a4480] mb B I16..4: 4.1% 0.0% 0.1% B16..8: 4.3% 0.5% 0.0% direct: 5.1% skip:85.9% L0:54.0% L1:40.1% BI: 6.0% [libx264 @ 0x55e9f54a4480] coded y,u,v intra: 1.8% 3.9% 3.9% inter: 0.7% 3.1% 2.9% [libx264 @ 0x55e9f54a4480] i16 v,h,dc,p: 99% 0% 1% 0% [libx264 @ 0x55e9f54a4480] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 45% 30% 20% 2% 1% 1% 0% 1% 0% [libx264 @ 0x55e9f54a4480] Weighted P-Frames: Y:0.0% UV:0.0% [libx264 @ 0x55e9f54a4480] ref P L0: 75.4% 24.6% [libx264 @ 0x55e9f54a4480] ref B L0: 64.8% 35.2% [libx264 @ 0x55e9f54a4480] ref B L1: 97.0% 3.0% [libx264 @ 0x55e9f54a4480] kb/s:1263.68 Exiting normally, received signal 2.
ffplay:
$ ffplay https://xxx/hls/master.m3u8 ffplay version 4.3.2 Copyright (c) 2003-2021 the FFmpeg developers built with gcc 10 (GCC) configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --docdir=/usr/share/doc/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection' --extra-ldflags='-Wl,-z,relro -Wl,--as-needed -Wl,-z,now -specs=/usr/lib/rpm/redhat/redhat-hardened-ld ' --extra-cflags=' -I/usr/include/rav1e' --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-version3 --enable-bzlib --disable-crystalhd --enable-fontconfig --enable-frei0r --enable-gcrypt --enable-gnutls --enable-ladspa --enable-libaom --enable-libdav1d --enable-libass --enable-libbluray --enable-libcdio --enable-libdrm --enable-libjack --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-liblensfun --enable-libmp3lame --enable-libmysofa --enable-nvenc --enable-openal --enable-opencl --enable-opengl --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg --enable-librav1e --enable-libsmbclient --enable-version3 --enable-libsoxr --enable-libspeex --enable-libssh --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libvidstab --enable-libvmaf --enable-version3 --enable-vapoursynth --enable-libvpx --enable-vulkan --enable-libglslang --enable-libx264 --enable-libx265 --enable-libxvid --enable-libxml2 --enable-libzimg --enable-libzvbi --enable-lv2 --enable-avfilter --enable-avresample --enable-libmodplug --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-lto --enable-libmfx --enable-runtime-cpudetect libavutil 56. 51.100 / 56. 51.100 libavcodec 58. 91.100 / 58. 91.100 libavformat 58. 45.100 / 58. 45.100 libavdevice 58. 10.100 / 58. 10.100 libavfilter 7. 85.100 / 7. 85.100 libavresample 4. 0. 0 / 4. 0. 0 libswscale 5. 7.100 / 5. 7.100 libswresample 3. 7.100 / 3. 7.100 libpostproc 55. 7.100 / 55. 7.100 [hls @ 0x7f9160000bc0] Skip ('#EXT-X-VERSION:7')B sq= 0B f=0/0 [hls @ 0x7f9160000bc0] Opening 'https://xxx/hls/video.m3u8' for reading [hls @ 0x7f9160000bc0] Skip ('#EXT-X-VERSION:7') [hls @ 0x7f9160000bc0] Opening 'https://xxx/hls/init.mp4' for reading [hls @ 0x7f9160000bc0] Opening 'https://xxx/hls/video4.m4s' for reading [hls @ 0x7f9160000bc0] Opening 'https://xxx/hls/video5.m4s' for reading Input #0, hls, from 'https://api.iptv.lwlcom.net/hls/ch36/master.m3u8': Duration: N/A, start: 0.080000, bitrate: 690 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], 690 kb/s, 50 fps, 50 tbr, 12800 tbn, 100 tbc Metadata: variant_bitrate : 5632000 compatible_brands: iso5iso6mp41 major_brand : iso5 minor_version : 512 encoder : Lavf58.76.100 [h264 @ 0x7f91605e4680] Invalid NAL unit 0, skipping. 0B f=0/0 Last message repeated 6 times [h264 @ 0x7f91605e4680] error while decoding MB 35 34, bytestream -15 Invalid UE golomb code [h264 @ 0x7f91605e4680] pps_id 3199971767 out of range [h264 @ 0x7f91605e4680] concealing 894 DC, 894 AC, 894 MV errors in P frame [h264 @ 0x7f916000a880] Invalid NAL unit size (1635019119 > 2524). [h264 @ 0x7f916000a880] Error splitting the input into NAL units. [h264 @ 0x7f916065e480] Invalid NAL unit size (-1829759794 > 1404). [h264 @ 0x7f916065e480] Error splitting the input into NAL units. [h264 @ 0x7f91606f2180] Invalid NAL unit size (166094046 > 1486). [h264 @ 0x7f91606f2180] Error splitting the input into NAL units. [h264 @ 0x7f916070ee00] Invalid NAL unit size (-1709010551 > 4394). [h264 @ 0x7f916070ee00] Error splitting the input into NAL units. [h264 @ 0x7f916072ba80] Invalid NAL unit size (-1296763943 > 1738). [h264 @ 0x7f916072ba80] Error splitting the input into NAL units. [h264 @ 0x7f91605dfa80] Invalid NAL unit size (734520070 > 1558). [h264 @ 0x7f91605dfa80] Error splitting the input into NAL units. [h264 @ 0x7f9160074000] Invalid NAL unit size (-1154727543 > 4796). [h264 @ 0x7f9160074000] Error splitting the input into NAL units. [h264 @ 0x7f9160634300] Invalid NAL unit size (987772374 > 2863). [h264 @ 0x7f9160634300] Error splitting the input into NAL units. [h264 @ 0x7f91605e4680] Invalid NAL unit size (-1139891260 > 2736). [h264 @ 0x7f91605e4680] Error splitting the input into NAL units. [h264 @ 0x7f916000a880] Invalid NAL unit size (-1809431930 > 3331). [h264 @ 0x7f916000a880] Error splitting the input into NAL units. [h264 @ 0x7f916065e480] Invalid NAL unit size (-1621316841 > 2803). [h264 @ 0x7f916065e480] Error splitting the input into NAL units. [h264 @ 0x7f91606f2180] Invalid NAL unit size (-1174425998 > 3660). [h264 @ 0x7f91606f2180] Error splitting the input into NAL units. [h264 @ 0x7f916070ee00] Invalid NAL unit size (-454287656 > 2812). [h264 @ 0x7f916070ee00] Error splitting the input into NAL units. [h264 @ 0x7f916072ba80] Invalid NAL unit size (332356729 > 3570). [h264 @ 0x7f916072ba80] Error splitting the input into NAL units. [h264 @ 0x7f91605dfa80] Invalid NAL unit size (1348583013 > 4152). [h264 @ 0x7f91605dfa80] Error splitting the input into NAL units. [h264 @ 0x7f9160074000] Invalid NAL unit size (-442161681 > 2339). [h264 @ 0x7f9160074000] Error splitting the input into NAL units. [h264 @ 0x7f9160634300] Invalid NAL unit size (4960112 > 3642). [h264 @ 0x7f9160634300] Error splitting the input into NAL units. [h264 @ 0x7f91605e4680] Invalid NAL unit size (-1452644366 > 4330). [h264 @ 0x7f91605e4680] Error splitting the input into NAL units. [h264 @ 0x7f916000a880] Invalid NAL unit size (2035501420 > 1269). [h264 @ 0x7f916000a880] Error splitting the input into NAL units. [https @ 0x7f91600a1b00] Opening 'https://xxx/hls/video6.m4s' for reading [https @ 0x7f9160076ac0] Opening 'https://xxx/hls/video.m3u8' for reading [hls @ 0x7f9160000bc0] Skip ('#EXT-X-VERSION:7') [https @ 0x7f91605f4b80] Opening 'https://xxx/hls/init.mp4' for reading [hls @ 0x7f9160000bc0] Opening 'https://xxx/hls/video7.m4s' for reading [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f91605d0b40] Found duplicated MOOV Atom. Skipped it [h264 @ 0x7f91605dfa80] Invalid NAL unit 0, skipping. 0B f=1/0 Last message repeated 6 times [h264 @ 0x7f91605dfa80] error while decoding MB 35 34, bytestream -15 Invalid UE golomb code [h264 @ 0x7f91605dfa80] pps_id 3199971767 out of range [h264 @ 0x7f91605dfa80] concealing 894 DC, 894 AC, 894 MV errors in P frame [h264 @ 0x7f9160074000] Invalid NAL unit size (1635019119 > 2524). [h264 @ 0x7f9160074000] Error splitting the input into NAL units. [h264 @ 0x7f9160634300] Invalid NAL unit size (-1829759794 > 1404). [h264 @ 0x7f9160634300] Error splitting the input into NAL units. [h264 @ 0x7f91605e4680] Invalid NAL unit size (166094046 > 1486). [h264 @ 0x7f91605e4680] Error splitting the input into NAL units. [h264 @ 0x7f916000a880] Invalid NAL unit size (-1709010551 > 4394). [h264 @ 0x7f916000a880] Error splitting the input into NAL units. [h264 @ 0x7f916065e480] Invalid NAL unit size (-1296763943 > 1738). [h264 @ 0x7f916065e480] Error splitting the input into NAL units. [h264 @ 0x7f91606f2180] Invalid NAL unit size (734520070 > 1558). [h264 @ 0x7f91606f2180] Error splitting the input into NAL units. [h264 @ 0x7f916070ee00] Invalid NAL unit size (-1154727543 > 4796). [h264 @ 0x7f916070ee00] Error splitting the input into NAL units. [h264 @ 0x7f916072ba80] Invalid NAL unit size (987772374 > 2863). [h264 @ 0x7f916072ba80] Error splitting the input into NAL units. [h264 @ 0x7f91605dfa80] Invalid NAL unit size (-1139891260 > 2736). [h264 @ 0x7f91605dfa80] Error splitting the input into NAL units. [h264 @ 0x7f9160074000] Invalid NAL unit size (-1809431930 > 3331). [h264 @ 0x7f9160074000] Error splitting the input into NAL units. [h264 @ 0x7f9160634300] Invalid NAL unit size (-1621316841 > 2803). [h264 @ 0x7f9160634300] Error splitting the input into NAL units. [h264 @ 0x7f91605e4680] Invalid NAL unit size (-1174425998 > 3660). [h264 @ 0x7f91605e4680] Error splitting the input into NAL units. [h264 @ 0x7f916000a880] Invalid NAL unit size (-454287656 > 2812). [h264 @ 0x7f916000a880] Error splitting the input into NAL units. [h264 @ 0x7f916065e480] Invalid NAL unit size (332356729 > 3570). [h264 @ 0x7f916065e480] Error splitting the input into NAL units. [h264 @ 0x7f91606f2180] Invalid NAL unit size (1348583013 > 4152). [h264 @ 0x7f91606f2180] Error splitting the input into NAL units. [h264 @ 0x7f916070ee00] Invalid NAL unit size (-442161681 > 2339). [h264 @ 0x7f916070ee00] Error splitting the input into NAL units. [h264 @ 0x7f916072ba80] Invalid NAL unit size (4960112 > 3642). [h264 @ 0x7f916072ba80] Error splitting the input into NAL units. [h264 @ 0x7f91605dfa80] Invalid NAL unit size (-1452644366 > 4330). [h264 @ 0x7f91605dfa80] Error splitting the input into NAL units. [h264 @ 0x7f9160074000] Invalid NAL unit size (2035501420 > 1269). [h264 @ 0x7f9160074000] Error splitting the input into NAL units. [https @ 0x7f9160076ac0] Opening 'https://xxx/hls/video.m3u8' for reading [hls @ 0x7f9160000bc0] Skip ('#EXT-X-VERSION:7') [https @ 0x7f91600a1b00] Opening 'https://xxx/hls/init.mp4' for reading [hls @ 0x7f9160000bc0] Opening 'https://xxx/hls/video8.m4s' for reading [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f91605d0b40] Found duplicated MOOV Atom. Skipped it [h264 @ 0x7f9160074000] Invalid NAL unit 0, skipping. 0B f=2/1 Last message repeated 6 times [h264 @ 0x7f9160074000] error while decoding MB 35 34, bytestream -15 Invalid UE golomb code [h264 @ 0x7f9160074000] pps_id 3199971767 out of range [h264 @ 0x7f9160074000] concealing 894 DC, 894 AC, 894 MV errors in P frame [h264 @ 0x7f9160634300] Invalid NAL unit size (1635019119 > 2524). [h264 @ 0x7f9160634300] Error splitting the input into NAL units. [h264 @ 0x7f91605e4680] Invalid NAL unit size (-1829759794 > 1404). [h264 @ 0x7f91605e4680] Error splitting the input into NAL units. [h264 @ 0x7f916000a880] Invalid NAL unit size (166094046 > 1486). [h264 @ 0x7f916000a880] Error splitting the input into NAL units. [h264 @ 0x7f916065e480] Invalid NAL unit size (-1709010551 > 4394). [h264 @ 0x7f916065e480] Error splitting the input into NAL units. [h264 @ 0x7f91606f2180] Invalid NAL unit size (-1296763943 > 1738). [h264 @ 0x7f91606f2180] Error splitting the input into NAL units. [h264 @ 0x7f916070ee00] Invalid NAL unit size (734520070 > 1558). [h264 @ 0x7f916070ee00] Error splitting the input into NAL units. [h264 @ 0x7f916072ba80] Invalid NAL unit size (-1154727543 > 4796). [h264 @ 0x7f916072ba80] Error splitting the input into NAL units. [h264 @ 0x7f91605dfa80] Invalid NAL unit size (987772374 > 2863). [h264 @ 0x7f91605dfa80] Error splitting the input into NAL units. [h264 @ 0x7f9160074000] Invalid NAL unit size (-1139891260 > 2736). [h264 @ 0x7f9160074000] Error splitting the input into NAL units. [h264 @ 0x7f9160634300] Invalid NAL unit size (-1809431930 > 3331). [h264 @ 0x7f9160634300] Error splitting the input into NAL units. [h264 @ 0x7f91605e4680] Invalid NAL unit size (-1621316841 > 2803). [h264 @ 0x7f91605e4680] Error splitting the input into NAL units. [h264 @ 0x7f916000a880] Invalid NAL unit size (-1174425998 > 3660). [h264 @ 0x7f916000a880] Error splitting the input into NAL units. [h264 @ 0x7f916065e480] Invalid NAL unit size (-454287656 > 2812). [h264 @ 0x7f916065e480] Error splitting the input into NAL units. [h264 @ 0x7f91606f2180] Invalid NAL unit size (332356729 > 3570). [h264 @ 0x7f91606f2180] Error splitting the input into NAL units. [h264 @ 0x7f916070ee00] Invalid NAL unit size (1348583013 > 4152). [h264 @ 0x7f916070ee00] Error splitting the input into NAL units. [h264 @ 0x7f916072ba80] Invalid NAL unit size (-442161681 > 2339). [h264 @ 0x7f916072ba80] Error splitting the input into NAL units. [h264 @ 0x7f91605dfa80] Invalid NAL unit size (4960112 > 3642). [h264 @ 0x7f91605dfa80] Error splitting the input into NAL units. [h264 @ 0x7f9160074000] Invalid NAL unit size (-1452644366 > 4330). [h264 @ 0x7f9160074000] Error splitting the input into NAL units. [h264 @ 0x7f9160634300] Invalid NAL unit size (2035501420 > 1269). [h264 @ 0x7f9160634300] Error splitting the input into NAL units. [https @ 0x7f9160076ac0] Opening 'https://xxx/hls/video.m3u8' for reading [hls @ 0x7f9160000bc0] Skip ('#EXT-X-VERSION:7') [https @ 0x7f91605f4b80] Opening 'https://xxx/hls/init.mp4' for reading [hls @ 0x7f9160000bc0] Opening 'https://xxx/hls/video9.m4s' for reading [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f91605d0b40] Found duplicated MOOV Atom. Skipped it [h264 @ 0x7f9160634300] Invalid NAL unit 0, skipping. 0B f=3/1 Last message repeated 6 times [h264 @ 0x7f9160634300] error while decoding MB 35 34, bytestream -15 Invalid UE golomb code [h264 @ 0x7f9160634300] pps_id 3199971767 out of range [h264 @ 0x7f9160634300] concealing 894 DC, 894 AC, 894 MV errors in P frame [h264 @ 0x7f91605e4680] Invalid NAL unit size (1635019119 > 2524). [h264 @ 0x7f91605e4680] Error splitting the input into NAL units. [h264 @ 0x7f916000a880] Invalid NAL unit size (-1829759794 > 1404). [h264 @ 0x7f916000a880] Error splitting the input into NAL units. [h264 @ 0x7f916065e480] Invalid NAL unit size (166094046 > 1486). [h264 @ 0x7f916065e480] Error splitting the input into NAL units. [h264 @ 0x7f91606f2180] Invalid NAL unit size (-1709010551 > 4394). [h264 @ 0x7f91606f2180] Error splitting the input into NAL units. [h264 @ 0x7f916070ee00] Invalid NAL unit size (-1296763943 > 1738). [h264 @ 0x7f916070ee00] Error splitting the input into NAL units. [h264 @ 0x7f916072ba80] Invalid NAL unit size (734520070 > 1558). [h264 @ 0x7f916072ba80] Error splitting the input into NAL units. [h264 @ 0x7f91605dfa80] Invalid NAL unit size (-1154727543 > 4796). [h264 @ 0x7f91605dfa80] Error splitting the input into NAL units. [h264 @ 0x7f9160074000] Invalid NAL unit size (987772374 > 2863). [h264 @ 0x7f9160074000] Error splitting the input into NAL units. [h264 @ 0x7f9160634300] Invalid NAL unit size (-1139891260 > 2736). [h264 @ 0x7f9160634300] Error splitting the input into NAL units. [h264 @ 0x7f91605e4680] Invalid NAL unit size (-1809431930 > 3331). [h264 @ 0x7f91605e4680] Error splitting the input into NAL units. [h264 @ 0x7f916000a880] Invalid NAL unit size (-1621316841 > 2803). [h264 @ 0x7f916000a880] Error splitting the input into NAL units. [h264 @ 0x7f916065e480] Invalid NAL unit size (-1174425998 > 3660). [h264 @ 0x7f916065e480] Error splitting the input into NAL units. [h264 @ 0x7f91606f2180] Invalid NAL unit size (-454287656 > 2812). [h264 @ 0x7f91606f2180] Error splitting the input into NAL units. [h264 @ 0x7f916070ee00] Invalid NAL unit size (332356729 > 3570). [h264 @ 0x7f916070ee00] Error splitting the input into NAL units. [h264 @ 0x7f916072ba80] Invalid NAL unit size (1348583013 > 4152). [h264 @ 0x7f916072ba80] Error splitting the input into NAL units. [h264 @ 0x7f91605dfa80] Invalid NAL unit size (-442161681 > 2339). [h264 @ 0x7f91605dfa80] Error splitting the input into NAL units. [h264 @ 0x7f9160074000] Invalid NAL unit size (4960112 > 3642). [h264 @ 0x7f9160074000] Error splitting the input into NAL units. [h264 @ 0x7f9160634300] Invalid NAL unit size (-1452644366 > 4330). [h264 @ 0x7f9160634300] Error splitting the input into NAL units. [h264 @ 0x7f91605e4680] Invalid NAL unit size (2035501420 > 1269). [h264 @ 0x7f91605e4680] Error splitting the input into NAL units. [https @ 0x7f9160762680] Opening 'https://xxx/hls/video10.m4s' for reading [https @ 0x7f9160076ac0] Opening 'https://xxx/hls/video.m3u8' for reading [hls @ 0x7f9160000bc0] Skip ('#EXT-X-VERSION:7') [https @ 0x7f91605f4b00] Opening 'https://xxx/hls/init.mp4' for reading [hls @ 0x7f9160000bc0] Opening 'https://xxx/hls/video11.m4s' for reading [mov,mp4,m4a,3gp,3g2,mj2 @ 0x7f91605d0b40] Found duplicated MOOV Atom. Skipped it ^C[marcus@ws-marcus ~]$ 4 aq= 0KB vq= 95KB sq= 0B f=3/2
Change History (6)
comment:1 by , 3 years ago
Description: | modified (diff) |
---|
comment:3 by , 3 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
comment:4 by , 3 years ago
Hi,
thanks for trying to reproduce this. Could you please try to run ffplay in another console windows while ffmpeg is still running? So that ffplay plays the live stream that's currently being encoded?
follow-up: 6 comment:5 by , 3 years ago
Hi,
thanks for trying to reproduce this. Could you please try to run ffplay in another console windows while ffmpeg is still running? So that ffplay plays the live stream that's currently being encoded?
comment:6 by , 3 years ago
Replying to maichelmann:
Hi,
thanks for trying to reproduce this. Could you please try to run ffplay in another console windows while ffmpeg is still running? So that ffplay plays the live stream that's currently being encoded?
sure, no problem too.
(base) liuqi05:ufbuild liuqi$ ./ffplay http://127.0.0.1/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 @ 0x61600003ff80] Skip ('#EXT-X-VERSION:7') [hls @ 0x61600003ff80] Opening 'http://127.0.0.1/hls/video.m3u8' for reading [hls @ 0x61600003ff80] Skip ('#EXT-X-VERSION:7') [hls @ 0x61600003ff80] Opening 'http://127.0.0.1/hls/init.mp4' for reading [hls @ 0x61600003ff80] Opening 'http://127.0.0.1/hls/video108.m4s' for reading [hls @ 0x61600003ff80] Opening 'http://127.0.0.1/hls/video109.m4s' for reading Input #0, hls, from 'http://127.0.0.1/hls/master.m3u8': Duration: N/A, start: 108.080000, bitrate: 11 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], 11 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 [http @ 0x626000039100] Opening 'http://127.0.0.1/hls/video110.m4s' for reading [http @ 0x626000033100] Opening 'http://127.0.0.1/hls/video.m3u8' for reading [hls @ 0x61600003ff80] Skip ('#EXT-X-VERSION:7') [http @ 0x62600003c100] Opening 'http://127.0.0.1/hls/init.mp4' for reading [hls @ 0x61600003ff80] Opening 'http://127.0.0.1/hls/video111.m4s' for reading [mov,mp4,m4a,3gp,3g2,mj2 @ 0x616000040280] Found duplicated MOOV Atom. Skipped it [http @ 0x626000033100] Opening 'http://127.0.0.1/hls/video.m3u8' for reading [hls @ 0x61600003ff80] Skip ('#EXT-X-VERSION:7') [http @ 0x62600004e100] Opening 'http://127.0.0.1/hls/init.mp4' for reading [hls @ 0x61600003ff80] Opening 'http://127.0.0.1/hls/video112.m4s' for reading [http @ 0x626000039100] Opening 'http://127.0.0.1/hls/video113.m4s' for reading [mov,mp4,m4a,3gp,3g2,mj2 @ 0x616000040280] Found duplicated MOOV Atom. Skipped it [http @ 0x626000033100] Opening 'http://127.0.0.1/hls/video.m3u8' for reading [hls @ 0x61600003ff80] Skip ('#EXT-X-VERSION:7') [http @ 0x626000039100] Opening 'http://127.0.0.1/hls/init.mp4' for reading [hls @ 0x61600003ff80] Opening 'http://127.0.0.1/hls/video114.m4s' for reading [http @ 0x626000051100] Opening 'http://127.0.0.1/hls/video115.m4s' for reading [mov,mp4,m4a,3gp,3g2,mj2 @ 0x616000040280] Found duplicated MOOV Atom. Skipped it [http @ 0x626000033100] Opening 'http://127.0.0.1/hls/video.m3u8' for reading [hls @ 0x61600003ff80] Skip ('#EXT-X-VERSION:7') [http @ 0x626000054100] Opening 'http://127.0.0.1/hls/init.mp4' for reading [hls @ 0x61600003ff80] Opening 'http://127.0.0.1/hls/video116.m4s' for reading [mov,mp4,m4a,3gp,3g2,mj2 @ 0x616000040280] Found duplicated MOOV Atom. Skipped it [http @ 0x626000033100] Opening 'http://127.0.0.1/hls/video.m3u8' for reading [hls @ 0x61600003ff80] Skip ('#EXT-X-VERSION:7') [http @ 0x626000057100] Opening 'http://127.0.0.1/hls/init.mp4' for reading [hls @ 0x61600003ff80] Opening 'http://127.0.0.1/hls/video117.m4s' for reading [http @ 0x626000051100] Opening 'http://127.0.0.1/hls/video118.m4s' for reading [mov,mp4,m4a,3gp,3g2,mj2 @ 0x616000040280] Found duplicated MOOV Atom. Skipped it 2021-07-20 15:42:58.261 ffplay[36660:71436098] TSM AdjustCapsLockLEDForKeyTransitionHandling - _ISSetPhysicalKeyboardCapsLockLED Inhibit (base) liuqi05:ufbuild liuqi$ ps -ef|grep ffmpeg 501 36597 1001 0 3:40下午 ttys008 2:59.30 /Users/liuqi/multimedia/upstream_ffmpeg/ufbuild/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 501 36665 1058 0 3:43下午 ttys010 0:00.01 grep ffmpeg (base) liuqi05:ufbuild liuqi$