1、安裝ffmpeg
分爲兩種安裝方式:bash
1. 命令行安裝
brew install ffmpeg
2. 下載壓縮包安裝
去 http://evermeet.cx/ffmpeg/ 下載7z壓縮包,解壓縮後,將ffmpeg文件拷貝到一個地方,而後在bash_profile裏面配置好環境變量ide
2、安裝ffplay
分爲兩種安裝方式:ui
1. 命令行安裝
執行下面的命令就能夠進行安裝操做spa
brew install ffmpeg --with-ffplay
- 注:目前使用此安裝方式安裝後,執行ffplay會出現command not found的問題,多是由於SDL的配置問題致使的。
2. 下載壓縮包安裝
去 http://evermeet.cx/ffmpeg/ 下載7z壓縮包,解壓縮後,將ffplay文件拷貝到一個地方,而後在bash_profile裏面配置好環境變量命令行
3、附言
在上面咱們接觸到了命令行安裝ffmpeg的方法,除了安裝選項 --with-ffplay外還有更多的選項以下:code
–with-fdk-aac (Enable the Fraunhofer FDK AAC library) –with-ffplay (Enable FFplay media player) –with-freetype (Build with freetype support) –with-frei0r (Build with frei0r support) –with-libass (Enable ASS/SSA subtitle format) –with-libcaca (Build with libcaca support) –with-libvo-aacenc (Enable VisualOn AAC encoder) –with-libvorbis (Build with libvorbis support) –with-libvpx (Build with libvpx support) –with-opencore-amr (Build with opencore-amr support) –with-openjpeg (Enable JPEG 2000 image format) –with-openssl (Enable SSL support) –with-opus (Build with opus support) –with-rtmpdump (Enable RTMP protocol) –with-schroedinger (Enable Dirac video format) –with-speex (Build with speex support) –with-theora (Build with theora support) –with-tools (Enable additional FFmpeg tools) –without-faac (Build without faac support) –without-lame (Disable MP3 encoder) –without-x264 (Disable H.264 encoder) –without-xvid (Disable Xvid MPEG-4 video encoder) –devel (install development version 2.1.1) –HEAD (install HEAD version)