How does ffmpeg go to use 8 and 10 bit scaling

How does ffmpeg go to use 8 and 10 bit scaling?
Setting pix_pmt=yuv420p10le is invalid.

I am not sure about the scaling filter that is being used. The CPU scale filter has a different command line and works on CPU surfaces while the CUDA scale filter works on CUDA surfaces. Please help with the command line that you are trying and I could help you with the changes needed.

The ffmpeg command line:
ffmpeg -hwaccel cuvid -c:v h264_cuvid -deint 1 -i udp://238.1.1.1:1234 -vf scale_npp=1920:1080:format=p010le -c:v h264_nvenc -b:v 4000k -f mpegts udp://239.1.1.1:1234

The scale_npp filter doesn’t work for 10 bit, please use scale_cuda, and no need to specify any format option

ffmpeg3.4 didn’t find scale_cuda. How do I compile scale_cuda into ffmpeg?

Please add --enable-cuda-sdk on the configure command line

Using scale_cuda 10bit is still unable to work.

The ffmpeg command line:

ffmpeg -hwaccel cuvid -c:v h264_cuvid -deint 1 -i udp://238.1.1.1:1234 -vf scale_cuda=1920:1080 -c:v h264_nvenc -pix_fmt=p010le -b:v 4000k -c:a copy -f mpegts udp://239.1.1.1:1234

We do not support any bit depth conversions currently. You can transcode from 8-bit to 8-bit and 10-bit to 10-bit

-pix_fmt=p010le can be removed.

What is the issue that you face with the command line.

After the -pix_fmt=p010le is removed, the green screen of the transcoding output is displayed.

Is the source 8-bit or 10-bit ?

8-bit.

Why are we then adding -pix_fmt=p010le. It should have worked fine.

ffmpeg3.4 --enable-static --disable-shared --enable-libfreetype --enable-libfontconfig --enable-libfribidi --enable-cuda --enable-cuvid --enable-nvenc --enable-nonfree --enable-libnpp --enable-cuda-sdk --extra-cflags=-I/usr/local/nvidia/include --extra-ldflags=-L/usr/local/nvidia/lib64

Can you send me the command line?

You can test the basic command line and then try to build from here other options

ffmpeg -hwaccel cuvid -c:v h264_cuvid in.264 -vf scale_npp=1280:720 -c:v h264_nvenc out.264

Can you send me the command line that supports 10bit?

1 Like