Improve ffmpeg CPU utilization compromising quality

I am using FFMpeg for screen capture. I am looking for a screen capture tool that will work on 1000 virtual machines (Windows and Mac). The VM has a limited processor (1 core) and 2GB of RAM and no GPU.

I am currently calling ffmpeg with

ffmpeg  -y -framerate 8 -f dshow -f gdigrab -i "desktop"  -c:v libx264  -crf 0 -preset ultrafast -threads 0 temp.mkv

      

Am I using gdigrab for screen capture? Are there any better options that can lower your CPU usage? or changing the encoder or format?

I am aiming to reduce CPU usage by 4-5%.

Thank you in advance

+3


source to share


2 answers


Using -profile baseline

and enabling -tune zerolatency

to enable some advanced features should help a little. Otherwise, you will need to use a different codec than h.264.



+3


source


What is your original resolution? If it's large (like 1080p or 720p), do you think you should scale it down to 480p / 404p first?



Otherwise, it's better to just change the codec. I would suggest trying "-c: v mpeg4" first. If it is still too slow, go to "-c: v mpeg2video".

+1


source







All Articles