Home > Tags > 携帯動画

携帯動画

FFmpegで携帯動画をキャリア間相互変換する

【準備】

[root@centos ~]# yum install gcc gcc-c++ automake libtool

【FAAC】

[root@centos ~]# tar xzvf faac-1.26.tar.gz
[root@centos ~]# cd faac
[root@centos ~]# sh bootstrap
[root@centos ~]# ./configure
[root@centos ~]# make
[root@centos ~]# make install

【FAAD2】

[root@centos ~]# tar xzvf faad2-2.7.tar.gz
[root@centos ~]# cd faad2-2.7
[root@centos ~]# sh bootstrap
[root@centos ~]# ./configure
[root@centos ~]# make
[root@centos ~]# make install

【AMR-NB】

[root@centos ~]# tar jxvf amrnb-7.0.0.2.tar.bz2
[root@centos ~]# cd amrnb-7.0.0.2
[root@centos ~]# ./configure
[root@centos ~]# make
[root@centos ~]# make install

【AMR-WB】

[root@centos ~]# tar jxvf amrwb-7.0.0.3.tar.bz2
[root@centos ~]# cd amrwb-7.0.0.3
[root@centos ~]# ./configure
[root@centos ~]# make
[root@centos ~]# make install

【A-52】

[root@centos ~]# tar xzvf a52dec-0.7.4.tar.gz
[root@centos ~]# cd a52dec-0.7.4
[root@centos ~]# ./configure
[root@centos ~]# make
[root@centos ~]# make install

【LAME】

[root@centos ~]# tar xzvf lame-398-2.tar.gz
[root@centos ~]# cd lame-398-2
[root@centos ~]# ./configure
[root@centos ~]# make
[root@centos ~]# make install

【Xvid】

[root@centos ~]# tar xzvf xvidcore-1.2.1.tar.gz
[root@centos ~]# cd xvidcore/build/generic
[root@centos ~]# ./configure
[root@centos ~]# make
[root@centos ~]# make install

【x264】

[root@centos ~]# yum -y install nasm yasm
(x264をコンパイルするための準備)

[root@centos ~]# tar jxvf x264-snapshot-20090226-2245.tar.bz2
[root@centos ~]# cd x264-snapshot-20090226-2245
[root@centos ~]# ./configure  --enable-pthread --enable-shared
[root@centos ~]# make
[root@centos ~]# make install

【FFmpeg】

[root@centos ~]# svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk ffmpeg
[root@centos ~]# cd ffmpeg
[root@centos ~]# ./configure --enable-libamr-nb --enable-libamr-wb --enable-libxvid --disable-ffplay --disable-ffserver --enable-libmp3lame --enable-libfaad --enable-libfaac --enable-libx264 --enable-gpl --enable-nonfree --enable-shared
[root@centos ~]# make
[root@centos ~]# make install

【AMR系のライブラリをロードするように設定】

[root@centos ~]# vi /etc/ld.so.conf.d/ffmpeg.conf
/usr/local/lib
[root@centos ~]# ldconfig

【MP4Box】

[root@centos ~]# yum install zlib-devel libX11-devel libXt-devel
[root@centos ~]# tar xzvf gpac-0.4.5.tar.gz
[root@centos ~]# cd gpac
[root@centos ~]# chmod 544 configure
[root@centos ~]# ./configure --disable-wx
[root@centos ~]# make lib
[root@centos ~]# make apps
[root@centos ~]# make install

【Ruby】

[root@centos ~]# yum install ruby ruby-devel ruby-irb ruby-libs ruby-rdoc ruby-ri

[root@centos ~]# cp atomChange.rb /usr/bin/

【ffmpeg-php】*1

[root@centos ~]# yum install php-devel
(ffmpeg-phpをコンパイルするための準備)

[root@centos ~]# tar jxvf ffmpeg-php-0.6.0.tbz2
[root@centos ~]# cd ffmpeg-php-0.6.0
[root@centos ~]# phpize
[root@centos ~]# ./configure
[root@centos ~]# make
[root@centos ~]# make install

※上記の方法でもバージョン違いにより上手く行かない事があるかもしれません。私は成功時のファイルを全て保存しているので、再構築時にはそれらを使用しています。コーデックのバージョンによりffmpegのmakeに失敗したり、正しくコーデックが使用できなかったりしたため苦肉の策なのです。本当はヘタレなだけ・・・

*1)09/03/24現在、上記の方法でffmpeg-phpをインストールするとmakeでerrorが出ます。原因はffmpegのリビジョン違いによるものと思われ、個人的な解決策としては・・・上記の方法で成功した時のffmpegが保存してあるので、それを再使用して回避しています^^;

Home > Tags > 携帯動画

Ads
Tag Cloud
Feeds
Counter

Return to page top