You are not logged in.
Hey all!
I've accumilated a fair few .FLAC files on my computer, and I could do with them being converted to MP3. On Ubuntu I used to use SoundConverter - It was a super simple GUI for doing that. However to install it from AUR pulls in 50MB of Gnome dependencies which I don't really want.
Is there a viable alternative? I'm OK with CLI tools too, as long as they can do more than one sound file at a time.
I've looked through MEncoder wiki at the GUI's and they all seem to be for video, so I'm not sure what else to try.
Thanks for any replies all!
Last edited by Reded (2012-04-28 22:14:46)
"Some humans would do anything to see if it was possible to do it. If you put a large switch in some cave somewhere, with a sign on it saying "End-of-the-World Switch. PLEASE DO NOT TOUCH", the paint wouldn't even have time to dry."
Offline
I use a little script for this kind of job. It needs lame and flac.
#!/bin/bash
if [ $# -lt 1 ]
then
echo "Usage `basename $0` [-q quality] [-f output folder] file"
exit 1
fi
qual=3
fol="./"
while getopts "q:f:" flag
do
case $flag in
q)
qual=$OPTARG
;;
f)
fol=$OPTARG
;;
esac
done
shift $((OPTIND-1))
if [ ! -d $fol ]; then
mkdir -p "$fol";
fi
for file in "${@}"
do
if [ ! -f "${file}" ]; then
continue;
fi
file=${file%.flac}
title=`metaflac --show-tag="TITLE" "$file.flac" | sed -e "s/title=//I"`
artist=`metaflac --show-tag="ARTIST" "$file.flac" | sed -e "s/artist=//I"`
album=`metaflac --show-tag="ALBUM" "$file.flac" | sed -e "s/album=//I"`
date=`metaflac --show-tag="DATE" "$file.flac" | sed -e "s/date=//I"`
genre=`metaflac --show-tag="GENRE" "$file.flac" | sed -e "s/genre=//"I`
track=`metaflac --show-tag="TRACKNUMBER" "$file.flac" | sed -e "s/tracknumber=//I"`
flac -c -d "$file.flac" | lame --vbr-new \
--tt "$title" --ta "$artist" --tg "$genre" --tl "$album" \
--ty "$date" --tn "$track" -V $qual - "${fol}/${file}.mp3"
done
exitSave it somewhere in your path, call it what you like (let's say flac2mp3), make it executable and call it like this
flac2mp3 -f OUTF -q QUAL *flac This will convert all your flacs into mp3s with variable bitrate of quality QUAL (0 is best, 9 is worst) and put them under folder OUTF. The arguments are optional and the default values are "./" (current folder) and 3 respectively. If you want CBR mp3s you need to tweak around the options a bit (man lame).
I'm pretty damn sure there are more elegant solutions but this works fine for me.
Last edited by Foucault (2012-04-28 18:52:02)
Offline
So I place that script into my file-ful of flac's and then run it in terminal?
Anything's gotta be more elegant than downloading 50mb of Gnome I'm never going to use - Like many other new Archers I've discovered OpenBox ![]()
"Some humans would do anything to see if it was possible to do it. If you put a large switch in some cave somewhere, with a sign on it saying "End-of-the-World Switch. PLEASE DO NOT TOUCH", the paint wouldn't even have time to dry."
Offline
You must put it in your $PATH. Issue echo $PATH to see which directories are included in your path. Don't forget to make it executable with (chmod +x flac2mp3, or whatever is called).
Offline
Oh so it'll convert ALL flac files on my PC into mp3? I'm getting a tad confused ![]()
"Some humans would do anything to see if it was possible to do it. If you put a large switch in some cave somewhere, with a sign on it saying "End-of-the-World Switch. PLEASE DO NOT TOUCH", the paint wouldn't even have time to dry."
Offline
You really need to do yourself some reading on the use of the shell if you want to survive Arch; there are dozens of tutorials available on the internet (for example this was the first google result). The $PATH is a list of directories in which the shell looks up executables so that they can be available for use without using the absolute path (for example you can use xterm, instead of /usr/bin/xterm). Then you can cd into a directory and invoke the script. flac2mp3 a_track.flac will convert a_track.flac into mp3, flac2mp3 *flac will convert all flacs in the current directory. This is really basic bash so do your homework ![]()
Offline
Yes I'm a bash newbie I know - I vaguely understood the parts you bolded there - What I didn't see in the command was the part that says 'only do these files' - Sorry if I missed that bit, it's that part that's confusing me!
OK cd'ing into the directory - I got that now. That's the part I was struggling with - the 'use this file' part.
I'll give it a try, thanks for helping - I will make sure to learn bash more in future ![]()
"Some humans would do anything to see if it was possible to do it. If you put a large switch in some cave somewhere, with a sign on it saying "End-of-the-World Switch. PLEASE DO NOT TOUCH", the paint wouldn't even have time to dry."
Offline
**edit**
soundconverter-xfce does not work.. some gladexml errors on startup.
Last edited by Rasi (2012-04-28 21:07:35)
He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.
Douglas Adams
Offline
Rasi - I tried to use that one and the build failed - Thanks for bringing it up as I forgot to post a comment on there.
For now Foucault's script seems to have done the job ![]()
I hope the SoundConverter-xfce package gets fixed though as that little application was easy enough to be used by a monkey ![]()
"Some humans would do anything to see if it was possible to do it. If you put a large switch in some cave somewhere, with a sign on it saying "End-of-the-World Switch. PLEASE DO NOT TOUCH", the paint wouldn't even have time to dry."
Offline
http://aur.archlinux.org/packages.php?ID=56726
This is what i use.
And if you want something like soundconverter: try gnac-xfce from aur.
Last edited by Rasi (2012-04-28 21:09:47)
He hoped and prayed that there wasn't an afterlife. Then he realized there was a contradiction involved here and merely hoped that there wasn't an afterlife.
Douglas Adams
Offline
I'll install it and try - Thanks for the suggestion ![]()
"Some humans would do anything to see if it was possible to do it. If you put a large switch in some cave somewhere, with a sign on it saying "End-of-the-World Switch. PLEASE DO NOT TOUCH", the paint wouldn't even have time to dry."
Offline
That's pretty cool - I usually use GogglesMM or MOC to play music, nice and small
I've never given Clementine a shot though so I'll give it a check!
Thanks for all the suggestions so far ![]()
Clementine seems a bit bulky for my needs - I generally just turn a playlist on and put shuffle on, I feel like the only part of Clementine I'd use is the transcoding part! Maybe I should message them and just ask for that bit ![]()
Last edited by Reded (2012-04-28 22:06:14)
"Some humans would do anything to see if it was possible to do it. If you put a large switch in some cave somewhere, with a sign on it saying "End-of-the-World Switch. PLEASE DO NOT TOUCH", the paint wouldn't even have time to dry."
Offline
I think I may have found a winner after some more googling - It's called FF Multi Converter and appears to do audio, video, images and documents, with a checkbox for 'all files in this folder' ![]()
I assume by it's name it's a frontend for ffmpeg, which suits me fine - I did have TraGtor installed but that didn't seem to want to do anything right.
Thread is solved for now, assuming FF Multi Converter does the job - Thanks for all your contributions, I love how I got so many suggestions that are all completely different approaches to each other, choice is good ![]()
"Some humans would do anything to see if it was possible to do it. If you put a large switch in some cave somewhere, with a sign on it saying "End-of-the-World Switch. PLEASE DO NOT TOUCH", the paint wouldn't even have time to dry."
Offline
For people still looking, I created a utility for that as well: https://aur.archlinux.org/packages.php?ID=46306 ![]()
Offline