Hi, On 18/11/2014 10:27, Kazakore wrote:
Well that was a surprise, to see that ffmpeg has been fully removed from Ubuntu now.
[...]
Anyway I have a little script for batch converting flacs to mp3s as I am rather space conscience while travelling and my mp3 player never liked ogg. My Bash skills are near zero and what I have working is messy from searching on the internet for a solution. Hopefully you can help me modify it to use Sox rather than ffmpeg.
For this use case you can probably simply pipe flac into lame like this: for f in *.flac;do flac -d -c "$f" | \ lame -b 320k -m j -q 0 - $(basename $f .flac).mp3;done Or am I missing something? Lorenzo. (And possibly make it so I can
simply call the command, rather than the more complex command I have to use currently.) To start the process I currently use this command in the terminal: find -type d -exec ~/bin/flac2mp3 "{}" \; 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 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@xxxxxxxxxxxxxxxxxxxx http://lists.linuxaudio.org/listinfo/linux-audio-user
_______________________________________________ Linux-audio-user mailing list Linux-audio-user@xxxxxxxxxxxxxxxxxxxx http://lists.linuxaudio.org/listinfo/linux-audio-user