Complete steps to install FFmpeg in CentOS server

Complete steps to install FFmpeg in CentOS server

Preface

The server system environment is: CentOS 6.5 (final);

It took a lot of effort to successfully install FFmpeg on the server. I will summarize the process of successful installation and hope it will be useful to everyone^_^;

Ps: To use Java to call FFmpeg to process audio and video media files, please refer to the Java FFmpeg Processing Video File Guide

Check the CentOS version command: rpm -q centos-release

CentOS 7 installation reference here: click me

Install via Yum

Execute the following commands in order to install FFmpeg:

Note: By default, commands are executed as root user. If you are not a root user, please add sudo command before each command to run these commands with root privileges.

1. Update the system

yum install epel-release -y
yum update -y

2. Install the Nux Dextop YUM repo

rpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro
rpm -Uvh http://li.nux.ro/download/nux/dextop/el6/x86_64/nux-dextop-release-0-2.el6.nux.noarch.rpm

3. Install FFmpeg and FFmpeg development packages

yum install ffmpeg ffmpeg-devel -y

At this point, if nothing goes wrong, FFmpeg should be successfully installed on the server;

You can use the which ffmpeg command in the console to view the execution path of the FFmpeg program;

FFmpeg commonly used video conversion commands

ffmpeg -i source video path to be converted -s 853x480 -vcodec libx264 -preset medium -crf 28 -y output video path

Stepping into the pit & filling the pit

Unable to find some dependent libraries when installing on CentOS 7

The main symptoms are as follows:

Pit filling guide:

1. First check whether EPEL is successfully installed

According to the installation tutorial above, two sources should be installed before installing FFmpeg, one is epel and the other is nux-dextop;

You can use the yum repolist command to check whether these two are installed:

2. If epel and nux-dextop have been successfully installed, but the install install ffmpeg command still reports an error that some dependencies cannot be found

It may be related to the configuration of epel. At this time, you need to switch to the configuration directory of epel first:

Use the command: cd /etc/yum.repos.d/ to switch to the epel configuration directory;

Edit the epel.repo file through the vim epel.repo command:

Because when downloading dependencies, they are pointed to by baseurl or metalink addresses. If the dependencies cannot be found, it is probably because there are problems with these two download addresses.

When I encountered this problem, I found that yum used the address specified by metalink in epel.repo to download, and some dependencies could not be downloaded. Later, I commented out the metalink line and let yum use the baseurl to download, and it was able to download.

If you cannot download baseurl and metalink, you can consider using Google to replace the original download address.

Summarize

The above is the full content of this article. I hope that the content of this article will have certain reference learning value for your study or work. If you have any questions, you can leave a message to communicate. Thank you for your support for 123WORDPRESS.COM.

You may also be interested in:
  • Detailed explanation of ffmpeg player implementation: video display (recommended)
  • Python integrates ffmpeg to realize batch conversion of video files
  • Java gets the video duration by calling FFMPEG
  • Detailed explanation of ffmpeg player implementation: framework building process

<<:  Reasons and solutions for being unable to remotely connect to MySQL database under CentOS7

>>:  Detailed installation tutorial of mysql 5.7.11 under Win7 system

Recommend

How to develop Java 8 Spring Boot applications in Docker

In this article, I will show you how to develop a...

mysql 5.7.19 latest binary installation

First download the zip archive version from the o...

Two methods of implementing automatic paging in Vue page printing

This article example shares the specific code of ...

How to install and persist the postgresql database in docker

Skip the Docker installation steps 1. Pull the po...

Exploration of three underlying mechanisms of React global state management

Table of contents Preface props context state Sum...

Optimize MySQL with 3 simple tweaks

I don't expect to be an expert DBA, but when ...

Linux five-step build kernel tree

Table of contents 0. The kernel tree that comes w...

Use of Linux crontab command

1. Command Introduction The contab (cron table) c...

CSS implements the web component function of sliding the message panel

Hello everyone, I wonder if you have the same con...

Nginx monitoring issues under Linux

nginx installation Ensure that the virtual machin...

Mysql online recovery of undo table space actual combat record

1 Mysql5.6 1.1 Related parameters MySQL 5.6 adds ...

Interpretation of 17 advertising effectiveness measures

1. 85% of ads go unread <br />Interpretatio...