Как удалить ffmpeg linux

Обновлено: 08.07.2024

This guide for standard support releases of Ubuntu, Debian, and Linux Mint and will provide a local, non-system installation of FFmpeg with several external libraries.

You may also refer to the Generic Compilation Guide for additional information about compiling software.

Recent static builds are also available for lazy people or those who are unable to compile. The static builds do not support non-free libraries.

Note: FFmpeg is part of the Ubuntu packages and can be installed via apt-get install ffmpeg . You may still wish to compile if you want the latest version, experience a bug, or want to customize your build, and it will not interfere with the ffmpeg package in the repository.

This guide is designed to be non-intrusive and will create several directories in your home directory:

  • ffmpeg_sources – Where the source files will be downloaded. This can be deleted if desired when finished with the guide.
  • ffmpeg_build – Where the files will be built and libraries installed. This can be deleted if desired when finished with the guide.
  • bin – Where the resulting binaries ( ffmpeg , ffplay , ffprobe , x264 , x265 ) will be installed.

You can easily undo any of this as shown in Reverting Changes Made by This Guide.

These are packages required for compiling, but you can remove them when you are done if you prefer:

On Ubuntu 20.04 you may also need this command: ( ​ note)

Note: Server users can omit the ffplay and x11grab dependencies: libsdl2-dev libva-dev libvdpau-dev libxcb1-dev libxcb-shm0-dev libxcb-xfixes0-dev .

In your home directory make a new directory to put all of the source code and binaries into:

This guide assumes that you want to install some of the most common third-party libraries. Each section provides you with the commands needed to install that library.

For each section, copy-paste the entire code-block into your shell.

If you do not require certain features, you may skip the relevant section (if it is not required) and then remove the appropriate ./configure option in FFmpeg. For example, if libvpx is not needed, skip that section and then remove --enable-libvpx from the Install FFmpeg section.

Tip: To significantly speed up the compilation process on systems with multiple cores, you can use the -j option with each make command to set the number of compilation jobs allowed to run simultaneously, such as make -j4 . To set this to the number of available logical CPU cores, use make -j$(nproc) . The -j option also works with the ninja build system used to compile some of the libraries in this guide. Using all cores may cause your machine to become slow or unresponsive.

An assembler used by some libraries.

If your repository provides nasm version ≥ 2.13 then you can install that instead of compiling:

Otherwise you can compile:

libx264

H.264 video encoder. See the H.264 Encoding Guide for more information and usage examples.

Requires ffmpeg to be configured with --enable-gpl --enable-libx264 .

If your repository provides libx264-dev version ≥ 118 then you can install that instead of compiling:

Otherwise you can compile:

libx265

H.265/HEVC video encoder. See the H.265 Encoding Guide for more information and usage examples.

Requires ffmpeg to be configured with --enable-gpl --enable-libx265 .

If your repository provides libx265-dev version ≥ 68 then you can install that instead of compiling:

Otherwise you can compile:

libvpx

VP8/VP9 video encoder/decoder. See the VP9 Video Encoding Guide for more information and usage examples.

Requires ffmpeg to be configured with --enable-libvpx .

If your repository provides libvpx-dev version ≥ 1.4.0 then you can install that instead of compiling:

Otherwise you can compile:

libfdk-aac

AAC audio encoder. See the AAC Audio Encoding Guide for more information and usage examples.

Requires ffmpeg to be configured with --enable-libfdk-aac (and --enable-nonfree if you also included --enable-gpl ).

If your repository provides libfdk-aac-dev then you can install that instead of compiling:

Otherwise you can compile:

libopus

Opus audio decoder and encoder.

Requires ffmpeg to be configured with --enable-libopus .

If your repository provides libopus-dev version ≥ 1.1 then you can install that instead of compiling:

Otherwise you can compile:

libaom

AV1 video encoder/decoder:

Warning: libaom does not yet appear to have a stable API, so compilation of libavcodec/libaomenc.c may occasionally fail. Just wait a day or two for us to catch up with these annoying changes, re-download ffmpeg-snapshot.tar.bz2 , and try again. Or skip libaom altogether.

libsvtav1

AV1 video encoder/decoder. Only the encoder is supported by FFmpeg, so building of the decoder is disabled.

Requires ffmpeg to be configured with --enable-libsvtav1 .

libdav1d

AV1 decoder, much faster than the one provided by libaom.

Requires ffmpeg to be configured with --enable-libdav1d .

If your repository provides libdav1d-dev , you can install that instead of compiling:

Otherwise you'll need can build from source. Users whose distributions don't provide a recent enough version of meson (0.49.0 or newer) will need to install a more up-to-date version. This is easily done via the Python Package Index:

NASM version 2.14 or newer is required for AVX-512 support. See the NASM section for how to install/build. Alternatively, disable AVX-512 in Meson setup with -Denable_avx512=false .

libvmaf

Library for calculating the ​ VMAF video quality metric. Requires ffmpeg to be configured with --enable-libvmaf . Currently ​ an issue in libvmaf also requires FFmpeg to be built with --ld="g++" for a static build to succeed.

FFmpeg

Now re-login or run the following command for your current shell session to recognize the new ffmpeg location:

Compilation and installation are now complete and ffmpeg (also ffplay , ffprobe , lame , x264 , & x265 ) should now be ready to use. The rest of this guide shows how to update or remove FFmpeg.

Usage

You can now open a terminal, enter the ffmpeg command, and it should execute your new ffmpeg .

If you need multiple users on the same system to have access to your new ffmpeg , and not just the user that compiled it, then move or copy the ffmpeg binary from

/bin to /usr/local/bin .

Documentation

If you want to run man ffmpeg to have local access to the documentation:

You may have to log out and then log in for man ffmpeg to work.

HTML formatted documentation is available in

You can also refer to the online FFmpeg documentation, but remember that it is regenerated daily and is meant to be used with the most current ffmpeg (meaning an old build may not be compatible with the online docs).

Development of FFmpeg is active and an occasional update can give you new features and bug fixes. First you need to delete (or move) the old files:

Now can just follow the guide from the beginning.

Remove the build and source files as well as the binaries:

You may also remove packages that have been installed from this guide:

Why install to

  • Avoids installing files into any system directories.
  • Avoids interfering with the package management system.
  • Avoids conflicts with the ffmpeg package from the repository.
  • Super simple to uninstall.
  • Does not necessarily require sudo or root: useful for shared server users as long as they have the required dependencies available.

/bin is already in the vanilla Ubuntu PATH (see

Why are the commands in this guide so complicated?

It is to make compiling easy and convenient for the user. This guide:

  • Confines everything to the user's home directory (see the previous FAQ question above).
  • Is intended to be usable on all currently supported versions of Debian and Ubuntu.
  • Allows the user to choose if they want to compile certain libraries (latest and greatest) or to simply install the version from their repository (fast and easy but older).

This results in some various additional commands and configurations instead of the typical and simple ./configure , make , make install .

make[1]: Nothing to be done for 'all'/'install'

This is message from libvpx that occasionally makes users think something went wrong. You can ignore this message. It just means make is finished doing its work.

After ffmpeg installed, FLV file format doesn't work. Below are ffmpeg related files.

101k 23 23 gold badges 201 201 silver badges 258 258 bronze badges

2 Answers 2

You can simply sudo apt-get remove ffmpeg just be aware that other software you use may depend on ffmpeg, so, read apt-get output carefully.


I installed ffmpeg via Firefox addon YouTube Video and Audio Downloader 0.5.2 option. After Firefox addon YouTube Video and Audio Downloader 0.5.2. installed, ffmpeg related files are installed.

FIX

To get FLV functioning properly, try running this in your terminal:

WHY THIS WORKS

The ubuntu-restricted-extras package contains audio codecs. Notice the word 'restricted.' This word is used by ubuntu because the package contains content that

THE ISSUE First of all, according to your comments, ffmpeg is not installed. But I guess you know that much by now.

The issue here is that you replaced a codec; specifically your FLV codec. The ffmpeg FLV codec does work, it just probably is not compatible with the one that you were using before.

A codec has two main jobs: compression and decompression. To achieve these jobs, the programmer has to write an algorithm for each. The first has to give back a smaller version of the file. It is up to the programmer to decide how to do this.

This is important because a set of identical files that are compressed by different versions (implementations) of the "same" codec are different.

This is why your FLV files aren't working. Your new codec is trying to decompress files that it did not compress.

When a codec decompresses a file that it compressed, It should get back something really close to the original. (How close depends on the type of codec. For more info, research lossful and lossless compression formats.)

Note: When you switch out the decompression algorithm, the same thing should happen. You should get back something resembling the original. However, in the real world, standards aren't always followed.

In fact, in researching for this question, I learned that some codec formats are not even officially standardized. These are made up of just a basic idea and a free-for-all. I would guess that FLV is one of these. This is probably why it is not as popular as, for example, MP3.

I tried this guide to install ffmpeg, but now I want to remove it completely from Ubuntu 13.10, but when I did that guide to remove, ffmpeg is still there! How to remove it exactly?

after removing ffmpeg I see this output again:


14k 15 15 gold badges 57 57 silver badges 73 73 bronze badges 649 2 2 gold badges 12 12 silver badges 25 25 bronze badges Are you sure the ffmpeg version you are using is from the guide or from the repository? Show the complete console output of the ffmpeg command. yeah I compiled it from that guide, in compiling only problem was "yasm" and I compile "ffmpeg --disable yasm" option, just that. The guide shows exactly how to compile or install yasm.

2 Answers 2

However, seeing your other recent ffmpeg question it appears that you did not follow the guide or did not follow it correctly so this may not work for you.

The guide does not install ffmpeg to the system. This is to avoid conflicts with packages from the repository, but I'm guessing you did install to the system with sudo make install without using checkinstall ; therefore it is not integrated in the package management system. If this is the case then try:

The guide is supposed to make compiling easy since the ideas is that the user must only successfully copy and paste, but compiling is not for everyone and results may vary.


Execute this command:

If this command returns any output then it means that you've installed it and doesn't removed completely. Now you can remove all ffmpeg using following command:

Edit

man ffmpeg opening manual doesn't mean that it was there. It was because some of the configuration files remained in system when you un-install the program. You can delete them but it is not recommended. I'm posting the command to search all the files in your system matching with ffmpeg and delete them all. But remember it is not recommended to do so..

It should remove all the ffmpeg files and also you'll not be able to open the manual again.

Я пытаюсь удалить несколько разделов видео с помощью FFmpeg.

например, представьте, что вы записали шоу на телевидении и хотите вырезать рекламные ролики. Это просто с графическим редактором; вы просто отмечаете начало и конец каждого клипа, который будет удален, и выберите Удалить. Я пытаюсь сделать то же самое из командной строки с FFmpeg.

Я знаю, как разрезать один сегмент на new видео как so:

это вырезает пятисекундный клип и сохраняет его как новый видеофайл, но как я могу сделать обратное и сохранить все видео без указанный клип, и как я могу указать несколько клипов, которые будут удалены?

например, если мое видео может быть представлено ABCDEFG, я хотел бы создать новое, которое будет состоять из ACDFG.

Ну, вы все еще можете использовать trim фильтр для этого. Вот пример, предположим, что вы хотите вырезать сегменты 30-40 сек (10 сек) и 50-80 сек (30 сек):

что я здесь делал? Я обрезал первые 30 сек, 40-50 сек и 80 сек до конца, а затем объединил их в поток out1 С concat фильтр.

о setpts: нам это нужно, потому что обрезка не изменяет время отображения изображения, и когда мы вырезали 10 сек счетчик декодера не видит кадров в течение этих 10 сек.

если вы хотите иметь аудио тоже, вы должны сделать то же самое для аудио потоков. Поэтому команда должна быть:

базовая стратегия использует -t и -ss чтобы получить видео каждого сегмента, который вы хотите, а затем объединить все части для вашей окончательной версии.

скажем, у вас есть 6 сегментов ABCDEF каждые 5 секунд, и вы хотите (0-5 секунд), C (10-15 секунд) и E (20-25 секунд) вы бы это сделали:

что будет делать файлы.детективный сериал, с.детективный сериал и электронной.телепроекте. The -t говорит как долго каждый клип, так что если c-30 секунд вы могли пройти за 30 или 0:00:30. Тот -ss опция говорит, как далеко, чтобы пропустить в исходное видео, так что это всегда относительно начала файла.

затем, как только у вас есть куча видеофайлов, я делаю файл ace-files.txt такой:

обратите внимание на "файл" в начале и убежал имя файла после этого.

отказ от ответственности: я не знаю, как (в)эффективна по сравнению с другими подходами в плане ffmpeg но для моих целей он лучше работает. Надеюсь, это кому-нибудь поможет.

Читайте также: