[FFmpeg-user] hwaccel cuvid with filters
james.girotti at gmail.com
Thu Apr 19 19:48:17 EEST 2018
> Maybe someone can explain how to use in filters?
This seems to be a gap in documentation, because it comes up every now and
then on the mailing list. I'll try to be brief. When using "-hwaccel cuvid"
the hw-decoded frames stay in GPU memory and are passed onto the
hw-encoder. The filters that you are trying to use are software filters.
They require decoded frames to be in CPU memory (and a format that is
compatible). To remedy this, you have two choices:
remove "-hwaccel cuvid" from your commandline (removing it causes decoded
frames to be copied from GPU->CPU memory and then CPU->GPU for encoding) OR
add 'hwdownload,format=nv12' to the beginning of filter.txt and
'hwupload_cuda' to the end.
The first option definitely reduces performance. I have not specifically
benchmarked the second, but it likely has the similar performance. The
filters you are applying will likely cause more reduction than either
though so it's moot.
Hope that helps.
More information about the ffmpeg-user