カテゴリー
OLD ENTRY

鯖OS再インストールのついでにffmpegもインストール

php絡みのフレームワーク導入実験で途中で面倒になってやめたらweb鯖周りがグチャグチャになってて、特に関連ファイルの依存関係がクルクルパーってゆーか数百ファイルに上ってたので修復も面倒でとりあえず稼働中のイロイロをバックアップ取ってOSの再インストールしたんですよ。ええ。

で、どーせならコレも面倒になって止めてたffmpegのインストールも「ちゃんと」しようってコトで今回のエントリはその辺りの覚書みたいな何かw

環境:CentOS 6.2

一応ベースパッケージと開発ツール類はOS入れたときにまとめてyumでインスコできてます。

# yum -y groupinstall "Base" "Development tools"

無駄に縦長になるので・・・分割w

ffmpeg.orgから新しいっぽいバージョンのtar玉をwgetして解凍、展開されたディレクトリに移動。

# wget http://www.ffmpeg.org/releases/ffmpeg-0.10.2.tar.gz
# tar zxvf ffmpeg-0.10.2.tar.gz
# cd ffmpeg-0.10.2

んで、まず"INSTALL"を読む・・・まぁいつもの手順なのでアレだけどえらくシンプルw

# more INSTALL

1) Type './configure' to create the configuration. A list of configure
options is printed by running 'configure –help'.

'configure' can be launched from a directory different from the FFmpeg
sources to build the objects out of tree. To do this, use an absolute
path when launching 'configure', e.g. '/ffmpegdir/ffmpeg/configure'.

2) Then type 'make' to build FFmpeg. GNU Make 3.81 or later is required.

3) Type 'make install' to install all binaries and libraries you built.

NOTICE

 – Non system dependencies (e.g. libx264, libvpx) are disabled by default.

とりあえず普通にコンフィギャー!><ってからコンパイルしてインストールしろってコトで、

# ./configure
yasm not found, use –disable-yasm for a crippled build

If you think configure made a mistake, make sure you are using the latest
version from Git.  If the latest version fails, report the problem to the
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solving the problem.

要約:「yasmがねぇんだよハゲ!ねぇんだったら–disable-yasmオプションつけさらして泣け!テメーのミスだと思うんだったらGitで最新版確認しろヨwそれも失敗したらMLかIRCで報告してm9(^Д^)プギャーされてろ!あ、コンフィギャー!><のログは"config.log"だから!べ、べつにアンタのために準備したんじゃないんだから!///><///」

ってコトで"yasm"をインストールしてからもっかいコンフィギャー!><。

# yum install -y yasm
# ./configure
install prefix            /usr/local
source path               .
C compiler                gcc
ARCH                      x86 (generic)
big-endian                no
runtime cpu detection     no
yasm                      yes
MMX enabled               yes
MMX2 enabled              yes
3DNow! enabled            yes
3DNow! extended enabled   yes
SSE enabled               yes
SSSE3 enabled             yes
AVX enabled               yes
CMOV enabled              no
CMOV is fast              no
EBX available             yes
EBP available             yes
debug symbols             yes
strip symbols             yes
optimize for size         no
optimizations             yes
static                    yes
shared                    no
postprocessing support    no
new filter support        yes
network support           yes
threading support         pthreads
safe bitstream reader     yes
SDL support               no
Sun medialib support      no
libdxva2 enabled          no
libva enabled             no
libvdpau enabled          no
AVISynth enabled          no
frei0r enabled            no
gnutls enabled            no
libaacplus enabled        no
libass enabled            no
libcdio support           no
libcelt enabled           no
libdc1394 support         no
libdirac enabled          no
libfaac enabled           no
libgsm enabled            no
libmodplug enabled        no
libmp3lame enabled        no
libnut enabled            no
libopencore-amrnb support no
libopencore-amrwb support no
libopencv support         no
libopenjpeg enabled       no
libpulse enabled          no
librtmp enabled           no
libschroedinger enabled   no
libspeex enabled          no
libstagefright-h264 enabled    no
libtheora enabled         no
libutvideo enabled        no
libv4l2 enabled           no
libvo-aacenc support      no
libvo-amrwbenc support    no
libvorbis enabled         no
libvpx enabled            no
libx264 enabled           no
libxavs enabled           no
libxvid enabled           no
openal enabled            no
openssl enabled           no
zlib enabled              yes
bzlib enabled             no

Enabled decoders:
aac                     cscd                    mdec
aac_latm                cyuv                    mimic
aasc                    dca                     mjpeg
ac3                     dfa                     mjpegb
adpcm_4xm               dirac                   mlp
adpcm_adx               dnxhd                   mmvideo
adpcm_ct                dpx                     motionpixels
adpcm_ea                dsicinaudio             mp1
adpcm_ea_maxis_xa       dsicinvideo             mp1float
adpcm_ea_r1             dvbsub                  mp2
adpcm_ea_r2             dvdsub                  mp2float
adpcm_ea_r3             dvvideo                 mp3
adpcm_ea_xas            dxa                     mp3adu
adpcm_g722              dxtory                  mp3adufloat
adpcm_g726              eac3                    mp3float
adpcm_ima_amv           eacmv                   mp3on4
adpcm_ima_apc           eamad                   mp3on4float
adpcm_ima_dk3           eatgq                   mpc7
adpcm_ima_dk4           eatgv                   mpc8
adpcm_ima_ea_eacs       eatqi                   mpeg1video
adpcm_ima_ea_sead       eightbps                mpeg2video
adpcm_ima_iss           eightsvx_exp            mpeg4
adpcm_ima_qt            eightsvx_fib            mpegvideo
adpcm_ima_smjpeg        escape124               msmpeg4v1
adpcm_ima_wav           escape130               msmpeg4v2
adpcm_ima_ws            ffv1                    msmpeg4v3
adpcm_ms                ffvhuff                 msrle
adpcm_sbpro_2           ffwavesynth             msvideo1
adpcm_sbpro_3           flac                    mszh
adpcm_sbpro_4           flashsv                 mxpeg
adpcm_swf               flashsv2                nellymoser
adpcm_thp               flic                    nuv
adpcm_xa                flv                     pam
adpcm_yamaha            fourxm                  pbm
alac                    fraps                   pcm_alaw
als                     frwu                    pcm_bluray
amrnb                   g723_1                  pcm_dvd
amrwb                   g729                    pcm_f32be
amv                     gif                     pcm_f32le
anm                     gsm                     pcm_f64be
ansi                    gsm_ms                  pcm_f64le
ape                     h261                    pcm_lxf
ass                     h263                    pcm_mulaw
asv1                    h263i                   pcm_s16be
asv2                    h264                    pcm_s16le
atrac1                  huffyuv                 pcm_s16le_planar
atrac3                  idcin                   pcm_s24be
aura                    idf                     pcm_s24daud
aura2                   iff_byterun1            pcm_s24le
avrp                    iff_ilbm                pcm_s32be
avs                     imc                     pcm_s32le
bethsoftvid             indeo2                  pcm_s8
bfi                     indeo3                  pcm_s8_planar
bink                    indeo4                  pcm_u16be
binkaudio_dct           indeo5                  pcm_u16le
binkaudio_rdft          interplay_dpcm          pcm_u24be
bintext                 interplay_video         pcm_u24le
bmp                     jpeg2000                pcm_u32be
bmv_audio               jpegls                  pcm_u32le
bmv_video               jv                      pcm_u8
c93                     kgv1                    pcm_zork
cavs                    kmvc                    pcx
cdgraphics              lagarith                pgm
cinepak                 loco                    pgmyuv
cljr                    mace3                   pgssub
cook                    mace6                   pictor
png                     sp5x                    vorbis
ppm                     srt                     vp3
prores                  sunrast                 vp5
prores_lgpl             svq1                    vp6
ptx                     svq3                    vp6a
qcelp                   targa                   vp6f
qdm2                    theora                  vp8
qdraw                   thp                     vqa
qpeg                    tiertexseqvideo         wavpack
qtrle                   tiff                    wmalossless
r10k                    tmv                     wmapro
r210                    truehd                  wmav1
ra_144                  truemotion1             wmav2
ra_288                  truemotion2             wmavoice
rawvideo                truespeech              wmv1
rl2                     tscc                    wmv2
roq                     tta                     wmv3
roq_dpcm                twinvq                  wmv3image
rpza                    txd                     wnv1
rv10                    ulti                    ws_snd1
rv20                    utvideo                 xan_dpcm
rv30                    v210                    xan_wc3
rv40                    v210x                   xan_wc4
s302m                   v308                    xbin
sgi                     v410                    xl
shorten                 vb                      xsub
sipr                    vble                    xwd
smackaud                vc1                     y41p
smacker                 vc1image                yop
smc                     vcr1                    yuv4
snow                    vmdaudio                zlib
sol_dpcm                vmdvideo                zmbv
sonic                   vmnc

Enabled encoders:
a64multi                h263p                   pcx
a64multi5               huffyuv                 pgm
aac                     jpeg2000                pgmyuv
ac3                     jpegls                  png
ac3_fixed               ljpeg                   ppm
adpcm_adx               mjpeg                   prores
adpcm_g722              mp2                     qtrle
adpcm_g726              mpeg1video              r10k
adpcm_ima_qt            mpeg2video              r210
adpcm_ima_wav           mpeg4                   ra_144
adpcm_ms                msmpeg4v2               rawvideo
adpcm_swf               msmpeg4v3               roq
adpcm_yamaha            msvideo1                roq_dpcm
alac                    nellymoser              rv10
amv                     pam                     rv20
ass                     pbm                     sgi
asv1                    pcm_alaw                snow
asv2                    pcm_f32be               sonic
avrp                    pcm_f32le               sonic_ls
bmp                     pcm_f64be               srt
cljr                    pcm_f64le               svq1
dca                     pcm_mulaw               targa
dnxhd                   pcm_s16be               tiff
dpx                     pcm_s16le               v210
dvbsub                  pcm_s24be               v308
dvdsub                  pcm_s24daud             v410
dvvideo                 pcm_s24le               vorbis
eac3                    pcm_s32be               wmav1
ffv1                    pcm_s32le               wmav2
ffvhuff                 pcm_s8                  wmv1
flac                    pcm_u16be               wmv2
flashsv                 pcm_u16le               xsub
flashsv2                pcm_u24be               xwd
flv                     pcm_u24le               y41p
g723_1                  pcm_u32be               yuv4
gif                     pcm_u32le               zlib
h261                    pcm_u8                  zmbv
h263

Enabled hwaccels:

Enabled parsers:
aac                     dvdsub                  mpegaudio
aac_latm                flac                    mpegvideo
ac3                     gsm                     pnm
adx                     h261                    rv30
cavsvideo               h263                    rv40
dca                     h264                    vc1
dirac                   mjpeg                   vp3
dnxhd                   mlp                     vp8
dvbsub                  mpeg4video

Enabled demuxers:
aac                     iff                     pcm_u24le
ac3                     image2                  pcm_u32be
act                     image2pipe              pcm_u32le
adf                     ingenient               pcm_u8
adx                     ipmovie                 pmp
aea                     iss                     pva
aiff                    iv8                     qcp
amr                     ivf                     r3d
anm                     jv                      rawvideo
apc                     latm                    rl2
ape                     lmlm4                   rm
applehttp               loas                    roq
asf                     lxf                     rpl
ass                     m4v                     rso
au                      matroska                rtp
avi                     microdvd                rtsp
avs                     mjpeg                   sap
bethsoftvid             mlp                     sbg
bfi                     mm                      sdp
bink                    mmf                     segafilm
bintext                 mov                     shorten
bit                     mp3                     siff
bmv                     mpc                     smacker
c93                     mpc8                    smjpeg
caf                     mpegps                  sol
cavsvideo               mpegts                  sox
cdg                     mpegtsraw               spdif
daud                    mpegvideo               srt
dfa                     msnwc_tcp               str
dirac                   mtv                     swf
dnxhd                   mvi                     thp
dsicin                  mxf                     tiertexseq
dts                     mxg                     tmv
dv                      nc                      truehd
dxa                     nsv                     tta
ea                      nut                     tty
ea_cdata                nuv                     txd
eac3                    ogg                     vc1
ffm                     oma                     vc1t
ffmetadata              pcm_alaw                vmd
filmstrip               pcm_f32be               voc
flac                    pcm_f32le               vqf
flic                    pcm_f64be               w64
flv                     pcm_f64le               wav
fourxm                  pcm_mulaw               wc3
g722                    pcm_s16be               wsaud
g723_1                  pcm_s16le               wsvqa
g729                    pcm_s24be               wtv
gsm                     pcm_s24le               wv
gxf                     pcm_s32be               xa
h261                    pcm_s32le               xbin
h263                    pcm_s8                  xmv
h264                    pcm_u16be               xwma
ico                     pcm_u16le               yop
idcin                   pcm_u24be               yuv4mpegpipe
idf

Enabled muxers:
a64                     ipod                    pcm_s16be
ac3                     ismv                    pcm_s16le
adts                    ivf                     pcm_s24be
adx                     latm                    pcm_s24le
aiff                    m4v                     pcm_s32be
amr                     matroska                pcm_s32le
asf                     matroska_audio          pcm_s8
asf_stream              md5                     pcm_u16be
ass                     microdvd                pcm_u16le
au                      mjpeg                   pcm_u24be
avi                     mkvtimestamp_v2         pcm_u24le
avm2                    mlp                     pcm_u32be
bit                     mmf                     pcm_u32le
caf                     mov                     pcm_u8
cavsvideo               mp2                     psp
crc                     mp3                     rawvideo
daud                    mp4                     rm
dirac                   mpeg1system             roq
dnxhd                   mpeg1vcd                rso
dts                     mpeg1video              rtp
dv                      mpeg2dvd                rtsp
eac3                    mpeg2svcd               sap
ffm                     mpeg2video              segment
ffmetadata              mpeg2vob                smjpeg
filmstrip               mpegts                  sox
flac                    mpjpeg                  spdif
flv                     mxf                     srt
framecrc                mxf_d10                 swf
framemd5                null                    tg2
g722                    nut                     tgp
g723_1                  ogg                     truehd
gif                     oma                     vc1t
gxf                     pcm_alaw                voc
h261                    pcm_f32be               wav
h263                    pcm_f32le               webm
h264                    pcm_f64be               wtv
image2                  pcm_f64le               yuv4mpegpipe
image2pipe              pcm_mulaw

Enabled protocols:
applehttp               httpproxy               rtmps
cache                   md5                     rtmpt
concat                  mmsh                    rtmpte
crypto                  mmst                    rtp
file                    pipe                    tcp
gopher                  rtmp                    udp
http                    rtmpe

Enabled filters:
abuffer                 earwax                  pan
abuffersink             fade                    pixdesctest
aconvert                fieldorder              rgbtestsrc
aevalsrc                fifo                    scale
aformat                 format                  select
amerge                  gradfun                 setdar
amovie                  hflip                   setpts
anull                   life                    setsar
anullsink               lut                     settb
anullsrc                lutrgb                  showinfo
aresample               lutyuv                  silencedetect
ashowinfo               mandelbrot              slicify
asplit                  movie                   split
astreamsync             negate                  swapuv
buffersink              noformat                testsrc
cellauto                null                    thumbnail
color                   nullsink                transpose
copy                    nullsrc                 unsharp
crop                    overlay                 vflip
deshake                 pad                     volume
drawbox

Enabled bsfs:
aac_adtstoasc           mjpeg2jpeg              mp3_header_decompress
chomp                   mjpega_dump_header      noise
dump_extradata          mov2textsub             remove_extradata
h264_mp4toannexb        mp3_header_compress     text2movsub
imx_dump_header

Enabled indevs:
dv1394                  lavfi                   v4l
fbdev                   oss                     v4l2

Enabled outdevs:
oss

License: LGPL version 2.1 or later
Creating config.mak and config.h…
config.h is unchanged
config.asm is unchanged
libavutil/avconfig.h is unchanged

するとソースパスとか対応したコーデックのエンコーダとかデコーダとかツラツラ表示された。
希望としてはproresの"mov"から"ogg"と"webm"と"mp4h.264)"にエンコードしたいので足りない物を調べる。
見たところproresのデコードは大丈夫っぽい?
エンコードはダメっぽいw

そんな訳でインストール終わってないけど今回はこれまで(ヲイ!)
今進行してる仕事もしないといけないので、後で足りないモノを探す旅に出ようw

あ、今後の予定っぽいものとしては、必要コーデックを揃えてffmpegのインストール完了後、後で仕事でも使えそうなのでffmpeg-phpを導入ってトコまでかな。

まぁそんな感じ。