Paso 1:

yum install -y autoconf automake bzip2 cmake freetype-devel gcc gcc-c++ git libtool make mercurial pkgconfig zlib-devel

Resultado:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
dieciséis
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
sesenta y cinco
66
67
[root@tutorialspots ~]# yum install -y autoconf automake bzip2 cmake freetype-devel gcc gcc-c++ git libtool make mercurial pkgconfig zlib-devel
Last metadata expiration check: 1:49:12 ago on Sat 09 Jan 2021 12:57:07 PM CET.
Package autoconf-2.69-27.el8.noarch is already installed.
Package automake-1.16.1-6.el8.noarch is already installed.
Package bzip2-1.0.6-26.el8.x86_64 is already installed.
Package freetype-devel-2.9.1-4.el8_3.1.x86_64 is already installed.
Package gcc-8.3.1-5.1.el8.x86_64 is already installed.
Package gcc-c++-8.3.1-5.1.el8.x86_64 is already installed.
Package git-2.27.0-1.el8.x86_64 is already installed.
Package libtool-2.4.6-25.el8.x86_64 is already installed.
Package make-1:4.2.1-10.el8.x86_64 is already installed.
Package pkgconf-pkg-config-1.4.2-1.el8.x86_64 is already installed.
Package zlib-devel-1.2.11-16.el8_2.x86_64 is already installed.
Dependencies resolved.
================================================================================
 Package           Arch    Version                             Repository  Size
================================================================================
Installing:
 cmake             x86_64  3.11.4-7.el8                        AppStream  8.1 M
 mercurial         x86_64  4.8.2-1.module_el8.0.0+40+715dddeb  AppStream  5.2 M
Installing dependencies:
 cmake-data        noarch  3.11.4-7.el8                        AppStream  1.3 M
 cmake-rpm-macros  noarch  3.11.4-7.el8                        AppStream   39 k
 libuv             x86_64  1:1.38.0-2.el8                      AppStream  151 k
Enabling module streams:
 mercurial                 4.8
 
Transaction Summary
================================================================================
Install  5 Packages
 
Total download size: 15 M
Installed size: 52 M
Downloading Packages:
(1/5): cmake-rpm-macros-3.11.4-7.el8.noarch.rpm 459 kB/s |  39 kB     00:00
(2/5): libuv-1.38.0-2.el8.x86_64.rpm            2.4 MB/s | 151 kB     00:00
(3/5): cmake-data-3.11.4-7.el8.noarch.rpm       5.7 MB/s | 1.3 MB     00:00
(4/5): cmake-3.11.4-7.el8.x86_64.rpm             17 MB/s | 8.1 MB     00:00
(5/5): mercurial-4.8.2-1.module_el8.0.0+40+715d  11 MB/s | 5.2 MB     00:00
--------------------------------------------------------------------------------
Total                                            22 MB/s |  15 MB     00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                        1/1
  Installing       : cmake-rpm-macros-3.11.4-7.el8.noarch                   1/5
  Installing       : libuv-1:1.38.0-2.el8.x86_64                            2/5
  Installing       : cmake-data-3.11.4-7.el8.noarch                         3/5
  Installing       : cmake-3.11.4-7.el8.x86_64                              4/5
  Installing       : mercurial-4.8.2-1.module_el8.0.0+40+715dddeb.x86_64    5/5
  Running scriptlet: mercurial-4.8.2-1.module_el8.0.0+40+715dddeb.x86_64    5/5
  Verifying        : cmake-3.11.4-7.el8.x86_64                              1/5
  Verifying        : cmake-data-3.11.4-7.el8.noarch                         2/5
  Verifying        : cmake-rpm-macros-3.11.4-7.el8.noarch                   3/5
  Verifying        : libuv-1:1.38.0-2.el8.x86_64                            4/5
  Verifying        : mercurial-4.8.2-1.module_el8.0.0+40+715dddeb.x86_64    5/5
 
Installed:
  cmake-3.11.4-7.el8.x86_64
  cmake-data-3.11.4-7.el8.noarch
  cmake-rpm-macros-3.11.4-7.el8.noarch
  libuv-1:1.38.0-2.el8.x86_64
  mercurial-4.8.2-1.module_el8.0.0+40+715dddeb.x86_64
 
Complete!

Paso 2:

1
2
mkdir ~/ffmpeg_sources
cd ~/ffmpeg_sources

Paso 3:

1
yum install yasm

Resultado:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
dieciséis
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
[root@tutorialspots ffmpeg_sources]# yum install yasm
Last metadata expiration check: 1:50:27 ago on Sat 09 Jan 2021 12:57:07 PM CET.
Dependencies resolved.
================================================================================
 Package       Architecture    Version                Repository           Size
================================================================================
Installing:
 yasm          x86_64          1.3.0-7.el8            PowerTools          495 k
 
Transaction Summary
================================================================================
Install  1 Package
 
Total download size: 495 k
Installed size: 2.8 M
Is this ok [y/N]: y
Downloading Packages:
yasm-1.3.0-7.el8.x86_64.rpm                     5.2 MB/s | 495 kB     00:00
--------------------------------------------------------------------------------
Total                                           4.0 MB/s | 495 kB     00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                        1/1
  Installing       : yasm-1.3.0-7.el8.x86_64                                1/1
  Running scriptlet: yasm-1.3.0-7.el8.x86_64                                1/1
  Verifying        : yasm-1.3.0-7.el8.x86_64                                1/1
 
Installed:
  yasm-1.3.0-7.el8.x86_64
 
Complete!

Paso 4: instale nasm
yum install -y nasm

Resultado:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
dieciséis
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
[root@tutorialspots ~]# yum install -y nasm
Last metadata expiration check: 2:13:03 ago on Sat 09 Jan 2021 12:57:07 PM CET.
Dependencies resolved.
================================================================================
 Package       Architecture    Version                Repository           Size
================================================================================
Installing:
 nasm          x86_64          2.13.03-2.el8          PowerTools          379 k
 
Transaction Summary
================================================================================
Install  1 Package
 
Total download size: 379 k
Installed size: 2.6 M
Downloading Packages:
nasm-2.13.03-2.el8.x86_64.rpm                   4.9 MB/s | 379 kB     00:00
--------------------------------------------------------------------------------
Total                                           3.5 MB/s | 379 kB     00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                        1/1
  Installing       : nasm-2.13.03-2.el8.x86_64                              1/1
  Running scriptlet: nasm-2.13.03-2.el8.x86_64                              1/1
  Verifying        : nasm-2.13.03-2.el8.x86_64                              1/1
 
Installed:
  nasm-2.13.03-2.el8.x86_64
 
Complete!

Paso 5: instale libx264

1
2
3
4
5
6
7
8
9
tar vxf x264-snapshot-20180224-2245-stable.tar.bz2
mkdir x264
mv -f x264-snapshot-20180224-2245-stable/* x264/
cd x264
PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" --enable-static
make
make install
cd ..

Resultado:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
dieciséis
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
...
[root@tutorialspots x264]# PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" --enable-static
platform:      X86_64
byte order:    little-endian
system:        LINUX
cli:           yes
libx264:       internal
shared:        no
static:        yes
asm:           yes
interlaced:    yes
avs:           avxsynth
lavf:          yes
ffms:          no
mp4:           no
gpl:           yes
thread:        posix
opencl:        yes
filters:       resize crop select_every
lto:           no
debug:         no
gprof:         no
strip:         no
PIC:           no
bit depth:     8
chroma format: all
 
You can run 'make' or 'make fprofiled' now.
...
[root@tutorialspots x264]# make install
install -d /root/bin
install x264 /root/bin
install -d /root/ffmpeg_build/include
install -d /root/ffmpeg_build/lib
install -d /root/ffmpeg_build/lib/pkgconfig
install -m 644 ./x264.h /root/ffmpeg_build/include
install -m 644 x264_config.h /root/ffmpeg_build/include
install -m 644 x264.pc /root/ffmpeg_build/lib/pkgconfig
install -m 644 libx264.a /root/ffmpeg_build/lib
gcc-ranlib /root/ffmpeg_build/lib/libx264.a

Paso 6: instale libx265

1
2
3
4
5
cd ~/ffmpeg_sources/x265/build/linux
cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="$HOME/ffmpeg_build" -DENABLE_SHARED:bool=off ../../source
make
make install

Resultado:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
dieciséis
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
sesenta y cinco
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
[root@tutorialspots ffmpeg_sources]# git clone https://github.com/videolan/x265
Cloning into 'x265'...
remote: Enumerating objects: 214, done.
remote: Counting objects: 100% (214/214), done.
remote: Compressing objects: 100% (116/116), done.
remote: Total 88647 (delta 137), reused 161 (delta 98), pack-reused 88433
Receiving objects: 100% (88647/88647), 121.66 MiB | 23.32 MiB/s, done.
Resolving deltas: 100% (71201/71201), done.
[root@tutorialspots ffmpeg_sources]# cd ~/ffmpeg_sources/x265/build/linux
[root@tutorialspots linux]# cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="$HOME/ffmpeg_build" -DENABLE_SHARED:bool=off ../../source
-- cmake version 3.11.4
CMake Deprecation Warning at CMakeLists.txt:10 (cmake_policy):
  The OLD behavior for policy CMP0025 will be removed from a future version
  of CMake.
 
  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.
 
 
CMake Deprecation Warning at CMakeLists.txt:16 (cmake_policy):
  The OLD behavior for policy CMP0054 will be removed from a future version
  of CMake.
 
  The cmake-policies(7) manual explains that the OLD behaviors of all
  policies are deprecated and that a policy should be set to OLD only under
  specific short-term circumstances.  Projects should be ported to the NEW
  behavior and not rely on setting a policy to OLD.
 
 
-- The C compiler identification is GNU 8.3.1
-- The CXX compiler identification is GNU 8.3.1
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detected x86_64 target processor
-- Could NOT find NUMA (missing: NUMA_ROOT_DIR NUMA_INCLUDE_DIR NUMA_LIBRARY)
-- Looking for include file inttypes.h
-- Looking for include file inttypes.h - found
-- Performing Test CC_HAS_NO_STRICT_OVERFLOW
-- Performing Test CC_HAS_NO_STRICT_OVERFLOW - Success
-- Performing Test CC_HAS_NO_NARROWING
-- Performing Test CC_HAS_NO_NARROWING - Success
-- Performing Test CC_HAS_NO_ARRAY_BOUNDS
-- Performing Test CC_HAS_NO_ARRAY_BOUNDS - Success
-- Performing Test CC_HAS_FAST_MATH
-- Performing Test CC_HAS_FAST_MATH - Success
-- Performing Test CC_HAS_STACK_REALIGN
-- Performing Test CC_HAS_STACK_REALIGN - Success
-- Performing Test CC_HAS_FNO_EXCEPTIONS_FLAG
-- Performing Test CC_HAS_FNO_EXCEPTIONS_FLAG - Success
-- Found nasm: /usr/bin/nasm (found version "2.13.03")
-- Found Nasm 2.13.03 to build assembly primitives
-- GIT_EXECUTABLE /usr/bin/git
-- x265 RELEASE VERSION 3.4+28-419182243
-- The ASM_NASM compiler identification is NASM
-- Found assembler: /usr/bin/nasm
-- Looking for strtok_r
-- Looking for strtok_r - found
-- Looking for include file getopt.h
-- Looking for include file getopt.h - found
-- Configuring done
-- Generating done
-- Build files have been written to: /root/ffmpeg_sources/x265/build/linux
...
[root@tutorialspots linux]# make install
[ 63%] Built target common
[ 84%] Built target encoder
[ 85%] Built target x265-static
[100%] Built target cli
Install the project...
-- Install configuration: "Release"
-- Installing: /root/ffmpeg_build/lib/libx265.a
-- Installing: /root/ffmpeg_build/include/x265.h
-- Installing: /root/ffmpeg_build/include/x265_config.h
-- Installing: /root/ffmpeg_build/lib/pkgconfig/x265.pc
-- Installing: /root/ffmpeg_build/bin/x265

Paso 7: instale libfdk_aac

1
2
3
4
5
6
7
cd ~/ffmpeg_sources
cd fdk-aac
autoreconf -fiv
./configure --prefix="$HOME/ffmpeg_build" --disable-shared
make
make install

Resultado:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
dieciséis
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
sesenta y cinco
66