System environment: 10.13 Previous system version, not upgraded to MacOS high Sierra. Normally brew install ffmpeg
, the FFmpeg can be installed by direct input, but there are some pits that need to be filled.
One, Mac command line input
brew install ffmpeg
The error will be prompt:-bash: brew: command not found
This is because the homebrew is not installed, the workaround refers to the second step
Second, Max installs the homebrew
Max installation Homebrew reference: Mac terminal-bash:brew:command not found
After the installation is complete, return to the first step and enter againbrew install ffmpeg
Error at this time
【Homebrew】Error: Failure while executing: git config --local --replace-all homebrew.private true
This is due to the lack of Xcode plug-ins, you can download the latest version of the plugin or download updates to the latest version of Xcode
You can download the xcode-select --install
install plugin at terminal input, and if this step is not compatible, it is recommended that you update Xcode and the operating system to the latest version of MacOS High Sierra.
Third, after solving the Xcode problem, go back to the first step, enter
brew install ffmpeg
At this point, you can properly compile and install FFmpeg
Iv. test whether the installation is successful, terminal input
ffmpeg
, the output of the following information indicates successful installation
V. Using FFMPEG to convert video to GIF
Switch to a video directory
/Users/chenshouyin/Desktop/ffmpeg
Enter the following command to convert the video to GIF
ffmpeg -i test.mp4 -t 10 -pix_fmt rgb24 out.gif
For example, a smooth word can be seen out.gif generated.
Reprint Please specify: This article reprinted from Online Assistant | online tool blog, original link: http://www.it399.com/blog/ffmpeg/201807011540
FFmpeg series one: Mac under FFmpeg compilation installation configuration and use example