m4a->mp3 help

Juan Kawada juankawada at gmail.com
Sun Oct 12 18:40:55 UTC 2008


@ Mark, All the files are organized into folders by letter/band/album, and
konqueror doesn't look through all that.

@nils, I tried that in a test folder to see if it would work, and It found
the m4a, converted it, and put an mp3 beside the m4a of the same name.
problem is that the mp3 is 13 seconds of very loud static.
Looks like this is either a problem with the settings I chose or with lame
itself though. Heres my output.

udyrfrykte at udyrfrykte-desktop:~$ find ~/Templates -iname "*.m4a" | while
read fn;do lame -V0 -h -b 160 --vbr-new "$fn" "${fn%[mM]4[aA]}mp3";done
Assuming raw pcm input file
LAME 3.97 64bits (http://www.mp3dev.org/)
Using polyphase lowpass filter, transition band: 19383 Hz - 19916 Hz
Encoding /home/udyrfrykte/Templates/01 - Police Truck.m4a
      to /home/udyrfrykte/Templates/01 - Police Truck.mp3
Encoding as 44.1 kHz VBR(q=0) j-stereo MPEG-1 Layer III (ca. 5.7x) qval=2
    Frame          |  CPU time/estim | REAL time/estim | play/CPU |    ETA
   517/517   (100%)|    0:00/    0:00|    0:00/    0:00|   21.783x|    0:00
 32 [  4] *
160 [  7] %%
192 [143] %%%%%%%%%%%%%%%%%%%%%%%%%%%%
224 [361]
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
256 [  1] %
320 [  1] %
-------------------------------------------------------------------------------
   kbps        LR    MS  %     long switch short %
  213.0       99.2   0.8        98.5   0.8   0.7
Writing LAME Tag...done
ReplayGain: -11.9dB



On Sun, Oct 12, 2008 at 5:20 AM, Nils Kassube <kassube at gmx.net> wrote:

> Jonas Norlander wrote:
> > 2008/10/12 Nils Kassube <kassube at gmx.net>:
> > > 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
> >
> > 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.
>
> The bash syntax ${fn%m4a} would result in the environment variable $fn
> with m4a cut off from the end of the string. However this would only work
> if the m4a part is lower case only. However the find option -iname would
> also find files with upper case file names. Therefore I used "[mM]"
> instead of "m" alone and "[aA]" instead of "a" alone as wildcards because
> it will work for both upper and lower case. Finally I want to add "mp3"
> to the end of the string which results in "${fn%[mM]4[aA]}mp3" and the
> quotes are added just in case there are spaces within the original file
> name. If that explanation wasn't good enough, feel free to ask again.
>
> > It should be possible with some sed script  to.
>
> Well, if you speak sed that is certainly possible but that would
> unnecessarily start sed for every filename :)
>
>
> Nils
>
> --
> kubuntu-users mailing list
> kubuntu-users at lists.ubuntu.com
> Modify settings or unsubscribe at:
> https://lists.ubuntu.com/mailman/listinfo/kubuntu-users
>



-- 
---------------
Registered Linux user  #475220
register at http://counter.li.org/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/kubuntu-users/attachments/20081012/57a11967/attachment.html>


More information about the kubuntu-users mailing list