FFmpeg series one: Mac under FFmpeg compilation installation configuration and use example

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.