16
17

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

ffmpegのビルド

Last updated at Posted at 2014-04-20

以下古い情報

ubuntu 14.04にはffmpegがdelicateになっててパッケージが無い。
avconvを使うもコアダンプ吐いてどうしようもないのでビルドすることにした。

必要なパッケージインストール

必要なパッケージインストール
$ sudo apt-get -y install \
autoconf \
automake \
build-essential \
libass-dev \
libfreetype6-dev \
libgpac-dev \
libsdl1.2-dev \
libtheora-dev \
libtool \
libva-dev \
libvdpau-dev \
libvorbis-dev \
libx11-dev \
libxext-dev \
libxfixes-dev \
pkg-config \
texi2html \
zlib1g-dev \
yasm \
libmp3lame-dev \
nasm \
libfdk-aac-dev \
unzip

ビルド

build.sh
## yasm
mkdir ~/src && cd ~/src
wget http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz
tar xzf yasm-1.2.0.tar.gz
cd yasm-1.2.0
./configure --prefix="$HOME/local/"
make && make install

## x264
cd ~/src
wget http://download.videolan.org/pub/x264/snapshots/last_x264.tar.bz2
tar xjf last_x264.tar.bz2
cd x264-snapshot*
./configure --prefix="$HOME/local" --enable-static
make && make install

## lame
cd ~/src
wget http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz
tar xzf lame-3.99.5.tar.gz
cd lame-3.99.5
./configure --prefix="$HOME/local" --enable-nasm --disable-shared
make && make install

## opus
cd ~/src
wget http://downloads.xiph.org/releases/opus/opus-1.1.tar.gz
tar xzf opus-1.1.tar.gz
cd opus-1.1
./configure --prefix="$HOME/local" --disable-shared
make && make install

## webm
cd ~/src
wget http://webm.googlecode.com/files/libvpx-v1.3.0.tar.bz2
tar xjf libvpx-v1.3.0.tar.bz2
cd libvpx-v1.3.0
./configure --prefix="$HOME/local" --disable-examples
make && make install

## ffmpeg
cd ~/src
wget http://ffmpeg.org/releases/ffmpeg-snapshot.tar.bz2
tar xjf ffmpeg-snapshot.tar.bz2
cd ffmpeg
export PKG_CONFIG_PATH="$HOME/local/lib/pkgconfig"
./configure \
--prefix="$HOME/local" \
--extra-cflags="-I$HOME/local/include" \
--extra-ldflags="-L$HOME/local/lib" \
--extra-libs="-ldl" \
--enable-gpl \
--enable-libass \
--enable-libfdk-aac \
--enable-libfreetype \
--enable-libmp3lame \
--enable-libopus \
--enable-libtheora \
--enable-libvorbis \
--enable-libvpx \
--enable-libx264 \
--enable-nonfree \
--enable-x11grab
make && make install

## clean
rm -rf ~/src

実行

~/local/bin/ffmpeg
16
17
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
16
17

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?