Home > OS >  I want third-party software to use the FFmpeg codecs but the file names don't match
I want third-party software to use the FFmpeg codecs but the file names don't match

Time:02-25

Software and file versions

FFmpeg

I have the latest release of FFmpeg, version 5.0-full_build-www.gyan.dev, which is a compiled executable for Windows. I downloaded "ffmpeg-release-full-shared.7z," which includes dlls in \bin.

Audacity

I have the latest release of Audacity, 3.1.3, which I installed using the 64-bit installer.

In Audacity's Preferences > Libraries, there is an option to use FFmpeg's libraries. Under Help > Diagnostics > Show log, Audacity seems to be looking for one of three versions of avformat-NN.dll: avformat-58.dll, avformat-57.dll, or avformat-55.dll

14:18:28: Looking for FFmpeg libraries
14:18:46: User-specified path = 'C:\Users\Blaze-X120e\Documents\Programs\FFmpeg\bin'
14:18:46: Error: Failed to load shared library 'avformat-58.dll' (error 126: The specified module could not be found.)
14:18:46: Error: Failed to load avformat-58.dll (error 126: The specified module could not be found.)
14:18:46: Error: Failed to load shared library 'avformat-57.dll' (error 126: The specified module could not be found.)
14:18:46: Error: Failed to load avformat-57.dll (error 126: The specified module could not be found.)
14:18:46: Error: Failed to load shared library 'avformat-55.dll' (error 126: The specified module could not be found.)
14:18:46: Error: Failed to load avformat-55.dll (error 126: The specified module could not be found.)
14:18:46: Error: User-specified path does not contain FFmpeg libraries.

I have avformat-59.dll in \bin. System PATH includes \path\to\FFmpeg\bin

GoldWave

Similarly, I have the latest version of GoldWave, 6.6, which can use FFmpeg's libraries. The documentation instructs me to find avcodec-56.dll. I have avcodec-59.dll.

In the file, "ffmpeg-4.4.1-full_build-shared.7z", on gyan.dev for the previous release of ffmpeg, 4.4.1, \bin includes avformat-58.dll, which seems to be what Audacity is looking for. It has avcodec-58.dll, not avcodec-56.dll, though. I suspect that if I look through prior releases of FFmpeg, I will find avcodec-56.dll.

Questions

  1. It seems that I could have parallel installations of FFmpeg. The latest version for me, 4.4.1 for Audacity, and something older for GoldWave. Would that enable the software to use whatever version of FFmpeg it could detect?
  2. If yes, would I want that? In FFmpeg, some codecs and codec implementations have improved in recent releases, so do I want to use older versions of FFmpeg?
  3. I assume that copying avformat-59.dll and renaming the copy avformat-58.dll will not work. Am I correct?
  4. I assume that the devs of Audacity and GoldWave could change their code to work with FFmpeg 5.0. Is that likely to be correct, or is there an obstacle I don't understand or know about?
  5. I can't control whether FFmpeg changes file names, and I can't control the devs at Audacity or GoldWave, so what options are available to me that I can control? Is there a more elegant solution than multiple installations of FFmpeg? I think Audacity is implying that the easiest solution is to install a stripped-down FFmpeg just for Audacity.

CodePudding user response:

The numbers 56..etc refer to the version number of the individual libraries that are a part of the FFmpeg project. So, avcodec-59 is major version 59 of libavcodec.

  1. Yes, you can have parallel installations without issue, provided you can set custom search paths for the client application.

  2. I suspect these clients are using libavcodec to export to major codecs. Those are generally mature, so older versions should be fine.

  3. That's correct. Across major versions, the API and ABI will likely have changed.

  4. Depends on what API calls they're using. A new decode/encode API was introduced some years ago but the old one was kept for compatibility, so clients could transition over gradually. In v59, those old calls were removed. So, if they did transition, then yes.

  • Related