日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 运维知识 > linux >内容正文

linux

centos 卸载ffmpeg_Linux下ffmpeg的完整安装

發(fā)布時(shí)間:2023/12/3 linux 32 豆豆
生活随笔 收集整理的這篇文章主要介紹了 centos 卸载ffmpeg_Linux下ffmpeg的完整安装 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

最近在做一個(gè)企業(yè)項(xiàng)目, 期間需要將用戶上傳的視頻轉(zhuǎn)成flv格式或mp4格式并用flash插件在前端播放, 我決定采用ffmpeg (http://www.ffmpeg.org/ )實(shí)現(xiàn). 當(dāng)然以前也用過ffmpeg, 但是沒有安裝額外的庫, 只是源代碼下簡單地 ./configure, 最后發(fā)現(xiàn)好多功能都用不了, 比如最流行的x264編碼器. 所以決心完整地安裝一下ffmpeg, 經(jīng)過兩天痛苦地折騰, 終于成功了, 現(xiàn)在將過程記錄下來. 主要參考了 [1] 和 [2] 兩篇博文, 其中 [1] 是2007年寫成的, 其中所提到的依賴庫版本比較老, 本人安裝的都是相應(yīng)最新的版本.

1 tar -zxvf lame-3.99.5.tar.gz2 cd lame-3.99.5

3 ./configure --enable-shared 4 make5 make install

2、libogg

libogg-1.3.1.tar.gz

Url:http://www.xiph.org/downloads/

安裝方法如下:

1 ./configure 2 make3 make install

(libvorbis依賴于libogg, 所以libogg必須先于libvorbis安裝)

安裝方法如下:

1 ./configure 2 make3 make install

1 tar zvxf xvidcore-1.3.2.tar.gz2 cd xvidcore-1.3.2/build/generic3 ./configure4 make5 make install

1    tar -jxvf latest_x264.tar.bz2

2 ./configure

3 make

4 make install

1 tar -jxvf libdca-0.0.5.tar.bz22 cd libdca-0.0.5

3 ./configure 4 make5 make install

7、a52

a52dec-0.7.4.tar.gz

(這個(gè)庫從2002年就沒有更新過了)

http://liba52.sourceforge.net/downloads.html

安裝方法:

1 ./configure 2 make3 make install

1 autoreconf -vif2 ./configure --with-mp4v2 --enable-shared3 make4 make install

1 tar zxvf faac-1.28.tar.gz2 cd faac-1.283 ./bootstrap4 ./configure 5 make6 make install

10、amr-nb

amrnb-10.0.0.0.tar.bz2

http://ftp.penguin.cz/pub/users/utx/amr/ ( 從此處下載最新版本 )

安裝方法:

1 ./configure 2 make3 make install

11、amr-wb

amrwb-7.0.0.1.tar.bz2

http://ftp.penguin.cz/pub/users/utx/amr/ ( 從此處下載最新版本 )

安裝方法:

1 ./configure 2 make3 make install

12、最關(guān)鍵的一步, 安裝ffmpeg

1 ./configure --prefix=/usr/local/ffmpeg2 --enable-libmp3lame --enable-libvorbis --enable-gpl --enable-version3 --enable-nonfree --enable-pthreads --enable-libfaac --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-libxvid --enable-postproc --enable-ffserver --enable-ffplay

2 make

3 make install

在./configure的時(shí)候會(huì)報(bào)錯(cuò), 提示說沒有l(wèi)ibopencore-amrnb和libopencore-amrwb兩個(gè)庫. 我參考了 [2], 使用如下命令安裝它們:

sudo apt-get install libopencore-amrnb-dev libopencore-amrwb-dev

如果./configure的時(shí)候加入 --enable-shared, 編譯安裝沒有問題. 但是運(yùn)行ffmpeg命令就會(huì)出錯(cuò):

relocation error: /usr/local/lib/libavfilter.so.3: symbol sws_get_class, version LIBSWSCALE_2 not defined in file libswscale.so.2 with link time reference;

這時(shí)可以參考 [3], 大意是說跟gstreamer的動(dòng)態(tài)庫沖突了, 要卸載gstreamer. 但是如果卸載了gstreamer我的多媒體軟件多不能用了. 所以我卸載了ffmpeg并重新編譯成靜態(tài)庫. 安裝完之后, 運(yùn)行ffmpeg成功, 輸出如下:

ffmpeg version 2.0.1 Copyright (c) 2000-2013 the FFmpeg developers

built on Oct 25 2013 17:40:51 with gcc 4.6 (Ubuntu/Linaro 4.6.3-1ubuntu5)

configuration: --prefix=/usr/local/ffmpeg2 --enable-libmp3lame --enable-libvorbis --enable-gpl --enable-version3 --enable-nonfree --enable-pthreads --enable-libfaac --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libx264 --enable-libxvid --enable-postproc --enable-ffserver --enable-ffplay

libavutil 52. 38.100 / 52. 38.100

libavcodec 55. 18.102 / 55. 18.102

libavformat 55. 12.100 / 55. 12.100

libavdevice 55. 3.100 / 55. 3.100

libavfilter 3. 79.101 / 3. 79.101

libswscale 2. 3.100 / 2. 3.100

libswresample 0. 17.102 / 0. 17.102

libpostproc 52. 3.100 / 52. 3.100

Hyper fast Audio and Video encoder

usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

[1] http://yezi.iteye.com/blog/139399

[2] http://www.learndiary.com/2011/04/ubuntu-linux-%E4%B8%8B-ffmpeg-%E5%8F%8A-mencoder-%E5%AE%89%E8%A3%85%E4%BD%BF%E7%94%A8%E5%B0%8F%E7%BB%93/

[3] http://blog.csdn.net/nil_foc/article/details/6547047

總結(jié)

以上是生活随笔為你收集整理的centos 卸载ffmpeg_Linux下ffmpeg的完整安装的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。