Linux 編譯升級 Ffmpeg 步驟

來源:互聯網
上載者:User

        如果伺服器已經安裝了一個 Ffmpeg 的話,比如已安裝在 /usr/local/ffmpeg 目錄。版本升級步驟如下:
        1.下載 ffmpeg-*.tar.gz
        到 Ffmpeg 官網
https://ffmpeg.org/download.html 挑選你要升級到的版本,然後下載,比如作者下載的是 ffmpeg-2.0.tar.gz。
        2.編譯安裝
        tar -zxvf ffmpeg-2.0.tar.gz
        cd ffmpeg-2.0
        ./configure --enable-shared --prefix=/usr/local/ffmpeg
        make
        make install

        3.動態連結程式庫
        vi /etc/ld.so.conf
        加入:/usr/local/ffmpeg/lib
        執行
        ldconfig
        4.為 Ffmpeg 加入環境變數
        vi /etc/profile
        加入以下內容:
        FFMPEG=/usr/local/ffmpeg
        PATH加入:$FFMPEG/bin
        5.使修改立即生效
        source /etc/profile
        執行 
        ffmpeg -version
        列印結果
ffmpeg version 2.0
built on Jul 24 2013 09:59:06 with gcc 4.4.7 (GCC) 20120313 (Red Hat 4.4.7-3)
configuration: --enable-shared --prefix=/usr/local/ffmpeg
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
        證明已升級成功。如果遇到 ffmpeg: error while loading shared libraries: libavdevice.so.55: cannot open shared object file: No such file or directory 之類的錯誤,請檢查第三步是否做好。

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.