[FFmpeg-user] Turn Off Multi-Threading

Moritz Barsnick barsnick at gmx.net
Wed Jul 31 00:17:50 CEST 2013


On Tue, Jul 30, 2013 at 22:58:17 +0200, Reindl Harald wrote:
> it has nothing to do with ffmpeg or not ffmpeg
> 
> if a process is using more than one thread it
> can use more than one CPU and 500% means simply
> 5 cores with a load of 100% - not more and not less

Which still doesn't answer the question for the poor guy! (And I
believe he realized very well that that is exactly what is happening.)

The question being:
How - if at all - can ffmpeg be restricted to one thread?

Actually, the question is "to one CPU", but everyone seems to realize
that the use of multiple CPUs is due to multithreading. :-)

Since no-one is answering that (except: "position does matter", which
may lead in the right direction), let me offer a different solution
outside of ffmpeg: taskset

Using taskset (on Linux), you can explicitly restrict a process (and I
assume its children and its threads) to a single CPU. This doesn't
avoid multithreading, but it would allow ffmpeg to "clobber" only one
CPU, leaving the others alone.

See also
http://unix.stackexchange.com/questions/23106/limit-process-to-one-cpu-core

Moritz


More information about the ffmpeg-user mailing list