Opened 11 years ago

Closed 8 years ago

Last modified 8 years ago

#2467 closed defect (fixed)

-itsoffset with overlay filter buffer queue overflow

Reported by: Tim Willison Owned by:
Priority: important Component: avfilter
Version: git-master Keywords: regression
Cc: Amit Agarwal Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description (last modified by Carl Eugen Hoyos)

Summary of the bug:
When attempting to overlay a video on another video, use of -itsoffset to delay the start of the overlay results in buffer queue overflow errors and dropped frames. Video is unusable.

I have tried with libx264 encoded mp4 files, as well as mpg and mov files and the problem is recreated every time.

Use of -itsoffset without the overlay filter seems to work as expected.

How to reproduce:

ffmpeg -i greenscreen2.mp4 -itsoffset 2 -i hero.mp4 -filter_complex '[1:0]scale=iw/2:ih/2[out];[0:0][out]overlay' -report -y mytest.mp4
ffmpeg started on 2013-04-13 at 14:53:35
Report written to "ffmpeg-20130413-145335.log"
ffmpeg version N-37415-g9b672d4 Copyright (c) 2000-2013 the FFmpeg developers
  built on Apr 13 2013 13:53:49 with gcc 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3)
  configuration: --enable-gpl --enable-libass --enable-libfaac --enable-libfdk-aac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libspeex --enable-librtmp --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-nonfree --enable-version3 --enable-libfreetype --enable-filter=drawtext
  libavutil      52. 26.100 / 52. 26.100
  libavcodec     55.  2.100 / 55.  2.100
  libavformat    55.  2.100 / 55.  2.100
  libavdevice    55.  0.100 / 55.  0.100
  libavfilter     3. 53.101 /  3. 53.101
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  3.100 / 52.  3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'greenscreen2.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42mp41
    creation_time   : 2013-03-30 17:54:38
  Duration: 00:00:32.85, start: 0.000000, bitrate: 4961 kb/s
    Stream #0:0(eng): Video: h264 (Main) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 4769 kb/s, 29.97 fps, 29.97 tbr, 30k tbn, 59.94 tbc
    Metadata:
      creation_time   : 2013-03-30 17:54:38
      handler_name    : ?Mainconcept Video Media Handler
    Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo, fltp, 189 kb/s
    Metadata:
      creation_time   : 2013-03-30 17:54:38
      handler_name    : #Mainconcept MP4 Sound Media Handler
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'hero.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42mp41
    creation_time   : 2012-04-12 18:15:14
  Duration: 00:00:06.00, start: 0.033333, bitrate: 610 kb/s
    Stream #1:0(eng): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 598 kb/s, 30 fps, 30 tbr, 30k tbn, 60 tbc
    Metadata:
      creation_time   : 2012-04-12 18:15:14
      handler_name    : Mainconcept MP4 Video Media Handler
[Parsed_scale_0 @ 0x3280be0] w:iw/2 h:ih/2 flags:'bilinear' interl:0
[graph 0 input from stream 1:0 @ 0x327f1c0] w:1280 h:720 pixfmt:yuv420p tb:1/30000 fr:30/1 sar:1/1 sws_param:flags=2
[graph 0 input from stream 0:0 @ 0x3405a40] w:1280 h:720 pixfmt:yuv420p tb:1/30000 fr:30000/1001 sar:1/1 sws_param:flags=2
[Parsed_scale_0 @ 0x3280be0] w:1280 h:720 fmt:yuv420p sar:1/1 -> w:640 h:360 fmt:yuva420p sar:1/1 flags:0x2
[Parsed_overlay_1 @ 0x327f280] main w:1280 h:720 fmt:yuv420p overlay w:640 h:360 fmt:yuva420p
[graph 1 input from stream 0:1 @ 0x3269b60] tb:1/48000 samplefmt:fltp samplerate:48000 chlayout:0x3
[audio format for output stream 0:1 @ 0x3428520] auto-inserting filter 'auto-inserted resampler 0' between the filter 'Parsed_anull_0' and the filter 'audio format for output stream 0:1'
[auto-inserted resampler 0 @ 0x3422be0] ch:2 chl:stereo fmt:fltp r:48000Hz -> ch:2 chl:stereo fmt:s16 r:48000Hz
[libx264 @ 0x329acc0] using SAR=1/1
[libx264 @ 0x329acc0] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.1 Cache64
[libx264 @ 0x329acc0] profile High, level 3.1
[libx264 @ 0x329acc0] 264 - core 130 r2 c832fe9 - 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=-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=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to 'mytest.mp4':
  Metadata:
    major_brand     : mp42
    minor_version   : 0
    compatible_brands: mp42mp41
    encoder         : Lavf55.2.100
    Stream #0:0: Video: h264 ([33][0][0][0] / 0x0021), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 30k tbn, 29.97 tbc
    Stream #0:1(eng): Audio: aac ([64][0][0][0] / 0x0040), 48000 Hz, stereo, s16, 128 kb/s
    Metadata:
      creation_time   : 2013-03-30 17:54:38
      handler_name    : #Mainconcept MP4 Sound Media Handler
Stream mapping:
  Stream #0:0 (h264) -> overlay:main (graph 0)
  Stream #1:0 (h264) -> scale (graph 0)
  overlay (graph 0) -> Stream #0:0 (libx264)
  Stream #0:1 -> #0:1 (aac -> libfaac)
Press [q] to stop, [?] for help
Buffer queue overflow, dropping.     115kB time=00:00:02.28 bitrate= 412.9kbits/s
[Parsed_overlay_1 @ 0x327f280] Buffer queue overflow, dropping.
    Last message repeated 36 times
*** 38 dup! fps= 59 q=29.0 size=     161kB time=00:00:04.77 bitrate= 275.8kbits/s
Buffer queue overflow, dropping.     339kB time=00:00:04.77 bitrate= 580.3kbits/s dup=38 drop=0
[Parsed_overlay_1 @ 0x327f280] Buffer queue overflow, dropping.
    Last message repeated 38 times
No more output streams to write to, finishing.e=00:00:31.61 bitrate= 801.2kbits/s dup=38 drop=0
frame=  983 fps= 77 q=32766.0 Lsize=    3178kB time=00:00:32.85 bitrate= 792.4kbits/s dup=38 drop=0
video:2634kB audio:508kB subtitle:0 global headers:0kB muxing overhead 1.157666%
[libx264 @ 0x329acc0] frame I:4     Avg QP:18.73  size: 49240
[libx264 @ 0x329acc0] frame P:289   Avg QP:18.56  size:  5803
[libx264 @ 0x329acc0] frame B:690   Avg QP:21.98  size:  1192
[libx264 @ 0x329acc0] consecutive B-frames:  4.5%  5.5%  0.9% 89.1%
[libx264 @ 0x329acc0] mb I  I16..4: 41.0% 37.7% 21.3%
[libx264 @ 0x329acc0] mb P  I16..4:  3.2%  4.2%  1.1%  P16..4:  9.9%  3.0%  1.6%  0.0%  0.0%    skip:77.0%
[libx264 @ 0x329acc0] mb B  I16..4:  0.3%  0.4%  0.0%  B16..8:  8.8%  1.1%  0.1%  direct: 0.4%  skip:88.9%  L0:44.1% L1:49.4% BI: 6.5%
[libx264 @ 0x329acc0] 8x8 transform intra:48.6% inter:77.5%
[libx264 @ 0x329acc0] coded y,uvDC,uvAC intra: 39.0% 48.1% 18.3% inter: 2.5% 3.2% 0.4%
[libx264 @ 0x329acc0] i16 v,h,dc,p: 58% 19%  8% 15%
[libx264 @ 0x329acc0] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 21% 21% 23%  5%  5%  6%  6%  6%  7%
[libx264 @ 0x329acc0] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 32% 18% 18%  4%  6%  6%  6%  5%  4%
[libx264 @ 0x329acc0] i8c dc,h,v,p: 61% 19% 15%  5%
[libx264 @ 0x329acc0] Weighted P-Frames: Y:3.5% UV:3.5%
[libx264 @ 0x329acc0] ref P L0: 60.2% 13.6% 17.7%  8.3%  0.2%
[libx264 @ 0x329acc0] ref B L0: 89.1%  9.3%  1.6%
[libx264 @ 0x329acc0] ref B L1: 96.3%  3.7%
[libx264 @ 0x329acc0] kb/s:657.71

I will attach the full report log.

Attachments (2)

ffmpeg-avfilter_itsoffset_bug.log (278.7 KB ) - added by Tim Willison 11 years ago.
Log file generated by -report
ffmpeg-20151020-071925.log (978.9 KB ) - added by AR F 8 years ago.
report for two delogo overlaying issue.

Download all attachments as: .zip

Change History (19)

by Tim Willison, 11 years ago

Log file generated by -report

comment:1 by Carl Eugen Hoyos, 11 years ago

Description: modified (diff)

Is this only reproducible using external libraries (libx264, libfaac) or also with native encoders?

Please point to (or provide) sample input files.

comment:2 by Carl Eugen Hoyos, 11 years ago

Keywords: regression added
Reproduced by developer: set
Status: newopen

Regression since b0012de

$ ffmpeg -f lavfi -i testsrc=s=vga:r=30 -itsoffset 1 -i fate-suite/svq3/Vertical400kbit.sorenson3.mov -filter_complex overlay -an -t 10 -qscale 2 out.avi
ffmpeg version N-52074-gf359be9 Copyright (c) 2000-2013 the FFmpeg developers
  built on Apr 14 2013 12:55:21 with gcc 4.7 (SUSE Linux)
  configuration: --enable-gpl --disable-indev=jack
  libavutil      52. 26.100 / 52. 26.100
  libavcodec     55.  2.100 / 55.  2.100
  libavformat    55.  2.100 / 55.  2.100
  libavdevice    55.  0.100 / 55.  0.100
  libavfilter     3. 54.100 /  3. 54.100
  libswscale      2.  2.100 /  2.  2.100
  libswresample   0. 17.102 /  0. 17.102
  libpostproc    52.  3.100 / 52.  3.100
Input #0, lavfi, from 'testsrc=s=vga:r=30':
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24, 640x480 [SAR 1:1 DAR 4:3], 30 tbr, 30 tbn, 30 tbc
[mov,mp4,m4a,3gp,3g2,mj2 @ 0x2c0cfc0] max_analyze_duration 5000000 reached at 5000998 microseconds
Guessed Channel Layout for  Input Stream #1.1 : mono
Input #1, mov,mp4,m4a,3gp,3g2,mj2, from 'fate-suite/svq3/Vertical400kbit.sorenson3.mov':
  Metadata:
    creation_time   : 2001-03-20 16:17:18
    title           : Vertical Online SV3 Demo
    title-eng       : Vertical Online SV3 Demo
    artist          : Logan Kelsey
    artist-eng      : Logan Kelsey
    copyright       : © Vertical Online 2001
    copyright-eng   : © Vertical Online 2001
    encoder         : Sorenson Video 3
    encoder-eng     : Sorenson Video 3
  Duration: 00:00:43.58, start: 0.000000, bitrate: 580 kb/s
    Stream #1:0(eng): Video: svq3 (SVQ3 / 0x33515653), yuvj420p, 320x240, 391 kb/s, 30.02 fps, 30 tbr, 600 tbn, 600 tbc
    Metadata:
      creation_time   : 2001-03-20 16:17:18
      handler_name    : Apple Alias Data Handler
    Stream #1:1(eng): Audio: adpcm_ima_qt (ima4 / 0x34616D69), 44100 Hz, mono, s16p, 176 kb/s
    Metadata:
      creation_time   : 2001-03-20 16:17:18
      handler_name    : Apple Alias Data Handler
Please use -q:a or -q:v, -qscale is ambiguous
Output #0, avi, to 'out.avi':
  Metadata:
    ISFT            : Lavf55.2.100
    Stream #0:0: Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 640x480 [SAR 1:1 DAR 4:3], q=2-31, 200 kb/s, 30 tbn, 30 tbc
Stream mapping:
  Stream #0:0 (rawvideo) -> overlay:main
  Stream #1:0 (svq3) -> overlay:overlay
  overlay -> Stream #0:0 (mpeg4)
Press [q] to stop, [?] for help
[Parsed_overlay_0 @ 0x2c0b0a0] Buffer queue overflow, dropping.
    Last message repeated 65 times
frame=  279 fps=0.0 q=2.0 Lsize=    1577kB time=00:00:10.00 bitrate=1292.2kbits/s
video:1565kB audio:0kB subtitle:0 global headers:0kB muxing overhead 0.816745%

comment:3 by Carl Eugen Hoyos, 11 years ago

Priority: normalimportant

comment:4 by Cigaes, 11 years ago

Patch sent to the mailing list.

Commit b0012de is not the source of the bug, it only un-hide it.

in reply to:  4 ; comment:5 by Carl Eugen Hoyos, 11 years ago

Replying to Cigaes:

Patch sent to the mailing list.

That was fast;-)

Commit b0012de is not the source of the bug, it only un-hide it.

Is it possible to reproduce the problem with a released version?
(Will I have to cherry-pick the commit?)

in reply to:  5 comment:6 by Cigaes, 11 years ago

Replying to cehoyos:

That was fast;-)

I was already on it yesterday evening.

Is it possible to reproduce the problem with a released version?
(Will I have to cherry-pick the commit?)

I do not think so. The line necessary to fix the problem was lost when the "evil plan" was merged, probably during commit a05a44e. IIRC, no release was made after that.

comment:7 by Carl Eugen Hoyos, 11 years ago

Resolution: fixed
Status: openclosed

Fixed by Nicolas.

comment:8 by Amit Agarwal, 10 years ago

Resolution: fixed
Status: closedreopened

comment:9 by Amit Agarwal, 10 years ago

This doesn't work for me at Mac with version 2.2.1

comment:10 by Carl Eugen Hoyos, 10 years ago

Resolution: fixed
Status: reopenedclosed

Works fine here.

comment:11 by Amit Agarwal, 10 years ago

Component: avfilterffmpeg
Keywords: buffer overflow added; regression removed
Resolution: fixed
Status: closedreopened

But it didn't work for me. It would be great if the underlying problem can be fixed in this case. Posting logs in case it helps.

Here is the command I executed:
ffmpeg -i .Files/1szqpq/hjmuqD/creation/overlaid-video.mp4 -itsoffset 22.952 -i .Files/1szqpq/hjmuqD/creation/07eda82db409f6c212ffa829287d9c0d_clip.webm -filter_complex "overlay=x='if(gte(t,34.28),NAN,0)':y=0" -y .Files/1szqpq/hjmuqD/creation/overlaid-video-2.mp4

Here is the log:
ffmpeg version 2.2-tessus Copyright (c) 2000-2014 the FFmpeg developers

built on Mar 24 2014 22:25:11 with llvm-gcc 4.2.1 (LLVM build 2336.1.00)
configuration: --prefix=/Users/tessus/data/ext/ffmpeg/sw --as=yasm --extra-version=tessus --disable-shared --enable-static --disable-ffplay --enable-gpl --enable-pthreads --enable-postproc --enable-libmp3lame --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-libspeex --enable-bzlib --enable-zlib --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libxavs --enable-version3 --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvpx --enable-libgsm --enable-libopus --enable-libmodplug --enable-fontconfig --enable-libfreetype --enable-libass --enable-libbluray --enable-filters --enable-runtime-cpudetect
libavutil 52. 66.100 / 52. 66.100
libavcodec 55. 52.102 / 55. 52.102
libavformat 55. 33.100 / 55. 33.100
libavdevice 55. 10.100 / 55. 10.100
libavfilter 4. 2.100 / 4. 2.100
libswscale 2. 5.102 / 2. 5.102
libswresample 0. 18.100 / 0. 18.100
libpostproc 52. 3.100 / 52. 3.100

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '.Files/1szqpq/hjmuqD/creation/overlaid-video.mp4':

Metadata:

major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf55.33.100

Duration: 00:00:44.91, start: 0.000000, bitrate: 443 kb/s

Stream #0:0(und): Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], 392 kb/s, 29.97 fps, 29.97 tbr, 11988 tbn, 59.94 tbc (default)
Metadata:

handler_name : VideoHandler

Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 128 kb/s (default)
Metadata:

handler_name : SoundHandler

Input #1, matroska,webm, from '.Files/1szqpq/hjmuqD/creation/07eda82db409f6c212ffa829287d9c0d_clip.webm':

Metadata:

encoder : libebml v1.2.0 + libmatroska v1.1.0
creation_time : 2014-04-09 06:16:15

Duration: 00:00:11.33, start: 0.000000, bitrate: 996 kb/s

Stream #1:0: Video: vp8, yuv420p, 274x486, SAR 1:1 DAR 137:243, 30.05 fps, 30.05 tbr, 1k tbn, 1k tbc (default)
Stream #1:1: Audio: vorbis, 48000 Hz, stereo, fltp (default)

[libx264 @ 0x104000600] using SAR=1/1
[libx264 @ 0x104000600] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX
[libx264 @ 0x104000600] profile High, level 3.1
[libx264 @ 0x104000600] 264 - core 142 - H.264/MPEG-4 AVC codec - Copyleft 2003-2014 - 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=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
Output #0, mp4, to '.Files/1szqpq/hjmuqD/creation/overlaid-video-2.mp4':

Metadata:

major_brand : isom
minor_version : 512
compatible_brands: isomiso2avc1mp41
encoder : Lavf55.33.100
Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 1280x720 [SAR 1:1 DAR 16:9], q=-1--1, 11988 tbn, 29.97 tbc (default)
Stream #0:1(und): Audio: aac (libvo_aacenc) ([64][0][0][0] / 0x0040), 44100 Hz, stereo, s16, 128 kb/s (default)
Metadata:

handler_name : SoundHandler

Stream mapping:

Stream #0:0 (h264) -> overlay:main (graph 0)
Stream #1:0 (vp8) -> overlay:overlay (graph 0)
overlay (graph 0) -> Stream #0:0 (libx264)
Stream #0:1 -> #0:1 (aac -> libvo_aacenc)

Press [q] to stop, ? for help
[Parsed_overlay_0 @ 0x103800000] [framesync @ 0x1038000e8] Buffer queue overflow, dropping.

Last message repeated 624 times

frame= 1345 fps=181 q=-1.0 Lsize= 2130kB time=00:00:44.81 bitrate= 389.4kbits/s dup=624 drop=0
video:1851kB audio:251kB subtitle:0 data:0 global headers:0kB muxing overhead 1.348262%
[libx264 @ 0x104000600] frame I:8 Avg QP:13.93 size: 30628
[libx264 @ 0x104000600] frame P:402 Avg QP:17.93 size: 2802
[libx264 @ 0x104000600] frame B:935 Avg QP:20.63 size: 560
[libx264 @ 0x104000600] consecutive B-frames: 2.4% 14.4% 1.1% 82.1%
[libx264 @ 0x104000600] mb I I16..4: 9.0% 73.4% 17.6%
[libx264 @ 0x104000600] mb P I16..4: 1.7% 1.7% 0.3% P16..4: 10.9% 2.3% 0.9% 0.0% 0.0% skip:82.2%
[libx264 @ 0x104000600] mb B I16..4: 0.1% 0.1% 0.0% B16..8: 7.6% 0.4% 0.0% direct: 0.1% skip:91.7% L0:46.5% L1:50.8% BI: 2.8%
[libx264 @ 0x104000600] 8x8 transform intra:53.1% inter:78.0%
[libx264 @ 0x104000600] coded y,uvDC,uvAC intra: 31.4% 36.8% 7.9% inter: 1.1% 2.3% 0.0%
[libx264 @ 0x104000600] i16 v,h,dc,p: 31% 27% 7% 35%
[libx264 @ 0x104000600] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 41% 20% 23% 3% 3% 3% 3% 3% 3%
[libx264 @ 0x104000600] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 39% 25% 14% 3% 4% 4% 4% 3% 3%
[libx264 @ 0x104000600] i8c dc,h,v,p: 74% 12% 11% 2%
[libx264 @ 0x104000600] Weighted P-Frames: Y:0.0% UV:0.0%
[libx264 @ 0x104000600] ref P L0: 68.4% 8.7% 17.1% 5.8%
[libx264 @ 0x104000600] ref B L0: 85.5% 13.7% 0.8%
[libx264 @ 0x104000600] ref B L1: 97.5% 2.5%
[libx264 @ 0x104000600] kb/s:337.78

in reply to:  11 comment:12 by Carl Eugen Hoyos, 10 years ago

Cc: Amit Agarwal added
Component: ffmpegavfilter
Keywords: regression added; buffer overflow removed

Replying to lifeamit:

But it didn't work for me.

You failed to provide any relevant information.

Please do not edit keywords, if your issue is not a regression, open a new ticket instead of reopening this one (that was a regression).

Is it reproducible with -an? If yes, please use it to simplify the command.
Is it reproducible with an internal encoder like -vcodec mpeg4? If yes, please use it, it makes reproducing issues significantly easier.
Is the problem only reproducible if a formula is used with the overlay filter? If not, please remove it.
Is your problem reproducible with b0012de4?

comment:13 by Amit Agarwal, 10 years ago

It is not reproducible with -an but then the final video looses audio which I don't want.
It is reproducible with -vcodec mpeg4
It is reproducible only when I use overlay filter (that too with -itoffset
What is b0012de4 and how to use it ?

comment:14 by Carl Eugen Hoyos, 10 years ago

Resolution: fixed
Status: reopenedclosed

Please open a new ticket for your apparently unrelated problem (this regression was reproducible with -an).

comment:15 by AR F, 8 years ago

Resolution: fixed
Status: closedreopened

Hello

I have similar problem using overlay and trim together:

I have a video that have a logo that should be delogoed and also the video have some boxes popping up in just 15 seconds of the file and I want to remove that too.

As examples of overlay filter in online ffmpeg docs, I've used this command that throws me some Buffer queue overflow, dropping. messages and the video freezes after 3rd second to when the trim has been occured: (to have informations I appended -report)

$ ./ffmpeg -i ~/Videos/SJ9VRF.mp4 -vf '[in]split[mainlogo][boxlogo];[mainlogo]delogo=x=95:y=35:w=80:h=20[maindelogo];[boxlogo]trim=start=60:end=75,delogo=300:30:100:20:show=1[boxdelogo];[maindelogo][boxdelogo]overlay=eof_action=pass[out]' -report -y ~/Videos/SJ9VRF-edited.avi

The output is:

ffmpeg started on 2015-10-20 at 07:19:25
Report written to "ffmpeg-20151020-071925.log"
ffmpeg version N-50577-g777b305-static http://johnvansickle.com/ffmpeg/  Copyright (c) 2000-2015 the FFmpeg developers
  built with gcc 4.9.3 (Debian 4.9.3-5)
  configuration: --enable-gpl --enable-version3 --disable-shared --disable-debug --enable-runtime-cpudetect --enable-libmp3lame --enable-libx264 --enable-libx265 --enable-libwebp --enable-libspeex --enable-libvorbis --enable-libvpx --enable-libfreetype --enable-fontconfig --enable-libxvid --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-gray --enable-libopenjpeg --enable-libopus --enable-libass --enable-gnutls --enable-libvidstab --enable-libsoxr --enable-frei0r --enable-libfribidi --cc=gcc-4.9
  libavutil      55.  4.100 / 55.  4.100
  libavcodec     57.  7.100 / 57.  7.100
  libavformat    57.  8.100 / 57.  8.100
  libavdevice    57.  0.100 / 57.  0.100
  libavfilter     6. 11.100 /  6. 11.100
  libswscale      4.  0.100 /  4.  0.100
  libswresample   2.  0.100 /  2.  0.100
  libpostproc    54.  0.100 / 54.  0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/home/arf1372/Videos/SJ9VRF.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf56.1.100
  Duration: 00:05:00.79, start: 0.083696, bitrate: 808 kb/s
    Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 640x360 [SAR 1:1 DAR 16:9], 756 kb/s, 25 fps, 25 tbr, 12800 tbn, 50 tbc (default)
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(eng): Audio: aac (HE-AAC) (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 48 kb/s (default)
    Metadata:
      handler_name    : SoundHandler
[Parsed_delogo_1 @ 0x41d23e0] Note: default band value was changed from 4 to 1.
[Parsed_delogo_3 @ 0x41a0720] Note: default band value was changed from 4 to 1.
Output #0, avi, to '/home/arf1372/Videos/SJ9VRF-edited.avi':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    ISFT            : Lavf57.8.100
    Stream #0:0(eng): Video: mpeg4 (FMP4 / 0x34504D46), yuv420p, 640x360 [SAR 1:1 DAR 16:9], q=2-31, 200 kb/s, 25 fps, 25 tbn, 25 tbc (default)
    Metadata:
      handler_name    : VideoHandler
      encoder         : Lavc57.7.100 mpeg4
    Stream #0:1(eng): Audio: mp3 (libmp3lame) (U[0][0][0] / 0x0055), 44100 Hz, stereo, fltp (default)
    Metadata:
      handler_name    : SoundHandler
      encoder         : Lavc57.7.100 libmp3lame
Stream mapping:
  Stream #0:0 -> #0:0 (h264 (native) -> mpeg4 (native))
  Stream #0:1 -> #0:1 (aac (native) -> mp3 (libmp3lame))
Press [q] to stop, [?] for help
[Parsed_overlay_4 @ 0x41a1d60] [framesync @ 0x41a1ea8] Buffer queue overflow, dropping.
    Last message repeated 277 times
[Parsed_overlay_4 @ 0x41a1d60] [framesync @ 0x41a1ea8] Buffer queue overflow, dropping.
    Last message repeated 357 times
[Parsed_overlay_4 @ 0x41a1d60] [framesync @ 0x41a1ea8] Buffer queue overflow, dropping.
    Last message repeated 356 times
[Parsed_overlay_4 @ 0x41a1d60] [framesync @ 0x41a1ea8] Buffer queue overflow, dropping.
    Last message repeated 355 times
[Parsed_overlay_4 @ 0x41a1d60] [framesync @ 0x41a1ea8] Buffer queue overflow, dropping.
    Last message repeated 84 times
frame= 6084 fps=257 q=31.0 Lsize=   13800kB time=00:05:00.80 bitrate= 375.8kbits/s    
video:8640kB audio:4700kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 3.443839%

I've also attached the report file.

by AR F, 8 years ago

Attachment: ffmpeg-20151020-071925.log added

report for two delogo overlaying issue.

comment:16 by Carl Eugen Hoyos, 8 years ago

Resolution: fixed
Status: reopenedclosed

Please do not reopen three-year old tickets.

comment:17 by Larry, 8 years ago

I know you said not to reopen three year old tickets, but ...

I am getting the same issue with:

ffmpeg -threads 0 -y -i source_video.mp4 -filter_complex "color=size=hd720:duration=5[L1213],[L1213]drawtext=fontcolor='white':fontfile='arial.ttf':text='Test of the {MP_BOXBLUR} filter':x=10:y=686[L1314],[L1314]colorkey=black:0.01:0.0[L1415],[L1415]fade=in:0:30[L1516],[L1516]fade=out:150:30[L2516],[0:v]scale=size=hd720[L2310],[L2310]colorkey=black:0.01:0.0[L2523],[L2523][L2516]overlay[L3025],[0:v]scale=size=hd720[L42],[L42]boxblur[L304],[L3025][L304]concat=n=2" mp_filter_harness.mp4

ffmpeg version N-81350-g3282e31 Copyright (c) 2000-2016 the FFmpeg developers

built with gcc 5.4.0 (GCC)
configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-libebur128 --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-decklink --enable-zlib
libavutil 55. 28.100 / 55. 28.100
libavcodec 57. 52.100 / 57. 52.100
libavformat 57. 46.101 / 57. 46.101
libavdevice 57. 0.102 / 57. 0.102
libavfilter 6. 51.100 / 6. 51.100
libswscale 4. 1.100 / 4. 1.100
libswresample 2. 1.100 / 2. 1.100
libpostproc 54. 0.100 / 54. 0.100

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'source_video.mp4':

Metadata:

major_brand : mp42
minor_version : 0
compatible_brands: mp41isom
creation_time : 2016-07-24 21:14:51

Duration: 00:00:10.75, start: 0.000000, bitrate: 4223 kb/s

Stream #0:0(und): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 854x480, 4220 kb/s, 29.97 fps, 29.97 tbr, 29970 tbn, 59.94 tbc (default)
Metadata:

creation_time : 2016-07-24 21:14:51
handler_name : VideoHandler
encoder : AVC Coding

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

creation_time : 2016-07-24 21:14:51
handler_name : SoundHandler

[libx264 @ 00000000029b5660] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2 AVX FMA3 AVX2 LZCNT BMI2
[libx264 @ 00000000029b5660] profile High, level 3.1
[libx264 @ 00000000029b5660] 264 - core 148 r2705 3f5ed56 - H.264/MPEG-4 AVC codec - Copyleft 2003-2016 - 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=crf mbtree=1 crf=23.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
[mp4 @ 00000000029b7a60] Using AVStream.codec to pass codec parameters to muxers is deprecated, use AVStream.codecpar instead.

Last message repeated 1 times

Output #0, mp4, to 'mp_filter_harness.mp4':

Metadata:

major_brand : mp42
minor_version : 0
compatible_brands: mp41isom
encoder : Lavf57.46.101
Stream #0:0: Video: h264 (libx264) ([33][0][0][0] / 0x0021), yuv420p, 1280x720, q=-1--1, 29.97 fps, 11988 tbn, 29.97 tbc (default)
Metadata:

encoder : Lavc57.52.100 libx264

Side data:

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

Stream #0:1(und): Audio: aac (LC) ([64][0][0][0] / 0x0040), 48000 Hz, stereo, fltp, 128 kb/s (default)
Metadata:

creation_time : 2016-07-24 21:14:51
handler_name : SoundHandler
encoder : Lavc57.52.100 aac

Stream mapping:

Stream #0:0 (h264) -> scale (graph 0)
Stream #0:0 (h264) -> scale (graph 0)
concat (graph 0) -> Stream #0:0 (libx264)
Stream #0:1 -> #0:1 (aac (native) -> aac (native))

Press [q] to stop, ? for help
[Parsed_concat_10 @ 00000000029aa460] Buffer queue overflow, dropping.97.9kbits/s speed= 1.3x

Last message repeated 6 times

[Parsed_concat_10 @ 00000000029aa460] Buffer queue overflow, dropping.61.7kbits/s speed=1.34x

Last message repeated 21 times

[Parsed_concat_10 @ 00000000029aa460] Buffer queue overflow, dropping.59.4kbits/s speed=1.33x

Last message repeated 19 times

[Parsed_concat_10 @ 00000000029aa460] Buffer queue overflow, dropping.25.2kbits/s speed=1.33x

Last message repeated 16 times

[output stream 0:0 @ 00000000029a9680] 100 buffers queued in output stream 0:0, something may be wrong.
frame= 644 fps= 58 q=-1.0 Lsize= 3523kB time=00:00:21.38 bitrate=1349.3kbits/s dup=66 drop=0 speed=1.92x
video:3503kB audio:3kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.468492%
[libx264 @ 00000000029b5660] frame I:19 Avg QP:18.47 size: 13815
[libx264 @ 00000000029b5660] frame P:198 Avg QP:21.99 size: 10802
[libx264 @ 00000000029b5660] frame B:427 Avg QP:22.21 size: 2776
[libx264 @ 00000000029b5660] consecutive B-frames: 7.1% 10.2% 9.3% 73.3%
[libx264 @ 00000000029b5660] mb I I16..4: 29.4% 68.5% 2.0%
[libx264 @ 00000000029b5660] mb P I16..4: 9.9% 24.8% 1.0% P16..4: 13.2% 4.1% 1.0% 0.0% 0.0% skip:46.0%
[libx264 @ 00000000029b5660] mb B I16..4: 0.7% 1.7% 0.1% B16..8: 13.2% 2.3% 0.4% direct: 1.4% skip:80.1% L0:47.6% L1:45.6% BI: 6.8%
[libx264 @ 00000000029b5660] 8x8 transform intra:69.2% inter:92.3%
[libx264 @ 00000000029b5660] coded y,uvDC,uvAC intra: 39.4% 56.6% 6.7% inter: 5.5% 8.8% 0.0%
[libx264 @ 00000000029b5660] i16 v,h,dc,p: 28% 23% 4% 45%
[libx264 @ 00000000029b5660] i8 v,h,dc,ddl,ddr,vr,hd,vl,hu: 29% 19% 16% 5% 6% 6% 7% 6% 6%
[libx264 @ 00000000029b5660] i4 v,h,dc,ddl,ddr,vr,hd,vl,hu: 24% 22% 11% 5% 10% 8% 9% 6% 4%
[libx264 @ 00000000029b5660] i8c dc,h,v,p: 47% 20% 20% 13%
[libx264 @ 00000000029b5660] Weighted P-Frames: Y:4.5% UV:4.5%
[libx264 @ 00000000029b5660] ref P L0: 67.7% 13.2% 14.5% 4.5% 0.1%
[libx264 @ 00000000029b5660] ref B L0: 91.9% 6.5% 1.6%
[libx264 @ 00000000029b5660] ref B L1: 97.6% 2.4%
[libx264 @ 00000000029b5660] kb/s:1335.32
[aac @ 00000000029b7220] Qavg: 65536.000

Note: See TracTickets for help on using tickets.