I have read in the L4T docs that ffmpeg is supposed to support hardware accelerated decoding of specific video codecs but I have been unable to achieve smooth playback of the UHD and 4K h264 and h265 videos I have tested.
I have had success playing hw accelerated videos under L4T with jetson-ffmpeg using commands like these:
I’ve given this a quick test now, but only with one h264 file.
It seems to work when run with sudo but the patch fails to apply to both the latest git ffmpeg and the latest ffmpeg stable release. Instead you have to checkout the ffmpeg git commit from the end of May, right before this patch was released, to get it to apply cleanly.
Since my last post I have also checked out the ffmpeg devs responses to this patch on the ffmpeg-devel ml and they aren’t happy with how its been implemented. It sounds like it won’t be upstreamed without a pretty major revision.
Need to be corrected. The page is titled ‘Accelerated decode with ffmpeg’ but if you follow the instructions on there as-is users will end up with the non-accelerated build.
Unfortunately ffplay isn’t included in the nvidia ffmpeg package. If you build ffmpeg from source ffplay gets built in a standard make and ffplay is also included in the normal Ubuntu ffmpeg package so please include ffplay in future updates of ffmpeg.
I’m also disappointed that I don’t see any nvv4l2dec decoder options when I run mpv --vd=help after installing the nvidia ffmpeg. I’m going to try rebuilding mpv to see if that fixes it.
EDIT
Actually, it’s mpv --hwdec=help to show the list of hardware decoding options but yes, still no nvv4l2dec. Looks like ffmpeg isn’t as closely tied to mpv as I hoped.
I’ve had a quick look at the latest git mpv source and there is no link between ffmpeg and mpv as far as the hardware decoding is concerned, which makes me wonder which would be easier to port to mpv , nvv4l2dec or nvmpi, the jetson-ffmpeg decoder/encoder?
Here are all of the currently supported mpv hardware decoding backends:
Thanks @DaneLLL,
I see that accelerated multimedia is possible with ffmpeg and gstreamer on the jetson devices
I just had a basic question:
If the ffmpeg and gstreamer are accelerated, are the applications based on ffmpeg (Create new page · amiaopensource/ffmpeg-amia-wiki Wiki · GitHub)-Graphical-User-Interface-Applications-using-FFmpeg) and gstreamer (GStreamer: Applications) are also accelerated if I build those applications from source and use the NVIDIA ffmpeg and gstreamer libraries ?
In ffmpeg, you would need to check if the decoder(such as h264_nvv4l2dec) is picked by the applications.
In gstreamer, you would need to use NVIDIA plugins such as nvv4l2decoder. Please take a look at gstreamer user guide.
hi DaneLLL, the standard deb you shared is not compiled with --enable-gpl flag, many of the interesting filters/packages (like mpdecimate) are not thus not enabled. Given replies here, can you share instruction how to compile this for Jetson Nano? Thanks.