[FFmpeg-devel] encoding to multiple cores with mpeg4

Daniel Taylor dan
Tue Oct 14 20:50:09 CEST 2008


On 14 Oct, 2008, at 19:15, Dion Galbreath wrote:
> I tried asking this in libavusers but there doesn't seem to be much
> traffic there.. so

Definitely the wrong list. Try ffmpeg-user!

> Can ffmpeg evenly distribute the work on 8 cores? I seem to only be  
> able
> to get it to evenly spread out on 2 cores, and a 3rd does a little bit
> of work while the remainder cores seem silent.  I am encoding to  
> mpeg4,
> and aac.  Is there some settings I can use to make the mpeg4 encoding
> work load thread to all 8 cores???

There is work currently in progress (I think it is still being done)  
for frame-based multithreading throughout ffmpeg so that all codecs  
can use multiple cores, but at the moment it must be implemented per- 
codec. I don't believe the mpeg4-asp encoder supports it, but encoding  
mpeg4-avc (h.264) with libx264 allows you to use any number of cores  
so you might want to look into that. To get it to automatically use  
all cores I believe you can pass -threads 0.

Good luck,
Daniel G. Taylor

More information about the ffmpeg-devel mailing list