Ubuntu uses PPA to install ffmpeg 4

ffmpeg can be compiled and installed by downloading the source code package from the official website, but I am too lazy...
https://ffmpeg.org/download.html#build-linux

1. Command line installation posture

  1. Add the PPA and upgrade the corresponding packages:
$ sudo add-apt-repository ppa:savoury1/graphics
$ sudo add-apt-repository ppa:savoury1/multimedia
$ sudo add-apt-repository ppa:savoury1/ffmpeg4
$ sudo apt-get update
$ sudo apt-get upgrade && sudo apt-get dist-upgrade
$ sudo apt-get install ffmpeg
  1. Check ffmpeg version:
$ ffmpeg -version
ffmpeg version 4.4-1ubuntu0~16.04.sav0.1 Copyright (c) 2000-2021 the FFmpeg developers

2. Various similar strange problems that arise

  1. If add-apt-repository command not found appears, use the following command
apt-get install software-properties-common

If you want to undo the above operation, use the old version (not verified)

sudo apt-get install ppa-purge && sudo ppa-purge ppa:savoury1/ffmpeg4
ImportError: No module named 'matplotlib'
安装对应模块就是:
python -m pip install matplotlib

reference:

Guess you like

Origin blog.csdn.net/u011795345/article/details/125844645