Cannot get ffmpeg to compile with libfdk_aac - Mild panic setting in

(Videoeditorguy) #1

I am not a terminal power user, but comfortable enough to write small scripts and use applications like ffmpeg, which I rely on.

I’ve just tried to encode a video as usual and got the following error:

Unknown encoder 'libfdk_aac'

I never had that before and didn’t change anything. I then tried removing and reinstalling ffmpeg using homebrew with the --with-fdk-aac option. Didn’t work:

Warning: ffmpeg: this formula has no --with-fdk-aac option so it will be ignored!

Weird. I then checked using brew options ffmpeg but that doesn’t return anything. Then I tried brew install fdk-aac and it say that it is already installed.

Now I don’t know what to do anymore. I have to deliver a bunch of videos to certain specs and these include encoding the audio with the Frauenhofer AAC codec.

I apologise if this is a stupid question, or I am missing something obvious. As I said, I am not a programmer, unfortunately. And I am new here. But I am starting to get nervous and this seems like the most active place for discussion.

(Sean Molenaar) #2

Options for homebrew-core formula have been removed as they added a extremely high support burden. If you want to use a different configuration than homebrew ships you’ll have to maintain your own version of it or file a pull request with the project if you think the majority of the users would benefit from having this as a default.

(Videoeditorguy) #3

Thank you for your answer!

Unfortunately, I don’t know how to do either of those things. But I will look into what a pull request is and how that works, since I do believe that most users would benefit from having that codec. In fact, the official compilation guide even says:

You can run brew info ffmpeg to see additional install options, e.g. in order to enable libfdk_aac, which is highly recommended.

I would have appreciated a warning about the removal of this feature, since I do not (cannot) follow development forums, but did set my workflow up to depend on this codec.

Is there any kind of interim solution I can use to get this functionality back for now? It doesn’t seem like Homebrew supports rolling back to the latest version that allowed for this. But is there another workaround/solution that I am missing?

(Sean Molenaar) #4

It’s been in the last few release notes that options were going away:
Also, there has been public progress to remove the options.

As for the official compilation guide, homebrew doesn’t have any affect on that one so unfortunately it’s outdated. Maybe you could suggest to change it to the ffmpeg project.

I just looked to see if anyone already made a pull request for AAC in ffmpeg but unfortunately homebrew can’t legally ship these as a default:

(Videoeditorguy) #5

It’s been in the last few release notes that options were going away:
Also, there has been public progress to remove the options.

I get that and I don’t mean to nag. It’s just that as someone who is an end user, not a developer, I don’t usually follow the behind-the-scenes for every software that I use. That’s why something like an obvious warning while using it would have been nice. But again, I don’t mean to be too critical and appreciate the work that you put into the software.

I just looked to see if anyone already made a pull request for AAC in ffmpeg but unfortunately homebrew can’t legally ship these as a default:

So it seems this particular library is caught in between a legal hurdle and the changed functionality of Homebrew, without an easy solution in sight. I will have a look at how to compile ffmpeg without Homebrew.

Thanks for the help/information!

(Sean Molenaar) #6

I get that, it’s a delicate balance for homebrew too between contacting everyone and actually spending time developing homebrew.


@videoeditorguy, I agree with you that these precipitous changes to how homebrew has functioned for years is an unwelcome surprise. Dealing software builds is often a non-trivial task. The fact that homebrew used to simplify that complexity is what used to make it valuable.

Anyways, if you are in a bind with ffmpeg, maybe check out the page for static builds:

(Mlindner) #9

A possible option. Can homebrew add an option to pass flags directly to the configure script of whatever we’re running? Homebrew used to be about home brewing now it’s all about bottled brews with no configurability.

(Sean Molenaar) #10

Since that would require source builds on local machines, no that isn’t really an option. As homebrew grows it’s becoming more centered around easy usage and installing and less around customizing everything. The easiest option by far here is to maintain your own tap as it’ll allow you to configure everything.

(Mlindner) #11

No it would just be an option to build on local machines.

I beg to differ. The entire idea of homebrew was “homebrewing”. To change that concept is to remove the idea of homebrew entirely. It breaks all the naming concepts of the project. You don’t tap your own home brew, you simply brew it. You tap someone else’s. Or you buy bottled brews (premade). The current devs seem to have forgotten what project they’re working on.

(Sean Molenaar) #12

You’re more than welcome to fork it and take it in de direction you want it to go. Projects evolve and unfortunately for you this is the direction homebrew is involving into.

(Mike McQuaid) #13

That’s the name of the project but it’s not “the whole idea”. The original idea was creating a macOS package manager that utilised system libraries and in which it was incredibly easy to create and contribute your own packages. That all remains the same. That it was built from source was an implementation detail and not an intentional rejection of binary packages. The original creator of Homebrew proposed binary packages to me in a conversation which is why they exist entirely.

You can agree or disagree with our decision making but it’s really quite silly to say such things. I’ve been working on the project for 10 years this year, I’m still in regular contact with the original creator (who still uses the project) and I’ve seen it from the days when only 10.5 was supported with no CI, binary packages or pull requests to today where we have millions of users most of whom do not make use of options at all (thanks analytics).

If building from source and specifying options is the most important part of Homebrew to you: you should find an alternative package manager.

(Mlindner) #14

You seem to assume that the original creator of Homebrew would approve of all these changes were he still in charge. Based on watching various talks he’s given on Homebrew back when he was still the lead dev on the project, I definitely do not get that implication. You should talk with him some more.

Yes that is what I’m going to have to do. I wish homebrew could have evolved to better support building from source and keeping track of dependency graphs. (For example it’s still a common problem to upgrade a package and have several packages break because a library version changed and those packages fail to dynamically link against the newly installed package. These types of things should have been added rather than simply removing an entire feature and effectively making the user experience of homebrew worse.

(Roger Pack) #15

If you get really desperate you could try --compiler-flavors=native --disable-nonfree=n, builds a massive static ffmpeg anyway

(Sveinn Davidsson) #16

This feature removal is incredibly dissapointing. I can’t install Imagemagick or ffmpeg with fontconfig… :weary: