1

I wish to convert the encoder of some audio files. The problem is that my car can't reproduce audio files encoded with LAME3.99.5; it's an issue with some Volvo cars. The problem is with USB and CD.

The encoder needs to be LAME3.95 or less, or another encoder. What command should I use to achieve this? I would like to make it scriptable to encode a lot of files recursively.

I'm trying SoX and ffmpeg with no luck.

2
  • 1
    Have you try to use FLAC instead of mp3? Commented Feb 27, 2022 at 11:36
  • 1
    I tried AAC format and it worked! I'm gonna try FLAC tomorrow. Thanks!
    – Unix
    Commented Feb 28, 2022 at 19:44

1 Answer 1

1

Are you aware of the standalone "lame", which you can choose version to download:

https://sourceforge.net/projects/lame/files/lame/3.95/

... but then you need to compile it ;-p

$ uname -a
... 20.04.1-Ubuntu ... x86_64 GNU/Linux
$ tar -xvf lame-3.95.tar.gz 
$ cd lame-3.95/
$ ./configure 2>&1 > log.txt
$ make all 2>&1 >> log.txt
$ grep -E 'fail|erro' log.txt | wc -l
1
$ grep -E 'fail|erro' log.txt
checking for library containing strerror... none required
$ ./frontend/lame --help
LAME version 3.95  (http://www.mp3dev.org/)

usage: ./frontend/lame [options] <infile> [outfile]

    <infile> and/or <outfile> can be "-", which means stdin/stdout.

RECOMMENDED:
    lame -h input.wav output.mp3

OPTIONS:
    -b bitrate      set the bitrate, default 128 kbps
    -f              fast mode (lower quality)
    -h              higher quality, but a little slower.  Recommended.
    -m mode         (s)tereo, (j)oint, (m)ono
                    default is (j) or (s) depending on bitrate
    -V n            quality setting for VBR.  default n=4

    --preset type   type must be "medium", "standard", "extreme", "insane",
                    or a value for an average desired bitrate and depending
                    on the value specified, appropriate quality settings will
                    be used.
                    "--preset help" gives more info on these

    --longhelp      full list of options

... now you need to have your "mp3"-file as WAV as you're about to run this; I'd guess sox or ffmpeg can create that, one file at a time...

I would like to make it scriptable to encode a lot of files recursively.

Now, go to www.tldp.org and read the Bash guides, there is one for beginners, then another one named "Advanced".

4
  • I know bash and I know how to compile. The sentence «I would like to make it scriptable to encode a lot of files recursively» was not the question. The question was about how to reformat an audio file with a different encoder. I used ffmpeg to convert an audio file to AAC format and it worked. I'm gonna try the FLAC format as well, before compiling an another LAME version. (What could happen if I compile an another LAME version in my Debian? Could this cause incompatibilities in some command line tools that I use every day, like yt-dlp, ytfzf, mplayer, mpv?)
    – Unix
    Commented Feb 28, 2022 at 19:53
  • 1
    I think I'm gonna convert all mp3 files to AAC or FLAC, because this fixes the issue without dealing with the encoder directly.
    – Unix
    Commented Feb 28, 2022 at 19:55
  • 1
    Well, lame isn't installed per default in Ubuntu, so no problems there. Dunno about Debian, I suspect the situation is the same. FLAC will bring your music file count down by a factor of ten or so. This just proves that "having the latest" isn't always the best option.
    – Hannu
    Commented Feb 28, 2022 at 20:30
  • Thanks again! Totally agree with that: having the latest is not always the best option. That's the reason I migrated from Arch to Debian some years ago (maintenance).
    – Unix
    Commented Feb 28, 2022 at 22:40

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .