Re: mp3tom4a via find and ffmpeg

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 12 Aug 2011 13:10:58 -0400
guerrier <guerrier@xxxxxxxxx> wrote:

> hello
> 
> can someone please help me with this?
> 
> i can find all the mp3s in a directory and its sub-directories with
> this:
> 
> find -name "*.mp3"
> 
> i can also ffmpeg a mp3 to m4a with this:
> 
> ffmpeg -i INPUT.mp3 -y -acodec libfaac -ab 192k OUTPUT.m4a
> 
> now, i would like to pipe all that find finds into ffmpeg.

You could try something like this :

find . -name '*.mp3' | while read f
do
ffmpeg -i "$f" -y -acodec copy -ab 192k "${f%.mp3}.m4a"
done

That should properly handle filenames containing spaces.

HTH

-- David
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@xxxxxxxxxxxxxxxxxxxx
http://lists.linuxaudio.org/listinfo/linux-audio-user


[Index of Archives]     [Linux Sound]     [ALSA Users]     [Pulse Audio]     [ALSA Devel]     [Sox Users]     [Linux Media]     [Kernel]     [Photo Sharing]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux