[FFmpeg-user] High memory usage when merging videos

Jonathan Girven jonathan.girven at trickbook.com
Wed Dec 21 13:32:13 EET 2016


> I think most useful situations do not trigger that kind of problems. But
> with a complicated filter graph, you may be unwittingly introducing
> loops that cause them.

Thanks, that makes a lot of sense. What I am doing with that horrible
filter graph is:

- take two input clips
- concatenate the video with:
    - a fade in from black at the beginning
    - a fade transition in the middle
    - a fade to black at the end
- do similar for the audio
- overlay a watermark

It wouldn't surprise me that in one of those stages I have a similar
situation as your example. I think through iterative testing and
memory monitoring of different commands, I must be able to find a
significant jump in peak memory required.

Alternatively, breaking up the command into separate stages is
probably an easy way to solve the issue. It will just slow processing
down a lot because of writing multiple files, right?

> Basically, to find the source of your issue, someone needs to take a
> large whiteboard, draw the graph and follow the frames. I suspect, with
> that huge filter graph, nobody will do that for you, sorry.

Sounds expensive!


More information about the ffmpeg-user mailing list