Recording casparcg output via ffmpeg and NVIDIA GPU

server

#1

Hi to all,

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?


#2

FFmpeg in CCG doesn’t use cuvid, nvenc or nvdec (and probably isn’t built with support for it anyways).


#3

Ah ok… any chance that this will be changed in the future so that also gpu is used ?


#4

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