How many threads does ffmpeg use by default?

As of 2014, it uses an optimal number.

You can verify this on a multi-core computer by examining CPU load (Linux: top, Windows: task manager) with different options to ffmpeg:

  • -threads 0 (optimal);

  • -threads 1 (single-threaded);

  • -threads 2 (2 threads for e.g. an Intel Core 2 Duo);

  • none (the default, also optimal).

2015 edit: on a 12-core CPU, some ffmpeg commands have Linux top showing at most 200% cpu (only 2 cores), no matter what number is given to -threads. So the default may still be optimal in the sense of "as good as this ffmpeg binary can get", but not optimal in the sense of "fully exploiting my leet CPU."


it depends on codec used, ffmpeg version and your CPU core count. Sometimes it's simply one thread per core. Sometimes it's more complex like:

With libx264 it is cores x 1.5 for frame threads and cores x 1 for slice threads.


Some of these answers are a bit old, and I'd just like to add that with my ffmpeg 4.1, encoding with libx264, all 6 cores/12 threads of my Ryzen 5 2600X system were maxed without any -thread argument.

Tags:

Ffmpeg