Bugzilla – Bug 467
Audacity fails to build with latest FFmpeg/libav 0.5 to 0.8
Last modified: 2018-08-20 11:51:36 UTC
Audacity builds with FFmpeg/libav 0.6, but not with newer version of FFmpeg/libav. This will lead to build failures on recent Linux distributions.
Created attachment 225 [details] ffmpeg-2.patch The ffmpeg-2.patch adds support for newer versions of FFmpeg and libav without dropping support for FFmpeg/libav 0.6. The patch was heavily tested and is included in the Debian/Ubuntu package for months.
Created attachment 226 [details] libav0.8.patch The libav0.8.patch should be applied atop of the ffmpeg-2.patch to add support for libav 0.8.
Thanks for adding this, Benajmin. Added devel-list URL. It has to be a minimum P3, I would have thought. Is it true that without the patch, people who build FFmpeg and Audacity themselves and figure the build problems out will still have export/import problems? Do we have a concise list of those export/import problems? Are there also problems with exports/imports in FFmpeg 0.6 or previous that this patch addresses?
People without the patch and a recent FFmpeg version will get a build failure unless they disable FFmpeg. The patch just adds support for newer FFmpeg version. It does not address any problems with FFmpeg 0.6 or previous. I have tested the patch with libav 0.7.3 and every tested import/export worked as expected. I can't remember any export/import problem with a recent FFmpeg/libav version.
I will review and probably commit these later today. I'm just mostly marking the bug. But in case there is some issue please say it now. I am guessing just submitted the patch for review to be safe and just hasn't been committed because no devs have reviewed it on linux.
Patches combined (because I gathered it would still break on puppylinux) and commited in r11425. Tested against 0.6.x and found no issues. Tested against 0.8.10 and found import to be flawless and some export issues, but this may be due to my personal build of ffmpeg having missing codecs, since people have reported mp3 success where I could not. Just in case, I will note - I built with --enable-liblamemp3 and could not export to mp3/mp2 (but wav/flac worked) with 0.8.10(libavformat53), but could with 0.6(libavformat52). But even if this is a bug, the 0.6 version still works so we have no lost functionality post patch, so I committed regardless. It would be good if someone could try more exports just to be safe. I think we should note you cannot switch between two different versions (or at least I could not). you are bound to the version of libav* that you compile against due to the way we use ffmpeg.h - they are not forwards or backwards compatible at runtime with both 0.6.x and 0.8.x, but you can pick either one to build against at compile time (I tested against both). This is to be expected with the way our FFmpeg.h is, but maybe it wasn't an issue before since later versions of libav were incompatible.
RESOLVED - FIXED These patches are believed to have solved most problems (including export and import) when building with FFmpeg 0.5 to 0.8 enabled. New bug opened at bug 539 (can't build Audacity --without-ffmpeg even given a supported FFmpeg 0.5 to 0.8 version).