This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

[HELP] FFmpeg x264 not fully utilizing the CPU
#1
Hello!

I use FFmpeg to create videos from one image and an Opus audio file. The expected outcome is a video that contains the given image at a rate of 4-6 FPS (manually selected) and the audio file; of course, the video should be as long as the audio track is - not longer, not shorter (as far as possible).

My workload sometimes requires me to process up to 100 audio files at once, so, since my CPU has 12 threads, I'd like all of them to be utilized, so I could finish the queue faster. Only problem is FFmpeg does not utilize more than 2 threads and cannot render faster than 12-18 FPS (~3x faster than real-time, no matter the settings).

At some point, I needed Hybrid for some workload, so I gave that a try. Importing the pre-rendered by FFmpeg video into Hybrid and re-encoding it yields 25x real-time encoding times and the CPU being utilized to 90%. Seeing this, I tried using Hybrid's FFmpeg version to process my workload, but the thread count did not rise.

My command is:
ffmpeg -loop 1 -i image -threads 18 -i audio.opus -c:v libx264 -crf:v 23 -preset ultrafast -strict -2 -r 6 -c:a copy -shortest audio_name.mkv

Any help would be appreciated!

P.S.: I have a program that applies the command to a batch of files, hence the simple command.
Reply


Messages In This Thread
FFmpeg x264 not fully utilizing the CPU - by antoniu200 - 28.05.2021, 21:53
RE: FFmpeg x264 not fully utilizing the CPU - by antoniu200 - 31.05.2021, 23:48
RE: FFmpeg x264 not fully utilizing the CPU - by antoniu200 - 01.06.2021, 18:40
RE: FFmpeg x264 not fully utilizing the CPU - by antoniu200 - 01.06.2021, 21:06

Forum Jump:


Users browsing this thread: 1 Guest(s)