[LAU] No ffmpeg, help convert script for Sox

F. Silvain silvain at freeshell.de
Tue Nov 18 10:33:55 UTC 2014


Kazakore, Nov 18 2014:
...
> The previously working contents of flac2mp3 was:
> #!/bin/bash
> if [ -d "${1}" ] ; then
>  cd "${1}" && for f in *.flac; do ffmpeg -i "$f" -f wav - | lame -b 320 -m j 
> -q 0 - "${f%.flac}.mp3"; done
> fi
Why not install flac, if it isn't installed already and change your ffmpeg command in that line to:
flac -d -o - $f | lame ...
the rest as before. You might need to add the quiet/silent option for flac, depending on your version of lame.
>
> I tried quickly to edit.
>
> #!/bin/bash
> if [ -d "${1}" ] ; then
>  cd "${1}" && for f in *.flac; do sox "$f" -b 16 "${f%.flac}.wav" - | lame 
> -b 320 -m j -q 0 - "${f%.flac}.mp3"; done
> fi
>
> Seems to think the .wav is an incoming file for concatenation.
>
> #!/bin/bash
> if [ -d "${1}" ] ; then
>  cd "${1}" && for f in *.flac; do sox "$f" -b 16 "${f%.flac}.wav" | lame -b 
> 320 -m j -q 0 - "${f%.flac}.mp3"; done
> fi
>
> Gives me all the wav files converted but doesn't then pass them onto the lame 
> section of the command.
>
>
> I'm sure this must be really simple! (As much having it all in one single 
> script called by just executing the file!)
>
>
> Regards, Dale.
> _______________________________________________
> Linux-audio-user mailing list
> Linux-audio-user at lists.linuxaudio.org
> http://lists.linuxaudio.org/listinfo/linux-audio-user
>

Ta-ta
----
Ffanci
* Internet: http://freeshell.de/~silvain


More information about the Linux-audio-user mailing list