I currently record all my output directly to harddisk with a command like:
ADD 1-1 FILE “FILENAME” -vcodec libx264 -preset ultrafast -tune fastdecode
Works totally fine but I have a high CPU usage when video has a lot movement. Nearly 100% CPU usage (99-100%)
My System is a HP Z420 with NVIDIA Quadro K2000 and CasparCG 2.2.
When I use sth like:
ADD 1-1 FILE “FILENAME” -vcodec libx264 -preset ultrafast -tune fastdecode -format mpegts then the same recording will end only in a total cpu usage of only 35-40%
When I check for GPU monitor (NVIDIA monitor), in both cases the GPU is about 50% used and it doesn’t matter if I record or not. Could it be that the GPU is not used at all for ffmpeg?
Does anyone have an idea which command to use to record with GPU usage instead CPU usage in ffmepg?
I just checked and the ffmpeg that Caspar 2.2 uses does have nvenc support enabled. I was not expecting that to be the case
But in your command you are using the libx264 codec which is a cpu h264 encoder. Try using h264_nvenc instead (you might also need -profile high444p -pixel_format yuv444p -preset default) for it to work https://trac.ffmpeg.org/wiki/HWAccelIntro
Note: Caspar will only take arguments in the -[parameter]:[stream] syntax. Use -codec:v, not -vcodec. Arguments not passed on by caspar to FFmpeg will yield an “Unused option” log message.
argument format is a thing with caspar’s ffmpeg consumer. can’t use the alias.
When I tested it I relied on “Video Encode” caption on GPU in task manager. But actually GPU uses doesn’t increase significantly.
I today tested 03-03-2020 build which uses ff-mpeg version 4.2.2. But it also doesn’t show GPU use.
While same command when used in ffmpeg command line GPU use goes up significantly.