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.

2 Likes

(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.

0 Likes

(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?

0 Likes

(Sean Molenaar) #4

It’s been in the last few release notes that options were going away: https://brew.sh/2019/01/09/homebrew-1.9.0/
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: https://github.com/Homebrew/homebrew-core/pull/36327#issuecomment-458146095

0 Likes

(Videoeditorguy) #5

It’s been in the last few release notes that options were going away: https://brew.sh/2019/01/09/homebrew-1.9.0/
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: https://github.com/Homebrew/homebrew-core/pull/36327#issuecomment-458146095

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!

1 Like

(Sean Molenaar) #6

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

1 Like

#7

@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: https://ffmpeg.zeranoe.com/builds/.

1 Like

(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.

1 Like

(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.

1 Like

(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.

1 Like

(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.

0 Likes

(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.

0 Likes

(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.

1 Like

(Roger Pack) #15

If you get really desperate you could try https://github.com/rdp/ffmpeg-windows-build-helpers --compiler-flavors=native --disable-nonfree=n, builds a massive static ffmpeg anyway

0 Likes

(Sveinn Davidsson) #16

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

1 Like

#17

Hi keepitcomplicated,

you can use my small Homebrew for the while being, it sports the last option-enabled versions of ffmpeg (and mpv), plus the latest updates from the main project:

brew tap sidneys/homebrew
brew tap-pin sidneys/homebrew
brew install ffmpeg --with-fdk-aac --HEAD

Cheers,
sidneys

0 Likes

#19

Dear videoeditorguy,

I wholeheartedly feel your pain. I’m a developer and rather advanced shell scripter, and did not get the news regarding these breaking, strategic changes to Homebrew either. A front-and-center deprecation warning would have done the job (see Python PIP deprecation warnings).

However, I’m also a A/V geek + fairly active user of FFmpeg ,and have thus created a small Homebrew Tap hosting ffmpeg. It sports the last option-enabled versions of ffmpeg (and mpv), plus the latest updates from the main project.

FFmpeg without proper AAC support truly is a joke, and unusable for most modern authoring workflows.

First, add the tap:
brew tap sidneys/homebrew

Then pin the tap, so that formulae installed from it override the default ones:
brew tap-pin sidneys/homebrew

Install & configure ffmpeg like before, e.g. from HEAD with FDK-AAC:
brew install ffmpeg --with-fdk-aac --HEAD

If anything fails, feel free to message me.

Cheers,
sidneys

2 Likes

(Theo Tiger) #20

sidneys, thank you very much for setting up and sharing the ffmpeg formula on your tap. The removal of configure options and therefore fdk-aac support for FFmpeg was problematic for me as well. I installed the formula and everything works fine again. Thanks a lot!

0 Likes