15대 16대 대통령 추모 배너

'mencoder'에 해당되는 글 2건

  1. 2009/03/11 Mencoder Shell Script와 라이브러리 추가 (2)
  2. 2009/03/10 리눅스(Ubuntu)에 FFmpeg와 MPlayer 설치하기 (1)
Developer/Video Encoding2009/03/11 15:10

Mencoder 설치 후 H.264 인코딩을 위해 구글에 공개된 podencoder 스크립트를 사용했습니다.

이 스크립트를 이용하기 위해 몇 가지 라이브러리를 추가로 설치해야 했습니다.

 

파일다운로드

wget http://downloads.sourceforge.net/faac/faac-1.28.tar.gz

wget ftp://ftp.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20090310-2245.tar.bz2

wget http://downloads.sourceforge.net/gpac/gpac-0.4.5.tar.gz

 

다운로드 된 파일의 압축을 풀어줍니다.

 

faac 설치

http://sourceforge.net/projects/faac/

./configure && make && make install

 

x264 설치

http://www.videolan.org/developers/x264.html

git 을 이용해 다운로드 할 수 있고 매일 업데이트되는 Tarball을 받을 수 있습니다.

 

다운로드 된 디렉토리에서 컴파일 후 설치합니다.

./configure && make && make install

 

MP4Box 설치

http://gpac.sf.net/

configure 에 실행권한을 적용하고 설치합니다.

chmod 755 configure

./configure && make && make install

 

Mencoder 설치

설치된 faac와 x264 라이브러리를 추가한 후 설치합니다.

./configure –-enable-jpeg –-enable-faad –-enable-faac-lavc –-enable-x264-lavc

make && make install

이올린에 북마크하기(0) 이올린에 추천하기(0)
Posted by 슈팅스타337
Developer/Video Encoding2009/03/10 13:55

This howto is written for Ubuntu 8.10 and is verified to work on 8.2.2009.

 

I found numerous tutorials on this subject out there but they all failed me, but combination of them all was successful. So fallowing is made from 10 different tutorials.

And for all those who will ask why not just apt-get php5-ffmpeg, answer is so we can configure ffmpeg with libs and options we need.

 

 

준비

apt-get update
apt-get upgrade
apt-get install libjpeg-progs libjpeg62 libjpeg62-dev libsdl1.2-dev php5-dev php5-cli php5-gd build-essential unzip

 

파일 다운로드

cd /usr/local/src

wget http://www3.mplayerhq.hu/MPlayer/releases/codecs/essential-20071007.tar.bz2  

wget http://rubyforge.org/frs/download.php/17497/flvtool2-1.0.6.tgz  

wget http://easynews.dl.sourceforge.net/sourceforge/lame/lame-3.97.tar.gz  

wget http://superb-west.dl.sourceforge.net/sourceforge/ffmpeg-php/ffmpeg-php-0.6.0.tbz2  

wget http://downloads.xiph.org/releases/ogg/libogg-1.1.3.tar.gz  

wget http://downloads.xiph.org/releases/vorbis/libvorbis-1.2.0.tar.gz  

wget http://ftp.penguin.cz/pub/users/utx/amr/amrnb-7.0.0.2.tar.bz2  

wget http://ftp.penguin.cz/pub/users/utx/amr/amrwb-7.0.0.3.tar.bz2  

wget http://downloads.xiph.org/releases/theora/libtheora-1.0beta3.tar.gz

 

압축해제

tar zxvf lame-3.97.tar.gz  

tar zxvf libogg-1.1.3.tar.gz  

tar zxvf libvorbis-1.2.0.tar.gz  

tar zxvf flvtool2-1.0.6.tgz  

tar jxvf essential-20071007.tar.bz2  

tar jxvf ffmpeg-php-0.6.0.tbz2  

bzip2 -cd amrnb-7.0.0.2.tar.bz2 | tar xvf -  

bzip2 -cd amrwb-7.0.0.3.tar.bz2 | tar xvf -  

tar zxvf libtheora-1.0beta3.tar.gz 

 

Ruby on Rails, Subversion & ncurses 설치

apt-get install subversion ruby libcurses-ruby

 

Mplayer, FFmpeg 다운로드

저장소에서 체크아웃 받은 후 최신버전으로 업데이트합니다.

svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg  

svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer  

cd /usr/local/src/mplayer  

svn update

 

코덱 복사

mkdir /usr/local/lib/codecs  

mv /usr/local/src/essential-20071007/* /usr/local/lib/codecs/  

chmod -R 755 /usr/local/lib/codecs/ 

 

임시 디렉토리(TMP) 생성

mkdir /usr/local/src/tmp  

chmod 777 /usr/local/src/tmp  

export TMPDIR=/usr/local/src/tmp

 

라이브러리 설치

각 디렉토리에서 컴파일 후 설치합니다.

./configure && make && make install

  1. lamemp3 설치
  2. libogg 설치
  3. libvorbis 설치
  4. AMR 설치
  5. libtheora 설치

 

flvtool2 설치

cd /usr/local/src/flvtool2-1.0.6/  

ruby setup.rb config  

ruby setup.rb setup  

ruby setup.rb install 

 

Mplayer & Mencoder 설치

{주의} H.264 인코딩 시 x264 라이브러리를 설치한 후 추가해야 합니다. : Mencoder Shell Script와 라이브러리 추가

cd /usr/local/src/mplayer

./configure --enable-jpeg

make && make install

 

FFmpeg 설치

cd /usr/local/src/ffmpeg/  

./configure --enable-libmp3lame --enable-libvorbis --disable-mmx --enable-shared --enable-libamr-nb --enable-libamr-wb --enable-nonfree --enable-libtheora  

make  

make install

 

{주의} 설치도중 라이브러리를 찾을 수 없는 에러가 발생할 수 있습니다. 이 경우 심볼릭 링크를 통해 라이브러리 경로를 지정해 줍니다.

ln -s /usr/local/lib/[YOUR LIB NAME] /usr/lib/[YOUR LIB NAME]

 

FFmpeg-php 설치

cd /usr/local/src/ffmpeg-php-0.6.0/  

phpize  

./configure --with-ffmpeg=/usr/local/ffmpeg  

make  

make install 

 

php.ini 에 모듈을 추가한 후 웹 서버를 다시 시작합니다.

echo 'extension=ffmpeg.so' >> /etc/php5/apache2/php.ini  

/etc/init.d/apache2 restart

 

 

 

 

원문 : http://www.hazaah.com/ubuntu/how-to-ffmpeg-ffmpeg-php-lame-libogg-libvorbis-flvtool2-mplayer-mencoder-amr/

이올린에 북마크하기(0) 이올린에 추천하기(0)
Posted by 슈팅스타337