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

basteon basteon at gmail.com
Sun Aug 18 10:14:34 CEST 2013


Hi,
If you still not solve this. That when bmdcapture loosing one frame rtmp
could be confused about timebase of that frame. If you using -copytb.

That will happening for video, audio or both?
for flv you can try nellymoser.


On 14 August 2013 05:12, Leonard Bogard <leonard at kcfchurch.org> wrote:

> Whether I stop ffmpeg manually or it stops on its own after some randomly
> short period of time fail it displays two error messages:
> [flv @ 0x2279ba0] Failed to update header with correct duration
> [flv @ 0x2279ba0] Failed to update header with correct filesize.
>
> I'm trying to stream from ffmpeg to a wowza server, here's my start script
> and output:
>
> OUTSTREAM="-f flv rtmp://192.168.7.2:1935/live/kcfstream"
>
> OUTAUDIO="-acodec libfdk_aac -af volume=8.0 -ab 64000 -ar 48000 -ac 2"
> #OUTAUDIO="-acodec libmp3lame -af volume=8.0 -ab 96000 -ar 44100 -ac 1"
>
> bmdcapture -m 14 -C 0 -A 2 -V 4 -F nut -f pipe:1 | ffmpeg -i - -copyts \
>   -r 30 -s 640x360 -aspect 16:9 \
>   -threads 2 \
>   $OUTAUDIO \
>   -vcodec libx264 -vb 500k -vprofile baseline -level 3.1 -pix_fmt yuv420p \
>   -strict -2 \
>   $OUTSTREAM
>
> ~$ ./exp2.sh
> ffmpeg version git-2013-08-13-8a7295b Copyright (c) 2000-2013 the FFmpeg
> developers
>   built on Aug 13 2013 21:30:35 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)
>   configuration: --prefix=/home/suser/ffmpeg_build
> --extra-cflags=-I/home/suser/ffmpeg_build/include
> --extra-ldflags=-L/home/suser/ffmpeg_build/lib --bindir=/home/suser/bin
> --extra-libs=-ldl --enable-gpl --enable-libass --enable-libfdk-aac
> --enable-libmp3lame --enable-libopus --enable-libtheora --enable-libvorbis
> --enable-libvpx --enable-libx264 --enable-libfaac --enable-version3
> --enable-nonfree --enable-encoder=libfaac
>   libavutil      52. 42.100 / 52. 42.100
>   libavcodec     55. 27.100 / 55. 27.100
>   libavformat    55. 13.102 / 55. 13.102
>   libavdevice    55.  3.100 / 55.  3.100
>   libavfilter     3. 82.100 /  3. 82.100
>   libswscale      2.  4.100 /  2.  4.100
>   libswresample   0. 17.103 /  0. 17.103
>   libpostproc    52.  3.100 / 52.  3.100
> Guessed Channel Layout for  Input Stream #0.1 : stereo
> Input #0, nut, from 'pipe:':
>   Metadata:
>     encoder         : Lavf54.20.3
>   Duration: N/A, start: 0.000000, bitrate: 1536 kb/s
>     Stream #0:0: Video: rawvideo (UYVY / 0x59565955), uyvy422, 1280x720,
> 59.94 tbr, 59.94 tbn, 59.94 tbc
>     Stream #0:1: Audio: pcm_s16le (PSD[16] / 0x10445350), 48000 Hz, stereo,
> s16, 1536 kb/s
> [libx264 @ 0x24b9120] using SAR=1/1
> [libx264 @ 0x24b9120] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
> AVX
> [libx264 @ 0x24b9120] profile Constrained Baseline, level 3.1
> [libx264 @ 0x24b9120] 264 - core 135 r2 f0c1c53 - H.264/MPEG-4 AVC codec -
> Copyleft 2003-2013 - http://www.videolan.org/x264.html - options: cabac=0
> ref=3 deblock=1:0:0 analyse=0x1:0x111 me=hex subme=7 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=-2 threads=2 lookahead_threads=1
> sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0
> constrained_intra=0 bframes=0 weightp=0 keyint=250 keyint_min=25
> scenecut=40 intra_refresh=0 rc_lookahead=40 rc=abr mbtree=1 bitrate=500
> 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://192.168.7.2:1935/live/kcfstream':
>   Metadata:
>     encoder         : Lavf55.13.102
>     Stream #0:0: Video: h264 (libx264) ([7][0][0][0] / 0x0007), yuv420p,
> 640x360 [SAR 1:1 DAR 16:9], q=-1--1, 500 kb/s, 1k tbn, 30 tbc
>     Stream #0:1: Audio: aac (libfdk_aac) ([10][0][0][0] / 0x000A), 48000
> Hz, stereo, s16, 64 kb/s
> Stream mapping:
>   Stream #0:0 -> #0:0 (rawvideo -> libx264)
>   Stream #0:1 -> #0:1 (pcm_s16le -> libfdk_aac)
> ^C[flv @ 0x24b8ba0] Failed to update header with correct duration.e=
> 435.2kbits/s dup=0 drop=209
> [flv @ 0x24b8ba0] Failed to update header with correct filesize.
> frame=  225 fps= 31 q=-1.0 Lsize=     528kB time=00:00:07.50 bitrate=
> 576.7kbits/s dup=0 drop=221
> video:458kB audio:59kB subtitle:0 global headers:0kB muxing overhead
> 2.044314%
> [libx264 @ 0x24b9120] frame I:11    Avg QP:23.52  size:  3701
> [libx264 @ 0x24b9120] frame P:214   Avg QP:29.68  size:  2000
> [libx264 @ 0x24b9120] mb I  I16..4: 88.1%  0.0% 11.9%
> [libx264 @ 0x24b9120] mb P  I16..4:  4.4%  0.0%  1.2%  P16..4: 28.9%  7.4%
> 1.8%  0.0%  0.0%    skip:56.2%
> [libx264 @ 0x24b9120] final ratefactor: 27.48
> [libx264 @ 0x24b9120] coded y,uvDC,uvAC intra: 15.2% 47.5% 7.5% inter: 9.3%
> 13.1% 1.2%
> [libx264 @ 0x24b9120] i16 v,h,dc,p: 41% 23%  6% 31%
> [libx264 @ 0x24b9120] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 14% 45% 18%  3%  4%
> 3%  6%  2%  4%
> [libx264 @ 0x24b9120] i8c dc,h,v,p: 62% 20% 10%  8%
> [libx264 @ 0x24b9120] ref P L0: 85.8%  8.7%  5.5%
> [libx264 @ 0x24b9120] kb/s:499.96
> Received signal 2: terminating.
>
> What am I doing wrong?  Thanks in advance for any help.
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>


More information about the ffmpeg-user mailing list