Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Improve ffmpeg CPU usage by compromising quality

I am using FFMpeg for screen capturing. I am looking for a screen capturing tool that will run on 1000 of VMs (windows and mac).The VMs have limited CPU (1 core) and 2GB ram and No GPU.

Currently I invoke ffmpeg with

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

I am using gdigrab to capture screen? Is there any better options that might reduce cpu usage? or changing the encoder or format?

I am aiming for 4-5% reduction in CPU usage.

Thanks in advance

like image 557
Hardik Juneja Avatar asked Oct 19 '25 09:10

Hardik Juneja


1 Answers

Using -profile baseline and enabling -tune zerolatency to turn of some extra features should help a bit. Otherwise, you will need to use a different codec than h.264.

like image 64
szatmary Avatar answered Oct 22 '25 03:10

szatmary



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!