阿七

  • HOME
  • CATEGORY
    • TECH
    • ENG
    • VIDEO
    • Image
    • MUSIC
  • Baidu
  • MY LIST
LOVE LASTS FOREVER
  1. Home
  2. TECH
  3. Text

How to compile ffmpeg on CentOS

19/05/2017 7385 Views 5 Likes 0 Comments

About

FFmpeg is the leading multimedia framework, able to decode, encode, transcode, mux, demux, stream, filter and play.
FFmpeg has highly portable it can compiles, runs, and passes our testing infrastructure FATE across Linux, OSX, Windows, BSDs, Solaris, etc. under a wide variety of build environments, machine architectures, and configurations.
FFmpeg project tries to provide the best technically possible solution for developers of applications and end users alike.

Compile on CentOS

1 Get the dependencies.

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

1
mkdir ~/ffmpeg_sources

2 Compilation & Installation
- Yasm

1
2
3
4
5
6
7
8
cd ~/ffmpeg_sources
git clone --depth 1 git://github.com/yasm/yasm.git
cd yasm
autoreconf -fiv
./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin"
make
make install
echo

- X264

1
2
3
4
5
6
7
cd ~/ffmpeg_sources
git clone --depth 1 git://git.videolan.org/x264
cd x264
PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" --enable-static
make
make install
echo

- X265

1
2
3
4
5
6
7
cd ~/ffmpeg_sources
hg clone https://bitbucket.org/multicoreware/x265
cd ~/ffmpeg_sources/x265/build/linux
cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX="$HOME/ffmpeg_build" -DENABLE_SHARED:bool=off ../../source
make
make install
echo

- ACC

1
2
3
4
5
6
7
8
cd ~/ffmpeg_sources
git clone --depth 1 git://git.code.sf.net/p/opencore-amr/fdk-aac
cd fdk-aac
autoreconf -fiv
./configure --prefix="$HOME/ffmpeg_build" --disable-shared
make
make install
echo

- MP3

1
2
3
4
5
6
7
8
cd ~/ffmpeg_sources
curl -L -O http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz
tar xzvf lame-3.99.5.tar.gz
cd lame-3.99.5
./configure --prefix="$HOME/ffmpeg_build" --bindir="$HOME/bin" --disable-shared --enable-nasm
make
make install
echo

- OPUS

1
2
3
4
5
6
7
8
cd ~/ffmpeg_sources
git clone http://git.opus-codec.org/opus.git
cd opus
autoreconf -fiv
PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure --prefix="$HOME/ffmpeg_build" --disable-shared
make
make install
echo

- OGG

1
2
3
4
5
6
7
8
cd ~/ffmpeg_sources
curl -O http://downloads.xiph.org/releases/ogg/libogg-1.3.2.tar.gz
tar xzvf libogg-1.3.2.tar.gz
cd libogg-1.3.2
./configure --prefix="$HOME/ffmpeg_build" --disable-shared
make
make install
echo

- VORBIS

1
2
3
4
5
6
7
8
cd ~/ffmpeg_sources
curl -O http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.4.tar.gz
tar xzvf libvorbis-1.3.4.tar.gz
cd libvorbis-1.3.4
./configure --prefix="$HOME/ffmpeg_build" --with-ogg="$HOME/ffmpeg_build" --disable-shared
make
make install
echo

- VPX

1
2
3
4
5
6
7
cd ~/ffmpeg_sources
git clone --depth 1 https://chromium.googlesource.com/webm/libvpx.git
cd libvpx
./configure --prefix="$HOME/ffmpeg_build" --disable-examples --disable-unit-tests
make
make install
echo

- FFMPEG

1
2
3
4
5
6
7
cd ~/ffmpeg_sources
curl -O http://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2
tar xjvf ffmpeg-snapshot.tar.bz2
cd ffmpeg
PKG_CONFIG_PATH="$HOME/ffmpeg_build/lib/pkgconfig" ./configure --prefix="$HOME/ffmpeg_build" --extra-cflags="-I$HOME/ffmpeg_build/include" --extra-ldflags="-L$HOME/ffmpeg_build/lib -ldl" --bindir="$HOME/bin" --pkg-config-flags="--static" --enable-gpl --enable-nonfree --enable-libfdk_aac --enable-libfreetype --enable-libmp3lame --enable-libopus --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libx265
make
make install

Lazy install package

if you do not want to input at all, you can try to use "Lazy install package" that is made by myself.

Postscript

if u compile it with any questions, u can email me.

Licensed under (CC BY-NC-ND 4.0)
Tag: centos ffmpeg linux
Last:10/10/2018

frank

Love Lasts Forever

Like
< PREV
NEXT >

Comment

取消回复

frank

Love Lasts Forever

New Hot Rand
New Hot Rand
DirectAdmin 去掉邮件队列 Debian Directadmin 中设置 wordpress 最全的伪静态配置 vnstat 清零流量重新统计 忘记关于什么事情了 selinux DirectAdmin面板 删除log How to install htop on CentOS 7
Directadmin 中设置 wordpress 最全的伪静态配置DirectAdmin 去掉邮件队列 Debian
Accelerider 坐骑云使用方法 LudicrousDB - Wordpress 数据库主从热备 Google Drive 或 office 365 桌面版 How to install htop on CentOS 7 Linux 更换登录提示 Windows 绝赞应用

© 2022 阿七 ALL RIGHTS RESERVED | Working

Theme Kratos Made By Seaton Jiang