FFmpeg Package Conflict and Installation Issues on NVIDIA Jetson Orin Platforms
Issue Overview
Users of NVIDIA Jetson Orin platforms, particularly those running Jetpack 6.0 with Linux R36.3 and Ubuntu 22.04, are experiencing significant issues with the installation and functionality of FFmpeg. The primary problems include:
- Package conflicts between NVIDIA’s FFmpeg and libpostproc-dev, along with its dependencies.
- Errors during FFmpeg installation, particularly when trying to overwrite existing files.
- Inability to run FFmpeg after installation due to missing shared libraries, specifically libdav1d.so.7.
- These issues are impacting not only FFmpeg but also related packages like gstreamer and the ability to build other software such as torchaudio and torcgvision.
The problem appears to be widespread and consistent across different Jetson Orin models, including Orin Nano, Orin NX, and Orin AGX.
Possible Causes
-
Package Incompatibility: The NVIDIA FFmpeg package seems to be incompatible with existing system libraries, particularly libpostproc-dev and its dependencies.
-
Incorrect Package Dependencies: The NVIDIA FFmpeg package may have been built with dependencies that are not available in the standard repositories for the Jetson platforms.
-
Mismatched Library Versions: The FFmpeg package is looking for libdav1d.so.7, while the system only has libdav1d.so.5 available, indicating a version mismatch.
-
Repository Issues: The L4T R36.3 repository may not contain the correct versions of all required libraries for the NVIDIA FFmpeg package.
-
Compilation Mismatch: There’s a possibility that the FFmpeg package was not correctly compiled for the ARM64 architecture used in Jetson platforms.
Troubleshooting Steps, Solutions & Fixes
-
Remove Conflicting Packages:
Before installing FFmpeg, try removing conflicting packages:sudo apt remove ffmpeg libpostproc-dev sudo apt update
-
Force Overwrite:
If you encounter file conflicts, you can force the overwrite:sudo dpkg -i --force-overwrite /var/cache/apt/archives/ffmpeg_7%3a4.4.2-nvidia_arm64.deb sudo apt --fix-broken install
-
Clean Installation Attempt:
Try a clean installation of FFmpeg and its dependencies:sudo apt update sudo apt-get -y install ffmpeg libavutil-dev libavcodec-dev libavformat-dev libavdevice-dev libavfilter-dev libswscale-dev libswresample-dev libswresample-dev libpostproc-dev libjpeg-dev libpng-dev libopenblas-base libopenmpi-dev
-
Use Alternative PPA (Temporary Fix):
As a temporary workaround, you can use an alternative PPA:sudo vim /etc/apt/sources.list.d/nvidia-l4t-apt-source.list # Comment out: deb https://repo.download.nvidia.com/jetson/ffmpeg r36.3 main sudo add-apt-repository ppa:savoury1/ffmpeg4 sudo apt-get update sudo apt remove ffmpeg sudo apt install ffmpeg
Note: This solution loses NVIDIA optimizations.
-
Check for Updates:
NVIDIA is aware of the issue and may release updates. Regularly check for system updates:sudo apt update sudo apt upgrade
-
Reinstall JetPack:
If all else fails, consider reflashing your Jetson device with the latest JetPack version. -
File a Bug Report:
If the issue persists after trying these solutions, file a bug report with NVIDIA, providing detailed information about your setup and the steps you’ve taken. -
Monitor NVIDIA Forums:
Keep an eye on NVIDIA’s official forums and developer resources for any announcements or official fixes for this issue.
It is worth emphasizing that as of the last update in this discussion, a comprehensive fix from NVIDIA was not yet available. Users should exercise caution when applying workarounds and be prepared for potential functionality loss, especially in terms of NVIDIA-specific optimizations.