[Libav-user] multi-thread decoding

YIRAN LI mrfun.china at gmail.com
Mon Oct 24 08:26:00 EEST 2016


Hi guys,

I'm researching the impact multi-thread decoding may have on memory usage.
Does anyone know if enabling multi thread decoding will use more memory ?
(so that more threads used, more memory required?)

I tried to decode an H.264 encoded 4K video using command:  ffmpeg.exe -v
error -i a.mp4  -threads 0 -f null - 2>error.log
>From Win10 resource monitor, I can see decoding with -threads 0 launches 11
threads, -threads 1 launches 6 threads and -threads 2 launches 8 threads
while memory consumption are at same level.

I'm testing on a 4-core i5 cpu. Below are the screen shots when running in
-thread 0, -thread 2 and -thread 1. Seems in all 3 cases there're only 6
valid threads.
Can anyone tell me what the other threads are doing?

Thanks


​
​
​
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20161024/1686bc23/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1-thread.PNG
Type: image/png
Size: 98784 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20161024/1686bc23/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0-thread.PNG
Type: image/png
Size: 31925 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20161024/1686bc23/attachment-0001.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 2-thread.PNG
Type: image/png
Size: 28545 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20161024/1686bc23/attachment-0002.png>


More information about the Libav-user mailing list