Download Ffmpeg For Mac

The FFmpeg import/export library allows Audacity to import and export many additional audio formats such as AC3, AMR(NB), M4A and WMA, and to import audio from video files. Audacity 2.0.6 and later requires FFmpeg 1.2 to 2.3.x (or libav 0.8 to 0.10.x).

  1. Download FFmpeg for Mac - A comprehensive, free, open-source and cross-platform solution for recording, encoding and streaming of video and audio content.
  2. Compiling FFmpeg on Mac with Apple Silicon (requires MacPorts): FFmpeg on Mac with Apple Silicon (M1): https://youtu.be/w.

FFmpeg is an astonishingly powerful open source command line tool for converting, streaming and recording audio and video.

That 'command line' will put many people off, and of course it does mean that the program is more difficult to use than a GUI converter. But don't let that put you off. Although FFmpeg requires a little work to learn, you can still get productive very quickly. Look at this:

ffmpeg -i video.avi video.mp4

As you can probably guess, the -i tells ffmpeg that video.avi is the input file, and it converts that and saves it to video.mp4. Need an MPG instead? Just specify video.mpg as the second file name. Using video.mp3 will extract only the soundtrack, or video.gif will save it as an animated GIF.

FFmpeg supports a vast number of formats, too, which is why it's the power behind many, perhaps most of the freeware conversion tools around (typically they're just front ends which allow you to specify a file, then pass the results to a local copy of ffmpeg.exe).

Of course this is only a fraction of what you need. There are a vast number of other commands to specify frames, resolutions, codecs, to define exactly how everything is processed, and that really can get complicated. But you don't have to use that, and even if you only ever learn -i, that's still probably enough to justify the download.

Verdict:
Ffmpeg

FFmpeg is the gold standard for media conversion, streaming and processing in general. It's console-based, but basic operations are easy, and if you're tired of the usual underpowered adware-packed freeware (many of which use FFmpeg under the hood anyway) then it's well worth a look.

The FFmpeg project is a fast, accurate multimedia transcoderwhich can be applied in a variety of scenarios on OS X.

If you just want to add a good video transcoder to a toolset thatalready includes Final Cut Pro, Adobe Photoshop, and similar tools,FFmpegX may be your best choice because of its familiarMac-style user interface.

But it's possible that you are interested in using FFmpeg to set up anautomated, web based system to transcode a variety of input videoformats to the Flash video format, which can easily be displayed onthe web.

In this case it will be neccesary to approach FFmpeg on its own termsas a command-line, Linux-centric project. You will need to learn theinstallation techniques commonly used by open source projects, and thestarting point for your work will be running Terminal and workingmostly from the command line. This article will apply thesetechniques in a step-by-step manner to installing a version of FFmpegwhich has most of the features you will need. Some techniques will beused without explanation, so be prepared to do some Googling to fillin the gaps in your knowledge.

Before you can follow these instructions, you must install Apple'sDeveloper Tools.

Prerequisites: LAME

MP3 is the audio codec most often used with Flash video, so you willneed an MP3 encoder. FFmpeg doesn't include one, but it will useLAME, which creates good quality audio files, if youinstall it. Header files will be needed during the compile, so it isnot enough to install a prebuilt binary using a package manager.Instead follow these directions to compile it from source:

Start by creating a working directory:

On a good day you can get the latest source code release of LAME fromSourceforge. The file you want will be namedlame-3.97.tar.gz or something similar.

If that doesn't work, do what I did and get the bleeding edge releasefrom revision control:

If you download the tar file, you need to unpack it as follows (thiscommand is not necessary if you used CVS):

After downloading and unpacking the source or checking it out fromCVS, change to the main directory and then enter the three commandswhich are typically used to build open source projects:

Each command will take a minute or so to complete. You should keep aneye out for any errors which may occur, but installing LAME isgenerally trouble-free.

Optional: FAAC and FAAD

How To Download Ffmpeg For Mac

Since Quicktime commonly uses AAC for audio, you may want to encodeand decode that format. Here again FFmpeg doesn't include built-incodecs, but it will use the codecs provided by another open sourceproject if you install them first.

Installing these codecs used to be so difficult that I wouldn't evenhave tried to address it in an introductory article, but recentimprovements mean that you can simply download the latestreleases and follow the instructions they provide, for example:

Download ffmpeg for audacity mac

It's generally a good idea to poke around in the main directory forfiles named INSTALL and README and pay attention to the instructionsthere. Often that's all you need.

Building FFmpeg for Mac OS X Leopard

Recent versions of FFmpeg will compile successfully on versions of OSX as far back as 10.3. Before that OS X used an older version of theC compiler which is no longer compatible with FFmpeg. It's possibleto get an older version of FFmpeg running on OS X 10.2 (read on), butyou may not be satisfied with its capabilities.

If you have a choice it's best to run a recent version of FFmpeg,which means downloading the source code from one of the revisioncontrol systems used by the developers, or getting a nightlysnapshot. Using revision control for something this simple is prettyeasy, and it's a useful technique, so that's what we'll do. Recentversions of Xcode already include Subversion (a newish revisioncontrol tool which really isn't so bad), so we'll use that.

First create a working directory:

The up-to-date version of FFmpeg generally compiles cleanly, and thatis the version you usually will want:

Next, configure and make

The --disable-mmx flag is not required on a PowerPC. If you leave itout on an Intel Mac, you will probably get a compile error, but it'sworth trying since it will provide a speed boost. If you installedthe AAC codecs, add the flags --enable-libfaac and --enable-libfaad.

(According to a discussion on ffmpeg-user The '--arch' flag isrequired under Snow Leopard. Experiment.)

A fallback

When I tested for this article originally, the latest source in theSubversion repository did not compile cleanly. My workaround was touse a known stable revision. In general, FFmpeg is a moving targetand you may encounter new issues that I did not. See the mailinglists for the latest information. Here's how to build FFmpegif you have problems with the latest release

Once again, the --disable-mmx flag is not required on a PowerPC-basedMac. There is nothing special about revision 15624, it's just aversion that happened to compile when this article was revised. IfFFmpeg is not compiling on OS X because of a recent change,subtracting a small amount from the latest revision number willprobably fix the issue. Work your way backwards until you findsomething that works.

Download ffmpeg mac terminal

Congratulations, you've installed FFmpeg. The next section describesa similar procedure for OS X 10.2, so skip ahead for additionalinformation on running FFmpeg.

Building FFmpeg for Mac OS X 10.2

[Update: the OS X 10.2 procedure results in an ffmpeg binary thatcan decode only some of the video formats listed in the ffmpegdocumentation. In particular, it can't decode Quicktime video. Takethis into account before you go to the trouble of downloading andcompiling it. On the other hand, this is one of the few freealternatives to Macromedia Flash for converting mpeg into Flash video,and you may be able to convert Quicktime to mpeg by other means.]

Start by creating a build directory:

Compiling on OS X 10.2 requires a patch, and it makes sense to patchagainst a known release. So we will download a recent release, whichcan be found by clicking here, and unpack it:

I have modified a patch by Christoph Seibert to compile onMac OS X 10.2 (if it doesn't work on another version of OS X, tryChristoph's patch). Download it by right-clicking here anduncompress it:

Change to the ffmpeg source directory and apply the patch:

(For more information on using patch, see my article on diff andpatch.)

Download

Now build the project:

Some flv examples

FFmpeg is now installed. There are instructions in the doc/directory, but basic commands are quite simple, and you will find thatthey are similar to ImageMagick, if you have used it. To convert anmpeg video to Flash, use:

(The '-ar 22050' flag sets an audio sample rate of 22050 Hz. It isusually necessary to set a sample rate when encoding flv files becausethe MP3 encoder only supports rates of 11025, 22050, and 44100 Hz.)That's the basic idea, but in practical uses you will probably want totake control over more of the quality settings. A more realisticcommand would look like this:

where

  • '-b 600k' selects a video bitrate of 600 kilobits per second. Thisis a compromise between quality and bandwidth (with older versionsof FFmpeg you would use '-b 600'. Type 'ffmpeg -h' to check whichunits are expected in your version);

  • '-r 24' selects 24 video frames per second;

  • '-ar 22050' selects an audio sample rate of 22050 Hz, which issufficient for voice;

  • '-ab 96k' selects an audio bit rate of 96 kilobits per second; youcould go a little lower for voice-only audio (with older versions ofFFmpeg you would use '-ab 96'. Type 'ffmpeg -h' to check.)

These are the parameters you will adjust most often. Finding theperfect values for your material is a matter of experiment.

Troubleshooting

flv 1.1 metadata

FFmpeg is a moving target, and this issue is resolved in the latestversion of FFmpeg from the Subversion repository. In older versions,however, FFmpeg didn't write the FLV metadata which is required forthe scrubber bar to work in some Flash video players.

If you experience this problem, there is a fix:

  1. First, try upgrading to the latest version of FFmpeg.

  2. If for some reason you can't upgrade, get the FLV MetadataInjector (Windows-only), or FLVTool2 (OS X andLinux) and process your flv files with them. See the links forinstructions.

make build errors

According to the mailing list, FFmpeg is sensitive to the version of'make' you are running and the build will fail in many cases. Recenttesting shows that the current stable version of GNU make (3.81) willwork, but 3.79 and 3.80 will both fail, for different reasons. BSDmake (also distributed with OS X as 'bsdmake') will fail with multipleerrors. If you are having a problem with make, the simple solutionwould be to upgrade Developer Tools.

Alternate download methods

If your version of Xcode doesn't include a Subversion client, refer tothe FFmpeg download page and pick another method to getthe source, for example:

Runtime errors

Some FFmpeg error messages are a little cryptic. Here are a few Ihave encountered:

  1. If you try to decode a video format that FFmpeg does notunderstand, you get the message

    Just try again with another format, or recompile FFmpeg to add thecodec you need.

  2. If you build FFmpeg without the --enable-libmp3lame flag and try toencode to Flash video, the audio stream will be silently discarded.Only by encoding to another format that does not require MP3 will youdiscover that this is not the expected behavior. In this case justfollow the instructions in this article to install LAME, if necessary,and recompile FFmpeg with LAME support.

  3. When encoding to MP3, you may receive the message

    In practice, this means that you should use the -ar flag to set anaudio sample rate of 11025, 22050, or 44100 Hz.

Further reading

Now that you have video in Flash video format, you may be interestedin publishing it on the web. See my Flash Video Howto forcomplete instructions.

Howard Pritchett publishes an FFmpeg user's guidewhich includes lots of useful information if you're just starting outwith FFmpeg.

Comment on this article and its topic

Copyright © 2006-2008 Stephen Jungels.Written permission is required to repost or reprint this article

Install Ffmpeg Mac Os

Mac

Download Ffmpeg Library For Audacity Mac

Last modified: Tue Feb 22 10:41:16 CST 2011