Reputation: 171
I'm trying to setup a media processing server. I've done a lot of research for FFMPEG and wrote a command. The command is as follows.
ffmpeg -y -i "bbb_sunflower_2160p_60fps_normal.mp4" -c:v libx264 \
-threads 7 -profile:v main -preset ultrafast -vf scale=1920:-1 \
"process/video/1080p.mp4" -c:v libx264 -threads 7 -profile:v main \
-preset ultrafast -vf scale=1280:-1 "process/video/720p.mp4" -c:v \
libx264 -threads 7 -profile:v main -preset ultrafast -vf \
scale=854:-1 "process/video/480p.mp4" -vf fps=5/60 \
process/image/thumb_%d.jpg
This command works and runs perfectly, but it is dirt slow. My server, which is dedicated to just running ffmpeg has the following specs:
12 core intel Xeon X5650 (Hyperthreading enabled)
64 GB ECC DDR3 RAM
250 GB SSD Drive
But when I use this command, the server CPU load hangs around 250-300%, which I would like it to hang around 2,000% while processing the video. Currently when processing the video, the server is rendering around 17 frames per second. This would take a very long time to process a 10 minute video that's 60fps.
Upvotes: 0
Views: 6805
Reputation: 21
If you are running windows, try again with defender (and any other virus checker) disabled. It can make a huge difference. Let us know the outcome please...
This worked for me on a windows 10 machine (which then processed up to ten times faster ) and is therefore a possible answer to the above problem. Clarification (of any sort) is not requested, but it would be good to know if it helped.
Upvotes: 1
Reputation: 31101
It's the scaler. The scaler in ffmpeg is single threaded, it is a bottleneck on a system with that many threads. Try running a different process for each output.
Upvotes: 4
Reputation: 11174
This is a very complicated commandline with little to no useful information. For example, you're not providing FFmpeg stdout/stderr (which contains lots of useful information). Possible causes:
I'd encourage you to test simpler versions and provide stdout/stderr.
Upvotes: 0