$ sudo apt install ffmpeg<\/code><\/pre>\n\n\n\nStep 2: Verify the Installation<\/h3>\n\n\n\n After the installation is complete, you can verify that FFmpeg is installed correctly by checking its version. Run the following command:<\/p>\n\n\n\n
$ ffmpeg -version<\/code><\/pre>\n\n\n\nYou should see output similar to the following, indicating the installed version of FFmpeg and its configuration:<\/p>\n\n\n\n
ffmpeg version 4.4.1-3ubuntu1 Copyright (c) 2000-2021 the FFmpeg developers\nbuilt with gcc 10 (Ubuntu 10.3.0-1ubuntu1)<\/code><\/pre>\n\n\n\nStep 3: Basic Usage of FFmpeg<\/h3>\n\n\n\n FFmpeg can perform a wide variety of multimedia tasks. Here are some common use cases and examples to get you started.<\/p>\n\n\n\n
Convert a Video File to a Different Format<\/h4>\n\n\n\n To convert a video file from one format to another, use the following command:<\/p>\n\n\n\n
$ ffmpeg -i input.mp4 output.avi<\/code><\/pre>\n\n\n\nThis command converts input.mp4<\/code> to output.avi<\/code>.<\/p>\n\n\n\nExtract Audio from a Video File<\/h4>\n\n\n\n To extract the audio from a video file, use the following command:<\/p>\n\n\n\n
$ ffmpeg -i input.mp4 -q:a 0 -map a output.mp3<\/code><\/pre>\n\n\n\nThis command extracts the audio from input.mp4<\/code> and saves it as output.mp3<\/code>.<\/p>\n\n\n\nResize a Video<\/h4>\n\n\n\n To resize a video, use the following command:<\/p>\n\n\n\n
$ ffmpeg -i input.mp4 -vf scale=1280:720 output.mp4<\/code><\/pre>\n\n\n\nThis command resizes input.mp4<\/code> to 1280×720 resolution and saves it as output.mp4<\/code>.<\/p>\n\n\n\nCompress a Video<\/h4>\n\n\n\n To compress a video, use the following command:<\/p>\n\n\n\n
$ ffmpeg -i input.mp4 -vcodec libx265 -crf 28 output.mp4<\/code><\/pre>\n\n\n\nThis command compresses input.mp4<\/code> using the H.265 codec with a constant rate factor (CRF) of 28 and saves it as output.mp4<\/code>.<\/p>\n\n\n\nAdvanced Installation (Optional)<\/h2>\n\n\n\n If you need the latest version of FFmpeg or want to customize the installation, you can build FFmpeg from source. This method is more complex but allows for greater flexibility.<\/p>\n\n\n\n
Step 1: Install Dependencies<\/h3>\n\n\n\n First, install the necessary dependencies for building FFmpeg from source:<\/p>\n\n\n\n
$ sudo apt install autoconf automake build-essential cmake git libass-dev libfreetype6-dev \\\nlibgnutls28-dev libmp3lame-dev libopus-dev libtool libvorbis-dev libvpx-dev \\\npkg-config texinfo wget yasm zlib1g-dev<\/code><\/pre>\n\n\n\nStep 2: Download the FFmpeg Source Code<\/h3>\n\n\n\n Next, download the FFmpeg source code from the official repository:<\/p>\n\n\n\n
$ cd ~\n$ git clone https:\/\/git.ffmpeg.org\/ffmpeg.git ffmpeg\n$ cd ffmpeg<\/code><\/pre>\n\n\n\nStep 3: Configure and Build FFmpeg<\/h3>\n\n\n\n Configure the build with the necessary options:<\/p>\n\n\n\n
$ code.\/configure --enable-gpl --enable-libass --enable-libfreetype --enable-libmp3lame \\\n--enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265<\/code><\/pre>\n\n\n\nBuild and install FFmpeg:<\/p>\n\n\n\n
$ make\n$ sudo make install<\/code><\/pre>\n\n\n\nStep 4: Verify the Installation<\/h3>\n\n\n\n Check the installed version of FFmpeg to verify the build:<\/p>\n\n\n\n
$ ffmpeg -version<\/code><\/pre>\n\n\n\nConclusion<\/h2>\n\n\n\n Installing FFmpeg on Ubuntu 24.04 Noble Numbat is a straightforward process that provides you with a powerful tool for handling multimedia files. Whether you choose to install FFmpeg from the official Ubuntu repositories for ease of use or build it from source for maximum flexibility, this guide has covered all the steps necessary to get you up and running.<\/p>\n\n\n\n
With FFmpeg installed, you can convert, compress, resize, and manipulate audio<\/a> and video files with ease. Its robust set of features makes it an essential tool for developers, multimedia enthusiasts, and anyone working with multimedia data.<\/p>\n","protected":false},"excerpt":{"rendered":"FFmpeg is a powerful and versatile multimedia framework that can decode, encode, transcode, mux, demux, stream, filter, and play almost anything that humans and machines have created. Whether you’re a…<\/p>\n","protected":false},"author":1,"featured_media":13977,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2,23,9,25,28,16,18],"tags":[76,111,350,372,424,433,449,544,545,591,615],"yoast_head":"\n
How to Install FFmpeg on Ubuntu 24.04 Noble Numbat<\/title>\n \n \n \n \n \n \n \n \n \n \n \n \n \n\t \n\t \n\t \n \n \n \n \n \n\t \n\t \n\t \n