Audacity and FFMPEG on Mac

This section is now closed.
Forum rules
Audacity 1.3.x is now obsolete. Please use the current Audacity 2.1.x version.

Mac 0S X 10.3 and earlier are no longer supported but you can download legacy versions of Audacity for those systems HERE.
Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10 / 11

Re: Does ffmpeg feature not work on Mac?

Post by Gale Andrews » Sun Nov 23, 2008 7:53 pm

If you haven't seen it, there is a link here that might help (at least it does not suggest you have to install a string of dependencies separately):
http://stephenjungels.com/jungels.net/a ... howto.html

I'll see if I can find someone else to help here with this.


Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

sfatula
Posts: 11
Joined: Sun Nov 16, 2008 12:02 am
Operating System: Please select

Re: Does ffmpeg feature not work on Mac?

Post by sfatula » Sun Nov 23, 2008 8:01 pm

The easier way is to simply use Macports. Assuming you use other ports, this can save you immense amounts of time and hassle. It avoids you having to figure out how to install various packages, except Macports of course.

Josh24
Posts: 10
Joined: Tue Oct 28, 2008 6:10 pm
Operating System: Please select

Re: Does ffmpeg feature not work on Mac?

Post by Josh24 » Mon Nov 24, 2008 6:53 pm

Yes it does.
If you're interested in building Audacity with ffmpeg support, here's how I did it. I'll offer a condensed version (A) for those familiar with compiling from source and (B) for the bold initiates. This worked on a PPC Mac ibook with Leo 10.5.2, with current Developers Tools installed and building in Terminal.
A: The current CVS release now builds with ./configure --with-ffmpeg=system. You need to build and install ffmpeg from source first to get the three libraries Audacity needs. (libavcodec,libavformat,libavutils) Get a snapshot from http://ffmpeg.mplayerhq.hu/download.html. I used the barebones link for a nightly build. That server is apparently not always awake, but I eventually got FFmpeg-20050807.tar.bz2. This I built in a local dir to see what it made.

Code: Select all

 ./configure --prefix=<dir> --enable-shared --disable-static 
If you read ./configure --help, you'll see that by default the libs are built the opposite of this, hence the switch.
If you want fffmpeg to support AAC you need to install libfaac and libfaad first and then add "--enable-libamr-nb --enable-libamr-wb --enable-nonfree" to the above configure. You can find FAAD and FAAC at:
http://www.audiocoding.com/ I skipped the AAC support for now. With my above configure, my install dir now held 4 dirs; bin,include,lib,and share. In /lib; i got libavcodec.52.1.0.dylib, libavdevice.52.1.0,libavformat.52.23.1.dylib, and libavutil.49.12.0. (and the symlinks). So I copied the works to /usr/local. (If you make /usr visible in the Finder ((Go menu-->GotoFolder)) you can transfer files to appropriate /local dirs. (with authentication) Before you move /lib/pkgconfig/*.pc files, edit the first line of each to read: prefix=/usr/local. (Or skip building in a test dir altogether, and slam it all in /usr/local properly from the get go.)

So now, if you've compiled Audacity of any sort before and your build set-up works, then grab up a fresh CVS copy (or update) and then, I used:

Code: Select all

./configure  --enable-unicode --with-ffmpeg=system --with-libsndfile=system --with-libsamplerate --with-libresample=no --with-libvorbis=system --with-libflac=system --with-libid3tag=system --with-libtwolame=system  --without-soundtouch --with-libmad --without-libvamp --without-redland --without-slv2 --without-liblrdf --without-midi --without-libscorealign --disable-nyquist 
I had all the optional libs pre-installed in system to speed up compile time and because I wanted to build against a custom libvorbis. If you checked out the thread at Nabble that Gale mentions, you'll see that there were problems with ffmpeg=local (they are fixed now but you still need the actual libs in your system to point to in preferences, which now correctly asks for avformat.dylib and then finds the others. Whether or not the additional steps we used in test building ( the addition of the CXXFLAGS="-Wall -Wextra" --with-ffmpeg=system and the make dep step) are still needed I don't know. If you add them, remember to toss the generated .depend and .gchdepend files from your build folder when you're all done.

[The extension tiff has been deactivated and can no longer be displayed.]


It works fine, and shows up as Audacity 1.3.7 -alpha in build info window.

(B) The best concise explanation I've found of the GNU bulld system for those who are interested:
http://www.st-andrews.ac.uk/~iam/docs/tutorial.html and documentation from GNU.org.
(if you want to install anything you build from source get pgk-config installed first so that other projects can find and use these libraries.)
A few things I learned: forget Fink and MacPorts, and forget the XCode project build... Get the ffmpeg snapshot.

Until Team Audacity releases a tarball with ffmpeg enabled, you need to build ffmpeg from source as well as Audacity from CVS.
For Audacity, get pkg-config, gettext, and wx-mac installed first.

Get the GNU versions installed into /usr/local, although Leopard has some kind of widgets and package manager in /usr, you don't want Audacity's configure script to find them first. Fink also has a pkg mgr that you want to hide. In other words, temporarily alter your $PATH. At your prompt type PATH=/usr/local/bin:$PATH. Now type echo $PATH. With /usr/local/bin now first in the list of : seperated search paths, the right stuff will be found first. If you have Fink installed libs that you want found in /sw, they still will be found when needed. Or maybe not, all my libs have a .pc file in /usr/libs/pkgconfig. That where Audacity looks first for build info and location of external libs it needs, and thats why you need it.
( This $PATH change is temporary for this shell session only, if you quit or log-out of Terminal you'll be reverted to your default next time. Or you can edit your
~/.profile and comment out the Fink script lines with a # to lose /sw from your path for awhile.)

Gettext is annoying and big, get the package, then just run the gettext-tools sub folder configure script, as really all Audacity wants is 'msgfmt' functionality to build the stupid .po translation files in locale.

I built wx-mac widgets 2.8.8 in /usr/local (default). 'mac-unicode-release-static-2.8' is the configuration descriptor, the version included in Leopard is mac-ansi-shared-debug which is a curious choice, but if you read the Audacity config script output you'll see which version it found.

Maybe I'll think of more later,
JK

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10 / 11

Re: Does ffmpeg feature not work on Mac?

Post by Gale Andrews » Sun Dec 21, 2008 7:08 pm

Note there may be other issues too:

* building and installing libmad may not result in a corresponding .pc file in usr/local/lib/pkgconfig
* configure may not see LIBSNDFILE without a PKG_CONFIG_PATH environment variable

For more on this, see:
http://audacityteam.org/forum/viewtopic ... d=a#p30850


Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10 / 11

Re: Does ffmpeg feature not work on Mac?

Post by Gale Andrews » Tue Dec 23, 2008 9:11 am

An FFmpeg binary for Mac is now available.

Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

svtcanuk
Posts: 2
Joined: Tue Dec 30, 2008 11:44 pm
Operating System: Please select

Re: Does ffmpeg feature not work on Mac?

Post by svtcanuk » Tue Dec 30, 2008 11:50 pm

When I try to use the the ffmpeg installer, audacity is looking for avformat-52.dll which it will never find for obvious reasons. Should it not be looking for libavformat.52.dylib?

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10 / 11

Re: Does ffmpeg feature not work on Mac?

Post by Gale Andrews » Wed Dec 31, 2008 12:38 am

svtcanuk wrote:When I try to use the the ffmpeg installer, audacity is looking for avformat-52.dll which it will never find for obvious reasons. Should it not be looking for libavformat.52.dylib?
1.3.6 Mac release does look for the Windows .dll in error, but this was corrected in source code on 18 November so that it looks for libavformat-52.dylib, which is the current major version. If you choose the "All Files" filter you should be able to select and use libavformat-52.dylib. Alternatively, download the latest nightly build of Audacity (the bottom one on the list here).


Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

svtcanuk
Posts: 2
Joined: Tue Dec 30, 2008 11:44 pm
Operating System: Please select

Re: Does ffmpeg feature not work on Mac?

Post by svtcanuk » Fri Jan 02, 2009 5:31 am

Thank you very much, works like a charm now ;)

macbuz
Posts: 8
Joined: Thu Jan 08, 2009 7:33 pm
Operating System: Please select

Re: Does ffmpeg feature not work on Mac?

Post by macbuz » Thu Jan 08, 2009 9:56 pm

I too was having this difficulty and visited the link a couple replies up, chose the nightly from 1/6/09 and all is well regarding audacity and ffmpeg libraries. I'm probably not the user to be using a beta build but thought I would give it a whirl.

FWIW - the Audacity Application inside the 1.3.7a Folder still checks in as 1.3.6 in the finder. FWIW.
Mac OS 10.5.6; MBP 2.4 GHz, 4Gb; Audacity 1.3.7a, Ffmpeg 0.0.9y, et al

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10 / 11

Re: Does ffmpeg feature not work on Mac?

Post by Gale Andrews » Fri Jan 09, 2009 2:44 am

macbuz wrote:the Audacity Application inside the 1.3.7a Folder still checks in as 1.3.6 in the finder.
The File Version should be 1.3.7.0. Can you be specific as to the steps in Finder where it shows Audacity as 1.3.6?

Thanks


Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

Locked