bash. convert mpeg adts to normal mp3

I need script to convert many files of the format MPEG ADTS to a normal mp3. (because my net radio can't play ADTS, for example:

file plik.mp3 
plik.mp3: MPEG ADTS, layer III, v1, 128 kBits, 44.1 kHz, JntStereo

not play

file beautiful.mp3 
beautiful.mp3: Audio file with ID3 version 23.0 tag, MP3 encoding

play.
sorry for my english

It's likely to be beyond the capabilities of bash to convert an audio format sorry.

Why? Can you expand it?

The shell itself is not a good tool for this, you need an audio conversion tool which understands the format in question. Which platform are you on, and what tools are you using to convert audio? Possibly all you need is the correct codecs.

I use debian and shell - bash.
I tested this:

lame -h plik.mp3 1.mp3

and

mplayer -nojoystick -nolirc -nortc -vo null -vc dummy -af resample=44100 -ao pcm:waveheader:file=1.wav plik.mp3
lame -h 1.wav 2.mp3

and results are same - MPEG ADTS:(

Have you tried different encoders than lame?

To my limited understanding, though, most audio tools will use whatever back-end codec you have, so switching from lame to another tool might not help at all. The issue then would be to figure out how to disable or bypass the codec which writes ADTS, or pass an option to it to not use ADTS.

I had the same problem, and I couldn't find a way to convert it directly. So, I just used ffmpeg to convert it to wav.

ffmpeg -i input.mp3 output.wav