Why won't Audacity let me use my own ffmpeg?

Hey,

I’m not sure whether this is a bug or whether the feature just doesn’t exist, but Audacity doesn’t allow me the option of using my own local, up-to-date installation of FFmpeg (which is in my PATH) unless I rename or delete the “FFmpeg for Audacity” folder from Program Files (I’m using Windows 7, and Audacity 2.3.0).

However, doing other basic functions in Audacity seems to require use of “FFmpeg for Audacity”, which also means deleting or renaming that folder isn’t a viable option yet either.

If this isn’t already a feature, could it be made one? I don’t see the use in having an extra, old version of Audacity when I regularly make use of an external, up-to-date version and the program already supports use of that to some extent.

Thank you.

It’s actually a bit more complicated than this, but to give a general idea of the problem:

Audacity uses the FFmpeg library via its API, rather than the standalone version of FFmpeg via the command-line.

If you wish to use the command-line version for exporting files, you can do so by using the “Exporting to an External Program” feature (https://manual.audacityteam.org/man/exporting_to_an_external_program.html). This allows you to use any version of FFmpeg, but you have to enter appropriate command-line options yourself.

When using the library version of FFmpeg, Audacity can communicate directly with FFmpeg via it’s API. Unfortunately, FFmpeg has regularly changed its API, so if you don’t have the right version, it won’t work.

This seems to be a generic reply rather than any actual answering of my questions. Are you saying that it’s impossible to entirely use an external version of FFmpeg for all purposes in Audacity, due to the APIs?

If this is the case, then can it at least be made so I can specify which version of Ffmpeg I want to use for the “external program” option? As mentioned in the original post, I currently have to delete or rename “FFmpeg for Audacity” to force the “external program” option to use my own version of FFmpeg. If I absolutely have to rely on “FFmpeg for Audacity” for non-export functions, can there at least be an option to default to using the FFmpeg in the path, or to choose which one I use, saving me from needing to keep renaming or delete the “FFmpeg for Audacity” folder just to switch between normal use of Audacity and exporting?

Did you determine that the Audacity FFMpeg was damaged or defective, or are you just assuming it can’t be any good?

You can use your own FFMpeg through the File > Export system.

File > Export > Export Audio > (external program)

Select the program of your choice.


Screen Shot 2019-02-20 at 18.41.21.png
https://manual.audacityteam.org/man/exporting_to_an_external_program.html


Koz

Why do people on this forum insist on informing me about things I already made clear I’m aware of in my original post while skipping over what I’m actually saying in my posts? It’s highly annoying. I understand how the program’s basic functions work, and that much is clear enough from a basic read of my posts, so it’s patronising to be given copy-paste information from the manual as if I haven’t already read it.

If you’re asking why I want to use my own version of FFmpeg to export, it’s because it’s the one I’m most used to and doesn’t require me to set

-strict

for audio codecs that stable FFmpeg hasn’t considered experimental for a long time. In an ideal world, I’d prefer to use only my own FFmpeg and have Audacity always use that, but in a world where’s that not possible, second-best would be using my own version of FFmpeg for exporting audio and Audacity FFmpeg for the usual functions.

If you need something that requires redevelopment of the Audacity code, and it seems like that’s what you’re asking, we’ll add you to Change Requests.

Koz

Given your other responses, and the title of this thread, I don’t think it is clear what your actual question is.

The direct answer to your question “Why won’t Audacity let me use my own ffmpeg?” is, “because your other version of ffmpeg doesn’t work with Audacity”, but that’s obvious. Going a little deeper, it’s because your other version of ffmpeg does not give the correct responses to Audacity’s calls to the ffmpeg API.

The title was my initial question, but since you informed me in your first comment that it’s impossible to use my own FFmpeg installation outside of the export dialog (which I think is what you’re saying?), I would at least like it so that during the Export dialogue, I am able to select my own FFmpeg installation when using “external program”, which currently defaults to using “FFmpeg for Audacity” unless that folder isn’t found. Currently, the only workaround for this is to go through the annoying rigmarole of having to delete or rename the “FFmpeg for Audacity” folder every time before selecting “external program” in the Export dialogue, just to get it to see and use the FFmpeg installation in my PATH.

An acceptable solution for this would be to make Audacity default to looking for a local FFmpeg installation in the PATH, and if it exists, use that one for “external program” instead of “FFmpeg for Audacity”, but I suppose a more complete solution would be to detect for both “FFmpeg for Audacity” as well as any FFmpeg installations in the PATH, and give the user the choice of which one to use for “external program”.

Please do, that would be great, thank you.

While we’re on the topic, is it truly impossible to use the latest version of FFmpeg with Audacity? Is there a particular reason Audacity - outside of “external command” - has to use FFmpeg V2’s APIs instead of calling a more up-to-date version directly through the command line?

No. Audacity could be updated to use a later version of FFmpeg, but from what I hear from some very experienced developers, it’s a big and difficult job. Volunteers are welcome.

Fair enough. I’m not a programmer, so I suppose I’ll have to resign myself to holding out hope that it’s a project that eventually gets done. Would definitely be very useful.