Audacity and ffmpeg

Questions about applications and software
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
vasmakk

Audacity and ffmpeg

Post by vasmakk »

Hi folks!

Today I tried to load an m4a audio file with Audacity for further editing, but surprisingly the file could not be loaded!
This is the error message I got:

Code: Select all

 "/home/vasmakk/music.m4a" is an Advanced Audio Coding file. Audacity cannot open this type of file. You need to convert it to a supported audio format, such as WAV or AIFF.
This is a codec issue. In earlier versions of LM I had to install ffmpeg and everything worked just fine.
But in LM 17 Qianna ffmpeg is missing! Any suggestions or alternatives?
I want to use Audacity and no other software as I find it very handy...

Thx!
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
kurotsugi

Re: Audacity and ffmpeg

Post by kurotsugi »

m4a is using propietary codec, thus audacity will refuse to play it. please run these command and tell us the result

Code: Select all

sudo apt-get update
aptitude search ffmpeg
vasmakk

Re: Audacity and ffmpeg

Post by vasmakk »

Thanks kurotsugi for your fast reply!

This is the output

Code: Select all

$ aptitude search ffmpeg
p   chromium-codecs-ffmpeg          - Free ffmpeg codecs for the Chromium Browse
p   chromium-codecs-ffmpeg:i386     - Free ffmpeg codecs for the Chromium Browse
p   chromium-codecs-ffmpeg-dbg      - chromium-codecs-ffmpeg debug symbols      
p   chromium-codecs-ffmpeg-dbg:i386 - chromium-codecs-ffmpeg debug symbols      
p   chromium-codecs-ffmpeg-extra    - Extra ffmpeg codecs for the Chromium Brows
p   chromium-codecs-ffmpeg-extra:i3 - Extra ffmpeg codecs for the Chromium Brows
p   chromium-codecs-ffmpeg-extra-db - chromium-codecs-ffmpeg-extra debug symbols
p   chromium-codecs-ffmpeg-extra-db - chromium-codecs-ffmpeg-extra debug symbols
p   cmus-plugin-ffmpeg              - lightweight ncurses audio player (FFmpeg p
p   cmus-plugin-ffmpeg:i386         - lightweight ncurses audio player (FFmpeg p
p   ffmpeg2theora                   - Theora video encoder using ffmpeg         
p   ffmpeg2theora:i386              - Theora video encoder using ffmpeg         
p   ffmpegthumbnailer               - fast and lightweight video thumbnailer    
p   ffmpegthumbnailer:i386          - fast and lightweight video thumbnailer    
p   ffmpegthumbnailer-dbg           - debugging informations for ffmpegthumbnail
p   ffmpegthumbnailer-dbg:i386      - debugging informations for ffmpegthumbnail
p   ffmpegthumbs                    - video thumbnail generator using ffmpeg    
p   ffmpegthumbs:i386               - video thumbnail generator using ffmpeg    
p   gmerlin-encoders-ffmpeg         - ffmpeg encoders for Gmerlin               
p   gmerlin-encoders-ffmpeg:i386    - ffmpeg encoders for Gmerlin               
i   gstreamer0.10-ffmpeg            - FFmpeg plugin for GStreamer               
p   gstreamer0.10-ffmpeg:i386       - FFmpeg plugin for GStreamer               
p   kffmpegthumbnailer              - video thumbnailer for KDE                 
p   kffmpegthumbnailer:i386         - video thumbnailer for KDE                 
p   libffmpegthumbnailer-dev        - development files for ffmpegthumbnailer   
p   libffmpegthumbnailer-dev:i386   - development files for ffmpegthumbnailer   
p   libffmpegthumbnailer4           - shared library for ffmpegthumbnailer      
p   libffmpegthumbnailer4:i386      - shared library for ffmpegthumbnailer      
p   libxine1-ffmpeg                 - MPEG-related plugins for libxine1         
p   libxine1-ffmpeg:i386            - MPEG-related plugins for libxine1         
p   libxine2-ffmpeg                 - MPEG-related plugins for libxine2         
p   libxine2-ffmpeg:i386            - MPEG-related plugins for libxine2         
p   moc-ffmpeg-plugin               - ncurses based console audio player - ffmpe
p   moc-ffmpeg-plugin:i386          - ncurses based console audio player - ffmpe
p   nepomuk-core-ffmpegextractor    - Nepomuk Semantik Desktop core libraries --
p   nepomuk-core-ffmpegextractor:i3 - Nepomuk Semantik Desktop core libraries --
$
I guess there must be something to install from those packages.
But which one ?
User avatar
Flemur
Level 20
Level 20
Posts: 10097
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: Audacity and ffmpeg

Post by Flemur »

ffmpeg in synaptic says*:
"This package contains the deprecated ffmpeg program. This package also serves
as a transitional package to libav-tools. Users are advised to use avconv from
the libav-tools package instead of ffmpeg."

I can read (most?) mp4 files with audacity; try installing libav-tools and libavcodec-extra-53.

*Edit: in Mint 16.
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
vasmakk

Re: Audacity and ffmpeg

Post by vasmakk »

Flemur wrote: I can read (most?) mp4 files with audacity; try installing libav-tools and libavcodec-extra-53.

*Edit: in Mint 16.
That is the problem Flemur...

There is no libavcodec-extra-53 in Mint 17.
Only libavcodec-extra-54. An this one doesnt support m4a (I have allready installed it!)
Thanks anyway!
kurotsugi

Re: Audacity and ffmpeg

Post by kurotsugi »

m4a and mp4 is two different things but you can try with flemur's suggestion. there are also several alternative tools which can be used to conver m4a file to mp3 such as
- soundconverter
- ffmulticonverter
vasmakk

Re: Audacity and ffmpeg

Post by vasmakk »

kurotsugi

Like I said, there is no libavcodec-extra-53 in LM 17 Qiana. Only in previous versions of LM
So I cannot try Flemur's suggestion...
I have already installed libavcodec-extra-54 but that doesnt help!
I am interested to convert m4a files not mp4... I tried other converters, but since most of them use the same codecs (which are not present)
they also dont work... I also tried avconv (from libav-tools) but the same happened. It failed!

Anyway thanks for all your efforts guys
I really don't know what to do! should I install LM 16 again ?
snipertyler
Level 1
Level 1
Posts: 27
Joined: Mon Aug 19, 2013 10:44 am

Re: Audacity and ffmpeg

Post by snipertyler »

ffmpeg & avconv have been in a bit of a war with some.. deceptive messages from Ubuntu, you may be using the "fake" ffmpeg [1]
So my suggestion would be to get one from their site [2] or compile it yourself [3].
About m4a, it seems that aac is essentially m4a [4] so the binaries from [3] should work fine as they support aac
To "install" swap out the binary you download to where the current one resides (marking it ffmpeg.bak if you're cautious)
You can use whereis ffmpeg or type ffmpeg to find the location.

If audacity doesn't support it after this, ffmpeg will. (not sure how much audacity uses ffmpeg as a backend)
Run ffmpeg by itself and check for a "aac" in the output to make sure it has support.

[1] http://stackoverflow.com/a/9477756/1109017
[2] http://ffmpeg.org/download.html
[3] http://trac.ffmpeg.org/wiki/CompilationGuide
[4] http://www.differencebetween.net/techno ... c-and-m4a/
kurotsugi

Re: Audacity and ffmpeg

Post by kurotsugi »

Code: Select all

avconv -i <filename>.m4a <filename>mp3
this command works perfectly on my system. the aac codec is on libavcodec-extra package. if you have it installed then you should play and convert those file easily.
vasmakk

Re: Audacity and ffmpeg

Post by vasmakk »

Thanks kurotsugi
Thank you guys!

Of course all the above solutions work for me too...
But I was hopping to import m4a files directly into Audacity like I used to in LM 13 "Maya".
Now I have to convert them to mp3 wav of aiff formats first, using avconv. And then import them to Audacity
kurotsugi

Re: Audacity and ffmpeg

Post by kurotsugi »

that's a tricky one :3
AFAIK you'll need to compile audacity with libav/ffmpeg integration option turned on. recent audacity didn't have this option turned on by default.
vasmakk

Re: Audacity and ffmpeg

Post by vasmakk »

Ok, now I see...
Thx kuro :) for everything
Ginsu543

Re: Audacity and ffmpeg

Post by Ginsu543 »

kurotsugi wrote:that's a tricky one :3
AFAIK you'll need to compile audacity with libav/ffmpeg integration option turned on. recent audacity didn't have this option turned on by default.
I just found a solution to this, if you're willing to add an unofficial ppa by Doug McMahon (you can check out his Launchpad webpage here). He has recompiled Audacity 2.0.5 with the ffmpeg option turned on and has included the necessary library files in his ppa.

Just follow his instructions:
  • 1. Open Software Sources and add his ppa (ppa:mc3man/testing5)
    2. Open Synaptic Package
    3. Upgrade Audacity
    4. Install the following three libraries: libavcodec53, libavformat53, and libavutil51
    5. Open Audacity --> Edit --> Preferences --> Libraries and point the FFmpeg Library to /opt/ffmpeg-compat/lib/libavformat.so.53
I used this new-and-improved Audacity to encode a .wav file into .m4a earlier today. Works like a charm!
Locked

Return to “Software & Applications”