Hi there, i’m trying to install the NVIDIA ffmpeg on a docker image which is being used on a Jetson Orin Nano. I can’t find a base image with ffmpeg installed, so I’m starting from this image - nvcr.io/nvidia/l4t-jetpack:r36.4.0 which seems to have most of what I need.
apt update
apt install ffmpeg
# this is the output:
root@2660b180d9dd:/# apt install ffmpeg
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
libavcodec58 libavfilter7 libavformat58 libavutil56 libpostproc55 libssh-gcrypt-4 libswresample3 libswscale5 libva-x11-2 libvdpau1
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
libcdio-cdda2 libcdio-paranoia2 libsrt1.4-openssl libxv1 nvidia-l4t-core nvidia-l4t-cuda nvidia-l4t-multimedia nvidia-l4t-multimedia-utils nvidia-l4t-nvsci
The following NEW packages will be installed:
ffmpeg libcdio-cdda2 libcdio-paranoia2 libsrt1.4-openssl libxv1 nvidia-l4t-core nvidia-l4t-cuda nvidia-l4t-multimedia nvidia-l4t-multimedia-utils nvidia-l4t-nvsci
0 upgraded, 10 newly installed, 0 to remove and 119 not upgraded.
Need to get 41.7 MB of archives.
After this operation, 147 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 https://repo.download.nvidia.com/jetson/t234 r36.4/main arm64 nvidia-l4t-core arm64 36.4.3-20250107174145 [3680 kB]
Get:2 https://repo.download.nvidia.com/jetson/t234 r36.4/main arm64 nvidia-l4t-cuda arm64 36.4.3-20250107174145 [6660 kB]
Get:3 http://ports.ubuntu.com/ubuntu-ports jammy/main arm64 libcdio-cdda2 arm64 10.2+2.0.0-1build3 [16.5 kB]
Get:4 https://repo.download.nvidia.com/jetson/t234 r36.4/main arm64 nvidia-l4t-multimedia-utils arm64 36.4.3-20250107174145 [270 kB]
Get:5 https://repo.download.nvidia.com/jetson/t234 r36.4/main arm64 nvidia-l4t-nvsci arm64 36.4.3-20250107174145 [416 kB]
Get:6 https://repo.download.nvidia.com/jetson/t234 r36.4/main arm64 nvidia-l4t-multimedia arm64 36.4.3-20250107174145 [13.1 MB]
Get:7 http://ports.ubuntu.com/ubuntu-ports jammy/main arm64 libcdio-paranoia2 arm64 10.2+2.0.0-1build3 [15.1 kB]
Get:8 http://ports.ubuntu.com/ubuntu-ports jammy/universe arm64 libsrt1.4-openssl arm64 1.4.4-4 [289 kB]
Get:9 https://repo.download.nvidia.com/jetson/ffmpeg r36.4/main arm64 ffmpeg arm64 7:4.4.2-nvidia [17.3 MB]
Get:10 http://ports.ubuntu.com/ubuntu-ports jammy/main arm64 libxv1 arm64 2:1.0.11-1build2 [11.0 kB]
Fetched 41.7 MB in 2s (21.0 MB/s)
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package nvidia-l4t-core.
(Reading database ... 41330 files and directories currently installed.)
Preparing to unpack .../nvidia-l4t-core_36.4.3-20250107174145_arm64.deb ...
/var/lib/dpkg/tmp.ci/preinst: line 43: /proc/device-tree/compatible: No such file or directory
dpkg: error processing archive /var/cache/apt/archives/nvidia-l4t-core_36.4.3-20250107174145_arm64.deb (--unpack):
new nvidia-l4t-core package pre-installation script subprocess returned error exit status 1
Errors were encountered while processing:
/var/cache/apt/archives/nvidia-l4t-core_36.4.3-20250107174145_arm64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@2660b180d9dd:/#
Do you have any pointers for how to install the NVIDIA ffmpeg in a l4t docker container?
I see that its trying to install slightly newer versions, e.g. 36.4.3-20250107174145 instead of 36.4.0-20240912212859 but I get the same issue even when I pin the 36.4.0 version.
I also tried to mount /proc/device-tree/compatible into the container, by running the container like this:
docker run -it --rm --runtime=nvidia --privileged --volume /proc/device-tree/:/proc/device-tree/:ro nvcr.io/nvidia/l4t-jetpack:r36.4.0 /bin/bash
But this this is the output error:
root@5e5fb9a8193a:/# apt install ffmpeg
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
libavcodec58 libavfilter7 libavformat58 libavutil56 libpostproc55 libssh-gcrypt-4 libswresample3 libswscale5 libva-x11-2 libvdpau1
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
libcdio-cdda2 libcdio-paranoia2 libsrt1.4-openssl libxv1 nvidia-l4t-core nvidia-l4t-cuda nvidia-l4t-multimedia nvidia-l4t-multimedia-utils nvidia-l4t-nvsci
The following NEW packages will be installed:
ffmpeg libcdio-cdda2 libcdio-paranoia2 libsrt1.4-openssl libxv1 nvidia-l4t-core nvidia-l4t-cuda nvidia-l4t-multimedia nvidia-l4t-multimedia-utils nvidia-l4t-nvsci
0 upgraded, 10 newly installed, 0 to remove and 119 not upgraded.
Need to get 41.7 MB of archives.
After this operation, 147 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 https://repo.download.nvidia.com/jetson/t234 r36.4/main arm64 nvidia-l4t-core arm64 36.4.3-20250107174145 [3680 kB]
Get:2 http://ports.ubuntu.com/ubuntu-ports jammy/main arm64 libcdio-cdda2 arm64 10.2+2.0.0-1build3 [16.5 kB]
Get:3 https://repo.download.nvidia.com/jetson/t234 r36.4/main arm64 nvidia-l4t-cuda arm64 36.4.3-20250107174145 [6660 kB]
Get:4 http://ports.ubuntu.com/ubuntu-ports jammy/main arm64 libcdio-paranoia2 arm64 10.2+2.0.0-1build3 [15.1 kB]
Get:5 https://repo.download.nvidia.com/jetson/t234 r36.4/main arm64 nvidia-l4t-multimedia-utils arm64 36.4.3-20250107174145 [270 kB]
Get:6 https://repo.download.nvidia.com/jetson/t234 r36.4/main arm64 nvidia-l4t-nvsci arm64 36.4.3-20250107174145 [416 kB]
Get:7 https://repo.download.nvidia.com/jetson/t234 r36.4/main arm64 nvidia-l4t-multimedia arm64 36.4.3-20250107174145 [13.1 MB]
Get:8 http://ports.ubuntu.com/ubuntu-ports jammy/universe arm64 libsrt1.4-openssl arm64 1.4.4-4 [289 kB]
Get:9 https://repo.download.nvidia.com/jetson/ffmpeg r36.4/main arm64 ffmpeg arm64 7:4.4.2-nvidia [17.3 MB]
Get:10 http://ports.ubuntu.com/ubuntu-ports jammy/main arm64 libxv1 arm64 2:1.0.11-1build2 [11.0 kB]
Fetched 41.7 MB in 2s (21.5 MB/s)
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package nvidia-l4t-core.
(Reading database ... 41330 files and directories currently installed.)
Preparing to unpack .../nvidia-l4t-core_36.4.3-20250107174145_arm64.deb ...
lsblk: overlay: not a block device
partx: /dev/: failed to initialize blkid prober
INFO: rootfs A/B is not enabled.
Unpacking nvidia-l4t-core (36.4.3-20250107174145) ...
dpkg: error processing archive /var/cache/apt/archives/nvidia-l4t-core_36.4.3-20250107174145_arm64.deb (--unpack):
unable to make backup link of './usr/lib/aarch64-linux-gnu/nvidia/ld.so.conf' before installing new version: Invalid cross-device link
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
Errors were encountered while processing:
/var/cache/apt/archives/nvidia-l4t-core_36.4.3-20250107174145_arm64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
I’m seeing e.g. h264_nvv4l2dec in the list which is promising. My next problem this that it has installed version 4.4.2 of ffmpeg, and I’m looking for 7.1:
ffmpeg version 4.4.2-1ubuntu0.1 Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 11 (Ubuntu 11.4.0-1ubuntu1~22.04)
Has anyone successfully built ffmpeg 7.1 for the jetson or have any pointers?
Hi,
Our ffmpeg package with hardware acceleration is in 4.4.2. If you would like to use later version, please install the original package. Not to add our server so that it downloads the package from ffmpeg organization.