Opened 2 years ago

Closed 3 weeks ago

#4950 closed defect (fixed)

overlay and trim together produces Buffer queue overflow

Reported by: arf1372 Owned by:
Priority: normal Component: avfilter
Version: unspecified Keywords: overlay trim buffer overflow
Cc: Blocked By:
Blocking: Reproduced by developer: yes
Analyzed by developer: no

Description

Hello

I have 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.

Attachments (1)

ffmpeg-20151020-075406.log (797.4 KB) - added by arf1372 2 years ago.
-report log file

Download all attachments as: .zip

Change History (4)

Changed 2 years ago by arf1372

-report log file

comment:1 Changed 2 years ago by ryanwilliams

In my experience, problem is caused by trim seeking the copy of the stream created by the split filter.

As a work around I suggest you remove the split filter and simply add the same input file a second time.

Alternatively you can experiment by including the fifo filter first on each leg of the split.
warning: This will consume lots of memory.

comment:2 Changed 21 months ago by richardpl

  • Component changed from undetermined to avfilter
  • Reproduced by developer set

comment:3 Changed 3 weeks ago by richardpl

  • Resolution set to fixed
  • Status changed from new to closed

Fixed in one of framesync improvements.

Note: See TracTickets for help on using tickets.