m4a->mp3 help

Jonas Norlander jonorland at gmail.com
Sun Oct 12 11:49:11 BST 2008


2008/10/12 Nils Kassube <kassube at gmx.net>:
> Juan Kawada wrote:
>> ok so I was thinking about trying something like
>> find ~/Music -iname "*.m4a" -exec lame -V0 -h -b 160 --vbr-new
>> input.m4a output.mp3
>>
>> but that requires me to specify the input and output name.
>
> You could try this:
>
> find ~/Music -iname "*.m4a" | while read fn;do
> lame -V0 -h -b 160 --vbr-new "$fn" "${fn%[mM]4[aA]}mp3";done
>
>
> Nils
>

Intresting. Do you mind explain the "${fn%[mM]4[aA]}mp3" part? I
understand that it will replace m4a with mp3 but i don't understand
how. It should be possible with some sed script  to.

/ Jonas



More information about the kubuntu-users mailing list