First, download a version from the FFMPEG official website and select a version under the "FFMPEG releases" column:
Http://ffmpeg.org/download.html
Then, decompress the package directly. Open the terminal of OS X and run the CD command to enter the project directory.
If your OS X uses the latest version of xcode 4.3.x or later, all compilation tools are displayed in sandbox status, that is, they are not registered to the system environment, therefore, you cannot directly compile data using the command line. Enter
Https://developer.apple.com/devcenter/mac/index.action
That is, the Mac developer homepage. Log on with a developer account (even if you haven't paid 99 $ to become IDP or MDP), find "additional downloads" and click "view all downloads ". Finally, select the latest version of "command line tools for xcode" to download.
After the download is complete, install it directly.
Then you can use the command line for compilation. Since Apple has now abandoned the old GCC and used more advanced llvm clang, we can use clang for compilation directly. Run the -- clang -- version command first.
To view the version information of the clang compiler and determine its validity.
Then, enter the command --./Configure -- cc = clang -- disable-ASM
Here, the -- CC option is used to select the compiler to use clang, while -- disable-ASM is used to disable all assemblies that involve assembly files, because Apple's llvm's built-in assembler may be somewhat different from the default GCC style.
After the call is successful, enter the command --Make
Finally, enter the command --Sudo make install
Enter the boarding password.
Finally, an FFMPEG executable file is generated in the current project directory.