[NTLUG:Discuss] Trivial MP3 conversion script

Daniel Hauck daniel at yacg.com
Sat Jun 7 15:35:42 CDT 2008


Thanks!  I should be able to adapt something like that.  Here's another
problem:

I just discovered that lame does "wav" to "mp3".  When I played back any
of the converted files, it was all white noise.  But I found another way:

mplayer filename.wma -ao pcm:file=filename.wav

Interestingly, mplayer will identify the internal WMA tag details like
name of song and artist.  I haven't yet found a way to get mplayer to
simply report that information (so that I can use it on the resulting
MP3 files with id3v2).  So I'd like to be able to convert the WMA tag
information along with the audio.  Ideas?


Russell Lemburg さんは書きました:
> Logically , I'd set up a parser to find ".wma" and replace it with an empty
> string.
> 
> This should work ...
> rename 's/\.wma.mp3$/\.mp3/' *.wma.mp3
> 
> 
> On Sat, Jun 7, 2008 at 12:50 PM, Daniel Hauck <daniel at yacg.com> wrote:
> 
>> I did this:
>>
>> for i in *.[Ww][Mm][Aa]; do lame $i ; done
>>
>>
>> The intent and purpose is to convert all WMA files in a folder over to
>> MP3.  It works, but it leaves "wma" in the resulting filename.
>>
>> For example, there is a file called "song.wma" and I run lame against
>> it, the resulting output file is "song.wma.mp3"
>>
>> How can I take the extension off of the file list and then process like
>> this?
>>
>> ... do lame $i.[Ww][Mm][Aa] $i.mp3; done
>>
>> What magic code strips off the ".wma"?
>>
>>
>> _______________________________________________
>> http://www.ntlug.org/mailman/listinfo/discuss
>>
> 
> 
> 




More information about the Discuss mailing list