Page 1 of 5 123 ... LastLast
Results 1 to 10 of 44

Thread: Audacity under Trusty Tahr: Building it with FFmpeg

  1. #1
    Join Date
    Dec 2006
    Beans
    7,349

    Cool Audacity under Trusty Tahr: Building it with FFmpeg

    ------------------------------------------
    A fix for this problem is available in the development version of Audacity and a patched version of Audacity will arrive in Trusty soon enough. So this guide is now of historical interest only and will close soon.....
    ------------------------------------------


    This 'mini-guide' is aimed at giving Trusty Tahr users access to the import/export function of Audacity via FFmpeg, a functionality not available with the Repository version of Audacity. Only a couple of easy steps involved:

    Build tools...

    The following build tools are required and we also create a working area for the source code. Copy the entire code block and paste into Terminal window:

    Code:
    sudo apt-get -y install build-essential checkinstall yasm && \
    mkdir -pv $HOME/audacity_build
    Development Files...

    The following development files will be used by both Audacity and by a special local installation of FFmpeg. Copy the entire code block and paste into Terminal window:

    Code:
    sudo apt-get -y install libwxgtk2.8-0 libwxgtk2.8-dev libsndfile1-dev \
    libsoxr-dev libexpat1-dev libgtk2.0-dev libasound2-dev libmad0-dev \
    libportaudio-dev libflac++-dev libid3tag0-dev libsbsms-dev libsoundtouch-dev \
    libtwolame-dev libportaudio-dev libmp3lame-dev libid3tag0-dev libfaac-dev \
    libopencore-amrnb-dev libopencore-amrwb-dev
    FFmpeg...

    This is the piece that is missing from Trusty and for this we will build a specially customised local version that will not interfere with any system FFmpeg libraries. (If you are building for a shared computer with multiple users another option would be to install to /opt, ask in the thread below). Copy the entire code block and paste into Terminal window:

    Code:
    cd $HOME/audacity_build && \
    wget http://www.ffmpeg.org/releases/ffmpeg-0.10.12.tar.bz2 && \
    tar xvf ffmpeg-0.10.12.tar.bz2 && cd ffmpeg-0.10.12 && \
    ./configure --prefix=$HOME/audacity_build/audacity_deps/usr \
                --enable-libfaac \
                --enable-libopencore-amrnb \
                --enable-libopencore-amrwb \
                --enable-libvorbis \
                --enable-libmp3lame \
                --enable-shared \
                --disable-static \
                --disable-doc \
                --disable-ffmpeg \
                --disable-ffplay \
                --disable-ffprobe \
                --disable-ffserver \
                --disable-filters \
                --disable-bsfs \
                --disable-protocols \
                --disable-debug \
                --disable-hwaccels \
                --disable-encoder=aac \
                --disable-encoder=vorbis \
                --enable-nonfree \
                --enable-version3 && \
    make -j 2 && make install-libs install-headers && make distclean
    After installing Audacity I will give instructions so Audacity can find this local installation, this will be done manually.

    Compile Audacity...

    Here we download the Audacity source code, compile it, package and install it. Copy the entire code block and paste into Terminal window:

    Code:
    cd $HOME/audacity_build && \
    wget http://audacity.googlecode.com/files/audacity-minsrc-2.0.5.tar.xz && \
    tar xvf audacity-minsrc-2.0.5.tar.xz && cd audacity-src-2.0.5 && \
    PKG_CONFIG_PATH="$HOME/audacity_build/audacity_deps/usr/lib/pkgconfig" \
    ./configure --prefix=/usr/local --with-ffmpeg && \
    make -j 2 && \
    mkdir -vp doc-pak && cp -v LICENSE.txt README.txt doc-pak && \
    sudo checkinstall --pakdir "$HOME/audacity_build" --backup=no --deldoc=yes  \
                      --pkgname audacity --pkgversion "3.2.0.5" \
                      --fstrans=no --deldesc=yes --delspec=yes --default && \
    make distclean && sudo ldconfig
    Using the FFmpeg libraries...

    To access the FFmpeg libraries from within Audacity you must show Audacity location of the libraries. Look for Edit --> Preferences --> Libraries -> FFmpeg Libraries --> Locate --> Browse and select the file:

    Code:
     $HOME/audacity_build/audacity_deps/usr/lib/libavformat.so
    Of course you will not see '$HOME' in the 'Browse' box this must be replaced with your $HOME details, if you are not sure what your details are run the following in a Terminal:

    Code:
    echo $HOME
    and this will give you the information you need. You can check if you have been successful by looking in $HOME/.audacity-data/audacity.cfg and look for a line similar to this:

    Code:
    [FFmpeg]
    Enabled=1
    FFmpegLibPath=/home/andrew/audacity_build/audacity_deps/usr/lib/libavformat.so
    And now you will have access to the Import/Export functions of Audacity through FFmpeg!

    In conclusion...

    I am hoping that this 'mini-guide' will be useful to Audacity users under Trusty, let me know if I have missed something and I will do my best to fill in the details. And in the meantime: 'Have fun!!.
    Last edited by andrew.46; June 8th, 2014 at 11:15 AM.
    You think that's air you're breathing now?

  2. #2
    Join Date
    Dec 2009
    Beans
    195

    Re: Audacity under Trusty Tahr: Building it with FFmpeg

    Thanks for the guide! Coincidentally today I installed manually ffmpeg 0.10.12 and audacity from the repos, but I wasn't sure I had everything right, so I completely uninstalled audacity and followed your guide to reinstall it, (reinstalled ffmpeg too). Everything went smoothly, export to MP3 works fine, so far so good.

  3. #3
    Join Date
    Dec 2006
    Beans
    7,349

    Re: Audacity under Trusty Tahr: Building it with FFmpeg

    Good to hear it all worked
    You think that's air you're breathing now?

  4. #4
    Join Date
    Jan 2014
    Location
    UK
    Beans
    78
    Distro
    Xubuntu 16.04 Xenial Xerus

    Re: Audacity under Trusty Tahr: Building it with FFmpeg

    Quote Originally Posted by andrew.46 View Post
    ... it all worked
    Hi
    I followed the mini-guide with audacity from svn. It's OK.

    (imho)
    It would be an improvement if we could store the FFmpeg library
    somewhere more secure than "$HOME/audacity_build/audacity_deps/usr/lib/libavformat.so".

    These are the config options that I used with FFmpeg-0.10.12.
    Code:
    ./configure \
    --prefix=$HOME/audacity_build/audacity_deps/usr \
    --enable-nonfree \
    --enable-version3 \
    --enable-libfaac \
    --enable-libgsm \
    --enable-libopencore-amrnb \
    --enable-libopencore-amrwb \
    --enable-libspeex \
    --enable-libvo-amrwbenc \
    --enable-shared \
    --disable-static \
    --disable-avdevice \
    --disable-avfilter \
    --disable-bsfs \
    --disable-doc \
    --disable-ffmpeg \
    --disable-ffplay \
    --disable-ffprobe \
    --disable-ffserver \
    --disable-filters \
    --disable-hwaccels \
    --disable-postproc \
    --disable-swresample \
    --disable-swscale
    EDIT
    There's a folder here ---> /usr/local/share/audacity
    I've put the audacity_deps/usr folder inside.
    Last edited by ron998; April 26th, 2014 at 06:09 AM. Reason: Found a secure home for libavformat.so

  5. #5
    Join Date
    Dec 2007
    Beans
    12,521

    Re: Audacity under Trusty Tahr: Building it with FFmpeg

    Quote Originally Posted by andrew.46 View Post
    Good to hear it all worked
    @andrew.46, Worked for me too

    But I was totally nervous because this was my first ever compile. Thank you for having everything laid out stepwise.

    BTW, this is on Lubuntu 14.04.

  6. #6
    Join Date
    Dec 2006
    Beans
    7,349

    Re: Audacity under Trusty Tahr: Building it with FFmpeg

    Quote Originally Posted by vasa1 View Post
    But I was totally nervous because this was my first ever compile. Thank you for having everything laid out stepwise.
    Good to hear that it has all worked out for you. The guide is designed so that those who have less experience with compiling will not be put off by complexity .
    You think that's air you're breathing now?

  7. #7
    Join Date
    Dec 2006
    Beans
    7,349

    Re: Audacity under Trusty Tahr: Building it with FFmpeg

    Quote Originally Posted by ron998 View Post
    (imho)
    It would be an improvement if we could store the FFmpeg library
    somewhere more secure than "$HOME/audacity_build/audacity_deps/usr/lib/libavformat.so".
    Could very well be true, I have left a brief not about a possible installation in /opt but not given great details, perhaps I will flesh this out a little. I have some horror of getting the FFmpeg libraries tangled up in the complex dependency arrangements of Debian / Ubuntu .

    These are the config options that I used with FFmpeg-0.10.12.
    Looks better than the ones I have suggested so next weekend I may very well add some of those in . I actually also had libvo_aacenc in place which seemed to be the better aac encoder for the older FFmpeg but it produced quite terrible aac from Audacity so I quietly removed it!
    You think that's air you're breathing now?

  8. #8
    Join Date
    Jan 2014
    Location
    UK
    Beans
    78
    Distro
    Xubuntu 16.04 Xenial Xerus

    Re: Audacity under Trusty Tahr: Building it with FFmpeg

    Quote Originally Posted by andrew.46 View Post
    ... also had libvo_aacenc in place...
    Hi
    The Audacity page here looks very interesting ---> http://manual.audacityteam.org/o/man...l_program.html
    Allows to export audio using command line programs... lame, FFmpeg etc.
    Probably fdkaac and opusenc too.

    But the FFmpeg option seems versatile.

    Maybe this is the way to go...
    For imports use FFmpeg-0.10.12 libary with --enable-whatever to add extra decoders.
    (Also disable some encoders, as in the mini-guide --disable-encoder=whatever).
    And use the system (or self-compiled) FFmpeg with bells and whistles for exports that Audacity can't handle.
    (Or FFmpeg static build from http://ffmpeg.gusari.org/static).


    This example worked OK.
    Code:
    ffmpeg -i - -c:a libfdk_aac -vbr 3 -ar 44100 -ac 2 "%f"
    And this one.
    Code:
    fdkaac -m 3 -o "%f" -
    Last edited by ron998; April 29th, 2014 at 02:02 PM. Reason: Added fdkaac command.

  9. #9
    Join Date
    Dec 2006
    Beans
    7,349

    Re: Audacity under Trusty Tahr: Building it with FFmpeg

    Quote Originally Posted by ron998 View Post
    The Audacity page here looks very interesting ---> http://manual.audacityteam.org/o/man...l_program.html
    Allows to export audio using command line programs... lame, FFmpeg etc.
    Indeed it does look very interesting! I am not sure if Audacity users are by nature commandline tinkerers so it would be interesting to know if many are using this pretty flexible part of the application. As for myself I am going to jump into some of the Audacity menus and explore some of those pretty amazing looking options .

    I am hoping that in some time the need for this guide will be gone when in a future release Audacity learns to cope with a newer FFmpeg but as a quick reading of the Audacity Forums seems to indicate this is probably not the major thrust of their work...
    You think that's air you're breathing now?

  10. #10
    Join Date
    Oct 2013
    Beans
    5

    Re: Audacity under Trusty Tahr: Building it with FFmpeg

    This is interesting. I haven't used Audacity with 14.04 until now. I have reported a bug for this issue, as I couldn't find one.

    I assume it's releated to ffmpeg being dropped from the repositories and package maintainers threw out the baby with the bathwater by removing the build flag from the package, which couldn't be any more wrong, because the actual ffmpeg package was replaced by a transitional(!) package from libav sources long ago (see also: AU - Is FFmpeg missing from the official repositories in 14.04?).

    Please hit the "affects me too" button on the page of the bugreport.

Page 1 of 5 123 ... LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •