I need to maximize speed while converting videos using FFmpeg to h264

  • Any input format of source videos
  • User's machine can have any number of cores
  • Power and memory consumption are non-issues

Of course, there are a whole bunch of options that can be tweaked but this question is particularly about choosing the best -thread <count> option. I am trying to find an ideal thread count as a function of

  • no. of cores
  • input video format
  • h264-friendly values maybe?
  • anything else missed above?

I am aware the default -thread 0 follows one-thread-per-core approach which is supposed to be optimal. But I am not sure if this is time or space-optimized. Also, on certain testcases, I've seen more threads (say 4 threads on my dual core test machine) finishes quicker than the default.

Any other direction, say configure options w.r.t. threads, worth pursuing?

Edit
Report