[Libav-user] Multithread decode and scaler

wolverin wolverin82 at mail.ru
Thu Aug 25 06:16:22 EEST 2022


>The only advice I can give you at this point is to examine how ffmpeg
>itself does and see how your program differs.
 
But I do not know where to look in ffmpeg, the source text of it is very confusing and there are few examples
 
>ffmpeg -i some_file_with_mjpeg -f null -
>
>and at the same time:
>
>top
>
>and see how much CPU it uses. If it is >>100%, then multithreading is
>used. If not, then it probably is not possible easily.
 
Thank you!
I created a file
       ffmpeg -f v4l2 -input_format mjpeg -video_size 1920x1080 -i /dev/video0 -c:v copy test.mjpeg
 
Then I executed your command and saw the CPU usage of 99-100%
       ffmpeg -i test.mjpeg -f null -
 
You said "it probably is not possible easily" but not impossible!? so I need to create my own thread queue for decoding or are there other solutions?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://ffmpeg.org/pipermail/libav-user/attachments/20220825/424815d8/attachment.htm>


More information about the Libav-user mailing list