UPDATE: Run ffmpeg On Mac Without Compiling Anything

This is going to be a update to a post I did a few days ago, “Run ffmpeg On Mac Without Compiling Anything”. I did get some good and skeptic response. They solution I posted does indeed work, but it’s a very old binary and you don’t get ffplay, ffserver etc. And a nice fella posted a comment telling me just that, and I appreciate that :) Continue reading UPDATE: Run ffmpeg On Mac Without Compiling Anything

How to: Extract Audio From Video Using ffmpeg

So, you want to extract some audio from a video ey? Sure! No problem! You can do just that using ffmpeg, here’s the command string.

In this example, i’ll extract the whole audio track to a mp3 file, with a 320k bit (constant) rate and 44100hz audio rate (high quality mp3):

ffmpeg -i “whatever.format” -vn -ac 2 -ar 44100 -ab 320k -f mp3 output.mp3

Here’s a short explanation on what every parameter does:

  • -i “input file”
  • -vn “skip the video part”
  • -ac “audio channels”
  • -ar “audio rate”
  • -ab “audio bit-rate
  • -f “file format to use”
  • (the end if the string) “output file”

NOTE: I am not responsible for any copyrighted material (ex, music videos) that get’s converted to audio using this method.

Run ffmpeg On Mac Without Compiling Anything

So you may be thinking, how on earth am I going to install ffmpeg on Mac OS X, do I compile it myself? Install it trough macports? NO, There is a perfectly fine and stable ffmpeg binary out there that someone else has compiled for us, and that someone (or he/she) is “FFmpegX”.

FFmpegX is a graphical front-end for ffmpeg (GUI) that makes it really easy to convert video and audio into different formats, however, I have used ffmpeg from the command line ever since I heard about it, and i prefer using it that way. And I didn’t want to compile it or use macports since I almost screw up my machine once doing so. So I went looking around for a pre-built binary  And I found it!

It turns out that there is a perfectly fine pre-built binary in the FFmpegX package itself! Here’s how you get it:

  1. Download and extract the FFmpegX package from here
  2. Control-Click the FFmpegX application, Choose “show package contents”, Go to “Resources”
  3. Copy the ffmpeg executable to /usr/local/bin (NOT /bin)
  4. Open the terminal and type ffmpeg to see if it works.

If you have any problems, type these commands and try again:

sudo chown root:wheel /usr/local/bin/ffmpeg
sudo chmod 755 /usr/local/bin/ffmpeg

Do you find ffmpeg usefull?