반응형
ffmpeg를 svn 이나 git 을 이용해 다운 받는다.

다운받은 ffmpeg 디렉토리 안에서

configure 를 다음과 같이 실행한다.

./configure --enable-shared --enable-gpl --enable-libx264 --enable-pthreads --enable-libxvid --enable-libmp3lame --enable-libvorbis --enable-libfaac --enable-libfaad

일단 난 욕심이 많아서 어서 들어본것 같은 옵션은 다 켰다.

./configure --help 라고 하면 사용 가능한 옵션들이 주루룩 나온다.

./configure를 원활히 하려면 해당하는 라이브러리 파일들을 설치해주어야 한다.
해당 라이브러리 파일들이 없을 경우

realg@realg-desktop:~/test_CODE/ffmpeg_test/ffmpeg$ ./configure --enable-shared --enable-gpl --enable-libx264 --enable-pthreads --enable-libxvid --enable-libmp3lame --enable-libvorbis --enable-libfaac --enable-libfaad
ERROR: libvorbis not found
If you think configure made a mistake, make sure you are using the latest
version from SVN.  If the latest version fails, report the problem to the
ffmpeg-user@mplayerhq.hu mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.err" produced by configure as this will help
solving the problem.

이와 같은 에러메세지가 계속 발생하게 된다.

그러므로 해당 라이브러리를 설치해주어야 한다.

위와 같이 libvorbis 가 없다고 나올때

sudo apt-cache search libvorbis
라고 하면

realg@realg-desktop:~/test_CODE/ffmpeg_test/ffmpeg$ sudo apt-cache search libvorbis
[sudo] password for realg:
libvorbis-dev - The Vorbis General Audio Compression Codec (development files)
libvorbis0a - The Vorbis General Audio Compression Codec
libvorbisenc2 - The Vorbis General Audio Compression Codec
libvorbisfile3 - The Vorbis General Audio Compression Codec
python-pyvorbis - A Python interface to the Ogg Vorbis library
python-pyvorbis-dbg - A Python interface to the Ogg Vorbis library (debug extension)
libogg-vorbis-perl - Perl extension for Ogg Vorbis streams
libvorbis-ocaml - OCaml bindings for vorbis library
libvorbis-ocaml-dev - OCaml bindings for the vorbis library
libvorbisfile-ruby - Ogg Vorbis support library for Ruby
libvorbisfile-ruby1.8 - Ogg Vorbis support library for Ruby
libvorbisidec-dev - Integer-only Ogg Vorbis decoder, AKA "tremor" (Development Files)
libvorbisidec1 - Integer-only Ogg Vorbis decoder, AKA "tremor"
libvorbisspi-java - Java Service Provider Interface for the OGG Vorbis audio format
realg@realg-desktop:~/test_CODE/ffmpeg_test/ffmpeg$


위와 같이 나오는데 이 때
sudo apt-get install libvorbis-dev

꼭 이렇게 dev 버전을 설치해주어야 한다. (그냥 libvorbis0a 이것만 설치하면 configure를 완료할 수 없다.)

realg@realg-desktop:~/test_CODE/ffmpeg_test/ffmpeg$ ./configure --enable-shared --enable-gpl --enable-libx264 --enable-pthreads --enable-libxvid --enable-libmp3lame --enable-libvorbis --enable-libfaac --enable-libfaad
ERROR: libx264 version must be >= 0.65.
If you think configure made a mistake, make sure you are using the latest
version from SVN.  If the latest version fails, report the problem to the
ffmpeg-user@mplayerhq.hu mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.err" produced by configure as this will help
solving the problem.
realg@realg-desktop:~/test_CODE/ffmpeg_test/ffmpeg$


이상하게도 x264 라이브러리는 버전이 안맞는다고 나온다.
우분투 패키지에는 0.59밖에 없는데. 0.65는 따로 받아서 설치해야 하나보다.
x264도 깔아야지 뭐....

root@realg-desktop:~/test_CODE/ffmpeg_test# git clone git://git.videolan.org/x264.git
Initialized empty Git repository in /home/realg/test_CODE/ffmpeg_test/x264/.git/
remote: Generating pack...
remote: Done counting 7782 objects.
remote: Deltifying 7782 objects...
remote:  100% (7782/7782) done
remote: Total 7782 (delta 6232), reused 146 (delta 123)
Receiving objects: 100% (7782/7782), 1.84 MiB | 462 KiB/s, done.
Resolving deltas: 100% (6232/6232), done.

이렇게 git을 이용하여 받은후 ./configure를 해야하는데
어쎔 컴파일이 안되서

또 yasm을 깔아야 한다. ㅠ.ㅠ
왜이렇게 깔아야할 것이 많은지....

sudo apt-get install yasm
으로 설치를 하고
./configure
make
make install
한다.


이렇게 없는 라이브러리들을 끝까지 다 설치한후에

root@realg-desktop:~/test_CODE/ffmpeg_test/ffmpeg# ./configure --enable-shared --enable-gpl --enable-libx264 --enable-pthreads --enable-libxvid --enable-libmp3lame --enable-libvorbis --enable-libfaac --enable-libfaad
install prefix            /usr/local
source path               /root/test_CODE/ffmpeg_test/ffmpeg
C compiler                gcc
.align is power-of-two    no
ARCH                      x86 (generic)
big-endian                no
yasm                      yes
MMX enabled               yes
MMX2 enabled              yes
3DNow! enabled            yes
SSE enabled               yes
SSSE3 enabled             yes
CMOV enabled              no
CMOV is fast              no
EBX available             yes
EBP available             yes
gprof enabled             no
debug symbols             yes
strip symbols             yes
optimizations             yes
static                    yes
shared                    yes
postprocessing support    no
software scaler enabled   no
new filter support        no
filters using lavformat   no
video hooking             yes
Imlib2 support            no
FreeType support          yes
network support           yes
IPv6 support              yes
threading support         pthreads
SDL support               yes
Sun medialib support      no
AVISynth enabled          no
libamr-nb support         no
libamr-wb support         no
libdc1394 support         no
libdirac enabled          no
libfaac enabled           yes
libfaad enabled           yes
libfaad dlopened          no
libgsm enabled            no
libmp3lame enabled        yes
libnut enabled            no
libschroedinger enabled   no
libspeex enabled          no
libtheora enabled         no
libvorbis enabled         yes
libx264 enabled           yes
libxvid enabled           yes
vdpau enabled             no
zlib enabled              yes
bzlib enabled             no

Enabled decoders:
aac                     flac                    pcm_u16be
aasc                    flashsv                 pcm_u16le
ac3                     flic                    pcm_u24be
adpcm_4xm               flv                     pcm_u24le
adpcm_adx               fourxm                  pcm_u32be
adpcm_ct                fraps                   pcm_u32le
adpcm_ea                gif                     pcm_u8
adpcm_ea_maxis_xa       h261                    pcm_zork
adpcm_ea_r1             h263                    pcx
adpcm_ea_r2             h263i                   png
adpcm_ea_r3             h264                    ptx
adpcm_ea_xas            huffyuv                 qcelp
adpcm_g726              idcin                   qdm2
adpcm_ima_amv           imc                     qdraw
adpcm_ima_dk3           indeo2                  qpeg
adpcm_ima_dk4           indeo3                  qtrle
adpcm_ima_ea_eacs       interplay_dpcm          ra_144
adpcm_ima_ea_sead       interplay_video         ra_288
adpcm_ima_iss           jpegls                  rawvideo
adpcm_ima_qt            kmvc                    rl2
adpcm_ima_smjpeg        libfaad                 roq
adpcm_ima_wav           loco                    roq_dpcm
adpcm_ima_ws            mace3                   rpza
adpcm_ms                mace6                   rv10
adpcm_sbpro_2           mdec                    rv20
adpcm_sbpro_3           mimic                   rv30
adpcm_sbpro_4           mjpeg                   rv40
adpcm_swf               mjpegb                  sgi
adpcm_thp               mlp                     shorten
adpcm_xa                mmvideo                 smackaud
adpcm_yamaha            motionpixels            smacker
alac                    mp1                     smc
amv                     mp2                     snow
ape                     mp3                     sol_dpcm
asv1                    mp3adu                  sonic
asv2                    mp3on4                  sp5x
atrac3                  mpc7                    sunrast
avs                     mpc8                    svq1
bethsoftvid             mpeg1video              svq3
bfi                     mpeg2video              targa
bmp                     mpeg4                   theora
c93                     mpegvideo               thp
cavs                    msmpeg4v1               tiertexseqvideo
cinepak                 msmpeg4v2               tiff
cljr                    msmpeg4v3               truemotion1
cook                    msrle                   truemotion2
cscd                    msvideo1                truespeech
cyuv                    mszh                    tscc
dca                     nellymoser              tta
dnxhd                   nuv                     txd
dsicinaudio             pcm_alaw                ulti
dsicinvideo             pcm_dvd                 vb
dvbsub                  pcm_f32be               vc1
dvdsub                  pcm_f32le               vcr1
dvvideo                 pcm_f64be               vmdaudio
dxa                     pcm_f64le               vmdvideo
eac3                    pcm_mulaw               vmnc
eacmv                   pcm_s16be               vorbis
eatgq                   pcm_s16le               vp3
eatgv                   pcm_s16le_planar        vp5
eightbps                pcm_s24be               vp6
eightsvx_exp            pcm_s24daud             vp6a
eightsvx_fib            pcm_s24le               vp6f
escape124               pcm_s32be               vqa
ffv1                    pcm_s32le               wavpack
ffvhuff                 pcm_s8                  wmav1
wmav2                   wnv1                    xl
wmv1                    ws_snd1                 xsub
wmv2                    xan_dpcm                zlib
wmv3                    xan_wc3                 zmbv

Enabled encoders:
ac3                     libx264                 pcm_u24be
adpcm_adx               libxvid                 pcm_u24le
adpcm_g726              ljpeg                   pcm_u32be
adpcm_ima_qt            mjpeg                   pcm_u32le
adpcm_ima_wav           mp2                     pcm_u8
adpcm_ms                mpeg1video              pcm_zork
adpcm_swf               mpeg2video              pgm
adpcm_yamaha            mpeg4                   pgmyuv
alac                    msmpeg4v1               png
asv1                    msmpeg4v2               ppm
asv2                    msmpeg4v3               qtrle
bmp                     nellymoser              rawvideo
dnxhd                   pam                     roq
dvbsub                  pbm                     roq_dpcm
dvdsub                  pcm_alaw                rv10
dvvideo                 pcm_f32be               rv20
ffv1                    pcm_f32le               sgi
ffvhuff                 pcm_f64be               snow
flac                    pcm_f64le               sonic
flashsv                 pcm_mulaw               sonic_ls
flv                     pcm_s16be               svq1
gif                     pcm_s16le               targa
h261                    pcm_s24be               tiff
h263                    pcm_s24daud             vorbis
h263p                   pcm_s24le               wmav1
huffyuv                 pcm_s32be               wmav2
jpegls                  pcm_s32le               wmv1
libfaac                 pcm_s8                  wmv2
libmp3lame              pcm_u16be               zlib
libvorbis               pcm_u16le               zmbv

Enabled parsers:
aac                     dvdsub                  mpeg4video
ac3                     h261                    mpegaudio
cavsvideo               h263                    mpegvideo
dca                     h264                    pnm
dirac                   mjpeg                   vc1
dnxhd                   mlp                     vp3
dvbsub

Enabled demuxers:
aac                     ipmovie                 pcm_u16be
ac3                     iss                     pcm_u16le
aiff                    lmlm4                   pcm_u24be
amr                     m4v                     pcm_u24le
apc                     matroska                pcm_u32be
ape                     mjpeg                   pcm_u32le
asf                     mlp                     pcm_u8
ass                     mm                      pva
au                      mmf                     r3d
avi                     mov                     rawvideo
avs                     mp3                     redir
bethsoftvid             mpc                     rl2
bfi                     mpc8                    rm
c93                     mpegps                  roq
daud                    mpegts                  rpl
dirac                   mpegtsraw               rtsp
dnxhd                   mpegvideo               sdp
dsicin                  msnwc_tcp               segafilm
dts                     mtv                     shorten
dv                      mvi                     siff
dxa                     mxf                     smacker
ea                      nsv                     sol
ea_cdata                nut                     str
eac3                    nuv                     swf
ffm                     ogg                     thp
flac                    oma                     tiertexseq
flic                    pcm_alaw                tta
flv                     pcm_f32be               txd
fourxm                  pcm_f32le               vc1
gsm                     pcm_f64be               vc1t
gxf                     pcm_f64le               vmd
h261                    pcm_mulaw               voc
h263                    pcm_s16be               wav
h264                    pcm_s16le               wc3
idcin                   pcm_s24be               wsaud
iff                     pcm_s24le               wsvqa
image2                  pcm_s32be               wv
image2pipe              pcm_s32le               xa
ingenient               pcm_s8                  yuv4mpegpipe

Enabled muxers:
ac3                     ipod                    pcm_mulaw
adts                    m4v                     pcm_s16be
aiff                    matroska                pcm_s16le
amr                     matroska_audio          pcm_s24be
asf                     mjpeg                   pcm_s24le
asf_stream              mmf                     pcm_s32be
ass                     mov                     pcm_s32le
au                      mp2                     pcm_s8
avi                     mp3                     pcm_u16be
avm2                    mp4                     pcm_u16le
crc                     mpeg1system             pcm_u24be
daud                    mpeg1vcd                pcm_u24le
dirac                   mpeg1video              pcm_u32be
dnxhd                   mpeg2dvd                pcm_u32le
dts                     mpeg2svcd               pcm_u8
dv                      mpeg2video              psp
eac3                    mpeg2vob                rawvideo
ffm                     mpegts                  rm
flac                    mpjpeg                  roq
flv                     mxf                     rtp
framecrc                null                    swf
gif                     nut                     tg2
gxf                     ogg                     tgp
h261                    pcm_alaw                vc1t
h263                    pcm_f32be               voc
h264                    pcm_f32le               wav
image2                  pcm_f64be               yuv4mpegpipe
image2pipe              pcm_f64le

Enabled protocols:
file                    pipe                    tcp
http                    rtp                     udp

Enabled filters:
crop

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

Enabled indevs:
alsa                    oss                     v4l2
dv1394                  v4l

Enabled outdevs:
alsa                    oss

License: GPL
Creating config.mak and config.h...
root@realg-desktop:~/test_CODE/ffmpeg_test/ffmpeg#


make
make install

해주면 된다.



----------------------------------------------------------------------------------------

ERROR: libx264 version must be >= 0.83

이런 메세지가 나오면 다음과 같이 해주면 된다.


# mkdir /usr/local/src
# cd /usr/local/src
# wget ftp://ftp.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20100330-2245.tar.bz2
# bzip2 -cd x264-snapshot-20100330-2245.tar.bz2 | tar xvf -
# cd /usr/local/src/x264-snapshot-20100330-2245
# make distclean
# ./configure --enable-shared && make clean && make && make install

반응형

'Linux > Linux 일반' 카테고리의 다른 글

Linux kernel에서의 Frame buffer 활성화  (0) 2009.02.07
make  (0) 2009.02.04
`Makefile.in' 만들기  (0) 2009.01.22
Posted by Real_G