I live in Omaha.
 
Navigation
 
Search
 
Random Image
DSC_0038.jpg
 
Me. Elsewhere.
 
Archives
 
Darcy
 
Recently Read
 
Things I Like
Support the Open Rights Group
 
License
 
any2mp3

Here’s a modification of a bash script I made a while back to convert anything that mplayer can play into an mp3 file. Change bitrates and the like to taste.

1
2
3
4
5
6
7
8
9
10
11
#!/bin/bash
#
# any2mp3
#
for i in *.$1; do
mplayer -vc null -vo null -ao pcm:fast "$i" -ao pcm:file="${i%.$1}.wav"
done
for i in *.wav; do
lame -h -V2 --vbr-new "$i" "${i%.wav}.mp3"
done
rm *.wav

Say you are in a directory of m4a files, just run any2mp3.sh m4a and wait.

Posted March 18th, 2008 - Permalink
Categories: Geek
Tags: , , ,
You can leave a comment, or trackback from your own site.
 
Possibly Related Posts
 
Adjacent Posts
 
Comments

One Response to “any2mp3”

  1. VelvetCache.org » John Hobbs Blog » Blog Archive » m4a2mp3 Says:

    [...] version to go from anything (that mplayer can play) to mp3 without editing the script. Check it out here. Posted June 4th, 2007 – Permalink Categories: BASH – Computers – Linux – Music – Programming You [...]

 
Copyright © 2006 - 2010 John Hobbs
get userping