Most of my work involves opening .mp4 files with audacity, and audacity extracts the audio with ffmpeg. I was using this
with much success under Linux Mint, and I recently moved to Debian. In Mint, I also built audacity and ffmpeg from source.
For some reason, however, in the current setup, Audacity will say that it can not find libavformat.so.55. When I go to preferences,
Library, it is listed as: /usr/lib/x86_64-linux-gnu/libavformat.so.55
Indeed, that file exists, and I just rebuilt it by re-building ffmpeg:
ls -l /usr/lib/x86_64-linux-gnu/libavformat.so.55
-rw-r--r-- 1 root root 2504664 Aug 15 12:42 /usr/lib/x86_64-linux-gnu/libavformat.so.55
Note that I also tried this with a later version of ffmpeg and libavformat.so.58. I thought perhaps 58 was too new,
so I backed off to .55 by rebuilding an older version of ffmpeg.
Do I have some kind of version mismatch? I am not sure why audacity lists the file in the library, but then says it is not found.
I have built a few versions to check this out, but currently I am using:
I will admit, there seems to be differences in installation instructions. If you download the source and read the linux/build.txt,
this is not exactly the same as the online instructions.
The instructions in the build.txt were written by developers for developers.
The instructions here on the help forum were written by me, for end users, and are thus detailed step-by-step instructions for a standard “release build”.
The thing that makes me think it is some kind of version issue is that in Audacity, I try to load a .mp4,
it comes up and says ffmpeg libraries are not found, even after I point to them.
UPDATE
I tried to recompile for grins. It breaks. No clue why. I have compiled at least four different versions of audacity
on this box looking for a solution. This is in a new directory, freshly untarred from the source.
In file included from /home/number9/audacity/audacity-minsrc-2.4.2/src/AudacityApp.cpp:82:
/home/number9/audacity/audacity-minsrc-2.4.2/src/FFmpeg.h:680:7: error: conflicting declaration of C function ‘AVOutputFormat* av_oformat_next(const AVOutputFormat*)’
av_oformat_next,
^~~~~~~~~~~~~~~
/home/number9/audacity/audacity-minsrc-2.4.2/src/FFmpeg.h:456:16: note: in definition of macro ‘FFMPEG_FUNCTION_WITH_RETURN’
inline r n a \
^
In file included from /home/number9/audacity/audacity-minsrc-2.4.2/src/FFmpeg.h:54,
from /home/number9/audacity/audacity-minsrc-2.4.2/src/AudacityApp.cpp:82:
/usr/local/include/libavformat/avformat.h:1762:17: note: previous declaration ‘AVOutputFormat* av_oformat_next(AVOutputFormat*)’
AVOutputFormat *av_oformat_next(AVOutputFormat *f);
^~~~~~~~~~~~~~~
[ 76%] Building CXX object src/CMakeFiles/Audacity.dir/AudacityHeaders.cpp.o
[ 76%] Building CXX object src/CMakeFiles/Audacity.dir/AudacityLogger.cpp.o
make[2]: *** [src/CMakeFiles/Audacity.dir/build.make:159: src/CMakeFiles/Audacity.dir/AudacityApp.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:2899: src/CMakeFiles/Audacity.dir/all] Error 2
make: *** [Makefile:150: all] Error 2
I overcame my ffmpeg build issue… I was trying to re-build the new version of audacity against an older ffmpeg. I rebuilt ffmpeg
according to this version, and the compile works. I still am getting the issue.
I am nearly convinced that the libavformat.so file is of the wrong version… e.g. audacity sees it and wants (I am not sure) .58
or .55 and all I have is .57 (Actually, I have built and installed .55 and .58).
I suppose I left out the fact that on my Debian 10, I am not using anything from the repos as Debian
is usually way far back. I installed cmake, wxwidgets, etc and compiled them all. I did the same
on Mint, incidentally, as I wanted to be running the latest Audacity.
I must be doing something else wrong. Does audacity only need the libavformat.so library?
I installed the cmake that you noted.
I rebuilt ffmpeg with shared libs.
I installed those libs.
I launch audacity, and tell it where the new libs are.
I try to load a .mp4, it comes back and says that the ffmpeg libs are not installed and that i need to
go to edit → preferences → Libraries and tell it where they are… but they are pointing to the correct
libraries.
Is there a way to explicitly tell audacity which ffmpeg to choose when loading? I have a feeling that audacity is
trying to load an ffmpeg that does not have shared libraries…
Just to be clear, I did install libavformat-dev version 7.4.16-1 on this debian installation, and then went back into
audacity and told it to use that libavformat.so. No change in audacity behavior.
If you install libavformat-dev then that should pull in all of the required parts of FFmpeg as dependencies.
It should not be necessary to tell Audacity where the FFmpeg library is. If a compatible version is correctly installed, Audacity should find it automatically.
Please post a screenshot of your “edit → preferences → Libraries”.