How to install FFmpeg on Mac?
1. Install via BREW download, this is fixed FFmpeg. 2. Download and install the FFmpeg through the source code, which is customizable. Brew Installation FFmpeg Brew installation please baidu.
Brew Search FFmpeg Download vim: brew install FFmpeg Delete vim: brew Remove FFmpeg copy codeCopy the code
Source code installation address ffmpeg.org/download.ht… You can select Download Snapshot to Download directly, or select copy command to Download on terminal.
Source code installation FFmpeg
1. After downloading, unzip FFmpeg to your desktop. 2. Open the terminal and go to the FFmpeg folder. 3. Execute three instructions in turn.
Go to CD desktop/ffmpeg and specify the installation path. /configure --prefix=/usr/local/ffmpeg --enable-debug=3 --disable-static --enable-shared Increase the compilation speed make -j 4 Install make install If the installation fails, try changing the installation permission sudo make installCopy the code
4. Check whether ffmpeg exists in /usr/local/. If yes, ffmpeg is successfully installed.
5. Configure FFmpeg environment variables. Open the environment variable vim ~/.bash_profile
Enter I to enter editing mode and configure the FFmpeg environment variable export PATH= /usr/local/ffmpeg-bin :$PATH
Press Esc to exit editing mode, enter :wq, save and exit. :wq
Run the source command to make the configured environment variables take effect source ~/.bash_profile
6. After all the above steps are completed, run ffMPEG on the terminal, and the terminal responds with ffMPEG instructions, which indicates that the environment configuration is complete.
Install ffMPEG source code, ffplay compiler can not be found after installing FFMPEG, so the solution is as follows: download SDL2 via BREW
Copy the code
Install ffmPEG./configure… /configure –prefix=/usr/local/ffmpeg –enable-debug=3 –disable-static –enable-shared –enable-sdl2
This will compile ffplay, and there is no need to configure environment variables here.