Is it better to run ffmpeg single or multi-core when processing multiple videos?

I have following use case: I need to process a batch of videos using ffmpeg and from each video I will be making a set of output videos with different formats (1080p, 720p etc.)

Will it be faster to process those videos one after another using -threads equal to number of CPU cores, or process multiple videos in the same time each being assigned just one core?


Solution 1:

I did some simple testing and found out that while converting a 5 minute video using 10 cores, the conversion takes about 4 minutes.
The same conversion using just one core takes around 5.5 minutes.

Testing on a set of 5 short videos confirmed that. 5 videos one after another on 10 cores took 21 minutes to convert. 5 videos at the same time on 1 core each took 6 minutes total.

Gains for extra cores are so small that my conclusion is that its better to convert multiple videos side by side using one core for each than to do it one after another.

I might do some more advanced benchmarking than that in the future.