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
#3
(28.05.2021, 23:07)Selur Wrote: Why not simply use a mkv with a cover instead of the video stream?

Not sure what you mean by that. I believe an mkv with a cover would mean an empty video inside the mkv, just some cover and the audio? Well, the video needs to have the picture displayed constantly while the video is played back, so just a cover won't do.

(28.05.2021, 23:07)Selur Wrote: Why the 6 fps, i mean when using just one image the fps should matter?

Because I don't want the videos taking a lot of space and by letting FFmpeg render at 25 FPS it really increases the video size, especially when working with hundreds of videos at a time.

(28.05.2021, 23:07)Selur Wrote: Why are you using crf ?

Seeing as you replaced it with "q", I guess I've never seen it used in FFmpeg commands before. I read this and tested the answer. It was true: the argument "q" gets ignored in libx264.

(28.05.2021, 23:07)Selur Wrote: Why the '-scrict -2' ?

I think it was necessary for muxing Opus in .mp4 format. I used to use .mp4, but have since changed to .mkv, but the -strict -2 argument remained.

(28.05.2021, 23:07)Selur Wrote: Also your encoding will probably be (a lot) faster if you specify the '-r 6' before the "-i image".
How fast is:
ffmpeg -y -loop 1 -r 6 -i <path to image> -i <path to audio> -c:v libx264 -q:v 23 -preset ultrafast -c:a copy -shortest <path to output>
for you?

It is up to 13x faster than real-time, considerably faster than the max 3.5x I had before. The threads are still not used, not sure if that's such a problem anymore. If possible, I'd still like them used.

(28.05.2021, 23:07)Selur Wrote: (Also if you have an nvida cpu or intel cpu with a graphic processor you might want to use nvenc or qsvenc instead of x264)

I do have both of those, but NVENC has really poor quality at the beggining of the video, from what I have tested. I have not tested qsvenc, not sure what that codec is for or how it's used.

(28.05.2021, 23:07)Selur Wrote: Ps.: your goal shouldn't be a higher cpu utilization, but higher speed. Since you basically tell the encoder to do nothing it's to be expected that the cpu utilization isn't high.

Well, that's pretty much my final goal, but the fact that the cores were not utilized at full potential really struck me, even after the -threads argument.


Are there any consequences to using the command like this? I, for one, didn't notice them, but I must say I didn't analyze the output files very thoroughly. All I saw was the files were small and the quality was not terrible.


Also, sorry for the late reply. I must have not subscribed correctly to the thread.
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)