Linux-安裝FFmpeg


 

 

FFmpeg官網:http://www.ffmpeg.org

官網介紹

FFmpeg is the leading multimedia framework, able to decodeencodetranscodemuxdemuxstreamfilter and play pretty much anything that humans and machines have created. It supports the most obscure ancient formats up to the cutting edge. No matter if they were designed by some standards committee, the community or a corporation. It is also highly portable: FFmpeg compiles, runs, and passes our testing infrastructure FATEacross Linux, Mac OS X, Microsoft Windows, the BSDs, Solaris, etc. under a wide variety of build environments, machine architectures, and configurations.

下載安裝

  1. 下載最新源碼包並解壓
$ wget http://ffmpeg.org/releases/ffmpeg-3.1.3.tar.bz2
$ tar jxvf ffmpeg-3.1.3.tar.bz2
  1. 安裝ffmpeg
$ cd ffmpeg-3.1.3 $ ./configure 

 

 
安裝報錯

報了錯誤,提示 yasm沒有安裝

 

  1. 安裝yasm
  

  解決錯誤:安裝yasm編譯器。安裝方法如下:

  1)下載:[yasm的下載鏈接](http://www.tortall.net/projects/yasm/releases/yasm-1.3.0.tar.gz)

  2)解壓:把下載下來的壓縮包進行解壓

  3)切換路徑: cd yasm-1.3.0

  4)執行配置: ./configure

  5)編譯:make

  6)安裝:make install(提示:Permission denied,就執行sudo make install)

 

  1. 繼續安裝ffmpeg
$ ./configure
$ make
$ make install
  1. 安裝成功
$ ffmpeg

輸入ffmpeg打印了相關信息,表示安裝成功

 
安裝成功


設置軟連接
ln -s /usr/local/ffmpeg/bin/ffmpeg  /usr/local/bin/ffmpeg


把視頻轉換為圖片
ffmpeg -i "3.mp4" -r 1 -q:v 2 -f image2 pic-%03d.jpeg


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM