[Libav-user] Recommended thread count to record video from rendering software

John Dexter jdxsolutions at gmail.com
Mon Feb 27 23:37:49 CET 2012

I have a single-thread application which does 3D rendering; it is a
moderate-heavy user of the single core it uses (~50%). In my quick
tests, recording the rendered output to video using libav is fastest
when I use AVCodecContext::thread_count == 3 on my quad-core PC, but
it's almost identical with it set to 0.

As well as any general advice you can offer, a couple of specific questions...

1)What does setting AVCodecContext::thread_count = 0 do (on Windows
x86/64 hardware if it is platform-dependent)? Does it default to
num-cores or nothing that simple?
2)In a situation similar to mine with a single-thread app using most
of one core on a N-core CPU, what would you set
AVCodecContext::thread_count to, and why?


More information about the Libav-user mailing list