亚洲免费在线-亚洲免费在线播放-亚洲免费在线观看-亚洲免费在线观看视频-亚洲免费在线看-亚洲免费在线视频

ffmpeg2.2.3編譯安裝

系統 2075 0

參考文檔:http://blog.chinaunix.net/uid-23069658-id-4018842.html

下載所需解碼器:

lame:wget http://nchc.dl.sourceforge.net/project/lame/lame/3.99/lame-3.99.5.tar.gz

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

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

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

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

libtheora:wget http://downloads.xiph.org/releases/theora/libtheora-1.1.1.tar.xz

vo-aacenc:wget http://mirrors.oschina.net/ubuntu/pool/universe/v/vo-aacenc/vo-aacenc_0.1.3.orig.tar.gz

xvid-core1.3.3:wget http://downloads.xvid.org/downloads/xvidcore-1.3.3.tar.gz

yasm1.2.0:wget http://www.tortall.net/projects/yasm/releases/yasm-1.2.0.tar.gz

x264:wget ftp://ftp.videolan.org/pub/x264/snapshots/last_x264.tar.bz2

libraw1394:wget http://ncu.dl.sourceforge.net/project/libraw1394/libraw1394/libraw1394-2.0.5.tar.gz

libdc1394:wget http://ncu.dl.sourceforge.net/project/libdc1394/libdc1394-2/2.2.1/libdc1394-2.2.1.tar.gz

fribidi:wget wget http://fribidi.org/download/fribidi-0.19.6.tar.bz2

fontconfig:wget http://www.freedesktop.org/software/fontconfig/release/fontconfig-2.11.1.tar.gz

libass:wget https://libass.googlecode.com/files/libass-0.10.2.tar.xz

librtmp:wget http://rtmpdump.mplayerhq.hu/download/rtmpdump-2.3.tgz

speex:wget http://downloads.xiph.org/releases/speex/speex-1.2rc1.tar.gz

twolame:wget http://downloads.sourceforge.net/twolame/twolame-0.3.13.tar.gz

libdts:wget http://down1.chinaunix.net/distfiles/libdts-0.0.2.tar.gz

a52:wget http://liba52.sourceforge.net/files/a52dec-0.7.4.tar.gz

fdk-aac:wget http://superb-dca3.dl.sourceforge.net/project/opencore-amr/fdk-aac/fdk-aac-0.1.3.tar.gz

opencore-amr:wget http://hivelocity.dl.sourceforge.net/project/opencore-amr/opencore-amr/opencore-amr-0.1.3.tar.gz

ffmpeg 2.2.3:wget http://ffmpeg.org/releases/ffmpeg-2.2.3.tar.gz


配置PKG CONFIG路徑,主要是安裝libass時會出現
Package libass was not found in the pkg-config search path.
Perhaps you should add the directory containing `libass.pc'
to the PKG_CONFIG_PATH environment variable
的錯誤。

[root@localhost ffmpeg]#vi /etc/profile
添加下面幾行:

PKG_CONFIG=/usr/bin/pkg-config
PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE HISTCONTROL JAVA_HOME JRE_HOME CLASSPATH PKG_CONFIG PKG_CONFIG_PATH #注:后面兩個變量是新添加的

保存退出。
[root@localhost ffmpeg]#source /etc/profile
[root@localhost ffmpeg]#cd faac-1.28
[root@localhost ffmpeg]#./bootstrap
[root@localhost ffmpeg]#./configure --prefix=/usr/local/ --enable-shared
[root@localhost ffmpeg]#make && make install

出現錯誤: g++: not found
解決方法:yum install gcc+ gcc-c++
make
出現錯誤:mpeg4ip.h:126: error: new declaration ‘char* strcasestr(const char*, const char*)’
解決方法:vim faac-1.28/common/mp4v2/mpeg4ip.h

從123行開始修改此文件mpeg4ip.h,到129行結束。
修改前:
#ifdef __cplusplus
extern "C" {
#endif
char *strcasestr(const char *haystack, const char *needle);
#ifdef __cplusplus
}
#endif

修改后:
#ifdef __cplusplus
extern "C++" {
#endif
const char *strcasestr(const char *haystack, const char *needle);
#ifdef __cplusplus
}
#endif
接著安裝

[root@localhost ffmpeg]#make && make install
[root@localhost ffmpeg]#cd ..

[root@localhost ffmpeg]#cd lame-3.99.5
[root@localhost ffmpeg]#./configure --prefix=/usr/local/ --enable-shared
[root@localhost ffmpeg]#make && make install
[root@localhost ffmpeg]#cd ..

[root@localhost ffmpeg]#cd libogg-1.3.2
[root@localhost ffmpeg]#./configure --prefix=/usr/local/ --enable-shared
[root@localhost ffmpeg]#make && make install
[root@localhost ffmpeg]#cd ..

[root@localhost ffmpeg]#cd libtheora-1.1.1
[root@localhost ffmpeg]#./configure --prefix=/usr/local/ --enable-shared

*** Could not run Ogg test program, checking why...
*** The test program compiled, but did not run. This usually means
*** that the run-time linker is not finding Ogg or finding the wrong
*** version of Ogg. If it is not finding Ogg, you'll need to set your
*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point
*** to the installed location? Also, make sure you have run ldconfig if that
*** is required on your system
***
*** If you have an old version installed, it is best to remove it, although
*** you may also be able to get things to work by modifying LD_LIBRARY_PATH
configure: error:
??? libogg is required to build this package!
??? please see http://www.xiph.org/ for how to
??? obtain a copy.
?? ?
明明安裝了ogg但theora卻認為咱們沒安裝。原因在哪里,當然是動態庫的查找路徑了,
我的解決辦法是在 /etc/ld.so.conf.d/目錄下創建一個名為local-libraries.conf的文件,內容很簡單,只有一行:
/usr/local/lib

然后執行ldconfig -v?? ?
[root@localhost ffmpeg]#./configure --prefix=/usr/local/ --enable-shared
[root@localhost ffmpeg]#make && make install
[root@localhost ffmpeg]#cd ..

[root@localhost ffmpeg]#cd libvorbis-1.3.4
[root@localhost ffmpeg]#./configure --prefix=/usr/local/ --enable-shared
[root@localhost ffmpeg]#make && make install
[root@localhost ffmpeg]#cd ..

[root@localhost ffmpeg]#cd vo-aacenc-0.1.3
[root@localhost ffmpeg]#./configure --prefix=/usr/local/ --enable-shared
[root@localhost ffmpeg]#make && make install
[root@localhost ffmpeg]#cd ..

[root@localhost ffmpeg]#cd xvidcore-1.3.3/build/generic
[root@localhost ffmpeg]#./configure --prefix=/usr/local/
[root@localhost ffmpeg]#make && make install
[root@localhost ffmpeg]#cd ../../../

[root@localhost ffmpeg]#cd yasm-1.2.0
[root@localhost ffmpeg]#./configure --prefix=/usr/local/
[root@localhost ffmpeg]#make && make install
[root@localhost ffmpeg]#cd ..

[root@localhost ffmpeg]#cd x264-snapshot-20140618-2245
[root@localhost ffmpeg]#./configure --prefix=/usr/local/ --enable-shared --enable-pic
[root@localhost ffmpeg]#make && make install
[root@localhost ffmpeg]#cd ..

[root@localhost ffmpeg]#cd libraw1394-2.0.5
[root@localhost ffmpeg]#./configure --prefix=/usr/local/ --enable-shared
[root@localhost ffmpeg]#make && make install
[root@localhost ffmpeg]#cd ..

[root@localhost ffmpeg]#cd libdc1394-2.2.1
[root@localhost ffmpeg]#./configure --prefix=/usr/local/ --enable-shared
[root@localhost ffmpeg]#make && make install
[root@localhost ffmpeg]#cd ..

[root@localhost ffmpeg]#cd libfreetype2-master
[root@localhost ffmpeg]#./configure --prefix=/usr/local/ --enable-shared
[root@localhost ffmpeg]#make && make install
[root@localhost ffmpeg]#cd ..

[root@localhost ffmpeg]#cd fribidi-0.19.6
[root@localhost ffmpeg]#make && make install
[root@localhost ffmpeg]#cd ..

[root@localhost ffmpeg]#cd fontconfig-2.11.1
[root@localhost ffmpeg]#./configure --prefix=/usr/local/ --enable-shared --enable-libxml2
[root@localhost ffmpeg]#make && make install
[root@localhost ffmpeg]#cd ..

[root@localhost ffmpeg]#cd libass-0.10.2
[root@localhost ffmpeg]#./configure --prefix=/usr/local/ --enable-shared
[root@localhost ffmpeg]#make && make install

如果出現下面的錯誤:
../libass/.libs/libass.so: undefined reference to `libiconv'
../libass/.libs/libass.so: undefined reference to `libiconv_close'
../libass/.libs/libass.so: undefined reference to `libiconv_open'
collect2: ld returned 1 exit status
make[2]: *** [test] Error 1
make[2]: Leaving directory `/root/tools/ffmpeg/libass-0.10.2/test'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/root/tools/ffmpeg/libass-0.10.2'
make: *** [all] Error 2

執行下面的配置命令
[root@localhost ffmpeg]#PKG_CONFIG_PATH=/usr/local/lib/pkgconfig/ ./configure --prefix=/usr/local/ --enable-shared
[root@localhost ffmpeg]#make && make install
[root@localhost ffmpeg]#cd ..

[root@localhost ffmpeg]#cd rtmpdump-2.3
[root@localhost ffmpeg]#make SYS=posix
[root@localhost ffmpeg]#make install
[root@localhost ffmpeg]#cd ..

[root@localhost ffmpeg]#cd speex-1.2rc1
[root@localhost ffmpeg]#./configure --prefix=/usr/local/ --enable-shared --enable-sse
[root@localhost ffmpeg]#make && make install
[root@localhost ffmpeg]#cd ..

[root@localhost ffmpeg]#cd twolame-0.3.13
[root@localhost ffmpeg]#./configure --prefix=/usr/local/ --enable-shared
[root@localhost ffmpeg]#make && make install
[root@localhost ffmpeg]#cd ..

[root@localhost ffmpeg]#cd libdts-0.0.2
[root@localhost ffmpeg]#./configure --prefix=/usr/local --enable-shared
[root@localhost ffmpeg]#make && make install
[root@localhost ffmpeg]#cd ..

[root@localhost ffmpeg]#cd a52dec-0.7.4
[root@localhost ffmpeg]#./configure --prefix=/usr/local
[root@localhost ffmpeg]#make && make install
[root@localhost ffmpeg]#cd ..

[root@localhost ffmpeg]#cd faad2-2.7
[root@localhost ffmpeg]#./configure --prefix=/usr/local --with-mp4v2 --enable-shared
[root@localhost ffmpeg]#make && make install
[root@localhost ffmpeg]#cd ..

[root@localhost ffmpeg]#cd amrwb-11.0.0.0
[root@localhost ffmpeg]#./configure --prefix=/usr/local --enable-shared

如果配置時出現:configure: error: You need patch utility to prepare sources.
執行下面命令
yum -y install patch
然后重新執行
./configure --prefix=/usr/local --enable-shared
[root@localhost ffmpeg]#make && make install
[root@localhost ffmpeg]#cd ..

[root@localhost ffmpeg]#cd amrnb-11.0.0.0
[root@localhost ffmpeg]#./configure --prefix=/usr/local --enable-shared
[root@localhost ffmpeg]#make && make install
[root@localhost ffmpeg]#cd ..

[root@localhost ffmpeg]#cd opencore-amr-0.1.3
[root@localhost ffmpeg]#./configure --prefix=/usr/local/ --enable-shared
[root@localhost ffmpeg]# make && make install
[root@localhost ffmpeg]#cd ..

[root@localhost ffmpeg]#cd fdk-aac-0.1.3
[root@localhost ffmpeg]#./configure --prefix=/usr/local/ --enable-shared
[root@localhost ffmpeg]#make && make install
[root@localhost ffmpeg]#cd ..

[root@localhost ffmpeg]#cd ffmpeg-2.2.3
[root@localhost ffmpeg]#LD_LIBRARY_PATH=/usr/local/include
[root@localhost ffmpeg]#./configure --prefix=/usr/local/ --enable-gpl --enable-version3 --enable-nonfree \
--enable-shared --enable-zlib --enable-bzlib --enable-libfaac --enable-libmp3lame \
--enable-libtheora --enable-libvo-aacenc? --enable-libvorbis --enable-libx264 \
--enable-libxvid --enable-pthreads --enable-libdc1394 --enable-libass --enable-pic \
--enable-openssl --enable-libtwolame --enable-libspeex --enable-librtmp --enable-libfreetype \
--enable-libopencore-amrnb --enable-libopencore-amrwb? --enable-avisynth --enable-fontconfig \
--enable-libfdk-aac --enable-rpath --extra-cflags=-I/usr/local/include --extra-ldflags=-L/usr/local/lib --extra-libs=-liconv

--extra-libs=-liconv是在出現找不到libiconv庫錯誤時加上去的

[root@localhost ffmpeg]#make && make install

所需包可以到這里下載http://www.kuaipan.cn/file/id_157354068283490498.htm

ffmpeg2.2.3編譯安裝


更多文章、技術交流、商務合作、聯系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號聯系: 360901061

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點擊下面給點支持吧,站長非常感激您!手機微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對您有幫助就好】

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長會非常 感謝您的哦?。?!

發表我的評論
最新評論 總共0條評論
主站蜘蛛池模板: 免费区欧美一级毛片 | 成人免费一级毛片在线播放视频 | 亚洲国产精品久久久天堂 | www.啪啪.com| 免费视频爰爱太爽了 | 日本一级毛片免费播 | 精品国产精品久久一区免费式 | 国产一级黄色网 | 日韩欧美一区在线观看 | 亚洲精品视频在线观看视频 | 久操综合 | 久久这里只有精品国产99 | 精品国产夜色在线 | 成人午夜在线播放 | 中文字幕在线国产 | 香蕉视频免费在线 | 黄页在线播放网址 | 青娱乐91在线 | 超清中文乱码字幕在线观看 | 深夜免费看片 | 天堂成人精品视频在线观 | 色综合色综合色综合色综合网 | 久久羞羞视频 | www.中文字幕 | 国产成人aa视频在线观看 | 狠狠激情五月综合婷婷俺 | 色综合欧美色综合七久久 | 国产高清对白国产露脸91 | 国产免费一区二区三区在线 | 99热这里只有精品8 99热这里只有精品88 | 免费播放欧美毛片欧美aaaaa | 中文字幕 亚洲精品 第1页 | 只有精品| 国自产拍在线天天更新91 | 888米奇色狠狠俺去啦 | 一本色道久久综合狠狠躁 | 一区 在线播放 | 在线视频欧美精品 | 国产成人一区二区三区视频免费 | 热热色视频 | 日韩午夜片 |