[FFmpeg-user] Failed to update header with correct duration. Failed to update header with correct filesize.

gary0318 at me.com gary0318 at me.com
Thu Jun 17 14:48:36 EEST 2021


I should also mention that the audio portion does not come through on the
stream.

Gar

 

Previous message:

 

When I use this command to send a stream to nginx, It fails with the errors
listed below. It processes about half of the media file, and crashes at the
same frame every time. Even, if I experiment and change the buffer size

 

Command:

ffmpeg -re -y -i /home/george/Documents/TOWSON-PLAYLISTS/test.mp4 -vcodec
libx264 -b:v 1024k -r 25 -s 1920x1080 -filter:v yadif -ab 64k -ac 1 -ar
44100 -f flv "rtmp://towson.ddns.net/live/CH3-NVT" 

 

 

errors :

[flv @ 0x55c0ce545880] Failed to update header with correct
duration.081.8kbits/s speed=0.826x    

[flv @ 0x55c0ce545880] Failed to update header with correct filesize.

 

 

 

Output:

ffmpeg version 4.2.4-1ubuntu0.1 Copyright (c) 2000-2020 the FFmpeg
developers

  built with gcc 9 (Ubuntu 9.3.0-10ubuntu2)

  configuration: --prefix=/usr --extra-version=1ubuntu0.1
--toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu
--incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl
--disable-stripping --enable-avresample --disable-filter=resample
--enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom
--enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca
--enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig
--enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm
--enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg
--enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg
--enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr
--enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame
--enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack
--enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid
--enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal
--enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394
--enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint
--enable-frei0r --enable-libx264 --enable-shared

  WARNING: library configuration mismatch

  avcodec     configuration: --prefix=/usr --extra-version=1ubuntu0.1
--toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu
--incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl
--disable-stripping --enable-avresample --disable-filter=resample
--enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom
--enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca
--enable-libcdio --enable-libcodec2 --enable-libflite --enable-libfontconfig
--enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm
--enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg
--enable-libopenmpt --enable-libopus --enable-libpulse --enable-librsvg
--enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr
--enable-libspeex --enable-libssh --enable-libtheora --enable-libtwolame
--enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwavpack
--enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid
--enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal
--enable-opencl --enable-opengl --enable-sdl2 --enable-libdc1394
--enable-libdrm --enable-libiec61883 --enable-nvenc --enable-chromaprint
--enable-frei0r --enable-libx264 --enable-shared --enable-version3
--disable-doc --disable-programs --enable-libaribb24 --enable-liblensfun
--enable-libopencore_amrnb --enable-libopencore_amrwb --enable-libtesseract
--enable-libvo_amrwbenc

  libavutil      56. 31.100 / 56. 31.100

  libavcodec     58. 54.100 / 58. 54.100

  libavformat    58. 29.100 / 58. 29.100

  libavdevice    58.  8.100 / 58.  8.100

  libavfilter     7. 57.100 /  7. 57.100

  libavresample   4.  0.  0 /  4.  0.  0

  libswscale      5.  5.100 /  5.  5.100

  libswresample   3.  5.100 /  3.  5.100

  libpostproc    55.  5.100 / 55.  5.100

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from
'/home/george/Documents/TOWSON-PLAYLISTS/test.mp4':

  Metadata:

    major_brand     : mp42

    minor_version   : 0

    compatible_brands: mp42mp41

    creation_time   : 2021-05-28T16:34:47.000000Z

  Duration: 00:03:11.49, start: 0.000000, bitrate: 10695 kb/s

    Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p,
1920x1080 [SAR 1:1 DAR 16:9], 10370 kb/s, 25 fps, 25 tbr, 25k tbn, 50 tbc
(default)

    Metadata:

      creation_time   : 2021-05-28T16:34:47.000000Z

      handler_name    : ?Mainconcept Video Media Handler

      encoder         : AVC Coding

    Stream #0:1(eng): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, stereo,
fltp, 317 kb/s (default)

    Metadata:

      creation_time   : 2021-05-28T16:34:47.000000Z

      handler_name    : #Mainconcept MP4 Sound Media Handler

Stream mapping:

  Stream #0:0 -> #0:0 (h264 (native) -> h264 (libx264))

  Stream #0:1 -> #0:1 (aac (native) -> mp3 (libmp3lame))

Press [q] to stop, [?] for help

[libx264 @ 0x55c0ce53d280] using SAR=1/1

[libx264 @ 0x55c0ce53d280] using cpu capabilities: MMX2 SSE2Fast SSSE3
SSE4.2 AVX FMA3 BMI2 AVX2

[libx264 @ 0x55c0ce53d280] profile High, level 4.0

[libx264 @ 0x55c0ce53d280] 264 - core 155 r2917 0a84d98 - H.264/MPEG-4 AVC
codec - Copyleft 2003-2018 - 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=12
lookahead_threads=2 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=abr mbtree=1 bitrate=1024 ratetol=1.0
qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00

Output #0, flv, to 'rtmp://TOWSON.ddns.net/live/CH3-NVT':

  Metadata:

    major_brand     : mp42

    minor_version   : 0

    compatible_brands: mp42mp41

    encoder         : Lavf58.29.100

    Stream #0:0(eng): Video: h264 (libx264) ([7][0][0][0] / 0x0007),
yuv420p(progressive), 1920x1080 [SAR 1:1 DAR 16:9], q=-1--1, 1024 kb/s, 25
fps, 1k tbn, 25 tbc (default)

    Metadata:

      creation_time   : 2021-05-28T16:34:47.000000Z

      handler_name    : ?Mainconcept Video Media Handler

      encoder         : Lavc58.54.100 libx264

    Side data:

      cpb: bitrate max/min/avg: 0/0/1024000 buffer size: 0 vbv_delay: -1

    Stream #0:1(eng): Audio: mp3 (libmp3lame) ([2][0][0][0] / 0x0002), 44100
Hz, mono, fltp, 64 kb/s (default)

    Metadata:

      creation_time   : 2021-05-28T16:34:47.000000Z

      handler_name    : #Mainconcept MP4 Sound Media Handler

      encoder         : Lavc58.54.100 libmp3lame

[flv @ 0x55c0ce545880] Failed to update header with correct
duration.081.8kbits/s speed=0.826x    

[flv @ 0x55c0ce545880] Failed to update header with correct filesize.

frame= 4786 fps= 21 q=-1.0 Lsize=   25412kB time=00:03:11.45
bitrate=1087.4kbits/s speed=0.821x    

video:23708kB audio:1496kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 0.827141%

[libx264 @ 0x55c0ce53d280] frame I:37    Avg QP:23.89  size: 48386

[libx264 @ 0x55c0ce53d280] frame P:1346  Avg QP:28.41  size: 10164

[libx264 @ 0x55c0ce53d280] frame B:3403  Avg QP:31.95  size:  2587

[libx264 @ 0x55c0ce53d280] consecutive B-frames:  4.2%  2.3%  1.9% 91.6%

[libx264 @ 0x55c0ce53d280] mb I  I16..4: 35.0% 54.7% 10.2%

[libx264 @ 0x55c0ce53d280] mb P  I16..4:  7.1% 10.4%  0.5%  P16..4: 19.5%
2.3%  1.3%  0.0%  0.0%    skip:58.9%

[libx264 @ 0x55c0ce53d280] mb B  I16..4:  0.5%  0.4%  0.0%  B16..8: 19.7%
0.4%  0.0%  direct: 0.7%  skip:78.3%  L0:46.8% L1:52.1% BI: 1.1%

[libx264 @ 0x55c0ce53d280] final ratefactor: 30.60

[libx264 @ 0x55c0ce53d280] 8x8 transform intra:56.1% inter:80.8%

[libx264 @ 0x55c0ce53d280] coded y,uvDC,uvAC intra: 14.0% 28.8% 4.5% inter:
2.0% 2.9% 0.1%

[libx264 @ 0x55c0ce53d280] i16 v,h,dc,p: 35% 39%  9% 16%

[libx264 @ 0x55c0ce53d280] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 27% 18% 43%  2%
2%  2%  2%  2%  2%

[libx264 @ 0x55c0ce53d280] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 28% 24% 18%  4%
6%  6%  6%  4%  4%

[libx264 @ 0x55c0ce53d280] i8c dc,h,v,p: 65% 22% 11%  2%

[libx264 @ 0x55c0ce53d280] Weighted P-Frames: Y:9.2% UV:8.3%

[libx264 @ 0x55c0ce53d280] ref P L0: 59.8% 13.3% 19.6%  7.0%  0.3%

[libx264 @ 0x55c0ce53d280] ref B L0: 86.9% 10.1%  3.0%

[libx264 @ 0x55c0ce53d280] ref B L1: 95.6%  4.4%

[libx264 @ 0x55c0ce53d280] kb/s:1014.46

 

 

 

Any thoughts on what I may be doing wrong?

 

Gar



More information about the ffmpeg-user mailing list