カテゴリー
OLD ENTRY

CentOSにffmpegをインストール中

はい、インストール中ですよ。w

で、前のffmpegインストールの続き(まだインストール終わってないw)

ffmpegのソースをwgetしてきてコンフィギャー!><した段階で希望するデコード・エンコードができないっぽいので必要なコーデック探しの旅に出たわけです。ええ。

今回の希望は
proresmovからoggwebmmp4にエンコードするコトで、ついでにmp3トカもエンコードできたらイイなぁとか思ってます。

で、前回コンフィギャー!><で出てきた対応デコーダとエンコーダを見比べて足りないものは・・・

デコーダは俺の希望の限りでは基本的に問題ないみたい。
エンコーダが全部NGっぽいw

で、テキトーな文字列でググってまずmp3エンコーダ
LAME
ソースを落としてきてアレする。

# wget http://downloads.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz
# tar zxvf lame-3.99.5.tar.gz
# cd lame-3.99.5
# ./configure
# make
# make install

次はなんだ?h264か
x264
その前にx264コンパイルのためのツール(nasmyasm-devel)がいるらしい。

# yum install -y nasm yasm-devel

あらためてx264のソースをwgetしてアレする。

# wget ftp://ftp.videolan.org/pub/x264/snapshots/last_x264.tar.bz2
# tar lxvf last_x264.tar.bz2
# cd x264-snapshot-20120419-2245
# ./configure
fatal: Not a git repository (or any of the parent directories): .git
platform:      X86
system:        LINUX
cli:           yes
libx264:       internal
shared:        no
static:        no
asm:           yes
interlaced:    yes
avs:           no
lavf:          no
ffms:          no
gpac:          no
gpl:           yes
thread:        posix
filters:       crop select_every
debug:         no
gprof:         no
strip:         no
PIC:           no
visualize:     no
bit depth:     8
chroma format: all

You can run 'make' or 'make fprofiled' now.

ん?なんか"no"が多いなw
で、もーちょっと調べてソレっぽいオプションを付けてやるらしいw

# ./configure –enable-shared –enable-pic –enable-visualize
fatal: Not a git repository (or any of the parent directories): .git
platform:      X86
system:        LINUX
cli:           yes
libx264:       internal
shared:        yes
static:        no
asm:           yes
interlaced:    yes
avs:           no
lavf:          no
ffms:          no
gpac:          no
gpl:           yes
thread:        posix
filters:       crop select_every
debug:         no
gprof:         no
strip:         no
PIC:           yes
visualize:     no
bit depth:     8
chroma format: all

You can run 'make' or 'make fprofiled' now.

ま、こんな感じでイイんかな?訳分からんw
でmakeしてインストール

# make
# make install

次はaacのエンコーダ・デコーダ、それぞれ分かれてるっぽい。
faac
faad2

# wget http://downloads.sourceforge.net/project/faac/faac-src/faac-1.28/faac-1.28.tar.gz
# tar zxvf faac-1.28.tar.gz
# cd faac-1.28
# ./configure
# make

ってなんかmp4v2関連エラー出たw
まーた調べないといけないのか・・・面倒w
どうも素でやるとエラーが出るらしいのでcommonディレクトリのmp4v2のなかのファイルを弄るんだってサ

# vi common/mp4v2/mpeg4ip.h

↓この部分をコメントアウト

#ifdef __cplusplus
extern "C" {
#endif
char *strcasestr(const char *haystack, const char *needle);
#ifdef __cplusplus
}
#endif
  ↓↓↓↓
/*
#ifdef __cplusplus
extern “C” {
#endif
char *strcasestr(const char *haystack, const char *needle);
#ifdef __cplusplus
}
#endif
*/

改めてアレ

# ./configure –with-mp4v2
# make
# make install

次はデコーダ

# wget http://downloads.sourceforge.net/project/faac/faad2-src/faad2-2.7/faad2-2.7.tar.gz
# tar zxvf faad2-2.7.tar.gz
# cd faad2-2.7
# ./configure
# make
# make install

ダルい・・・ダル過ぎるw
次はー色々音声コーデックwのOpenCORE Framework実装ライブラリか。
お腹へった。
opencore-amr

# wget http://downloads.sourceforge.net/project/opencore-amr/opencore-amr/opencore-amr-0.1.3.tar.gz
# tar zxvf opencore-amr-0.1.3.tar.gz
# cd opencore-amr-0.1.3
# ./configure
# make
# make install

え?それから?なに?ogg?
ogg

# wget http://downloads.xiph.org/releases/ogg/libogg-1.3.0.tar.gz
# tar zxvf libogg-1.3.0.tar.gz
# cd libogg-1.3.0
# ./configure
# make
# make install

ogg関連?の音声エンコーダ
Vorbis Audio Compression

# wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.3.3.tar.gz
# tar zxvf libvorbis-1.3.3.tar.gz
# cd libvorbis-1.3.3
# ./configure

あれ?"configure: error: must have Ogg installed!"って?
さっきoggはインストールしたよな・・・なに?ええ?

で、ちょっと用事があるので今日はここまでw
まーだffmpegのインストールできてないトカw

そんな感じ。

%d