📜  ffmpeg install ubuntu - Shell-Bash (1)

📅  最后修改于: 2023-12-03 15:00:44.811000             🧑  作者: Mango

ffmpeg install ubuntu - Shell-Bash

FFmpeg is a popular multimedia framework that can be used to encode, decode, transcode, mux, demux, stream, filter, and play audio and video files.

In this tutorial, we will show you how to install FFmpeg on Ubuntu using the command line or shell.

Prerequisites

Before starting with the installation, make sure that your Ubuntu system is updated and has the necessary tools and libraries installed.

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install -y build-essential checkinstall git libfaac-dev libjack-jackd2-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libsdl2-dev libtheora-dev libtool libva-dev libvdpau-dev libvorbis-dev libxcb1-dev libxcb-shm0-dev libxcb-xfixes0-dev pkg-config texinfo zlib1g-dev
Installation

You can install FFmpeg on Ubuntu using one of the following two methods: using official Ubuntu repository or building from source.

Install FFmpeg from Ubuntu Repository

The easiest way to install FFmpeg on Ubuntu is by using the official Ubuntu repository.

sudo apt-get update
sudo apt-get install ffmpeg
Build FFmpeg from Source

To build ffmpeg from source, you need to follow the steps mentioned below:

  1. Clone the ffmpeg repository:

    git clone https://github.com/FFmpeg/FFmpeg.git
    
  2. Configure and compile FFmpeg:

    cd FFmpeg
    ./configure --enable-shared
    make -j8
    sudo make install
    

    Here, -j8 means that we want to use 8 CPU threads for compilation.

    You can also configure FFmpeg with additional features, such as libvpx, libx265, libx264, etc., by specifying the --enable-lib option followed by the library name.

    For example:

    ./configure --enable-shared --enable-libx264
    
Verify Installation

To verify that FFmpeg is installed correctly, run the following command:

ffmpeg -version

The output should display the installed FFmpeg version and other details.

Conclusion

In this tutorial, we have seen how to install FFmpeg on Ubuntu using command line or shell. FFmpeg is a powerful tool for video and audio editing, transcoding, streaming, and more. With FFmpeg, you can easily manipulate and convert different multimedia formats on your Ubuntu system.