11. ffmpeg + AirVideo Server 설치 [NAS 구축기][ubuntu 10.4]

얼렁뚱땅설명서 2012. 3. 6. 10:58


ffmpeg는 인코딩 프로그램을 유명하다. Airvideo Server을 설치하기 전에 먼저 설치하는 이유는  Airvideo Server가 더 훌륭해 지거나 Live Conversion이 매우 빠르게 수행될 것 같은 느낌 때문이다. 근거는 없다. 

ffmpeg는 컴파일을 해야하므로 일단, 시스템을 업데이트 하고 기본적인 컴파일 도구를 설치한다.
덤으로 인코딩에 사용할 여러개의 라이브러리도 설치한다. 명령어가 조금 길다.

username@Team4Svr:~$ sudo -s
root@Team4Svr:~#  apt-get update
.......
.......
....... 
 
패키지 목록을 읽는 중입니다... 완료
root@Team4Svr:~# apt-get install build-essential subversion git-core checkinstall yasm texi2html libfaac-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libsdl1.2-dev libtheora-dev libvorbis-dev libvpx-dev libx11-dev libxfixes-dev libxvidcore-dev zlib1g-dev
패키지 목록을 읽는 중입니다... 완료
의존성 트리를 만드는 중입니다
상태 정보를 읽는 중입니다... 완료
build-essential 패키지는 이미 최신 버전입니다.
.....
.....
..... 
0개 업그레이드, 61개 새로 설치, 0개 지우기 및 0개 업그레이드 안 함.
28.1M바이트 아카이브를 받아야 합니다.
이 작업 후 86.7M바이트의 디스크 공간을 더 사용하게 됩니다.
계속 하시겠습니까 [Y/n]?
.....
.....
너무 길어서 이하생략
.....
.....
libxvidcore-dev (2:1.2.2+debian-0ubuntu2) 설정하는 중입니다 ...
subversion (1.6.6dfsg-2ubuntu1.3) 설정하는 중입니다 ...
texi2html (1.82-1) 설정하는 중입니다 ...
yasm (0.8.0-1) 설정하는 중입니다 ...
libc-bin에 대한 트리거를 처리하는 중입니다 ...
ldconfig deferred processing now taking place



x264 라이브러리를 설치한다. x264는 H.264의 구현으로 '매우 높은 데이터 압축률을 가지는 디지털 비디오 코덱 표준으로 MPEG-4 파트 10 또는 MPEG-4/AVC(고급 비디오 부호화, Advanced Video Coding)라 부르기도 한다.-한국위키-'....... 하여간 좋은 거다.;
 

root@Team4Svr:~# cd
root@Team4Svr:~# git clone git://git.videolan.org/x264.git
Initialized empty Git repository in /home/fishingday/x264/.git/
remote: Counting objects: 15359, done.
remote: Compressing objects: 100% (2923/2923), done.
remote: Total 15359 (delta 12578), reused 15174 (delta 12395)
Receiving objects: 100% (15359/15359), 3.80 MiB | 749 KiB/s, done.
Resolving deltas: 100% (12578/12578), done.
root@Team4Svr:~# cd x264
root@Team4Svr:~/x264#
root@Team4Svr:~/x264# ./configure   <--- yasm 버전이 낮다고 한다. 아래와 같이 한다.
Found yasm 0.8.0.2194
Minimum version is yasm-1.0.0
If you really want to compile without asm, configure with --disable-asm.
root@Team4Svr:~/x264# ./configure --enable-shared --disable-asm
platform:      X86_64
system:        LINUX
cli:           yes
libx264:       internal
shared:        yes
static:        no
asm:           no
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.
root@Team4Svr:~/x264#
isualize:     no
bit depth:     8
chroma format: all

You can run 'make' or 'make fprofiled' now.
root@Team4Svr:~/x264# checkinstall --pkgname=x264 --pkgversion "2:0.`grep X264_BUILD x264.h -m1 | cut -d' ' -f3`.`git rev-list HEAD | wc -l`+git`git rev-list HEAD -n 1 | head -c 7`" --backup=no --deldoc=yes --fstrans=no --default

checkinstall 1.6.1, Copyright 2002 Felipe Eduardo Sanchez Diaz Duran
           This software is released under the GNU GPL.


The package documentation directory ./doc-pak does not exist.
Should I create a default set of package docs?  [y]: y

Preparing package documentation...OK

*****************************************
**** Debian package creation selected ***
*****************************************

This package will be built according to these values:

0 -  Maintainer: [ root@Team4Svr ]
1 -  Summary: [ Package created with checkinstall 1.6.1 ]
2 -  Name:    [ x264 ]
3 -  Version: [ 2:0.120.2164+gitda19765 ]
4 -  Release: [ 1 ]
5 -  License: [ GPL ]
6 -  Group:   [ checkinstall ]
7 -  Architecture: [ amd64 ]
8 -  Source location: [ x264 ]
9 -  Alternate source location: [  ]
10 - Requires: [  ]
11 - Provides: [ x264 ]

Enter a number to change any of them or press ENTER to continue:

Installing with make...Installing with install...

========================= Installation results ===========================
....
.... 생략...
....
======================== Installation successful ==========================

Copying documentation directory...
./
./AUTHORS
./doc/
./doc/vui.txt
./doc/standards.txt
./doc/threads.txt
./doc/regression_test.txt
./doc/ratecontrol.txt
./COPYING
grep: /var/tmp/tmp.llEegCHGR8/newfile: 그런 파일이나 디렉터리가 없습니다

Some of the files created by the installation are inside the build
directory: /home/fishingday/x264

You probably don't want them to be included in the package,
especially if they are inside your home directory.
Do you want me to list them?  [n]: n
Should I exclude them from the package? (Saying yes is a good idea)  [y]: y

Copying files to the temporary directory...OK

Stripping ELF binaries and libraries...OK

Compressing man pages...OK

Building file list...OK

Building Debian package...OK

Installing Debian package...OK

Erasing temporary files...OK

Deleting doc-pak directory...OK

Deleting temp dir...OK


**********************************************************************

 Done. The new package has been installed and saved to

 /home/fishingday/x264/x264_2:0.120.2164+gitda19765-1_amd64.deb

 You can remove it from your system anytime using:

      dpkg -r x264

**********************************************************************

root@Team4Svr:~/x264#


 이제 ffmpeg를 설치해 준다.

root@Team4Svr:~# cd
root@Team4Svr:~# svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
....
....
A    ffmpeg/MAINTAINERS
A    ffmpeg/COPYING.LGPLv3
 U   ffmpeg
체크아웃된 리비전 26402.
root@Team4Svr:~# cd ffmpeg
root@Team4Svr:~/ffmpeg# ./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab
.......
.......
.......
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:
alsa                    oss                     v4l2
dv1394                  v4l                     x11_grab_device

Enabled outdevs:
alsa                    oss

License: nonfree and unredistributable
Creating config.mak and config.h...
root@Team4Svr:~/ffmpeg# make
CC      libavdevice/alldevices.o
CC      libavdevice/alsa-audio-common.o
CC      libavdevice/alsa-audio-dec.o
CC      libavdevice/alsa-audio-enc.o
CC      libavdevice/avdevice.o
.....
.....
.....
POD     doc/ffmpeg.pod
MAN     doc/ffmpeg.1
POD     doc/ffplay.pod
MAN     doc/ffplay.1
POD     doc/ffprobe.pod
MAN     doc/ffprobe.1
POD     doc/ffserver.pod
MAN     doc/ffserver.1
root@Team4Svr:~/ffmpeg# checkinstall --pkgname=ffmpeg --pkgversion "4:SVN-r`LANG=C svn info | grep Revision | awk '{ print $NF }'`" --backup=no --deldoc=yes --fstrans=no --default
....
....
....
Copying files to the temporary directory...OK

Stripping ELF binaries and libraries...OK

Compressing man pages...OK

Building file list...OK

Building Debian package...OK

Installing Debian package...OK

Erasing temporary files...OK

Deleting doc-pak directory...OK

Deleting temp dir...OK


**********************************************************************

 Done. The new package has been installed and saved to

 /home/fishingday/ffmpeg/ffmpeg_4:SVN-r26402-1_amd64.deb

 You can remove it from your system anytime using:

      dpkg -r ffmpeg

**********************************************************************

root@Team4Svr:~/ffmpeg# hash x264 ffmpeg ffplay
root@Team4Svr:~/ffmpeg# make tools/qt-faststart
CC      tools/qt-faststart.o
LD      tools/qt-faststart
rm tools/qt-faststart.o
root@Team4Svr:~/ffmpeg# checkinstall --pkgname=qt-faststart --pkgversion "4:SVN-r`LANG=C svn info | grep Revision | awk '{ print $NF }'`" --backup=no --deldoc=yes --fstrans=no --default install -D -m755 tools/qt-faststart /usr/local/bin/qt-faststart

checkinstall 1.6.1, Copyright 2002 Felipe Eduardo Sanchez Diaz Duran
           This software is released under the GNU GPL.


The package documentation directory ./doc-pak does not exist.
Should I create a default set of package docs?  [y]: y

Preparing package documentation...OK

*****************************************
**** Debian package creation selected ***
*****************************************

This package will be built according to these values:

0 -  Maintainer: [ root@Team4Svr ]
1 -  Summary: [ Package created with checkinstall 1.6.1 ]
2 -  Name:    [ qt-faststart ]
3 -  Version: [ 4:SVN-r26402 ]
4 -  Release: [ 1 ]
5 -  License: [ GPL ]
6 -  Group:   [ checkinstall ]
7 -  Architecture: [ amd64 ]
8 -  Source location: [ ffmpeg ]
9 -  Alternate source location: [  ]
10 - Requires: [  ]
11 - Provides: [ qt-faststart ]

Enter a number to change any of them or press ENTER to continue:

Installing with install...Installing with -D...Installing with -m755...Installing with tools/qt-faststart...Installing with /usr/local/bin/qt-faststart...

========================= Installation results ===========================

======================== Installation successful ==========================

.......
.......
.......

Copying files to the temporary directory...OK

Stripping ELF binaries and libraries...OK

Compressing man pages...OK

Building file list...OK

Building Debian package...OK

Installing Debian package...OK

Erasing temporary files...OK

Deleting doc-pak directory...OK

Deleting temp dir...OK


**********************************************************************

 Done. The new package has been installed and saved to

 /home/fishingday/ffmpeg/qt-faststart_4:SVN-r26402-1_amd64.deb

 You can remove it from your system anytime using:

      dpkg -r qt-faststart

**********************************************************************

root@Team4Svr:~/ffmpeg#

짜잔 FFmpeg의 설치가 끝났다. CentOS에서 설치할땐 하루 종일 걸렸던 것 같은데.... 우분투에선 금방 이다. 
그럼 이제 ffmpeg를 실행 해 보자. 기대와 달리 실행할 수 없다는 오류를 냉큼 떨어뜨린다. ㅡㅡ;

root@Team4Svr:~/ffmpeg# ffmpeg
ffmpeg: error while loading shared libraries: libx264.so.120: cannot open shared object file: No such file or directory
root@Team4Svr:~/ffmpeg#

 공유 라이브러리를 찾을 수 없다는 오류 이므로, 아래와 같은 조치를 취한 후 다시 실행해 준다.

root@Team4Svr:~/ffmpeg# vi /etc/ld.so.conf
include /etc/ld.so.conf.d/*.conf

/usr/local/lib   <--- 추가하고 저장 한다.
~
root@Team4Svr:~/ffmpeg# ldconfig
root@Team4Svr:~/ffmpeg# ffmpeg
FFmpeg version SVN-r26402, Copyright (c) 2000-2011 the FFmpeg developers
  built on Mar  6 2012 10:44:30 with gcc 4.4.3
  configuration: --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libvpx --enable-libx264 --enable-libxvid --enable-x11grab
  libavutil     50.36. 0 / 50.36. 0
  libavcore      0.16. 1 /  0.16. 1
  libavcodec    52.108. 0 / 52.108. 0
  libavformat   52.93. 0 / 52.93. 0
  libavdevice   52. 2. 3 / 52. 2. 3
  libavfilter    1.74. 0 /  1.74. 0
  libswscale     0.12. 0 /  0.12. 0
  libpostproc   51. 2. 0 / 51. 2. 0
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

Use -h to get full help or, even better, run 'man ffmpeg'
root@Team4Svr:~/ffmpeg#



FFmpeg의 간단하 사용방법이다.

### One-pass CRF
ffmpeg -i input.avi -acodec libfaac -ab 128k -ac 2 -vcodec libx264 -vpre slow -crf 22 -threads 0 output.mp4

### Two-Pass 인코딩
ffmpeg -i input.avi -pass 1 -vcodec libx264 -vpre fast_firstpass -b 512k -bt 512k    -threads 0 -f rawvideo -an -y /dev/null && ffmpeg -i input.avi -pass 2 -acodec libfaac -ab 128k -ac 2 -vcodec libx264 -vpre fast -b 512k -bt 512k -threads 0 output.mp4

### iPod 640x480 으로 인코딩
ffmpeg -i input.avi -acodec libfaac -aq 100 -ac 2 -vcodec libx264 -vpre slow -vpre ipod640 -crf 26 -map_meta_data 0:0 -vf scale=640:-1 -threads 0 output.mp4


아래는 오래전(?)에 테스트 하면서 사용한 명령어이다. 여러가지 포맷으로 변환이 된다.

[root@localhost test] ffmpeg -i 640x480.wmv -y -s 640x360 -acodec libfaac -ar 32000 -ab 48000 -ac 2 -f flv -vcodec flv -b 700k tranc640x360.flv 
....
[root@localhost test] ffmpeg -i 640x480.wmv -y -threads 4-s 640x360 -acodec libfaac -ar 32000 -ab 48000 -ac 2 -f mp4 -vcodec libx264 -vpre fast -b 1000k -g 30 -bf 2 -b_strategy 1 tranc640x360.mp4

[root@localhost test] ffmpeg -i 640x480.wmv -y -threads 4-s 640x360 -acodec libfaac -ar 32000 -ab 48000 -ac 2 -f mp4 -vcodec mpeg4 -b 1000k  tranc640x360.mp4

인코딩 참고 사이트 : http://ospace.tistory.com/125, http://xmlangel2.blogspot.com/2010/04/ffmpeg-%EA%B8%B0%EB%B3%B8-%EC%82%AC%EC%9A%A9%EB%B2%95.html, http://ffmpeg.org/ffmpeg-doc.html 

※ ffmepg 설치방법은 여기서(http://ubuntuforums.org/showthread.php?t=786095) 참고 했다. 배꼈다. ㅡㅡ;



이제 드디어 Airvideo Server를 설치할 차례이다. 설치는 매우 간단하고 빠르다.

root@Team4Svr:~# add-apt-repository ppa:rubiojr/airvideo
Executing: gpg --ignore-time-conflict --no-options --no-default-keyring --secret-keyring /etc/apt/secring.gpg --trustdb-name /etc/apt/trustdb.gpg --keyring /etc/apt/trusted.gpg --primary-keyring /etc/apt/trusted.gpg --keyserver keyserver.ubuntu.com --recv A58221FEBF9C6AC1914B24ACC2B39E5DF6BD82A0
gpg: requesting key F6BD82A0 from hkp server keyserver.ubuntu.com
gpg: key F6BD82A0: public key "Launchpad PPA for rubiojr" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
root@Team4Svr:~# apt-get update
....
....
root@Team4Svr:~# sudo apt-get install airvideo-server
패키지 목록을 읽는 중입니다... 완료
의존성 트리를 만드는 중입니다
........
........
  airvideo-server ca-certificates-java faac icedtea-6-jre-cacao java-common
  libaccess-bridge-java libaccess-bridge-java-jni libclucene0ldbl libfaad2 libiodbc2
  libmodplug0c2 libmp4v2-0 libmpeg4ip-0 libmysqlclient16 libphonon4 libqscintilla2-5
  libqt4-dbus libqt4-designer libqt4-multimedia libqt4-network libqt4-opengl libqt4-ruby1.8
  libqt4-script libqt4-sql libqt4-sql-mysql libqt4-svg libqt4-test libqt4-webkit libqt4-xml
  libqt4-xmlpatterns libqtruby4shared2 libruby1.8 libsmokeqt4-3 libsmokesoprano3 libsoprano4
  libx264-85 libxcb-shape0 libxcb-shm0 libxcb-xv0 libxine1 libxine1-bin libxine1-console
  libxine1-misc-plugins libxine1-x mpeg4ip-server mysql-common openjdk-6-jre
  openjdk-6-jre-headless openjdk-6-jre-lib phonon phonon-backend-xine ruby ruby1.8
  soprano-daemon ttf-dejavu-extra tzdata-java virtuoso-nepomuk
0개 업그레이드, 57개 새로 설치, 0개 지우기 및 0개 업그레이드 안 함.
78.9M바이트 아카이브를 받아야 합니다.
이 작업 후 228M바이트의 디스크 공간을 더 사용하게 됩니다.
계속 하시겠습니까 [Y/n]?
......
......
......
openjdk-6-jre (6b20-1.9.13-0ubuntu1~10.04.1) 설정하는 중입니다 ...
update-alternatives: /usr/lib/jvm/java-6-openjdk/jre/bin/javaws 사용해서 자동 모드에서 /usr/bin/javaws (javaws) 제공.
update-alternatives: /usr/lib/jvm/java-6-openjdk/jre/bin/pluginappletviewer 사용해서 자동 모드에서 /usr/bin/pluginappletviewer (pluginappletviewer) 제공.
update-alternatives: /usr/lib/jvm/java-6-openjdk/jre/bin/policytool 사용해서 자동 모드에서 /usr/bin/policytool (policytool) 제공.

airvideo-server (0alpha6ubuntu1~lucid1) 설정하는 중입니다 ...
libc-bin에 대한 트리거를 처리하는 중입니다 ...
ldconfig deferred processing now taking place
root@Team4Svr:~# vi /opt/airvideo-server/AirVideoServerLinux.properties
path.ffmpeg = /opt/airvideo-server/bin/ffmpeg
path.mp4creator = /usr/bin/mp4creator
path.faac = /usr/bin/faac
password =
subtitles.encoding = euc-kr   <-- 변경
subtitles.font = undotum  <-- 변경
folders = Movies:/DataCenter/Movies,/DataCenter/Study  <-- 변경

이제 설치가 끝났다. AirVideo Server를 실행하기 위해선 아래의 화면과 같이 프로그램>음악과비디오>Airvideo Server 를 찾아서 실행한다.
서버를 띄우면 아래 화면처럼 아이콘이 생기는 것을 볼 수 있다. 여기서 Start Server를 눌러주면 된다.



아래는 아이폰을 통해 Airvideo Server에 접속한 모습니다. 아이폰의 Airvideo 프로그램은 유료 버전과 무료 버전이 있다. 유료와 무료의 차이점은 목록이 전부다 나오느냐, 일부만 나오느냐의 차이다. 그 외에는 차이는 없는 듯 하다. [+] 버튼을 눌러 Specify Address Manually를 선택한 다음 서버주소와 포트 번호를 누르면 서버를 간단히 추가할 수 있다. 그리고, 서버를 누르면 목록을 볼 수 있고, 목록에서 동영상을 선택하면 된다. mp4로 인코딩 된 동영상은 바로 실행이 되지만, 그 외에는 Play with Live Conversion을 통해 동영상을 즐길 수 있다.




FFMpeg 설치 [on Centos5.x]

카테고리 없음 2011. 9. 20. 18:02


1) 폴더를 만들고... 
 

[root@team4svr ~]# mkdir ffmpeg
[root@team4svr ~]# cd ffmpeg
[root@team4svr ffmpeg]# ls
[root@team4svr ffmpeg]# pwd
/root/ffmpeg



2) 필요한 것들을 다운 받고... 

[root@team4svr ffmpeg]# wget http://www1.mplayerhq.hu/MPlayer/releases/codecs/essential-20071007.tar.bz2
--2011-09-16 11:43:53--  http://www1.mplayerhq.hu/MPlayer/releases/codecs/essential-20071007.tar.bz2
Resolving www1.mplayerhq.hu... 192.190.173.45
Connecting to www1.mplayerhq.hu|192.190.173.45|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 10009454 (9.5M) [application/x-bzip2]
Saving to: `essential-20071007.tar.bz2'

100%[=========================================================================>] 10,009,454  1.27M/s   in 9.8s

2011-09-16 11:44:05 (995 KB/s) - `essential-20071007.tar.bz2' saved [10009454/10009454]


[root@team4svr ffmpeg]# wget http://rubyforge.org/frs/download.php/17497/flvtool2-1.0.6.tgz 
--2011-09-15 10:40:23--  http://rubyforge.org/frs/download.php/17497/flvtool2-1.0.6.tgz
Resolving rubyforge.org... 205.234.109.19
Connecting to rubyforge.org|205.234.109.19|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://files.rubyforge.vm.bytemark.co.uk/flvtool2/flvtool2-1.0.6.tgz [following]
--2011-09-15 10:40:24--  http://files.rubyforge.vm.bytemark.co.uk/flvtool2/flvtool2-1.0.6.tgz.tgz
Resolving files.rubyforge.vm.bytemark.co.uk... 80.68.94.54
Connecting to files.rubyforge.vm.bytemark.co.uk|80.68.94.54|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 24701 (24K) [application/x-gzip]
Saving to: `flvtool2-1.0.6.tgz'

100%[=========================================================================>] 24,701      43.2K/s   in 0.6s    
2011-09-15 10:40:26 (43.2 KB/s) - `flvtool2-1.0.6.tgz' saved [24701/24701]


[root@team4svr ffmpeg]# wget http://downloads.sourceforge.net/sourceforge/ffmpeg-php/ffmpeg-php-0.5.0.tbz2 
--2011-09-15 10:44:04--  http://downloads.sourceforge.net/sourceforge/ffmpeg-php/ffmpeg-php-0.5.0.tbz2
Resolving downloads.sourceforge.net... 216.34.181.59
Connecting to downloads.sourceforge.net|216.34.181.59|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://downloads.sourceforge.net/project/ffmpeg-php/ffmpeg-php/0.5.0/ffmpeg-php-0.5.0.tbz2 [following]
--2011-09-15 10:44:05--  http://downloads.sourceforge.net/project/ffmpeg-php/ffmpeg-php/0.5.0/ffmpeg-php-0.5.0.tbz2
Reusing existing connection to downloads.sourceforge.net:80.
HTTP request sent, awaiting response... 302 Found
Location: http://cdnetworks-kr-1.dl.sourceforge.net/project/ffmpeg-php/ffmpeg-php/0.5.0/ffmpeg-php-0.5.0.tbz2 [following]
--2011-09-15 10:44:05--  http://cdnetworks-kr-1.dl.sourceforge.net/project/ffmpeg-php/ffmpeg-php/0.5.0/ffmpeg-php-0.5.0.tbz2
Resolving cdnetworks-kr-1.dl.sourceforge.net... 211.39.135.162
Connecting to cdnetworks-kr-1.dl.sourceforge.net|211.39.135.162|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1606351 (1.5M) [application/octet-stream]
Saving to: `ffmpeg-php-0.5.0.tbz2'

100%[=========================================================================>] 1,606,351   7.29M/s   in 0.2s    

2011-09-15 10:44:06 (7.29 MB/s) - `ffmpeg-php-0.5.0.tbz2' saved [1606351/1606351]


[root@team4svr ffmpeg]# wget http://downloads.xiph.org/releases/ogg/libogg-1.1.3.tar.gz 
--2011-09-15 10:44:18--  http://downloads.xiph.org/releases/ogg/libogg-1.1.3.tar.gz
Resolving downloads.xiph.org... 64.50.233.100, 64.50.236.52
Connecting to downloads.xiph.org|64.50.233.100|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 403467 (394K) [application/x-gzip]
Saving to: `libogg-1.1.3.tar.gz'

100%[=========================================================================>] 403,467      205K/s   in 1.9s    

2011-09-15 10:44:22 (205 KB/s) - `libogg-1.1.3.tar.gz' saved [403467/403467]



[root@localhost ffmpeg]# wget http://www.tortall.net/projects/yasm/releases/yasm-0.8.0.tar.gz
--2011-09-16 11:54:16--  http://www.tortall.net/projects/yasm/releases/yasm-0.8.0.tar.gz
Resolving www.tortall.net... 69.55.238.110
Connecting to www.tortall.net|69.55.238.110|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1419273 (1.4M) [application/x-gzip]
Saving to: `yasm-0.8.0.tar.gz'

100%[=========================================================================>] 1,419,273    462K/s   in 3.0s

2011-09-16 11:54:20 (462 KB/s) - `yasm-0.8.0.tar.gz' saved [1419273/1419273]


[root@localhost ffmpeg]# wget ftp://ftp.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20110914-2245.tar.bz2
--2011-09-16 11:54:27--  ftp://ftp.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20110914-2245.tar.bz2
           => `x264-snapshot-20110914-2245.tar.bz2'
Resolving ftp.videolan.org... 88.191.250.2
Connecting to ftp.videolan.org|88.191.250.2|:21... connected.
Logging in as anonymous ... Logged in!
==> SYST ... done.    ==> PWD ... done.
==> TYPE I ... done.  ==> CWD /pub/videolan/x264/snapshots ... done.
==> SIZE x264-snapshot-20110914-2245.tar.bz2 ... 514587
==> PASV ... done.    ==> RETR x264-snapshot-20110914-2245.tar.bz2 ... done.
Length: 514587 (503K)

100%[=========================================================================>] 514,587      205K/s   in 2.4s

2011-09-16 11:54:35 (205 KB/s) - `x264-snapshot-20110914-2245.tar.bz2' saved [514587]


[root@localhost ffmpeg]# wget http://downloads.sourceforge.net/faac/faad2-2.7.tar.gz
--2011-09-16 11:54:46--  http://downloads.sourceforge.net/faac/faad2-2.7.tar.gz
Resolving downloads.sourceforge.net... 216.34.181.59
Connecting to downloads.sourceforge.net|216.34.181.59|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://downloads.sourceforge.net/project/faac/faad2-src/faad2-2.7/faad2-2.7.tar.gz [following]
--2011-09-16 11:54:51--  http://downloads.sourceforge.net/project/faac/faad2-src/faad2-2.7/faad2-2.7.tar.gz
Reusing existing connection to downloads.sourceforge.net:80.
HTTP request sent, awaiting response... 302 Found
Location: http://cdnetworks-kr-1.dl.sourceforge.net/project/faac/faad2-src/faad2-2.7/faad2-2.7.tar.gz [following]
--2011-09-16 11:54:52--  http://cdnetworks-kr-1.dl.sourceforge.net/project/faac/faad2-src/faad2-2.7/faad2-2.7.tar.gz
Resolving cdnetworks-kr-1.dl.sourceforge.net... 211.39.135.162
Connecting to cdnetworks-kr-1.dl.sourceforge.net|211.39.135.162|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1137407 (1.1M) [application/x-gzip]
Saving to: `faad2-2.7.tar.gz'

100%[=========================================================================>] 1,137,407   --.-K/s   in 0.1s

2011-09-16 11:54:52 (7.72 MB/s) - `faad2-2.7.tar.gz' saved [1137407/1137407]


[root@localhost ffmpeg]# wget http://downloads.sourceforge.net/faac/faac-1.28.tar.gz
--2011-09-16 11:54:54--  http://downloads.sourceforge.net/faac/faac-1.28.tar.gz
Resolving downloads.sourceforge.net... 216.34.181.59
Connecting to downloads.sourceforge.net|216.34.181.59|:80... connected.
HTTP request sent, awaiting response... 301 Moved Permanently
Location: http://downloads.sourceforge.net/project/faac/faac-src/faac-1.28/faac-1.28.tar.gz [following]
--2011-09-16 11:54:55--  http://downloads.sourceforge.net/project/faac/faac-src/faac-1.28/faac-1.28.tar.gz
Reusing existing connection to downloads.sourceforge.net:80.
HTTP request sent, awaiting response... 302 Found
Location: http://cdnetworks-kr-2.dl.sourceforge.net/project/faac/faac-src/faac-1.28/faac-1.28.tar.gz [following]
--2011-09-16 11:54:55--  http://cdnetworks-kr-2.dl.sourceforge.net/project/faac/faac-src/faac-1.28/faac-1.28.tar.gz
Resolving cdnetworks-kr-2.dl.sourceforge.net... 211.39.135.163
Connecting to cdnetworks-kr-2.dl.sourceforge.net|211.39.135.163|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 678891 (663K) [application/x-gzip]
Saving to: `faac-1.28.tar.gz'

100%[=========================================================================>] 678,891     --.-K/s   in 0.08s

2011-09-16 11:54:55 (8.14 MB/s) - `faac-1.28.tar.gz' saved [678891/678891]


[root@localhost ffmpeg]# wget http://sourceforge.net/projects/lame/files/lame/3.98/lame-398.tar.gz
--2011-09-16 11:55:01--  http://sourceforge.net/projects/lame/files/lame/3.98/lame-398.tar.gz
Resolving sourceforge.net... 216.34.181.60
Connecting to sourceforge.net|216.34.181.60|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://sourceforge.net/projects/lame/files/lame/3.98/lame-398.tar.gz/download [following]
--2011-09-16 11:55:01--  http://sourceforge.net/projects/lame/files/lame/3.98/lame-398.tar.gz/download
Connecting to sourceforge.net|216.34.181.60|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://downloads.sourceforge.net/project/lame/lame/3.98/lame-398.tar.gz?r=&ts=1316141717&use_mirror=cdnetworks-kr-1 [following]
--2011-09-16 11:55:02--  http://downloads.sourceforge.net/project/lame/lame/3.98/lame-398.tar.gz?r=&ts=1316141717&use_mirror=cdnetworks-kr-1
Resolving downloads.sourceforge.net... 216.34.181.59
Connecting to downloads.sourceforge.net|216.34.181.59|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://cdnetworks-kr-1.dl.sourceforge.net/project/lame/lame/3.98/lame-398.tar.gz [following]
--2011-09-16 11:55:02--  http://cdnetworks-kr-1.dl.sourceforge.net/project/lame/lame/3.98/lame-398.tar.gz
Resolving cdnetworks-kr-1.dl.sourceforge.net... 211.39.135.162
Connecting to cdnetworks-kr-1.dl.sourceforge.net|211.39.135.162|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1415983 (1.3M) [application/x-gzip]
Saving to: `lame-398.tar.gz'

100%[=========================================================================>] 1,415,983   8.91M/s   in 0.2s

2011-09-16 11:55:02 (8.91 MB/s) - `lame-398.tar.gz' saved [1415983/1415983]


[root@localhost ffmpeg]# wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.2.3.tar.gz
--2011-09-16 11:55:24--  http://downloads.xiph.org/releases/vorbis/libvorbis-1.2.3.tar.gz
Resolving downloads.xiph.org... 64.50.236.52, 64.50.233.100
Connecting to downloads.xiph.org|64.50.236.52|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1474492 (1.4M) [application/x-gzip]
Saving to: `libvorbis-1.2.3.tar.gz'

100%[=========================================================================>] 1,474,492    462K/s   in 3.1s

2011-09-16 11:55:29 (462 KB/s) - `libvorbis-1.2.3.tar.gz' saved [1474492/1474492]


[root@localhost ffmpeg]# wget http://www.libsdl.org/release/SDL-1.2.13.tar.gz
--2011-09-16 11:56:00--  http://www.libsdl.org/release/SDL-1.2.13.tar.gz
Resolving www.libsdl.org... 69.163.143.10
Connecting to www.libsdl.org|69.163.143.10|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 3373673 (3.2M) [application/x-tar]
Saving to: `SDL-1.2.13.tar.gz'

100%[=========================================================================>] 3,373,673    411K/s   in 8.7s

2011-09-16 11:56:09 (377 KB/s) - `SDL-1.2.13.tar.gz' saved [3373673/3373673]


[root@localhost ffmpeg]#  wget http://downloads.xiph.org/releases/theora/libtheora-1.1.1.zip
--2011-09-16 11:56:16--  http://downloads.xiph.org/releases/theora/libtheora-1.1.1.zip
Resolving downloads.xiph.org... 64.50.233.100, 64.50.236.52
Connecting to downloads.xiph.org|64.50.233.100|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2275495 (2.2M) [application/zip]
Saving to: `libtheora-1.1.1.zip'

100%[=========================================================================>] 2,275,495    785K/s   in 2.8s

2011-09-16 11:56:20 (785 KB/s) - `libtheora-1.1.1.zip' saved [2275495/2275495]


[root@localhost ffmpeg]# wget http://downloads.xvid.org/downloads/xvidcore-1.2.1.tar.gz
--2011-09-16 13:56:29--  http://downloads.xvid.org/downloads/xvidcore-1.2.1.tar.gz
Resolving downloads.xvid.org... 46.4.202.231
Connecting to downloads.xvid.org|46.4.202.231|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 742501 (725K) [application/x-gzip]
Saving to: `xvidcore-1.2.1.tar.gz'

100%[=========================================================================>] 742,501      222K/s   in 3.3s

2011-09-16 13:56:34 (222 KB/s) - `xvidcore-1.2.1.tar.gz' saved [742501/742501]


[root@team4svr ffmpeg]# svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer 
.....
.....


Fetching external item into 'mplayer/libdvdread4'
A    mplayer/libdvdread4/dvd_reader.c
A    mplayer/libdvdread4/nav_read.c
A    mplayer/libdvdread4/nav_print.c
A    mplayer/libdvdread4/bitreader.c
A    mplayer/libdvdread4/bswap.h
A    mplayer/libdvdread4/dvd_input.h
A    mplayer/libdvdread4/md5.c
A    mplayer/libdvdread4/Makefile.am
A    mplayer/libdvdread4/dvdread
A    mplayer/libdvdread4/dvdread/ifo_print.h
A    mplayer/libdvdread4/dvdread/dvd_udf.h
A    mplayer/libdvdread4/dvdread/dvd_reader.h
A    mplayer/libdvdread4/dvdread/nav_read.h
A    mplayer/libdvdread4/dvdread/nav_print.h
A    mplayer/libdvdread4/dvdread/bitreader.h
A    mplayer/libdvdread4/dvdread/ifo_types.h
A    mplayer/libdvdread4/dvdread/ifo_read.h
A    mplayer/libdvdread4/dvdread/nav_types.h
A    mplayer/libdvdread4/ifo_read.c
A    mplayer/libdvdread4/ifo_print.c
A    mplayer/libdvdread4/dvdread_internal.h
A    mplayer/libdvdread4/md5.h
A    mplayer/libdvdread4/dvd_udf.c
A    mplayer/libdvdread4/dvd_input.c
 U   mplayer/libdvdread4
Checked out external at revision 1233.


Fetching external item into 'mplayer/libdvdnav'
A    mplayer/libdvdnav/read_cache.c
A    mplayer/libdvdnav/navigation.c
A    mplayer/libdvdnav/settings.c
A    mplayer/libdvdnav/dvdnav
A    mplayer/libdvdnav/dvdnav/dvd_types.h
A    mplayer/libdvdnav/dvdnav/dvdnav.h
A    mplayer/libdvdnav/dvdnav/dvdnav_events.h
A    mplayer/libdvdnav/vm
A    mplayer/libdvdnav/vm/vm.c
A    mplayer/libdvdnav/vm/decoder.c
A    mplayer/libdvdnav/vm/vmcmd.c
A    mplayer/libdvdnav/vm/vm.h
A    mplayer/libdvdnav/vm/Makefile.am
A    mplayer/libdvdnav/vm/decoder.h
A    mplayer/libdvdnav/vm/vmcmd.h
A    mplayer/libdvdnav/dvdnav.c
A    mplayer/libdvdnav/dvdnav_internal.h
A    mplayer/libdvdnav/read_cache.h
A    mplayer/libdvdnav/searching.c
A    mplayer/libdvdnav/remap.c
A    mplayer/libdvdnav/FELLOWSHIP.map
A    mplayer/libdvdnav/highlight.c
A    mplayer/libdvdnav/Makefile.am
A    mplayer/libdvdnav/README.MAP
A    mplayer/libdvdnav/remap.h
 U   mplayer/libdvdnav
Checked out external at revision 1233.

Checked out revision 34117.


[root@team4svr ffmpeg]# svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg 
....
....
A    ffmpeg/libavformat/bink.c
A    ffmpeg/libavformat/movenc.c
A    ffmpeg/libavformat/mpeg.c
A    ffmpeg/libavformat/ffmetaenc.c
A    ffmpeg/libavformat/pcmdec.c
A    ffmpeg/libavformat/movenc.h
A    ffmpeg/libavformat/mms.c
A    ffmpeg/libavformat/sierravmd.c
A    ffmpeg/libavformat/wc3movie.c
A    ffmpeg/libavformat/mpeg.h
A    ffmpeg/libavformat/sol.c
A    ffmpeg/libavformat/filmstripenc.c
A    ffmpeg/libavformat/rtmppkt.c
A    ffmpeg/libavformat/mms.h
A    ffmpeg/libavformat/psxstr.c
A    ffmpeg/libavformat/vocdec.c
A    ffmpeg/libavformat/mmsh.c
A    ffmpeg/libavformat/iff.c
A    ffmpeg/libavformat/rtmppkt.h
A    ffmpeg/libavformat/dtsdec.c
A    ffmpeg/libavformat/yop.c
A    ffmpeg/libavformat/daud.c
A    ffmpeg/libavformat/flic.c
A    ffmpeg/libavformat/ffmetadec.c
A    ffmpeg/libavformat/filmstripdec.c
A    ffmpeg/libavformat/vorbiscomment.c
A    ffmpeg/libavformat/nutenc.c
A    ffmpeg/libavformat/vorbiscomment.h
A    ffmpeg/libavformat/h264dec.c
A    ffmpeg/libavformat/allformats.c
A    ffmpeg/libavformat/idroqenc.c
A    ffmpeg/libavformat/gif.c
A    ffmpeg/libavformat/framecrcenc.c
A    ffmpeg/libavformat/pcm.c
A    ffmpeg/libavformat/file.c
A    ffmpeg/libavformat/rtpdec_formats.h
A    ffmpeg/libavformat/nutdec.c
A    ffmpeg/libavformat/eacdata.c
A    ffmpeg/libavformat/pcm.h
A    ffmpeg/libavformat/idcin.c
A    ffmpeg/libavformat/rtpenc_vp8.c
A    ffmpeg/libavformat/idroqdec.c
A    ffmpeg/libavformat/aviobuf.c
A    ffmpeg/libavformat/h261dec.c
A    ffmpeg/ffserver.h
A    ffmpeg/MAINTAINERS
A    ffmpeg/COPYING.LGPLv3
 U   ffmpeg
체크아웃된 리비전 26402.



[root@localhost ffmpeg]# ls
essential-20071007      ffmpeg                  lame-398.tar.gz         mplayer
essential-20071007.tar  ffmpeg-php-0.5.0.tbz2   libogg-1.1.3.tar.gz     SDL-1.2.13.tar.gz
faac-1.28.tar.gz        flvtool2_1.0.5_rc6.tgz  libtheora-1.1.1.zip     x264-snapshot-20110914-2245.tar.bz2
faad2-2.7.tar.gz        lame-3.97.tar.gz        libvorbis-1.2.3.tar.gz  yasm-0.8.0.tar.gz
[root@localhost ffmpeg]#


3)  Ruby 설치

[root@localhost ffmpeg]# yum -y install subversion ruby

Loaded plugins: fastestmirror

Loading mirror speeds from cached hostfile

 * base: centos.mirror.cdnetworks.com

 * extras: centos.mirror.cdnetworks.com

 * updates: centos.mirror.cdnetworks.com

Setting up Install Process

Resolving Dependencies

--> Running transaction check

---> Package ruby.i386 0:1.8.5-19.el5_6.1 set to be updated

--> Processing Dependency: ruby-libs = 1.8.5-19.el5_6.1 for package: ruby

--> Processing Dependency: libruby.so.1.8 for package: ruby

---> Package subversion.i386 0:1.6.11-7.el5_6.4 set to be updated

--> Running transaction check

---> Package ruby-libs.i386 0:1.8.5-19.el5_6.1 set to be updated

--> Finished Dependency Resolution


Dependencies Resolved


======================================================================================================

 Package                     Arch                  Version                             Repository             Size

======================================================================================================

Installing:

 ruby                        i386                  1.8.5-19.el5_6.1                    base                  275 k

Updating:

 subversion                  i386                  1.6.11-7.el5_6.4                    base                  3.1 M

Installing for dependencies:

 ruby-libs                   i386                  1.8.5-19.el5_6.1                    base                  1.6 M


Transaction Summary

=====================================================================================================

Install       2 Package(s)

Upgrade       1 Package(s)


Total download size: 5.0 M

Downloading Packages:

(1/3): ruby-1.8.5-19.el5_6.1.i386.rpm                                                       | 275 kB     00:00

(2/3): ruby-libs-1.8.5-19.el5_6.1.i386.rpm                                                  | 1.6 MB     00:00

(3/3): subversion-1.6.11-7.el5_6.4.i386.rpm                                                 | 3.1 MB     00:00

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

Total                                                                              7.8 MB/s | 5.0 MB     00:00

warning: rpmts_HdrFromFdno: Header V3 DSA signature: NOKEY, key ID e8562897

base/gpgkey                                                                                 | 1.5 kB     00:00

Importing GPG key 0xE8562897 "CentOS-5 Key (CentOS 5 Official Signing Key) <centos-5-key@centos.org>" from /etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5

Running rpm_check_debug

Running Transaction Test

Finished Transaction Test

Transaction Test Succeeded

Running Transaction

  Installing     : ruby-libs                                                                                   1/4

  Updating       : subversion                                                                                  2/4

  Installing     : ruby                                                                                        3/4

  Cleanup        : subversion                                                                                  4/4


Installed:

  ruby.i386 0:1.8.5-19.el5_6.1


Dependency Installed:

  ruby-libs.i386 0:1.8.5-19.el5_6.1


Updated:

  subversion.i386 0:1.6.11-7.el5_6.4


Complete!

[root@localhost ffmpeg]#


[root@team4svr ffmpeg]# yum install subversion*
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos.mirror.cdnetworks.com
 * extras: centos.mirror.cdnetworks.com
 * updates: centos.mirror.cdnetworks.com
Setting up Install Process
Package subversion-1.6.11-7.el5_6.4.x86_64 already installed and latest version
Package subversion-1.6.11-7.el5_6.4.i386 already installed and latest version
Resolving Dependencies
--> Running transaction check
---> Package subversion-devel.i386 0:1.6.11-7.el5_6.4 set to be updated
---> Package subversion-devel.x86_64 0:1.6.11-7.el5_6.4 set to be updated
---> Package subversion-javahl.x86_64 0:1.6.11-7.el5_6.4 set to be updated
---> Package subversion-perl.x86_64 0:1.6.11-7.el5_6.4 set to be updated
---> Package subversion-ruby.x86_64 0:1.6.11-7.el5_6.4 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

=====================================================================================================================================================================================================
 Package                                              Arch                                      Version                                                Repository                               Size
=====================================================================================================================================================================================================
Installing:
 subversion-devel                                     i386                                      1.6.11-7.el5_6.4                                       base                                    266 k
 subversion-devel                                     x86_64                                    1.6.11-7.el5_6.4                                       base                                    266 k
 subversion-javahl                                    x86_64                                    1.6.11-7.el5_6.4                                       base                                    179 k
 subversion-perl                                      x86_64                                    1.6.11-7.el5_6.4                                       base                                    1.0 M
 subversion-ruby                                      x86_64                                    1.6.11-7.el5_6.4                                       base                                    516 k

Transaction Summary
=====================================================================================================================================================================================================
Install       5 Package(s)
Upgrade       0 Package(s)

Total download size: 2.2 M
Is this ok [y/N]: Y
Downloading Packages:
(1/5): subversion-javahl-1.6.11-7.el5_6.4.x86_64.rpm                                                                                                                          | 179 kB     00:00     
(2/5): subversion-devel-1.6.11-7.el5_6.4.i386.rpm                                                                                                                             | 266 kB     00:00     
(3/5): subversion-devel-1.6.11-7.el5_6.4.x86_64.rpm                                                                                                                           | 266 kB     00:00     
(4/5): subversion-ruby-1.6.11-7.el5_6.4.x86_64.rpm                                                                                                                            | 516 kB     00:00     
(5/5): subversion-perl-1.6.11-7.el5_6.4.x86_64.rpm                                                                                                                            | 1.0 MB     00:00     
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                                6.0 MB/s | 2.2 MB     00:00     
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : subversion-ruby                                                                                                                                                               1/5 
  Installing     : subversion-perl                                                                                                                                                               2/5 
  Installing     : subversion-javahl                                                                                                                                                             3/5 
  Installing     : subversion-devel                                                                                                                                                              4/5 
  Installing     : subversion-devel                                                                                                                                                              5/5 

Installed:
  subversion-devel.i386 0:1.6.11-7.el5_6.4        subversion-devel.x86_64 0:1.6.11-7.el5_6.4       subversion-javahl.x86_64 0:1.6.11-7.el5_6.4       subversion-perl.x86_64 0:1.6.11-7.el5_6.4      
  subversion-ruby.x86_64 0:1.6.11-7.el5_6.4      

Complete!


[root@localhost ffmpeg]# yum install ncurses-devel*
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos.tt.co.kr
 * extras: centos.tt.co.kr
 * updates: centos.tt.co.kr
Setting up Install Process
Package ncurses-devel-5.5-24.20060715.i386 already installed and latest version
Nothing to do <--- 이미 있군요. ^^;


4)  이제 다운 받은 것들을 설치해 보고... 

filename.tar.bz2 일 경우 우선 bunzip2로 압축을 해제한다.
ex) bunzip2 essential-20071007.tar.bz2

filename.tar일 경우 tar vfx 옵션으로 해제한다.
ex)  tar xvf filename.tar 

filename.tgz or filename.tar.gz 일 경우 tar vfxz 옵션으로 해제한다.
ex)  tar xvfz filename.tar.gz 

filename.zip일 경우 unzip 으로 해제한다.
ex) unzip  filename.zip


[root@team4svr ffmpeg]# bunzip2 essential-20071007.tar.bz2
[root@team4svr ffmpeg]# tar xvf essential-20071007.tar 
essential-20071007/
essential-20071007/wvc1dmod.dll
essential-20071007/vp7vfw.dll
essential-20071007/vsshdsd.dll
essential-20071007/README
essential-20071007/tvqdec.dll
...
...
[root@localhost ffmpeg]# mkdir /usr/local/lib/codecs/
[root@localhost ffmpeg]# mv essential-20071007/* /usr/local/lib/codecs/
[root@localhost ffmpeg]# chmod -R 755 /usr/local/lib/codecs/


 

[root@localhost ffmpeg]# tar xvfz libogg-1.1.3.tar.gz
[root@localhost ffmpeg]# cd libogg-1.1.3
[root@localhost libogg-1.1.3]# ./configure
[root@localhost libogg-1.1.3]# make; make install

 

[root@localhost ffmpeg]# tar xvfz lame-398.tar.gz
....
[root@localhost ffmpeg]# cd lame-398
[root@localhost lame-398]# ./configure
..... 

[root@localhost lame-398]# make; make install



[root@localhost ffmpeg]# tar xvfz SDL-1.2.13.tar.gz
[root@localhost ffmpeg]# cd SDL-1.2.13
[root@localhost SDL-1.2.13]# ./configure
[root@localhost SDL-1.2.13]# make; make install 


[root@localhost ffmpeg]# tar xvfz faac-1.28.tar.gz
[root@localhost ffmpeg]# cd faac-1.28
[root@localhost faac-1.28]# ./configure
[root@localhost 
faac-1.28]# make; make install  


[root@localhost ffmpeg]# tar xvfz faad2-2.7.tar.gz
....
[root@localhost ffmpeg]# cd 
faad2-2.7
[root@localhost faad2-2.7]# ./configure
....
[root@localhost 
faad2-2.7]# make; make install  


[root@localhost ffmpeg]# unzip libtheora-1.1.1.zip
[root@localhost ffmpeg]# cd libtheora-1.1.1
[root@localhost libtheora-1.1.1]# ./configure
[root@localhost 
libtheora-1.1.1]# make; make install  


[root@localhost ffmpeg]# tar xvfz libvorbis-1.2.3.tar.gz
[root@localhost ffmpeg]# cd libvorbis-1.2.3
[root@localhost libvorbis-1.2.3]# ./configure 
[root@localhost libvorbis-1.2.3]# make; make install


[root@localhost ffmpeg]# tar xvfz yasm-0.8.0.tar.gz

[root@localhost ffmpeg]# cd yasm-0.8.0
[root@localhost yasm-0.8.0]# ./configure
[root@localhost yasm-0.8.0]# make; make install


[root@localhost ffmpeg]# tar xvfz flvtool2-1.0.6.tgz
flvtool2-1.0.6/
flvtool2-1.0.6/bin/
flvtool2-1.0.6/bin/._flvtool2
flvtool2-1.0.6/bin/flvtool2
flvtool2-1.0.6/._CHANGELOG
flvtool2-1.0.6/CHANGELOG
flvtool2-1.0.6/examples/
flvtool2-1.0.6/examples/tags.xml
flvtool2-1.0.6/._flvtool2.exy
flvtool2-1.0.6/flvtool2.exy
flvtool2-1.0.6/lib/
flvtool2-1.0.6/lib/flv/
flvtool2-1.0.6/lib/flv/._amf_string_buffer.rb
flvtool2-1.0.6/lib/flv/amf_string_buffer.rb
flvtool2-1.0.6/lib/flv/._audio_tag.rb
flvtool2-1.0.6/lib/flv/audio_tag.rb
flvtool2-1.0.6/lib/flv/._core_extensions.rb
flvtool2-1.0.6/lib/flv/core_extensions.rb
flvtool2-1.0.6/lib/flv/._meta_tag.rb
flvtool2-1.0.6/lib/flv/meta_tag.rb
flvtool2-1.0.6/lib/flv/._stream.rb
flvtool2-1.0.6/lib/flv/stream.rb
flvtool2-1.0.6/lib/flv/._tag.rb
flvtool2-1.0.6/lib/flv/tag.rb
flvtool2-1.0.6/lib/flv/._video_tag.rb
flvtool2-1.0.6/lib/flv/video_tag.rb
flvtool2-1.0.6/lib/._flv.rb
flvtool2-1.0.6/lib/flv.rb
flvtool2-1.0.6/lib/flvtool2/
flvtool2-1.0.6/lib/flvtool2/._base.rb
flvtool2-1.0.6/lib/flvtool2/base.rb
flvtool2-1.0.6/lib/flvtool2/._version.rb
flvtool2-1.0.6/lib/flvtool2/version.rb
flvtool2-1.0.6/lib/._flvtool2.rb
flvtool2-1.0.6/lib/flvtool2.rb
flvtool2-1.0.6/lib/._mixml.rb
flvtool2-1.0.6/lib/mixml.rb
flvtool2-1.0.6/lib/._miyaml.rb
flvtool2-1.0.6/lib/miyaml.rb
flvtool2-1.0.6/LICENSE
flvtool2-1.0.6/._Rakefile
flvtool2-1.0.6/Rakefile
flvtool2-1.0.6/._README
flvtool2-1.0.6/README
flvtool2-1.0.6/._setup.rb
flvtool2-1.0.6/setup.rb
[root@localhost ffmpeg]# cd  flvtool2-1.0.6
[root@localhost flvtool2-1.0.6]# ruby setup.rb config
---> bin
<--- bin
---> lib
---> lib/flvtool2
<--- lib/flvtool2
---> lib/flv
<--- lib/flv
<--- lib
[root@localhost flvtool2-1.0.6]# ruby setup.rb setup
---> bin
updating shebang: flvtool2
<--- bin
---> lib
---> lib/flvtool2
<--- lib/flvtool2
---> lib/flv
<--- lib/flv
<--- lib
[root@localhost flvtool2-1.0.6]# ruby setup.rb install
rm -f InstalledFiles
---> bin
mkdir -p /usr/bin
install flvtool2 /usr/bin/
<--- bin
---> lib
mkdir -p /usr/lib/ruby/site_ruby/1.8
install flv.rb /usr/lib/ruby/site_ruby/1.8/
install mixml.rb /usr/lib/ruby/site_ruby/1.8/
install flvtool2.rb /usr/lib/ruby/site_ruby/1.8/
install miyaml.rb /usr/lib/ruby/site_ruby/1.8/
---> lib/flvtool2
mkdir -p /usr/lib/ruby/site_ruby/1.8/flvtool2
install version.rb /usr/lib/ruby/site_ruby/1.8/flvtool2
install base.rb /usr/lib/ruby/site_ruby/1.8/flvtool2
<--- lib/flvtool2
---> lib/flv
mkdir -p /usr/lib/ruby/site_ruby/1.8/flv
install meta_tag.rb /usr/lib/ruby/site_ruby/1.8/flv
install audio_tag.rb /usr/lib/ruby/site_ruby/1.8/flv
install stream.rb /usr/lib/ruby/site_ruby/1.8/flv
install video_tag.rb /usr/lib/ruby/site_ruby/1.8/flv
install amf_string_buffer.rb /usr/lib/ruby/site_ruby/1.8/flv
install tag.rb /usr/lib/ruby/site_ruby/1.8/flv
install core_extensions.rb /usr/lib/ruby/site_ruby/1.8/flv
<--- lib/flv
<--- lib
[root@localhost flvtool2-1.0.6]#

[root@localhost ffmpeg]# tar xvfz xvidcore-1.2.1.tar.gz
[root@localhost ffmpeg]# cd xvidcore/build/generic/
[root@localhost generic]# ./configure
[root@localhost generic]# make; make install 


[root@localhost ffmpeg]# bunzip2 x264-snapshot-20110914-2245.tar.bz2
[root@localhost ffmpeg]# tar xvf x264-snapshot-20110914-2245.tar
[root@localhost ffmpeg]# cd x264-snapshot-20110914-2245
[root@localhost x264-snapshot-20110914-2245]# ./configure --enable-shared
./version.sh: line 2: git: command not found  <--- Git가 없다고 투덜거려 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:        no
visualize:  no
bit depth:  8

You can run 'make' or 'make fprofiled' now.
[root@localhost x264-snapshot-20110914-2245]# ./configure --enable-shared
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:        no
visualize:  no
bit depth:  8

You can run 'make' or 'make fprofiled' now. 
[root@localhost x264-snapshot-20110914-2245]# make; make install;

[root@localhost mplayer]# cd ~/ffmpeg/ffmpeg
[root@localhost ffmpeg]# ./configure --enable-static --enable-shared --enable-gpl --enable-postproc --enable-pthreads --enable-libfaac --enable-libmp3lame --enable-libx264 --disable-ffserver --disable-ffplay --disable-debug --disable-network --enable-nonfree --enable-avfilter --disable-devices --enable-avfilter --enable-runtime-cpudetect --enable-libtheora --enable-libvorbis --enable-libxvid  --enable-nonfree --enable-postproc --enable-x11grab
......
......
[root@localhost ffmpeg]# make
......
[root@localhost ffmpeg]# make install


[root@localhost ffmpeg]# cd mplayer

[root@localhost mplayer]# ./configure
....
....
[root@localhost mplayer]# make; make install 


5) 라이브러리는 폴더를 등록해서 설치해 주고...

[root@localhost ffmpeg]# vi /etc/ld.so.conf
include ld.so.conf.d/*.conf
include /usr/local/iconv

/usr/local/lib <---- 이거 추가
~
~
~
[root@localhost ffmpeg]# ldconfig


6)  모든 설치가 끝났으면 실행~ 

[root@localhost ffmpeg]# ./ffmpeg
FFmpeg version SVN-r26402, Copyright (c) 2000-2011 the FFmpeg developers
  built on Sep 15 2011 13:45:22 with gcc 4.1.2 20080704 (Red Hat 4.1.2-51)
  configuration: --enable-static --enable-shared --enable-gpl --enable-postproc --enable-pthreads --enable-libfaac --enable-libmp3lame --enable-libx264 --disable-ffserver --disable-ffplay --disable-debug --disable-network --enable-nonfree --enable-avfilter --disable-devices --enable-avfilter --enable-runtime-cpudetect --enable-libtheora --enable-libvorbis --enable-libxvid --enable-nonfree --enable-postproc --enable-x11grab
  libavutil     50.36. 0 / 50.36. 0
  libavcore      0.16. 1 /  0.16. 1
  libavcodec    52.108. 0 / 52.108. 0
  libavformat   52.93. 0 / 52.93. 0
  libavdevice   52. 2. 3 / 52. 2. 3
  libavfilter    1.74. 0 /  1.74. 0
  libswscale     0.12. 0 /  0.12. 0
  libpostproc   51. 2. 0 / 51. 2. 0
Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

Use -h to get full help or, even better, run 'man ffmpeg'
[root@team4svr localhost]#



7)  실제 인코딩~

[root@localhost test] ffmpeg -i 640x480.wmv -y -s 640x360 -acodec libfaac -ar 32000 -ab 48000 -ac 2 -f flv -vcodec flv -b 700k tranc640x360.flv 
....
[root@localhost test] ffmpeg -i 640x480.wmv -y -threads 4-s 640x360 -acodec libfaac -ar 32000 -ab 48000 -ac 2 -f mp4 -vcodec libx264 -vpre fast -b 1000k -g 30 -bf 2 -b_strategy 1 tranc640x360.mp4

[root@localhost test] ffmpeg -i 640x480.wmv -y -threads 4-s 640x360 -acodec libfaac -ar 32000 -ab 48000 -ac 2 -f mp4 -vcodec mpeg4 -b 1000k  tranc640x360.mp4 

인코딩 참고 사이트 : http://ospace.tistory.com/125http://xmlangel2.blogspot.com/2010/04/ffmpeg-%EA%B8%B0%EB%B3%B8-%EC%82%AC%EC%9A%A9%EB%B2%95.htmlhttp://ffmpeg.org/ffmpeg-doc.html


끝....

뱀발 ) 쓸데없이 너무 많이 설치 한 것 같기도 하고...  실시간 인코딩은 어려울 것 같기도 하고... 뭐가 뭔지 잘 모르기도 하고...
참고 사이트 )  http://blog.naver.com/humor1004/120048954163http://hojae.com/xe/?document_srl=328