Specifying ffmpeg bitrate for importing files

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

The final version of Audacity for Windows 98/ME is the legacy 2.0.0 version.
Locked
majestic12
Posts: 2
Joined: Sat Apr 09, 2011 6:30 pm
Operating System: Please select

Specifying ffmpeg bitrate for importing files

Post by majestic12 » Sat Apr 09, 2011 6:37 pm

I installed the ffmpeg libraries and pointed audacity at them so I could import an MPEG AAC (mp4a)
audio stream from an mp4 video file. However, the default settings yield a very poor quality hissing/crackling
mp3. I tried running ffmpeg from the command line using a much higher bitrate (256kb/s) and got better
quality. Is there a way to get audacity to import using a custom bitrate setting, or will I have to
manually convert everything I want to end up with high quality inside audacity???

steve
Site Admin
Posts: 81653
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Specifying ffmpeg bitrate for importing files

Post by steve » Sat Apr 09, 2011 7:46 pm

Importing a file into Audacity does not create an MP3 file. The audio track in Audacity is uncompressed audio data. Exporting to MP3 is a separate step. Where is the problem, does it sound bad and poor quality when you play the track in Audacity, or is it the exported MP3 file that sounds bad?
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

majestic12
Posts: 2
Joined: Sat Apr 09, 2011 6:30 pm
Operating System: Please select

Re: Specifying ffmpeg bitrate for importing files

Post by majestic12 » Sat Apr 09, 2011 11:17 pm

I'm only importing and playing the file inside Audacity, not exporting anything.
I had assumed it got imported as an MP3, but you're right it only says "Stereo, 44100hz 16-bit PCM".

However, I do know that when I imported it, it used FFMPEG because it didn't work before the FFMPEG library was
installed. The question is how to get Audacity convert with a particular bitrate when it imports (passing parameters
to FFPMEG). The audio started as an MP4A (AAC) stream so I know a conversion had to run to get it to 16-bit PCM.

steve
Site Admin
Posts: 81653
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Specifying ffmpeg bitrate for importing files

Post by steve » Sun Apr 10, 2011 8:54 am

Yes FFMpeg is required to decode M4A/AAC files. You should not need to pass any additional parameters to FFMpeg as the necessary information about the data format should be read automatically from the file header. In other words, If you Import a correctly formed AAC file, either from the Audacity File menu, or by drag and dropping the file into Audacity, the file should import correctly.

If you use either Audacity or FFMpeg from the command line to convert the MP4 file to "Stereo, 44100hz 16-bit PCM" WAV (uncompressed audio data) it should sound identical to the original MP4 file. (It works here). If you convert to MP3 format it will sound different to the original. If you convert the same MP4 file to an uncompressed (WAV) format, are you hearing a difference between Audacity and FFMpeg from the command line?
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Locked