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

The most comprehensive collection of front-end interview questions

HTML+CSS 1. Understanding and knowledge of WEB st...

How to use CocosCreator object pool

Table of contents Preface: Specific operations St...

How to mount a disk in Linux and set it to automatically mount on boot

Knowing that everyone's time is precious, I w...

Introduction and use of five controllers in K8S

Table of contents Controller type of k8s Relation...

Do you know the difference between empty value and null value in mysql

Preface Recently I found that my friend's met...

Several methods of calling js in a are sorted out and recommended for use

We often use click events in the a tag: 1. a href=...

Idea configures tomcat to start a web project graphic tutorial

Configure tomcat 1. Click run configuration 2. Se...

JavaScript ECharts Usage Explanation

I used ECharts when doing a project before. Today...

How to set underline in HTML? How to underline text in HTML

Underlining in HTML used to be a matter of enclos...

Using js to realize dynamic background

This article example shares the specific code of ...

MySQL 8.x msi version installation tutorial with pictures and text

1. Download MySQL Official website download addre...

Detailed explanation of mysql user variables and set statement examples

Table of contents 1 Introduction to user variable...

Centos7.3 automatically starts or executes specified commands when booting

In centos7, the permissions of the /etc/rc.d/rc.l...

Vue implements irregular screenshots

Table of contents Image capture through svg CSS p...

Best Practices Guide for MySQL Partitioned Tables

Preface: Partitioning is a table design pattern. ...