Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to install latest ffmpeg on mac

I am using this command

sudo port install ffmpeg +gpl +postproc +lame +theora +libogg +vorbis +xvid +x264 +a52 +faac +faad +dts +nonfree

But the installed version of ffmpeg I get is only 0.7.13.

I am using MacPorts which may be the issue

Apparently there is a 1.0 release! http://ffmpeg.org/download.html#release_1.0

like image 972
Bachalo Avatar asked Oct 20 '12 21:10

Bachalo


People also ask

What is the latest version of ffmpeg?

July 22nd, 2022, FFmpeg 5.1 "Riemann" FFmpeg 5.1 "Riemann", a new major release, is now available! Some of the highlights: add ipfs/ipns protocol support.

Can you use ffmpeg on Mac?

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 and the MacPorts section below for more info.

Where is Ffmpeg path on Mac?

In Terminal, navigate to the folder containing the ffmpeg file using the "cd" (change directory) command. Type "cd" followed by the file path to your Downloads folder. For example, the path on my system is "/Users/aaron/Downloads".


2 Answers

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!

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Then install FFmpeg through the ffmpeg formula:

brew install ffmpeg

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:

brew install ffmpeg --with-fdk-aac --with-ffplay --with-freetype --with-libass --with-libquvi --with-libvorbis --with-libvpx --with-opus --with-x265

To update ffmpeg later on, run:

brew update && brew upgrade ffmpeg

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:

  • http://evermeet.cx/ffmpeg/
  • http://ffmpegmac.net/

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:

cd ~/Downloads/
sudo mkdir -p /usr/local/bin/
sudo cp ./ffmpeg /usr/local/bin
sudo chmod 644 /usr/local/bin/ffmpeg
sudo chown $USER /usr/local/bin/ffmpeg

Now, if you use Bash (which is the default shell), add it to your $PATH:

open -e ~/.bash_profile

Add this to the file at the end:

export PATH="/usr/local/bin:$PATH"

Save it, and close the editor. Now restart your Terminal and which ffmpeg should return /usr/local/bin/ffmpeg.

like image 78
poke19962008 Avatar answered Sep 26 '22 08:09

poke19962008


It's a "problem" with MacPorts. As you say, the last port version is 0.7.13. There is also a devel port but with a recent revision (5 weeks ago). You could also take a look here. This site seems to have a 1.0 static binary. It is a trusted website. Actually is linked in the official ffmpeg website.

like image 44
David Moreno García Avatar answered Sep 26 '22 08:09

David Moreno García