Best/lossless "preset" (or "ffmpeg" parameters) to use for intermediate steps


I have an assembly that processes videos thru several steps (crop, resize, pad, crop again and watermark). I want to make sure it’s not doing lossy recompression at every step and introducing artifacts.

I am not sure how an assembly like this translates into ffmpeg commands? Is it 1:1 a separate command per assembly step with recompression at each step? Or does it try to consolidate steps into a single ffmpeg filter chain?

If it is a separate ffmpeg command for each step, is there a preset that I should be using in my intermediate steps to avoid unnecessary lossy recompression?



So each video preset encodes a set of predefined FFmpeg attributes into your video. This means there is not a best preset, more that one may be more suited than another for each specific use case. Please see the link below for a full list of attributes that each preset encodes.

You do not, however, have to use a preset. Using the “empty” value, you can set your ffmpeg attributes as you please. Below I have linked a demo that shows an example of how you can use the “empty” preset value.


Thanks for the reply!

I guess I’m wondering regardless of input format or final output codec/format, what would be some good ffmpeg parameters in general for these intermediate steps to minimize adding recompression artifacts at each step? My final step would still do the lossy transcode to the final format.

e.g. I tried libx264 with “veryslow” and “qp”: 0 (which came up in a search for “lossless h264”) for all my intermediate steps and it seemed to work in that I didn’t notice any artifacts being introduced although it seemed to take longer too. So was just wondering if there is something faster that achieves the same result.