[FFmpeg-user] 10bit hardware decoding using CUDA

Ivan Gorin ivangorin21 at gmail.com
Sun Dec 20 00:42:05 EET 2020

For anyone who might have a similar question in the future, I have figured
out a way to do this using software conversion from 10 bit to 8 bit. Here
is the example command:

time ffmpeg -hide_banner -hwaccel cuda -hwaccel_output_format cuda -i
source.mkv -vf "hwdownload,format=p010le,format=yuv420p,hwupload_cuda" -c:v
hevc_nvenc -preset slow test.mkv

"hwdownload,format=p010le,format=yuv420p,hwupload_cuda" downloads frames
from hardware to system memory in the original format (in this case p010le
which is equivalent to yuv420p10le), then converts them into 8-bit yuv420p
and uploads them back to hardware to encode.
Of course additional options are needed to set your desired encoding

I'm not 100% sure this is the best or correct way, but it's better than


More information about the ffmpeg-user mailing list