Reputation: 387
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
Upvotes: 4
Views: 2943
Reputation: 1229
What is your source's resolution ? If it's big (like 1080p or 720p), have you considered downscaling first to 480p / 404p ?
Otherwise, it's better to just change the codec. I'd suggest you first try "-c:v mpeg4". If it is still too slow, go for "-c:v mpeg2video".
Upvotes: 1
Reputation: 31101
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.
Upvotes: 4