On 11/18/2014 04:27 AM, 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 [...]
> Hopefully you can help me modify
> it to use Sox rather than ffmpeg.
Or you can just add real ffmpeg back in, as many of us have been doing for
about 3 years now. If they've finally removed their fake ffmpeg package,
that will actually make things less complicated (and maybe open the door to
restoring big-boy ffmpeg over the objections of the butthurt avconv
motherforkers).
https://launchpad.net/~jon-severinsson/+archive/ubuntu/ffmpeg
As for making it work without the find command, try something like this:
#!/bin/bash
for d in "$@"; do
if [ -d "$d" ] ; then
cd "${1}" && for f in *.flac; do ffmpeg -i "$f" -f wav - | lame -b 320 -m
j -q 0 - "${f%.flac}.mp3"; done
elif [ -f "$d" ]; then
ffmpeg -i "$d" -f wav - | lame -b 320 -m j -q 0 - "${f%.flac}.mp3";
fi
done
Easy enough to put the find command right in the script, too, if you need
to do it recursively.
But what's wrong with encoding to mp3 with ffmpeg directly? Personally, I
just do something like
ffmpeg -i "$1" -b 320 `basename $1 .flac`.mp3
and it rarely fails. (If you've been using avconv pretending to be ffmpeg,
maybe that's why it didn't work to your liking.)
And when I want to copy tags over, I just use flac2mp3:
https://github.com/robinbowes/flac2mp3
Rob
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-user
Received on Tue Nov 18 20:15:01 2014
This archive was generated by hypermail 2.1.8 : Tue Nov 18 2014 - 20:15:01 EET