I try to encode a raw video with gray format losslessly using ffmpeg compiled with cuda as in [url]https://developer.nvidia.com/ffmpeg[\url]
The command that I used is:
ffmpeg -y -f rawvideo -s:v 640x480 -r 60 -pix_fmt gray -i input -c:v h264_nvenc -preset lossless -qp 0 -pix_fmt yuv420p output.mp4
And decoded it with:
ffmpeg -y -vsync 0 -c:v h264_cuvid -i output.mp4 -f rawvideo -pix_fmt gray output.yuv
And then I compare the input with the output.yuv file with:
diff input output.yuv
And the two files are not identical.
I don’t find any document on the quality of video with -preset set to lossless.
Is the compressed video really lossless ?
Thanks