Mplayer & Lame command

Asked by KKevin901

Try to convert realaudio audio file to mp3 format for MP3 player playing back. Browse around on web and learned the following command lines. It works but the playback audio volume is too low that almost cannot hear.

Would like to get advise on the following command if anyway to boot up the output audio gain:

#Rip with Mplayer / encode with LAME
for i in *.ra ; do mplayer -vo null -vc dummy -af resample=11025 -ao pcm:waveheader $i && lame -m s audiodump.wav -o $i; done
#convert file names
for i in *.ra; do mv "$i" "`basename "$i" .ra`.mp3"; done
rm audiodump.wav

Thanks

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu lame Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
mycae (mycae) said :
#1

Use the audio editor "audacity" to change the volume level. Its pretty straightforward.

Revision history for this message
mycae (mycae) said :
#2

Oh, if you are doing batch, you may want to look at the package normalize-audio

Revision history for this message
KKevin901 (kkevin901) said :
#3

The audacity works. But it takes many steps on graphical process.

I have the above command lines put onto a script. It will be perfect if someone can advise to twist the above command lines instruction to add the normalize-audio or gain control. As it will then be a one step command line simple instruction.

Thanks

Revision history for this message
mycae (mycae) said :
#4

add at the end of your script:

for i in *.mp3; do normalize-audio --amplitude=-12dBFS $i ; done

after installing the normalize-audio program.

Note that the above will fail if your filenames have spaces in them

Can you help with this problem?

Provide an answer of your own, or ask KKevin901 for more information if necessary.

To post a message you must log in.