Support for NVDEC / NVIDIA VIDEO CODEC for the Jetson Nano

Hello,

Seems like there’s a ton of interest to get support for the Nvidia Codecs on tegra platforms like the Jetson nano. Is this planned to be supported in the future?

https://developer.nvidia.com/nvidia-video-codec-sdk#Download

2 Likes

Hi Will, yes the Nano’s hardware encoder and decoder are supported in software, the API’s are GStreamer and V4L2.

Please refer to the L4T Multimedia API reference and the L4T Accelerated GStreamer User Guide for more info.

1 Like

Thanks, Dusty. I was aware of that, but many applications are being built to natively support NVDEC, like plex. Will NVDEC be supported?

There aren’t currently plans to support it, as Jetson uses different encoder/decoder hardware than the discrete GPUs, however we are in the preliminary stages of looking at support for applications like Plex.

1 Like

It’s great news you guys are looking into Plex. Is there any way I can stay in the loop with your developments?

When I saw the Jetson Nano - I thought it would make a great Plex server. Very keen to have proper hardware acceleration for it.

1 Like

Thanks for the feedback - I run Plex at my house too :) We are in the preliminary stages of looking at the support, but will post updates here when we have something more concrete to share. Stay tuned.

1 Like

I have to say, this is an amazing little plex server sans encoder. The gigabit interface is truly gigabit, and there’s good io between my usb 3.0 wd drive and the network interface for direct play. It would be nice to be able to connect an nvme ssd to the m.2 port without having to build from source for a more reliable boot disk, but it’s pretty good as is.

Oh yeah - I managed 6 simultaneous 1080p streams with direct play in the house. I ran out of devices to test with :D

I use Plex / Kodi as well as server / client. The Nano has a ton of potential on this front as a media player if hw decode/encode worked. I haven’t tested but Kodi/plex may support lv4l2 or gstreamer if built in. There are countless Kodi based set top boxes out there. Be nice to have a template.

Here are (i think) complete build dependencies for git kodi. It’s pretty long. You can stick in in a text file and run apt :

automake
autopoint
bison
build-essential
ccache
cmake
curl
cvs
default-jre
fp-compiler
gawk
gdc
gettext
git-core
gperf
libasound2-dev
libass-dev
libavcodec-dev
libavfilter-dev
libavformat-dev
libavutil-dev
libbluetooth-dev
libbluray-dev
libboost-dev
libboost-thread-dev
libbz2-dev
libcap-dev
libcdio-dev
libcec-dev
libcurl4-gnutls-dev
libcwiid-dev
libcwiid1
libdbus-1-dev
libenca-dev
libflac-dev
libfontconfig-dev
libfreetype6-dev
libfribidi-dev
libfstrcmp-dev
libgif-dev
libglew-dev
libiso9660-dev
libjpeg-dev
libltdl-dev
liblzo2-dev
libmad0-dev
libmicrohttpd-dev
libmodplug-dev
libmp3lame-dev
libmpeg2-4-dev
libmpeg3-dev
libmysqlclient-dev
libnfs-dev
libogg-dev
libpcre3-dev
libplist-dev
libpng-dev
libpostproc-dev
libpulse-dev
libsamplerate-dev
libsdl-dev
libsdl-gfx1.2-dev
libsdl-image1.2-dev
libsdl-mixer1.2-dev
libshairport-dev
libsmbclient-dev
libsqlite3-dev
libssh-dev
libssl-dev
libswscale-dev
libtaglib-cil-dev
libtiff-dev
libtinyxml-dev
libtool
libudev-dev
libusb-dev
libva-dev
libvdpau-dev
libvorbisenc2
libxml2-dev
libxmu-dev
libxrandr-dev
libxrender-dev
libxslt1-dev
libxt-dev
libyajl-dev
mesa-utils
nasm
pmount
python-dev
python-pil
python-sqlite
rapidjson-dev
swig
unzip
yasm
zip
zlib1g-dev

You can put those in a text file and go: cat packages.txt | xargs sudo apt-get install

Then make a build subdir in the git repository and run cmake like so:

adminuser@fixed-nano:~/installed/xbmc/build$ cmake -DENABLE_INTERNAL_FMT=ON ..
-- The CXX compiler identification is GNU 7.4.0
-- The C compiler identification is GNU 7.4.0
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/cc
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Source directory: /home/adminuser/installed/xbmc
-- Build directory: /home/adminuser/installed/xbmc/build
-- Generator: Single-configuration: Release (Unix Makefiles)
-- CMake Version: 3.10.2
-- System type: Linux
-- Linker: GNU gold
-- Core system type: linux
-- Platform: 
-- CPU: aarch64, ARCH: aarch64
-- Cross-Compiling: FALSE
-- Execute build artefacts on host: TRUE
-- Depends based build: 
-- Could not find hardware support for SSE (missing: _SSE_TRUE _SSE_OK) 
-- Could not find hardware support for SSE2 (missing: _SSE2_TRUE _SSE2_OK) 
-- Could not find hardware support for SSE3 (missing: _SSE3_TRUE _SSE3_OK) 
-- Could not find hardware support for SSSE3 (missing: _SSSE3_TRUE _SSSE3_OK) 
-- Could not find hardware support for SSE4.1 (missing: _SSE41_TRUE _SSE41_OK) 
-- Could not find hardware support for SSE4.2 (missing: _SSE42_TRUE _SSE42_OK) 
-- Could not find hardware support for AVX (missing: _AVX_TRUE _AVX_OK) 
-- Could not find hardware support for AVX2 (missing: _AVX2_TRUE _AVX2_OK) 
-- NEON optimization enabled
-- Found Git: /usr/bin/git (found version "2.17.1") 
-- Found PkgConfig: /usr/bin/pkg-config (found version "0.29.1") 
-- Found Lzo2: /usr/lib/aarch64-linux-gnu/liblzo2.so  
-- Found ZLIB: /usr/lib/aarch64-linux-gnu/libz.so (found version "1.2.11") 
-- Found PNG: /usr/lib/aarch64-linux-gnu/libpng.so (found version "1.6.34") 
-- Found GIF: /usr/lib/aarch64-linux-gnu/libgif.so  
-- Found JPEG: /usr/lib/aarch64-linux-gnu/libjpeg.so  
-- Found Alsa: /usr/lib/aarch64-linux-gnu/libasound.so (found version "1.1.3") 
-- Could NOT find Avahi (missing: AVAHI_CLIENT_LIBRARY AVAHI_COMMON_LIBRARY AVAHI_CLIENT_INCLUDE_DIR AVAHI_COMMON_INCLUDE_DIR) 
-- Found Bluetooth: /usr/lib/aarch64-linux-gnu/libbluetooth.so  
-- Found Bluray: /usr/lib/aarch64-linux-gnu/libbluray.so (found suitable version "1.0.2", minimum required is "0.9.3") 
-- Found CAP: /usr/lib/aarch64-linux-gnu/libcap.so (found version "2.25") 
-- Found CCache: /usr/bin/ccache  
-- Found CEC: /usr/lib/aarch64-linux-gnu/libcec.so (found suitable version "4.0.2", minimum required is "4.0.0") 
-- Found DBus: /usr/lib/aarch64-linux-gnu/libdbus-1.so (found version "1.12.2") 
-- Could NOT find LCMS2 (missing: LCMS2_LIBRARY LCMS2_INCLUDE_DIR) 
-- Could NOT find LircClient (missing: LIRCCLIENT_LIBRARY LIRCCLIENT_INCLUDE_DIR) 
-- Could NOT find MDNS (missing: MDNS_LIBRARY MDNS_INCLUDE_DIR) 
-- Found MicroHttpd: /usr/lib/aarch64-linux-gnu/libmicrohttpd.so (found version "0.9.59") 
-- Found NFS: /usr/lib/aarch64-linux-gnu/libnfs.so (found version "2.0.0") 
-- Found Plist: /usr/lib/aarch64-linux-gnu/libplist.so (found version "2.0.0") 
-- Found PulseAudio: /usr/lib/aarch64-linux-gnu/libpulse.so (found suitable version "11.1", minimum required is "2.0.0") 
-- Found PythonLibs: /usr/lib/aarch64-linux-gnu/libpython2.7.so (found suitable version "2.7.15rc1", minimum required is "2.7") 
-- Found Python: /usr/include/python2.7  
-- Found SmbClient: /usr/lib/aarch64-linux-gnu/libsmbclient.so (found version "0.2.3") 
-- Could NOT find Sndio (missing: SNDIO_LIBRARY SNDIO_INCLUDE_DIR) 
-- Found UDEV: /lib/aarch64-linux-gnu/libudev.so (found version "237") 
-- Found LibXml2: /usr/lib/aarch64-linux-gnu/libxml2.so (found version "2.9.4") 
-- Found XSLT: /usr/lib/aarch64-linux-gnu/libxslt.so (found version "1.1.29") 
-- Found VAAPI: /usr/lib/aarch64-linux-gnu/libva.so (found suitable version "1.1.0", minimum required is "0.39.0") 
-- Found VDPAU: /usr/lib/aarch64-linux-gnu/libvdpau.so (found version "1.1.1") 
-- Found GLX: /usr/lib/aarch64-linux-gnu/libGL.so  
-- Found ASS: /usr/lib/aarch64-linux-gnu/libass.so (found version "0.14.0") 
-- Found Cdio: /usr/lib/aarch64-linux-gnu/libcdio.so (found version "1.0.0") 
-- Found EXPAT: /usr/lib/aarch64-linux-gnu/libexpat.so (found version "2.2.5") 
-- Found CrossGUID: /home/adminuser/installed/xbmc/build/build/lib/libcrossguid.a (found version "8f399e8bd4") 
-- Found UUID: /usr/lib/aarch64-linux-gnu/libuuid.so (found version "2.31.1") 
-- Found Curl: /usr/lib/aarch64-linux-gnu/libcurl.so (found version "7.58.0") 
-- FFmpeg 4.0 not found, falling back to internal build
-- Found FlatBuffers: /usr/local/bin/flatc  
-- Found Fmt: /home/adminuser/installed/xbmc/build/build/lib/libfmt.a (found version "5.1.0") 
-- Found FreeType: /usr/lib/aarch64-linux-gnu/libfreetype.so (found version "21.0.15") 
-- Found FriBidi: /usr/lib/aarch64-linux-gnu/libfribidi.so (found version "0.19.7") 
-- Found fstrcmp: /usr/lib/libfstrcmp.so (found version "0.7.D001") 
-- Found Iconv: /usr/lib/aarch64-linux-gnu/libc.so  
-- Found OpenSSL: /usr/lib/aarch64-linux-gnu/libcrypto.so (found version "1.1.0g") 
-- Found PCRE: /usr/lib/aarch64-linux-gnu/libpcrecpp.so (found version "8.39") 
-- Found RapidJSON: /usr/include (found version "1.1.0") 
-- Found Sqlite3: /usr/lib/aarch64-linux-gnu/libsqlite3.so (found version "3.22.0") 
-- Found TagLib: /usr/local/lib/libtag.a (found version "1.11.1") 
-- Found TinyXML: /usr/lib/aarch64-linux-gnu/libtinyxml.so (found version "2.6.2") 
-- Found OpenGl: /usr/lib/aarch64-linux-gnu/libGL.so  
-- Found EGL: /usr/lib/aarch64-linux-gnu/libEGL.so (found version "18.2.8") 
-- Found X: /usr/lib/aarch64-linux-gnu/libX11.so (found version "1.6.4") 
-- Found XRandR: /usr/lib/aarch64-linux-gnu/libXrandr.so (found version "1.5.1") 
-- Found LibDRM: /usr/lib/aarch64-linux-gnu/libdrm.so (found version "2.4.95") 
-- Could NOT find MariaDBClient (missing: MARIADBCLIENT_LIBRARY MARIADBCLIENT_INCLUDE_DIR) 
-- Found MySqlClient: /usr/lib/aarch64-linux-gnu/libmysqlclient.so (found version "5.7.26") 
-- Could NOT find Shairplay (missing: SHAIRPLAY_LIBRARY SHAIRPLAY_INCLUDE_DIR HAVE_SHAIRPLAY_CALLBACK_CLS) 
-- Found PythonInterp: /usr/bin/python (found version "2.7.15") 
-- Found Threads: TRUE  
-- Found Java: /usr/bin/java (found version "11.0.3") found components:  Runtime 
-- Found SWIG: /usr/bin/swig3.0 (found version "3.0.12") 
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 
-- #---- CONFIGURATION ----#
-- Platform: X11
-- -- PATH config --
-- Prefix: /usr/local
-- Libdir: /usr/local/lib
-- Bindir: /usr/local/bin
-- Includedir: /usr/local/include
-- Datarootdir: /usr/local/share
-- Datadir: /usr/local/share
-- Docdir: /usr/local/share/doc/kodi
-- ALSA enabled: Yes
-- AVAHI enabled: No
-- BLUETOOTH enabled: Yes
-- BLURAY enabled: Yes
-- CAP enabled: Yes
-- CCACHE enabled: Yes
-- CEC enabled: Yes
-- DBUS enabled: Yes
-- LCMS2 enabled: No
-- LIRCCLIENT enabled: No
-- MDNS enabled: No
-- MICROHTTPD enabled: Yes
-- NFS enabled: Yes
-- PLIST enabled: Yes
-- PULSEAUDIO enabled: Yes
-- PYTHON enabled: Yes
-- SMBCLIENT enabled: Yes
-- SNDIO enabled: No
-- UDEV enabled: Yes
-- XSLT enabled: Yes
-- VAAPI enabled: Yes
-- VDPAU enabled: Yes
-- GLX enabled: Yes
-- MARIADBCLIENT enabled: No
-- MYSQLCLIENT enabled: Yes
-- Configuring done
-- Generating done
-- Build files have been written to: /home/adminuser/installed/xbmc/build

Then make -j4 && sudo make install

… and it’s building on my nano. Will see if it works, and how well. I don’t think it will use accelerated decode based on what I undestand and the above enabled features.

Edit: So I ran it and tested with an avc bluray remux (of a disk I own) and while it works, it drops frames, and that’s 1080p, so no HW decode from Kodi atm unfortunately. Hopefully it will come in time.

1 Like

Hello. Any progress on it?
It would be great to know at least chances that hardware encoding will come to apps like Plex.

Hi,
We are still evaluating to support it. Please consider the suggestion in comment #2

1 Like

Thanks, I’m glad to hear that.

As you know Jian made a FFMPEG project for the Jetson

I’m helping him by developing a test bed to check every possible format input and checking the output, Jain discover that the Tegra Multimedia API is lacking of DTS output, so Jian, had to recalculate it, but is not perfect.

1 Like

Hi.
Still no progress here?

I’m also interested in this. Please share if any progress. Thank you.

Hi,
We have enabled hardware video decoding in ffmpeg. Please check development guide.

2 Likes

Also, the repo isn’t signed.

W: GPG error: https://repo.download.nvidia.com/jetson/ffmpeg main InRelease: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 0D296FFB880FB004
E: The repository ‘https://repo.download.nvidia.com/jetson/ffmpeg main InRelease’ is not signed.
N: Updating from such a repository can’t be done securely, and is therefore disabled by default.

Does that help getting Plex using GPU when transcoding videos?

1 Like

No, plex now uses their own transcoder. It used to be based off of a fork of ffmpeg, but I don’t think it is anymore.

2 Likes