[Libav-user] When to set thread_count

Info || Non-Lethal Applications info at non-lethal-applications.com
Mon Dec 5 12:43:42 EET 2016


Sorry folks. False alarm.
The issue was related to seeking on each frame and frequently flushing the codec buffers.

> On 4 Dec 2016, at 20:26, Info || Non-Lethal Applications <info at non-lethal-applications.com> wrote:
> 
> I use libavcodec as my decoding framework.
> Up until now, I was using an older version of libavcodec (about 1 year old) and the performance was fine.
> 
> I then updated to the latest version and I found out that I needed to set the thread count to zero manually as libav wouldn’t use more than one core for H.264 decoding otherwise (probably for other codecs as well). It was my understanding that setting the thread count to zero would cause libav to determine the optimal thread count under the hood. When setting it to zero it would also play 4K H.264 files using the number of cores needed.
> 
> I then imported an AVID DNxHD 185 file and my machine used 600% CPU although the same file played file in VLC only using around 65% CPU on my machine. I then removed the “thread_count = 0” line from the code and it also only used around 65% of CPU but still played back the same way as when using 600% CPU. This leads me to think that something’s odd with the DNx decoder.
> Has anyone else experienced that issue?
> 
> What’s the right way of setting the thread count? Should it be set to 0?
> I just found out that leaving it untouched only ever uses 1 core. Higher bandwidth DNx files wouldn’t play if they needed more than 1 CPU core.
> 
> Any advice would be greatly appreciated!
> 
> Thanks in advance!
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user




More information about the Libav-user mailing list