- How to Install FFmpeg in Linux
- How to Install FFmpeg Multimedia Framework in Linux
- Install FFmpeg on Ubuntu and Linux Mint
- Install FFmpeg on Debian
- Install FFmpeg on CentOS and RHEL
- Install FFmpeg on Fedora
- Install FFmpeg on Arch Linux
- Install FFmpeg on openSUSE
- FFmpeg Compiling from Source
- Conclusion
- If You Appreciate What We Do Here On TecMint, You Should Consider:
- Related Posts
- 11 thoughts on “How to Install FFmpeg in Linux”
- Got something to say? Join the discussion. Cancel reply
- Как установить FFmpeg на Linux
- Как установить FFmpeg Multimedia Framework в Linux
- Установите FFmpeg в Ubuntu и Linux Mint
- Установите FFmpeg в Debian
- Установите FFmpeg на CentOS и RHEL
- Установите FFmpeg на Fedora
- Компиляция FFmpeg из исходного кода
- Заключение
How to Install FFmpeg in Linux
FFmpeg is one of the best multimedia frameworks that contains various tools for different tasks. For example, the ffplay is a portable media player that can be used to play audio/video files, ffmpeg can convert between different file formats, ffserver can be used to stream live broadcasts and ffprobe is able to analyze multimedia stream.
This framework is really powerful due to the diversity of available tools, that provide the best technical solution for the user. According to the description of FFmpeg on the official website, the reason for having such a great multimedia framework is the combination of the best free software options available.
The FFmpeg framework offers high security and the reason for this is the seriosity of the developers when they review the code, it is always done with security in mind.
I am very sure you will find this framework very useful when you would like to do some digital audio and video streaming or recording. There are many other practical things that you can do with the help of the FFmpeg framework such as converting your wav file to an mp3 one, encode and decode your videos, or even scale them.
According to the official website, FFmpeg is able to do the following.
- decode multimedia files
- encode multimedia files
- transcode multimedia files
- mux multimedia files
- demux multimedia files
- stream multimedia files
- filter multimedia files
- play multimedia files
Let me take an example, a very simple one. The following command will convert your mp4 file into an avi file, simple as that.
The above command is only useful for explanation, it is not recommended to be used in practice because the codec, bitrate, and other specifics are not declared.
In the next part, we will practice with some of the FFmpeg multimedia framework tools, but before doing that we have to install them in our Linux box.
How to Install FFmpeg Multimedia Framework in Linux
Since the FFmpeg packages are offered for the most used Linux distributions and the installation will be relatively easy. Let’s start with the installation of the FFmpeg framework in Ubuntu-based distributions.
Install FFmpeg on Ubuntu and Linux Mint
I will install FFmpeg from the default repositories. Open a new terminal (CTRL+ALT+T) and then run the following commands.
Install FFmpeg on Debian
The FFmpeg package is included in the official Debian repositories and can be installed using the package manager as shown.
Install FFmpeg on CentOS and RHEL
To install FFmpeg on CentOS and RHEL distributions, you need to enable EPEL and RPM Fusion repository on the system using the following commands.
To install and enable EPEL, use the following command.
To install and enable RPM Fusion, use the following command on your distribution version.
After enabling repositories, run the following command to install FFmpeg:
Install FFmpeg on Fedora
On Fedora, you need to install and enable RPM Fusion to install FFmpeg as shown.
Install FFmpeg on Arch Linux
Install FFmpeg on openSUSE
FFmpeg Compiling from Source
Compiling software from a source is not the easiest thing in the world, but with the right instructions, we will be able to do it. First, make sure your system meets all the dependencies. The installation of these dependencies can be done with the help of the following commands.
First, tell the system to pull down the latest packages.
Install the dependencies with the following command.
Then use the following command to create a new directory for the FFmpeg sources. This is the directory where the source files will be downloaded.
Now compile and install yasm assembler used by FFmpeg by running the following commands.
After you have successfully installed the yasm assembler it is time to install some various encoders that will be used with the specific FFmpeg tools. Use the following commands to install the H.264 video encoder.
Another nice useful encoder is the libfdk-aac AAC audio encoder.
Install libopus audio decoder and encoder.
Now, it’s time to install ffmpeg from the source.
Note: If you have not installed certain encoders, make sure to remove ‘–enable-encoder_name‘ from the above ‘./configure‘ command so the installation is done without any problem.
There are many encoders that you can install, but fur the purpose of this article I am not going to install all of them, but you can install them using the following official guides.
Conclusion
In this first part, we updated our readers with the latest news according to the FFmpeg multimedia framework and showed them how to install it on their Linux machines. The next part will be totally about learning how to use the amazing tools inside this leading multimedia framework.
Update: Part 2 of this FFmpeg series is published, which shows some useful ffmpeg command-line usage to perform various audio, video, and image conversion procedures: 15 Useful ‘FFmpeg’ Commands for Video, Audio and Image Conversion in Linux.
If You Appreciate What We Do Here On TecMint, You Should Consider:
TecMint is the fastest growing and most trusted community site for any kind of Linux Articles, Guides and Books on the web. Millions of people visit TecMint! to search or browse the thousands of published articles available FREELY to all.
If you like what you are reading, please consider buying us a coffee ( or 2 ) as a token of appreciation.
We are thankful for your never ending support.
Related Posts
11 thoughts on “How to Install FFmpeg in Linux”
Please guide me on how to install ffmpeg in cloudlinux server because I am using cloud Linux in my server.
Run the following commands to Install FFmpeg on CloudLinux OS.
This is mani, when I was trying to install the FFMPEG tool in Redhat 7.6, I am getting Library errors.
Hey, this article is informative but here I want to know how to Set the FFmpeg path and where to?
I can’t fetch update from this repo ‘ppa:mc3man/trusty-media‘.
My environment : Ubuntu 19.04
E: The repository ‘http://ppa.launchpad.net/mc3man/trusty-media/ubuntu disco Release’ does not have a Release file.
N: Updating from such a repository can’t be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
The PPA does not support your version of Ubuntu, better install FFMPEG from default repositories.
Make sure to remove the added PPA:
hello..the above tutorials for ffmpeg wont work with atrpms repository for centos 7…since atrpms server is dead..its no longer available..
one can download the above commands by enabling nux desktop repository explicitely..
sudo yum -y –enablerepo=rpmforge install ffmpeg ffmpeg-devel
and also to the above dependency packegaes
Thank you for the post. You can add here some additional libs and codecs for ffmpeg support all kind of audio and video formats like listed here – http://sysadm.pp.ua/linux/video-streaming/ffmpeg-build.html .
I am trying to use Clip Bucket with FFPMEG conversion, but the script sent the parm ‘- aspect 0’, but the FFMPEG 2.2.4 do not recognize it.
Some technicians talked to me for downgrade to FFMPEG 0.9.1. However, I want to use newest version.
Look my problem:
Converting Video
Conversion Command : /usr/bin/ffmpeg -i /files/conversion_queue/140413494554888.mp4 -f flv -vcodec libx264 -preset normal -r 25 -s 0x0 -aspect 0 -vf pad=0:0:0:0:black -acodec libfaac -ab 128000 -an /files/videos/140413494554888.flv 2> /files/temp/140413500190db3.tmp
ffmpeg version 2.2.4- http://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2014 the FFmpeg developers
built on Jun 24 2014 20:49:40 with gcc 4.9 (Debian 4.9.0-7)
configuration: –enable-gpl –enable-version3 –disable-shared –disable-debug –enable-runtime-cpudetect –enable-libmp3lame –enable-libx264 –enable-libwebp –enable-libspeex –enable-libvorbis –enable-libvpx –enable-libfreetype –enable-fontconfig –enable-libxvid –enable-libopencore-amrnb –enable-libopencore-amrwb –enable-libtheora –enable-libvo-aacenc –enable-libvo-amrwbenc –enable-gray –enable-libopenjpeg –enable-libopus –disable-ffserver –enable-libass
libavutil 52. 66.100 / 52. 66.100
libavcodec 55. 52.102 / 55. 52.102
libavformat 55. 33.100 / 55. 33.100
libavdevice 55. 10.100 / 55. 10.100
libavfilter 4. 2.100 / 4. 2.100
libswscale 2. 5.102 / 2. 5.102
libswresample 0. 18.100 / 0. 18.100
libpostproc 52. 3.100 / 52. 3.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from ‘/files/conversion_queue/140413494554888.mp4’:
Metadata:
major_brand : isom
minor_version : 0
compatible_brands: isomiso2avc1
creation_time : 2013-12-25 18:45:13
Duration: 00:00:10.29, start: 0.000000, bitrate: 817 kb/s
Stream #0:0(eng): Video: h264 (Constrained Baseline) (avc1 / 0x31637661), yuv420p, 640×360, 700 kb/s, 30.11 fps, 30.11 tbr, 30107 tbn, 60214 tbc (default)
Metadata:
creation_time : 2013-12-25 18:45:12
Stream #0:1(eng): Audio: aac (mp4a / 0x6134706D), 44100 Hz, stereo, fltp, 127 kb/s (default)
Metadata:
creation_time : 2013-12-22 22:48:57
Invalid aspect ratio: 0
Conversion failed!
Where is Part 2 of this article as promised? And why do you keep repeating Part 1?
The part 2 of this series, will be published soon. The author (Oltjano Terpollari) having some serious personal issues, due to this, he may not getting time to publish the 2nd part of this series. And we not repeating it, we updating the article based on newer ffmpeg release. Please co-operate with us, will soon publish a remain part of this portion.
Got something to say? Join the discussion. Cancel reply
This site uses Akismet to reduce spam. Learn how your comment data is processed.
Источник
Как установить FFmpeg на Linux
FFmpeg – это одна из лучших мультимедийных платформ, которая содержит различные инструменты для различных задач.
Например, ffplay – это портативный медиаплеер, который можно использовать для воспроизведения аудио / видео файлов, ffmpeg может конвертировать файлы в разные форматы, ffserver может использоваться для потоковой трансляции в прямом эфире, а ffprobe может анализировать мультимедийный поток.
Этот фреймворк действительно мощный благодаря разнообразию доступных в нем инструментов, которые обеспечивают лучшее техническое решение для пользователя.
Согласно описанию FFmpeg на официальном веб-сайте, причиной наличия такой великолепной мультимедийной среды является сочетание лучших доступных вариантов бесплатного программного обеспечения.
Инфраструктура FFmpeg обеспечивает высокий уровень безопасности, и причиной этого является серьезность того, что разработчики проверяют код, это всегда делается с учетом безопасности.
Я уверен, что вы найдете этот фреймворк очень полезным, когда захотите сделать потоковое аудио или видео или записать видео.
Есть много других практических вещей, которые вы можете сделать с помощью фреймворка FFmpeg, таких как преобразование вашего wav-файла в mp3, кодирование и декодирование ваших видео или даже масштабирование их.
Позвольте мне привести пример, очень простой. Следующая команда преобразует ваш файл mp4 в простой файл avi.
Вышеприведенная команда полезна только для пояснения, ее не рекомендуется использовать на практике, поскольку кодекс, битрейт и другие особенности не объявлены.
В следующей части мы будем практиковаться с некоторыми из инструментов мультимедиа-инфраструктуры FFmpeg, но перед тем, как это сделать, мы должны установить его в нашу коробку Linux.
Как установить FFmpeg Multimedia Framework в Linux
Поскольку пакеты FFmpeg предлагаются для наиболее часто используемых дистрибутивов Linux, установка будет относительно простой. Начнем с установки платформы FFmpeg в дистрибутивы на основе Ubuntu.
Установите FFmpeg в Ubuntu и Linux Mint
Я установлю FFmpeg через PPA, рекомендованный в официальном блоге. Откройте новый терминал (CTRL + ALT + T) и затем выполните следующие команды.
Установите FFmpeg в Debian
Чтобы установить FFmpeg, сначала вам нужно добавить следующую строку в ваш файл /etc/apt/sources.list.
В соответствии с вашим дистрибутивом измените «mydist» на «stretch», «jessie» или «wheezy».
Затем обновите исходные коды системных пакетов и установите FFmpeg с помощью следующих команд.
Установите FFmpeg на CentOS и RHEL
Чтобы установить FFmpeg в дистрибутивах CentOS и RHEL, вам необходимо включить репозиторий EPEL и RPM Fusion в системе, используя следующие команды.
Чтобы установить и включить EPEL, используйте следующую команду.
Чтобы установить и включить RPM Fusion, используйте следующую команду в вашей версии дистрибутива.
После включения репозиториев выполните следующую команду для установки FFmpeg:
Установите FFmpeg на Fedora
В Fedora вам нужно установить и включить RPM Fusion для установки FFmpeg, как показано на рисунке.
Компиляция FFmpeg из исходного кода
Компиляция программного обеспечения из исходного кода – не самая простая вещь в мире, но с правильными инструкциями мы сможем это сделать.
Сначала убедитесь, что ваша система соответствует всем зависимостям. Установка этих зависимостей может быть выполнена с помощью следующих команд.
Во-первых, скажите системе, чтобы она разобрала последние пакеты.
Установите зависимости с помощью следующей команды.
Затем используйте следующую команду, чтобы создать новый каталог для источников FFmpeg. Это каталог, в который будут загружаться исходные файлы.
Теперь скомпилируйте и установите ассемблер yasm, используемый FFmpeg, выполнив следующие команды.
После того, как вы успешно установили ассемблер yasm, пришло время установить несколько различных кодеков, которые будут использоваться с конкретными инструментами FFmpeg. Используйте следующие команды для установки видеокодера H.264.
Другим полезным полезным кодировщиком является аудиокодер libfdk-aac AAC.
Установите libopus аудио декодер и кодировщик.
Теперь пришло время установить ffmpeg из исходного кода.
Примечание. Если вы не установили определенные кодировщики, обязательно удалите ‘–enable-encoder_name‘ из вышеуказанной команды ‘./configure so, чтобы установка прошла без проблем.
Заключение
В этой первой части мы ознакомили наших читателей с последними новостями в соответствии с мультимедийной платформой FFmpeg и показали, как установить ее на своих компьютерах с
Следующая часть будет полностью посвящена изучению того, как использовать удивительные инструменты в этой ведущей мультимедийной среде.
Источник