目指せffmpeg全部入りw
折角のゴールデンウィークなのでffmpegのコンパイルを始める。
各種コーデックを集めてコンパイル
lame faac faad2 x264 xvid ac3 どうもこれら3つが少なくとも必要らしい。
ogg,vorbis,a52(ac3)
aptでインストール
aptitude install libogg0 libogg-dev libvorbis0a libvorbis-dev liba52-0.7.4 liba52-dev
lame
tar xzpf lame-3.97.tar.gz cd lame-3.97 ./configure make sudo make install
faac,faad2
tar xzpf faac-1.25.tar.gz cd faac nkf -d bootstrap > bootstrap2 mv configure.in configure.in_orig nkf -d configure.in_orig > configure.in vi configure.in chmod +x bootstrap2 ./bootstrap2 ./configure make #echo /usr/local/lib > /etc/ld.so.conf.d/locallib.conf #ldconfig #make install
aclocalとlibtoolizeが無いときにはautomakeとlibtoolを入れておく
aptitude install automake libtool
bootstrapの10行目のワーニングはautomakeのせいらしい*1ので以下のように編集
AC_DEFUN([MY_DEFINE], [ AC_DEFINE($1, 1, [define if needed]) ])
同様にfaad2もやる。こちらはbootstrap2時にbmpディレクトリが無いといわれる。*2*3
tar xzpf faad2-2.5.tar.gz cd faad2 nkf -d bootstrap > bootstrap2 chmod +x bootstrap2 mv configure.in configure.in_orig nkf -d configure.in_orig > configure.in ファイルを修正する chmod +x bootstrap2 ./bootstrap2 ./configure make sudo make install
修正点は以下を参考にした
FAAD2 は FAAD2 2.5 が最新です。
これも FAAC と同様に改行コードを「CR+LF」から「LF」に変換。
さらに以下の3つのファイルを修正。「configure.in」の
32行 AC_ARG_WITH(bmp,[ --with-bmp compile beep media player plugin],
33行 [WITHBMP=$withval;WITHXMMS=$withval], [WITHBMP=no])117行 if test x$WITHBMP = xyes; then
118行 AC_DEFINE([HAVE_BMP], 1, [User wants beep media player plugin built])
119行 AM_CONDITIONAL([HAVE_XMMS], true)
120行 AM_CONDITIONAL([HAVE_BMP], true)
121行 fi
を削除。「plugins/Makefile.am」の
11行 if HAVE_BMP
12行 SUBDIRS = bmp
13行 else15行 endif #HAVE_BMP
を削除。「plugins/xmms/src/Makefile.am」
1行 if HAVE_BMP
2行 libdir=$(shell pkg-config --variable=input-plugin-dir bmp)
3行 local_CFLAGS=$(shell pkg-config --cflags bmp)
4行 local_LDFLAGS=$(shell pkg-config --libs bmp)
5行 else9行 endif #HAVE_BMP
を削除。configure で --with-bmp が使えなくなりますが、Linuxのプレーヤー用のプラグインらしいのでいらないかな?
あとは$ ./bootstrap
$ ./configure
$ make
$ sudo make install
x264
tar xjvpf x264-snapshot-20070501-2245.tar.bz2 cd x264-snapshot-20070501-2245 ./configure --enable-shared make sudo make install
xvid
- ソース
- http://www.xvid.org/Downloads.43.0.html (xvidcore-1.1.2.tar.gz)
tar xzpf xvidcore-1.1.2.tar.gz cd xvidcore-1.1.2/build/generic ./bootstrap ./configure make sudo make install
ffmpeg本体
tar xjpf ffmpeg-checkout-snapshot.tar.bz2 cd ffmpeg-checkout-2007-05-02/ ./configure --enable-libmp3lame --enable-libogg --enable-libvorbis --enable-libfaac --enable-libfaad --enable-xvid --enable-gpl --enable-liba52 --enable-x264 make sudo make install
うーん、全然全部入りじゃねえな。
big-endian no MMX enabled yes CMOV enabled no CMOV is fast no gprof enabled no debug symbols yes strip symbols yes optimize yes static yes shared no postprocessing support no software scaler enabled no video hooking yes Imlib2 support no FreeType support yes network support yes IPv6 support yes threading support no SDL support no Sun medialib support no AVISynth enabled no liba52 support yes liba52 dlopened no libdts support no libfaac enabled yes libfaad enabled yes faadbin enabled no libgsm enabled no libmp3lame enabled yes libnut enabled no libogg enabled yes libtheora enabled no libvorbis enabled yes x264 enabled yes XviD enabled yes zlib enabled yes AMR-NB float support no AMR-WB float support no License: GPL
参考にしたURL
http://penta.zaniah.net/index.php?ffmpeg
http://d.hatena.ne.jp/brazil/20060329/1143614301
http://kat.or.tp/memo.php?t=ffmpeg&b=&n=
*1:http://d.hatena.ne.jp/paraches/20070110 を参照のこと
*2:http://raketta.blogzine.jp/blog/2006/08/svnffmpeg_59fe.html を参照
*3:bmpx-devをインストールしても解決できなかった