I have a Docker image with Ubuntu 18.04. This has, from the normal repo package, ffmpeg 3.4.6, but I would like to upgrade it to 4.x. I tried the "standard" way of jonathonf's PPA, but I'm getting library version mismatch.
Here are the details:
FROM nvidia/cudagl:10.0-runtime-ubuntu18.04
RUN echo 'debconf debconf/frontend select Noninteractive' | debconf-set-selections
RUN apt-get update -y && \ apt-get install -y apt-utils && \ apt-get install -y curl x11-apps xserver-xorg libglu1-mesa-dev freeglut3-dev mesa-common-dev \ libgtk2.0-0 libxmu-dev libxi-dev mesa-utils htop libgtk-3-dev libglfw3 vim \ python zip unzip software-properties-common ffmpeg imagemagick python3.6-dev && \ rm -rf /var/lib/apt/lists/*
+ some unrelated stuff (CUDA, python packages, etc.)after which (when I log into a container, but it's the same if I do it in the Dockerfile) I do the bog standard:
add-apt-repository ppa:jonathonf/ffmpeg-4
apt-get update
apt-get install ffmpegi.e. something I've done quite a few times before when setting up different machines.
However, instead of the usual ffmpeg version 4.2 Copyright (c) 2000-2019 the FFmpeg developers or similar, what I get when I run ffmpeg is this thing:
ffmpeg: relocation error: /usr/lib/x86_64-linux-gnu/libavfilter.so.7: symbol av_gcd_q version LIBAVUTIL_56 not defined in file libavutil.so.56 with link time referenceI googled that and it seems to be a library version mismatch. I tried uninstalling and reinstalling related libav packages, putting the ppa at the beginning of the Dockerfile (before anything substantial is installed), apt upgrade, apt autoremove, all sorts of combinations, but nothing seems to give me a workable binary.
I guess I could get a static build of ffmpeg and include that in my docker image, but I'd much prefer not doing that and just install 4.x from a ppa/repo package. How could I do that?
1 Answer
Just install ffmpeg via snap:
sudo snap install ffmpegsnap search ffmpeg
Name Version Publisher Notes Summary
ffmpeg 4.3.1 snapcrafters - A complete solution to record, convert and stream audio and video. 2