- How to install ffmpeg mac os
- ffmpeg through Homebrew
- Additional options
- Updating ffmpeg
- Compiling FFmpeg yourself
- Xcode
- Installing dependencies with Homebrew
- Manual install of the dependencies without Homebrew
- Pkg-config & GLib
- Additional libraries
- Freetype
- Compiling
- Installing FFmpeg for Mac
- Contents
- Recommended package installer
- Locating the FFmpeg library manually
- Install FFmpeg on OS X
- 1 Answer 1
- 1. Homebrew
- 2. Static Builds
- 3. Compiling yourself
- How to install latest ffmpeg on mac
- 2 Answers 2
- Easiest Way To Install FFmpeg On Mac OS X
- Getting Started: Xcode and Homebrew Installation
- Final Step: Installing FFmpeg
How to install ffmpeg mac os
There are a few ways to get FFmpeg on macOS:
- Use a package manager like Homebrew or MacPorts to install ffmpeg . These will automatically keep your FFmpeg installation up-to-date. See the Homebrew section below for more info.
- Download a static build for macOS. This is as easy as extracting and running the downloaded binary. One disadvantage with static builds is that updates have to be performed manually. Also, they may not contain all encoders or filters you want.
- Build it yourself. Compiling on macOS is as easy as on any other *nix machine. Download the source, then run ./configure with the needed flags, make and make install . However, the configuration options have to be set manually, and you will need to install third-party libraries yourself. See the compilation section below for more info.
ffmpeg through Homebrew
Homebrew is a command-line package manager, which is similar to apt-get on popular Linux distributions. In order to use it, you need to install brew first, if you haven’t already:
Follow the on-screen instructions. This will take a few minutes while it’s installing the necessary developer tools for macOS. Then, run:
to get the latest released version with minimal configuration (and library dependency) options. These versions are packaged as Homebrew formulas and will take care of all the dependencies and the installation itself. To get the latest Git master version, run:
Additional options
Since v2.0, Homebrew does not offer options for its core formulae anymore. Users who want to build ffmpeg with additional libraries (including non-free ones) need to use so-called taps from third party repositories. These repositories are not maintained by Homebrew.
The following repositories for ffmpeg are available – refer to the README for additional information about the included options:
ffmpeg can be installed from the repository using its full formula name after tapping, for example:
Options are available with brew options homebrew-ffmpeg/ffmpeg/ffmpeg .
Updating ffmpeg
To later upgrade your ffmpeg version to the latest released, simply run:
If you have installed the HEAD, then you can upgrade by running:
Compiling FFmpeg yourself
Xcode
Xcode is required to compile software on your Mac. Install Xcode by downloading it from the website or using the Mac App Store.
After installing Xcode, install the Command Line Tools from Preferences > Downloads > Components. You can also install the tools via your shell:
Installing dependencies with Homebrew
To get some dependencies for ffmpeg, you can install Homebrew.
Tip: If you don’t want to use Homebrew to get the dependencies, see the section below. Using Homebrew will however save you time in setting up all the needed tools.
Manual install of the dependencies without Homebrew
Pkg-config & GLib
Pkg-config is necessary for detecting some of the libraries you can compile into FFmpeg, and it requires GLib, which is not included in macOS (but almost every other *nix distribution). You may either download pkg-config 0.23, or download the large tarball from Gnome.org and compile it. Pkg-config is available from Freedesktop.org.
To compile GLib, you must also download gettext from GNU.org and edit the file stpncpy.c to add #undef stpncpy just before #ifndef weak_alias . Mac OS X Lion has its own (incompatible) version of the stpncpy function, which overlaps in gettext . Compile gettext as usual. Compile GLib with
To compile pkg-config, run
Nasm is an assembler required for x264. The latest version is available at nasm.us.
Additional libraries
These are just some examples. Run ./configure —help for all available options.
- x264 encodes H.264 video. Use —enable-gpl —enable-libx264 .
- fdk-aac encodes AAC audio. Use —enable-libfdk-aac .
- libvpx is a VP8 and VP9 encoder. Use —enable-libvpx .
- libvorbis encodes Vorbis audio . Requires libogg. Use —enable-libvorbis .
- libopus encodes Opus audio.
- LAME encodes MP3 audio. Use —enable-libmp3lame .
- libass is a subtitle renderer. Use —enable-libass .
Freetype
macOS already comes with freetype installed (older versions may need X11 selected during installation), but in an atypical location: /opt/X11/ .
Running freetype-config in Terminal can give the locations of the individual folders, like headers, and libraries, so be prepared to add lines like
in your ./configure command.
Compiling
Once you have compiled all of the codecs/libraries you want, you can now download the FFmpeg source either with Git or the from release tarball links on the website.
For general instructions on how to compile software, consult the Generic compilation guide. The information there is applicable to the macOS environment as well.
Run ./configure —help , and study its output to learn what options are available. Make sure you’ve enabled all the features you want. Note that —enable-nonfree and —enable-gpl will be necessary for some of the dependencies above.
Источник
Installing FFmpeg for Mac
Audacity on Mac is now a 64-bit application. |
This means that if you are a user of previous Audacity versions on Mac and had installed the optional FFmpeg library then you must now install the 64-bit versions of the FFmpeg library, otherwise your imports and exports that depend upon FFmpeg will no longer work.
Installing the 64-bit FFmpeg library will not overwrite or delete your 32-bit FFmpeg library if you have one installed.
Contents
Recommended package installer
- Go to the external download page
Left-click this link, do not right-click. - In the 64-bit FFmpeg section, left-click the link «ffmpeg_64bit_osx.pkg» and save the file anywhere on your computer.
- When you have finished downloading, double-click the «ffmpeg_64bit_osx.pkg» in your Downloads folder.
- You will be guided through the installation
- Click through the steps in the installer. This will install the ffmpeg.55.64bit.dylib file in the system library at /Library/Application Support/audacity/libs/.
- On some Macs the process may look as though it has stalled on «Validating packages» — just be patient and wait for it to complete.
- Restart Audacity if it was running when you installed FFmpeg then Audacity should detect FFmpeg automatically.
If you have problems with Audacity detecting FFmpeg, follow the steps below to manually locate FFmpeg.
Locating the FFmpeg library manually
If you installed FFmpeg while Audacity was running, or if you installed FFmpeg to a non-default location, Audacity will ask you to configure Preferences to locate the FFmpeg library.
To do this, access Preferences then the «Libraries» tab on the left:
As in the image above, the «FFmpeg Library Version» will say «FFmpeg library not found«. To correct this:
- Click the Locate. button to right of FFmpeg Library:
- If a «Success» message indicates Audacity has now automatically detected valid FFmpeg libraries and asks if you want to detect them manually, click No , then OK to close Preferences
- If the «Locate FFmpeg» dialog appears, click Browse.
- Navigate to the folder that contains FFmpeg and select the file «ffmpeg.55.64bit.dylib«
- Click Open then OK
- Note that the FFmpeg library has been located
- Then click OK to close Preferences.
FFmpeg Library Version should now show a set of three version numbers for the sub-libraries of FFmpeg («F» for libavformat version, «C» for libavcodec version and «U» for libavutil version).
If you still see «not found», you may have installed the wrong libraries. Click the Download. button to obtain the correct library for your operating system. You can also choose Help > Diagnostics > Show Log. to see diagnostic information about FFmpeg detection.
Источник
Install FFmpeg on OS X
Is there a good place or bash script I can use (or at least a version I can build myself) for FFmpeg on OS X?
I have Xcode installed as well as the CLI for Xcode ( gcc etc).
I have a version of FFmpeg currently installed, but somehow I get a segmentation error on libx264 as well as the libvpx (I can’t convert to MP4 and WebM).
All I want to do is batch convert video files to HTML5 compatible videos. All my source videos consist of .mov .mp4 and .wmv files. .ogv works fine by the way.
So the real question:
- How to uninstall everything of FFmpeg on my Mac now
- Reinstall a FFmpeg version that can convert to .mp4, .webm, and .ogv
I also tried the precompiled version of Miro video converter but somehow that doesn’t work either.
1 Answer 1
There are three options, sorted by complexity:
- Homebrew (or other package managers)
- Static builds
- Compile yourself
To follow this you need to have a bit of knowledge using a terminal/shell under macOS.
1. Homebrew
Homebrew has a formula for stable FFmpeg releases. This will get you running pretty fast. First, install Homebrew.
Then install FFmpeg through the ffmpeg formula:
This will download a lot of dependencies such as x264, but after that you should be good to go.
To update ffmpeg later on, run:
2. Static Builds
The FFmpeg project, on the download page, offers links to static builds for ffmpeg , which you can just download, extract, and use in a terminal.
Static builds cannot contain every possible encoder, mostly due to licensing issues. This is why I don’t recommend using them unless you don’t really care about which specific features you need.
Once downloaded, extract the file, open up Terminal.app, and navigate to the directory where you unzipped the files, i.e. where you find a file called ffmpeg . Copy this file to /usr/local/bin :
Now, if you use Bash (which is the default shell), add it to your $PATH:
Add this to the file at the end:
Save it, and close the editor. Now restart your Terminal and which ffmpeg should return /usr/local/bin/ffmpeg .
3. Compiling yourself
You can of course build FFmpeg tools yourself, following the OS X compilation guide. This guide will always be up to date, and by manually compiling you may be able to tweak a few parameters.
To uninstall whatever version of FFmpeg you installed we’d need to know how you’ve installed it in the first place. Since Homebrew will install to /usr/local/Cellar , and symlink to /usr/local/bin/ffmpeg , it probably won’t cause any problems with other libraries. However, check the make install scripts of the versions you (supposedly) built yourself and see where they placed FFmpeg. Then just delete them from there — it won’t interfere with Homebrew.
The segmentation fault could be due to improper linking between the x264 or libvpx libraries. Since Homebrew will take care of this, you shouldn’t run into any issues.
Источник
How to install latest ffmpeg on mac
I am using this command
But the installed version of ffmpeg I get is only 0.7.13.
I am using MacPorts which may be the issue
2 Answers 2
1. Homebrew
Homebrew has a formula for stable FFmpeg releases. This will get you running pretty fast. First, install Homebrew by opening Terminal.app and and pasting this. Follow all the instructions closely!
Then install FFmpeg through the ffmpeg formula:
This will download a lot of dependencies such as x264, LAME, FAAC, et cetera, but after that you should be good to go. You can also brew install ffmpeg —HEAD to get the absolute latest version.
For additional options, check the output of brew info ffmpeg. You can, for example, add the following options, which are normally disabled:
To update ffmpeg later on, run:
2. Static Builds
The FFmpeg project, on the download page, offers links to static builds for ffmpeg, which you can just download, extract, and use in a terminal.
At the moment, you can get them from here:
Static builds cannot contain every possible encoder, mostly due to licensing issues. This is why I don’t recommend using them unless you don’t really care about which specific features you need.
Once downloaded, extract the file, open up Terminal.app, and navigate to the directory where you unzipped the files, i.e. where you find a file called ffmpeg. Copy this file to /usr/local/bin:
Now, if you use Bash (which is the default shell), add it to your $PATH:
Add this to the file at the end:
Save it, and close the editor. Now restart your Terminal and which ffmpeg should return /usr/local/bin/ffmpeg .
Источник
Easiest Way To Install FFmpeg On Mac OS X
Posted By : Anirudh Bhardwaj | 23-Jan-2017
FFmpeg is an open-source multimedia framework which provides powerful multimedia handling capabilities to the developers, content owners and publishers. FFmpeg boasts a full-fledged support for all the major codecs and audio/video format. Besides, it also provides seamless video streaming and web hosting services. The framework uses a library of programming functions for handling multimedia tasks like encoding/decoding, muxing/demuxing, parsing and audio/video conversions. Anyone can try their hands on this tool. However, it is recommended that you go through the documentation provided by FFmpeg before doing that and learn the necessary command line instructions to carry out multimedia tasks. You can download the complete package from ffmpeg.org or github.
Installing FFmpeg on Linux and Windows is comparatively easy but complications arise when you are doing that on Mac OS. While there are plenty of methods available for installing it on Mac, in this blog, you’ll know how it install it through an exclusive linux based software called Homebrew. Homebrew is a free Package Management software which makes it easy to install the third-party softwares and utilities on MacOS systems. If by any chance, you are aware of this software, installing FFmpeg on Mac is going to be a lot easier for you. But in case you don’t, you can watch a short tutorial on youtube or just follow the instructions that I’m going to give.
Getting Started: Xcode and Homebrew Installation
Installing Homebrew requires command line instructions. So you can’t directly install the Homebrew package on your Mac. To do that, you will need a command-line tool called Xcode. It is a software development suite developed by Apple for its operating system. Xcode in MacOS is very much comparable to the Terminal in Ubuntu. You can download the Xcode setup wizard from the Mac App Store and it is available for free. After installing, launch the app. Go to Xcode Preferences > Downloads > Install . This is where you need to enter the command line code for installing Homebrew on your Mac.
/usr/bin/ruby -e «$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)»
Copy the above code and paste it in the Xcode terminal and hit enter to start the installation process.
Final Step: Installing FFmpeg
Now that you have Homebrew package installed on your Mac OS X, you are almost halfway there. Now you can easily install the FFmpeg package on your Mac. All you need to do is execute the FFmpeg installation command. You can also get the installation command from this Github page . Just copy the code from the second line, paste it in your Homebrew terminal and hit enter. That’s it! The installation may take several minutes and then you can start using FFmpeg on your Mac to carry out necessary operations.
Источник