How to Install FFMPEG on Centos 7

FFMPEG, which stands for Fast Forward Moving Picture Experts Group is a free and open source tool that can process audio and video files in various ways. I had a recent project that I wanted to fulfill. Basically, I need to livestream video to a Real Time Messaging Protocol server.

However, I did not want to have to use a desktop computer software program to livestream video. Fast Forward Moving Picture Experts Group software can send video data to a real time messaging protocol server in a command line. I will be showing you how to install Fast Forward Moving Picture Experts Group software on a Community Enterprise Operating System 7 Linux web server.

Community Enterprise Operating System is a red hat Linux derivation distribution computer operating system. You will want to log into your Community Enterprise Operating System 7 server with your root account or a normal user account. If you log into your Community Enterprise Operating System 7 server with a normal user account, you will need to use sudo before each command in order to install Fast Forward Moving Picture Experts Group.

You will first need to enable the Extra Packages for Enterprise Linux repository by entering in one of these following commands.

sudo yum install epel-release

or

yum install epel-release

Now you will want to enable the red hat package manager repository by typing in one of these following commands.

sudo yum localinstall --nogpgcheck https://download1.rpmfusion.org/free/el/rpmfusion-free-release-7.noarch.rpm

or

yum localinstall --nogpgcheck https://download1.rpmfusion.org/free/el/rpmfusion-free-release-7.noarch.rpm

Once the a fore mentioned Linux repositories are enabled successfully, you can then install Fast Forward Moving Picture Experts Group onto your Community Enterprise Operating System 7 Linux server. Type in one of these following commands.

sudo yum install ffmpeg ffmpeg-devel

or

yum install ffmpeg ffmpeg-devel

There will be multiple additional package dependencies that will be installed along with ffmpeg and ffmpeg-devel packages. Type Y to install all of those software packages or type N to cancel that installation. Congratulations, you have succesfully installed Fast Forward Moving Picture Experts Group onto your Community Enterprise Operating System 7 Linux server.

You could use these instructions to install this software program on a regular installation of Community Enterprise Operating System 7 Linux. You do not need the server version of this operating system to install Fast Forward Moving Picture Experts Group. If you need to know which version of this software program is installed, you can type this following command into your command line Linux terminal window.

ffmpeg -version

You will see an output with your Fast Forward Moving Picture Experts Group version number similar to this output.

$ ffmpeg -version
ffmpeg version 3.4.9 Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 4.8.5 (GCC) 20150623 (Red Hat 4.8.5-44)
configuration: --prefix=/usr --bindir=/usr/bin --datadir=/usr/share/ffmpeg --docdir=/usr/share/doc/ffmpeg --incdir=/usr/include/ffmpeg --libdir=/usr/lib64 --mandir=/usr/share/man --arch=x86_64 --optflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic' --extra-ldflags='-Wl,-z,relro ' --extra-cflags=' ' --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-version3 --enable-bzlib --disable-crystalhd --enable-fontconfig --enable-gcrypt --enable-gnutls --enable-ladspa --enable-libass --enable-libbluray --enable-libcdio --enable-libdrm --enable-indev=jack --enable-libfreetype --enable-libfribidi --enable-libgsm --enable-libmp3lame --enable-nvenc --enable-openal --enable-opencl --enable-opengl --enable-libopenjpeg --enable-libopus --disable-encoder=libopus --enable-libpulse --enable-librsvg --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libvorbis --enable-libv4l2 --enable-libvidstab --enable-libvpx --enable-libx264 --enable-libx265 --enable-libxvid --enable-libzvbi --enable-avfilter --enable-avresample --enable-libmodplug --enable-postproc --enable-pthreads --disable-static --enable-shared --enable-gpl --disable-debug --disable-stripping --shlibdir=/usr/lib64 --enable-libmfx --enable-runtime-cpudetect
libavutil      55. 78.100 / 55. 78.100
libavcodec     57.107.100 / 57.107.100
libavformat    57. 83.100 / 57. 83.100
libavdevice    57. 10.100 / 57. 10.100
libavfilter     6.107.100 /  6.107.100
libavresample   3.  7.  0 /  3.  7.  0
libswscale      4.  8.100 /  4.  8.100
libswresample   2.  9.100 /  2.  9.100
libpostproc    54.  7.100 / 54.  7.100

You can type in the following command to find out where the Fast Forward Moving Picture Experts Group files are located on your Community Enterprise Operating System 7 Linux distribution.

whereis ffmpeg

You will view something similar to what is posted below.

whereis ffmpeg

ffmpeg: /usr/bin/ffmpeg /usr/include/ffmpeg /usr/share/ffmpeg /usr/share/man/man1/ffmpeg.1.gz

Finally, if you need to learn more about Fast Forward Moving Picture Experts Group you can open the manual for this software program in a command line terminal window by typing in this following command.

man ffmpeg

You will be able to view a screen similar to this. The man command opens up the text manual in your terminal window.

FFMPEG(1)                                                                                                    FFMPEG(1)

NAME
       ffmpeg - ffmpeg video converter

SYNOPSIS
       ffmpeg [global_options] {[input_file_options] -i input_url} ... {[output_file_options] output_url} ...

DESCRIPTION
       ffmpeg is a very fast video and audio converter that can also grab from a live audio/video source. It can also
       convert between arbitrary sample rates and resize video on the fly with a high quality polyphase filter.

       ffmpeg reads from an arbitrary number of input "files" (which can be regular files, pipes, network streams,
       grabbing devices, etc.), specified by the "-i" option, and writes to an arbitrary number of output "files",
       which are specified by a plain output url. Anything found on the command line which cannot be interpreted as an
       option is considered to be an output url.

       Each input or output url can, in principle, contain any number of streams of different types
       (video/audio/subtitle/attachment/data). The allowed number and/or types of streams may be limited by the
       container format. Selecting which streams from which inputs will go into which output is either done
       automatically or with the "-map" option (see the Stream selection chapter).

       To refer to input files in options, you must use their indices (0-based). E.g.  the first input file is 0, the
       second is 1, etc. Similarly, streams within a file are referred to by their indices. E.g. "2:3" refers to the
       fourth stream in the third input file. Also see the Stream specifiers chapter.

       As a general rule, options are applied to the next specified file. Therefore, order is important, and you can
       have the same option on the command line multiple times. Each occurrence is then applied to the next input or
 Manual page ffmpeg(1) line 1 (press h for help or q to quit)

How to Install FFMPEG on Centos 7 - Video Transcript

00:01

ultraviolet

00:03

sds

00:07

how to install ffmpeg on centos 7

00:12

web server and i think these

00:14

instructions should also

00:18

be productive for just

00:20

centos 7 even if it's a desktop computer

00:23

but i am

00:25

going to demonstrate this on centos 7

00:28

server

00:29

number one you're going to need root

00:30

credentials so you will want to either

00:33

log in to your root account with su or

00:36

you can also

00:38

with your normal account that does not

00:41

have root privileges you can use sudo

00:44

and then space and then the commands but

00:46

i'm not going to use sudo all right

00:50

first thing you want to do is you want

00:52

to enable

00:57

a repository

00:59

that depends on enterprise

01:05

linux

01:07

depository so

01:11

come on

01:14

anyways so what you're going to type in

01:16

is

01:18

oh my god

01:21

this web browser is a disaster so you're

01:23

going to install extra packages for

01:25

enterprise linux you're going to enable

01:27

that repository so that you can install

01:31

centos

01:32

excuse me ffmpeg

01:35

onsento7 server

01:38

command line using yum

01:42

using that tool yum to install

01:44

so that way you do not have to make and

01:47

then you know build and then no you're

01:50

not you are not installing

01:53

p e g from source which i do not like

01:56

installing software from source i've

01:58

never liked it and i never will i don't

02:01

think okay so quickly

02:03

quickly so this is the first command

02:06

yum space install space epel space

02:10

excuse me

02:11

dash release

02:13

and then i'm just going to copy and

02:15

paste it

02:18

oh my bad

02:21

all right

02:26

okay

02:29

oh this might take a little while

02:30

because

02:34

right anyways let's load up the next

02:37

command now then after that you're going

02:40

to enable the rpm

02:42

fusion

02:43

repository but you must install

02:48

the repository

02:51

and i'm gonna

02:53

let's see

02:56

copy that section of that command i

02:58

think you copied it all

03:00

no it did not

03:02

i'll come on

03:04

this brave publisher's brave web browser

03:08

is turning into a dumpster fire did you

03:11

know the brave web browser

03:13

a lot of websites don't work with it

03:14

correctly yeah i see it's

03:16

still i don't know what it is but

03:21

using yum on

03:24

my

03:24

server isn't the greatest now

03:27

it has pretty good bandwidth but i don't

03:29

know man okay come on come on come on

03:31

come on

03:32

come on anything i can go over while i'm

03:34

reading

03:36

okay let's see

03:38

so then that'll be the second step

03:41

you're gonna have to enable rpm fusion

03:43

then you're going to have to then you

03:45

install ffmpeg so it's basically just

03:48

three commands

03:49

three

03:50

the number three commands

03:53

to

03:55

install

04:00

the enterprise

04:03

repository then install the rpm and then

04:06

just install

04:08

okay

04:09

nothing to do already install latest

04:11

version oh all right now here's the

04:13

second command

04:19

now oops

04:20

well it doesn't matter

04:24

what is this message here

04:30

let's remove the pseudo

04:33

all right quickly quickly quickly

04:37

yum

04:38

space local install space dash dash no

04:42

gpg check space and then the uniform

04:45

resource locator on screen bam hit enter

04:53

examining

04:54

[Music]

04:56

does not update installed package

05:00

okay

05:02

now i don't think this will work but

05:03

we'll try it anyways

05:17

yum space install space

05:20

ffmpeg space ffmpeg dash d e v e l

05:26

for development

05:29

and let's see okay it says whoa there's

05:32

a lot of dependencies

05:34

all right

05:35

i'm not gonna go over each dependency

05:38

you should be able to install if you as

05:40

long as you do not receive any errors so

05:42

that you have to

05:44

install and enable those previous

05:46

repositories now again this is so you do

05:49

not have to install ffmpeg from source

05:52

which would require make and build if

05:55

you know how to perform those i know how

05:58

to i i'll be blunt i hate it because i

06:01

my experiences using linux for what

06:03

decades now

06:06

is that i run in

06:07

to way more problems when i install from

06:10

source

06:11

you can get scripts or you can script it

06:13

yourself

06:14

but my honor with my experiences there

06:16

is no guarantees i prefer to use yum

06:21

on debian derivation linux distributions

06:23

on the red hat linux like suzy and

06:28

fedora etc i would prefer to use apt-get

06:34

and it's much easier

06:36

less problems with my experiences all

06:38

right

06:39

so there's a lot of package dependencies

06:42

it's going to install these two packages

06:44

here which is ffmpeg and then

06:48

ffmpeg-el that is required

06:51

from and you notice the repository

06:53

that's uh i'll give you a warning about

06:55

that

06:57

you may want to first verify

07:00

whether or not a repository is

07:02

legitimate most of them are

07:04

i have a lot of experience with linux

07:07

and i have used rpm fusion before but

07:10

there were a couple of repositories that

07:11

weren't as possible excuse me

07:14

as popular

07:17

i'm looking outside the window

07:20

and

07:21

the sunlight is out and

07:24

so i'm kind of distracting myself all

07:26

right

07:31

you just may want if you're a beginner

07:33

you may want to just double check that

07:35

the repository that you're about to

07:37

install and use is legitimate or recent

07:40

reviews rpm fusion i really haven't had

07:43

up like

07:44

linux is not perfect it is by not no

07:47

means perfect any of these repositories

07:49

you could have problems but most of the

07:51

repositories that i've ran across that

07:52

are pretty well known i've never really

07:54

had a whole lot of problems

07:57

installing from source that's a

07:59

different

08:01

story as i'm at the eight minute mark

08:03

okay so you

08:04

and then you want to check the version

08:07

3.4.9 that's pretty current

08:09

and then now look at all these other

08:11

dependencies that you have to install in

08:13

order to use fnm paint

08:15

and which really there's not much data

08:18

here

08:19

so it's not going to take up a lot of

08:20

disk space

08:22

these other dependencies

08:24

and so that's good to see

08:26

all right so total download size 6.1

08:30

megabytes install size 25 megabytes and

08:33

then you would answer y d or an

08:38

yes then y for yes

08:42

and for no and d i'm not sure what the

08:45

d is i'm not never use d

08:48

d

08:48

with that before

08:50

i'm not sure who cares

08:53

install two packages plus 15 dependent

08:56

packages

08:59

okay so let's click yes this shouldn't

09:01

take that long because actually on my

09:03

server the downloads are pretty quick i

09:05

don't i don't know why at the

09:07

the initial whenever i

09:09

update using yum or i install package

09:12

the initial time it takes to

09:14

go out and

09:16

look for the actual software on a

09:18

repository

09:20

it's kind of slow i don't know why that

09:22

is anyways okay i'm done that's it see

09:24

no errors now as you can see on screen

09:27

you're gonna see these messages

09:29

it down these are all the packages that

09:31

it downloaded it didn't take that long

09:33

at all just a few seconds for all of

09:35

them

09:36

and then

09:38

running transaction check running

09:41

transaction tests transaction tests

09:43

succeeded

09:45

and then

09:46

installing running transaction install

09:48

installing each package including

09:50

dependencies

09:52

verifying and then a cleanup

09:54

installed the first two packages

09:58

and then the dependent packages in order

10:00

to use ffmpeg

10:02

and complete so as long as you see

10:04

complete you're good to go and it should

10:07

take you back to the command prompt if

10:08

you run into any errors

10:11

i really can't help you right now

10:13

because with linux or well any basically

10:16

any computer operating system it depends

10:18

on the error the error code what you

10:21

could do is look for

10:23

number one look for the actual error

10:28

it may be one package that there's a

10:30

problem with

10:34

you know what i'm saying

10:35

and then you would

10:37

perform an internet search with that

10:40

error message

10:41

my experiences with linux is when i use

10:44

apt-get or and or yum

10:47

to install software much less problems

10:50

and i prefer command line

10:52

when i start using the graphical user

10:55

interface which basically the aggressive

10:57

focal user interface

11:00

it uses the commands that you would type

11:02

in a command point but i just i don't

11:03

like it they're bloated sometimes it's

11:05

just to me not necessary

11:08

and then

11:10

when it comes to installing from source

11:13

it can it can turn into a disaster and

11:15

then another caveat i mean it's up to

11:17

you

11:18

you know what i'm saying so

11:20

the reason why i had to enable those

11:22

repositories is because

11:25

centos operating system is not really

11:27

bleeding edge it's a more

11:30

i'll shall i describe it

11:32

this video is already over i already

11:34

showed you how to install it and you

11:36

probably already left already which i

11:37

don't give a all right this is just

11:39

some

11:40

overtime centos is not a bleeding edge

11:44

debian derivation linux distribution or

11:47

no wait a minute it's re it's red hat my

11:49

bad i use both i use mx linux which is

11:53

debian derivation which is uses appgit

11:56

my central server is actually red hat

11:58

linux based and it uses yum it's not

12:01

bleeding edge

12:03

updates

12:04

can take a while to show up and software

12:08

it's it's a

12:11

linux operating system that is more

12:13

reliable for my experiences

12:18

apt get yum less problems installing but

12:21

if you have to if you could you know

12:23

certainly try to install it from source

12:25

but i'm i'm just warning you it's a

12:27

different process

12:29

and sometimes when i've installed

12:31

software by source you have to reverse

12:33

the process and if you're not

12:36

comfortable if you're don't have that

12:37

much experience or you just do not like

12:39

it

12:40

well

12:41

you literally have to go get you have to

12:43

reverse it you have to remove all

12:45

basically all the packages one by one or

12:48

you have to script it or you have to

12:49

find a script whereas when you use yum

12:53

or apt-get it's pretty self-explanatory

12:56

although it is they are not perfect

12:58

so it's already installed now what i can

13:00

do is

13:02

like i'm not going to show you how to

13:03

use it now ffmpeg

13:06

is

13:08

basically a multimedia tool

13:10

that you can use for all kinds of

13:13

purposes

13:14

ffmpeg is a free and open source

13:16

software project consisting of a suite

13:18

of libraries and programs for handling

13:20

video audio and other multimedia files

13:23

and streams at its core

13:26

is the command line ffmpeg tool itself

13:28

designed for processing of video and

13:30

audio files

13:31

i think i could be wrong but i think obs

13:33

studio uses it even

13:36

commercial software

13:38

they do use ffmpeg ffmpeg you can record

13:42

videos with it you can

13:44

screen capture you can capture your

13:47

desktop you can even use it to live

13:49

stream you can also use it to stream

13:51

video you can use it to stream audio

13:54

if you know how to use ffmpeg you don't

13:56

need to buy

13:58

any software you don't even need to

14:00

download obs studio or you don't even

14:02

need to

14:03

you know what i'm saying if you know how

14:05

to use it

14:08

i don't know if there's a gui version of

14:09

it i'm not sure it might be but the

14:11

command line if you know how to use

14:13

command line and then you use tools like

14:15

ffmpeg

14:16

wow you could you can learn how to

14:20

you know perform tasks that you would

14:22

have to use other software

14:24

i'm not don't get me wrong i'm not no no

14:26

i'm not

14:27

criticizing obs studio i actually use

14:29

obs studio but i'm just saying you know

14:32

what i'm saying anyways i digress so

14:34

that is what ffmpeg is i'm not but i'm

14:36

not going to discuss it any further this

14:38

video is already done i just want to

14:39

show you that what another thing you can

14:40

do

14:41

is if you if you need to know you can

14:44

find out what the version is

14:46

and then so you're going to type in

14:48

ffmpeg dash version

14:50

which it's already on screen because i

14:51

already showed you what version was

14:53

installed but

14:55

ffmpeg

15:00

and then dash version

15:02

and then it'll tell you

15:04

and these are oh

15:06

yeah right here is the top ffmpeg

15:08

version 3.4.9 it is copyrighted

15:12

however it is open source so well i

15:14

might have been wrong i'm not sure i i

15:16

don't give a about copyright bit i

15:19

think

15:20

that some commercial software uses

15:23

ffmpeg they may have to get a license or

15:25

they may have to include that it is

15:27

or whatever but i i thought obs studio

15:29

used it but i could certainly be wrong

15:31

anyways i digress

15:33

now that's the version and then now it

15:35

even tells you the versions of these

15:37

other

15:38

dependencies these other libraries

15:41

so you've got av utility or kodak a

15:44

format these fill and then their

15:46

versions just in case maybe you need to

15:47

know or maybe you need to have the exact

15:49

version of these other dependencies or

15:52

these other

15:53

tools

15:54

or maybe troubleshooting but it is

15:57

installed now another command that you

15:58

could type and then then i'm going to

16:00

run now you type in where is ffmpeg

16:06

and it should tell you the directory

16:08

slash user bin ffmpeg that's the

16:11

executable that's the actual program

16:13

now since it's installed using

16:16

yum i don't you don't need to you should

16:19

not need to use the entire path which

16:21

i'm not going to discuss how to use

16:23

ffmpeg i mean it's a there's so many

16:26

different uses but you would type in

16:28

ffmpeg space and then whatever the

16:30

variables are and it should work you

16:32

should not have to use the direct path

16:34

because it you know what i'm saying

16:36

the it's under the user include ffmpeg

16:39

and then also there's a directory user

16:41

share ffmpeg and there's a manual so you

16:44

could type in man

16:46

if you do not know how to use it

16:48

there's a not there's a website there's

16:50

an official website also you could use

16:52

the man page man which stands for manual

16:55

man

16:56

and then space ffmpeg and it's a it's

16:59

text

17:00

this is old school but yes i i still use

17:02

manual

17:04

and see how long it is you see all a

17:07

detailed description in profile demuxer

17:10

or you can mux you can demux you can

17:13

convert you could use it as a file

17:14

converter you could convert

17:17

i think ffmpeg you could

17:19

take a video file and take out the audio

17:22

you could extrapolate the audio and

17:24

create a podcast and i'm not making that

17:26

up

17:27

there's all kinds of different uses man

17:29

you can you can use it to stream video

17:31

and audio

17:33

and so just but anyways

17:37

that is how to i would say quickly

17:40

install ffmpeg on centos 7

17:44

server

17:45

if you have desktop version of centos 7

17:47

i think you could probably use the same

17:49

instructions adios