How to convert .m4a audio files to .mp3 command line? (with no deterioration in quality, if possible). Ubuntu 16.04LTS media info:
General
Complete name : show.m4a
Format : MPEG-4
Format profile : Apple audio with iTunes info
Codec ID : M4A (M4A /mp42/isom)
File size : 55.5 MiB
Duration : 1h 48mn
Overall bit rate mode : Variable
Overall bit rate : 71.7 Kbps
Audio
ID : 1
Format : AAC
Format/Info : Advanced Audio Codec
Format profile : HE-AAC / LC
Codec ID : 40
Duration : 1h 48mn
Bit rate mode : Variable
Bit rate : 72.0 Kbps
Maximum bit rate : 93.8 Kbps
Channel(s) : 2 channels
Channel positions : Front: L R
Sampling rate : 44.1 KHz / 22.05 KHz
Frame rate : 21.533 fps (1024 spf)
Compression mode : Lossy
Stream size : 54.9 MiB (99%)
Writing library : Nero AAC codec 1.5.4.0
Encoding settings : -q 0.25
I note that your input file is actually a Variable Bitrate (VBR) AAC file with an overall bitrate of 71.7 Kbps and a maximum bitrate of 93.8 Kbps. So you actually have two reasonable choices: encode to a Variable Bitrate MP3 file or simply decide on a suitable bitrate for Constant Bitrate (CBR) MP3 encoding. And FFmpeg is certainly the best tool for both of these!
1. Variable Bitrate (VBR) Encoding
This would be my own choice if only for the reason that the original AAC file is also a VBR file. Encoding to MP3 with a variable bitrate of 70-105 Kbps can be mapped to FFmpeg with the
-q:a 8
option as below:And I suspect that this is your best option with your input file.
2. Constant Bitrate (CBR) Encoding
Constant Bitrate (CBR) Encoding is a little over-used IMHO but if this suits your playback equipment best then it is a valid choice. Since your input file has an overall bitrate of 71.7 Kbps and a maximum bitrate of 93.8 Kbps we could perhaps fudge the numbers a little and use the following:
Some experimentation might be in order with good choices for the bitrate being taken from the following LAME 'allowable' standards: 64k, 80k, 96k, 112k. Whatever sounds best on your playback hardware...
References:
You can use FFmpeg command-line version.
In the process of converting it to MP3, always there will be some quality loss(Although it may be unnoticeable to human hearing). MP3 is a lossy format (no matter the format of the original). You can read more about lossy and lossless formats here
Give this a try:
This will install the
ffmpeg
package.We can see what formats are acceptable by typing:
Or
Navigate to the directory your audio files are in with the
cd
command. If you need help finding the directory use thels
command.Lets say my files are in the
Desktop
folder. I would then type:Now I will be in the correct directory. Following, now we type:
To convert with a specified bitrate ( In your case it looks like 71.1Kbps with a max of 93.8Kbps - I'm not sure what will happen if trying to use the max vs the Overall bit rate, unfortunately), we run:
I pulled this information from https://www.howtoforge.com/tutorial/ffmpeg-audio-conversion/
Please note that conversion to a lossless codec (mp3) inevitably will lead to (not necessarily audible) quality loss.