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

Comprehensive summary of Vue3.0's various listening methods

Table of contents Listener 1.watchEffect 2.watch ...

Detailed explanation of MySQL binlog usage

binlog is a binary log file that records all DML ...

The difference between KEY, PRIMARY KEY, UNIQUE KEY, and INDEX in MySQL

The problem raised in the title can be broken dow...

Use vue2+elementui for hover prompts

Vue2+elementui's hover prompts are divided in...

HTML form component example code

HTML forms are used to collect different types of...

Understanding flex-grow, flex-shrink, flex-basis and nine-grid layout

1. flex-grow, flex-shrink, flex-basis properties ...

CSS3 custom scroll bar style::webkit-scrollbar sample code detailed explanation

The default scroll bar style in Windows is ugly, ...

JS implementation of Apple calculator

This article example shares the specific code of ...

Mysql solution to improve the efficiency of copying large data tables

Preface This article mainly introduces the releva...

Teach you how to monitor Tomcat's JVM memory through JConsoler

Table of contents 1. How to monitor Tomcat 2. Jav...

How to implement html input drop-down menu

Copy code The code is as follows: <html> &l...

How to deploy hbase using docker

Standalone hbase, let’s talk about it first. Inst...

Examples of using temporary tables in MySQL

I've been a little busy these two days, and t...

Installation and configuration tutorial of MySQL 8.0.16 under Win10

1. Unzip MySQL 8.0.16 The dada folder and my.ini ...