What is an ffmpeg command line that can be used so the final mp4 can always be played on a Jetson AGX hardware?

Okay, I found the problem. Strange, though but I have to force the pixel format to yuv420p otherwise it may remain at a higher scale such as yuv444p or yuv422p and the NVDEC does not support those.

I thought that the -vf format=yuv420p was sufficient, but apparently not. What I had to add is the -pix_fmt yuv420p command line option to make it work properly. Now the NVDEC is happy whatever the original JPEG input data.

If you’d like a good YUV 444 image that will give you grief, here is one on Wikipedia.

The scale of the default command I have above will be ignored and the output movie will fail.

When you try to add the -pix_fmt yuv420p, it also fails because the width is not a multiple of 2. It would be great, though, if we could get error messages that tell us what’s wrong. What I see now is:

NVMEDIA: NVMEDIABufferProcessing: 1507: NvMediaParserParse Unsupported Codec
Event_BlockError from 0BlockH264Dec : Error code - e3840
Sending error event from 0BlockH253DecNVMEDIA: NnMMLitemNVMEDIADecDoWork: 1985: NVMEDIA Video Dec Unsupported Stream

So it tells us it’s an unsupported Codec, but it is really not clear since most of us expect all H.264 encoded movies to work when only yuv420p is supported.

1 Like