[FFmpeg-user] Running multiple ffmpeg commands with minimal loss in quality

Moritz Barsnick barsnick at gmx.net
Sat Jul 25 10:45:11 CEST 2015

On Fri, Jul 24, 2015 at 16:02:22 -0700, Michael Nolan wrote:
> do things like overlay, scale and trim videos, render text, render images,
> The biggest issue that I have is that the application that I run has to run
> ffmpeg multiple times, thus re-encoding the video(s) and making the end
> video look much lower quality than the original content. The original
> videos are .webm and encoded using QTmuxingAppLibWebM-0.0.1.

You say it "has to". Could you elaborate?

> Is there any way that I can help prevent this sort of thing or is there any
> existing tooling for taking a series of edits and running them in one
> command (meaning I don't have to re-encode multiple times)?

Not if it "has to". You didn't give us examples of what you are doing -
full command lines for the chain of edits - so I can only guess you are
basically using ffmpeg's filters (in the widest sense) to do these

If so, you can chain your filters to a filterchain or a complex filter.

$ ffmpeg [...] -vf filter1=a=a1:b=b1,filter2=c=c1:d=d1 [...]
$ ffmpeg [...] -filter_complex "[0:v][1:v]filter1=...[outv];[0:a]filter2[outa];[outv][2:v]overlay" [...]

Please show us your commands.


More information about the ffmpeg-user mailing list