You are not logged in.

#1 2012-04-28 17:44:19

Reded
Member
From: Manchester, England
Registered: 2012-02-21
Posts: 242

[SOLVED] Simple bulk sound-converting GUI?

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

#2 2012-04-28 18:50:56

Foucault
Member
From: Athens, Greece
Registered: 2010-04-06
Posts: 214

Re: [SOLVED] Simple bulk sound-converting GUI?

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
exit

Save 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

#3 2012-04-28 19:00:42

Reded
Member
From: Manchester, England
Registered: 2012-02-21
Posts: 242

Re: [SOLVED] Simple bulk sound-converting GUI?

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 big_smile


"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

#4 2012-04-28 19:39:47

Foucault
Member
From: Athens, Greece
Registered: 2010-04-06
Posts: 214

Re: [SOLVED] Simple bulk sound-converting GUI?

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

#5 2012-04-28 19:46:53

Reded
Member
From: Manchester, England
Registered: 2012-02-21
Posts: 242

Re: [SOLVED] Simple bulk sound-converting GUI?

Oh so it'll convert ALL flac files on my PC into mp3? I'm getting a tad confused big_smile


"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

#6 2012-04-28 20:16:21

Foucault
Member
From: Athens, Greece
Registered: 2010-04-06
Posts: 214

Re: [SOLVED] Simple bulk sound-converting GUI?

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 smile

Offline

#7 2012-04-28 20:28:37

Reded
Member
From: Manchester, England
Registered: 2012-02-21
Posts: 242

Re: [SOLVED] Simple bulk sound-converting GUI?

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 wink


"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

#8 2012-04-28 21:00:52

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,914
Website

Re: [SOLVED] Simple bulk sound-converting GUI?

**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

#9 2012-04-28 21:06:50

Reded
Member
From: Manchester, England
Registered: 2012-02-21
Posts: 242

Re: [SOLVED] Simple bulk sound-converting GUI?

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 big_smile

I hope the SoundConverter-xfce package gets fixed though as that little application was easy enough to be used by a monkey smile


"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

#10 2012-04-28 21:07:48

Rasi
Member
From: Germany
Registered: 2007-08-14
Posts: 1,914
Website

Re: [SOLVED] Simple bulk sound-converting GUI?

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

#11 2012-04-28 21:12:11

Reded
Member
From: Manchester, England
Registered: 2012-02-21
Posts: 242

Re: [SOLVED] Simple bulk sound-converting GUI?

I'll install it and try - Thanks for the suggestion smile


"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

#12 2012-04-28 21:57:34

firecat53
Member
From: Lake Stevens, WA, USA
Registered: 2007-05-14
Posts: 1,542
Website

Re: [SOLVED] Simple bulk sound-converting GUI?

The clementine music player also has the option to transcode music.

Scott

Offline

#13 2012-04-28 22:03:11

Reded
Member
From: Manchester, England
Registered: 2012-02-21
Posts: 242

Re: [SOLVED] Simple bulk sound-converting GUI?

That's pretty cool - I usually use GogglesMM or MOC to play music, nice and small wink I've never given Clementine a shot though so I'll give it a check!

Thanks for all the suggestions so far smile

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 wink

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

#14 2012-04-28 22:11:28

Reded
Member
From: Manchester, England
Registered: 2012-02-21
Posts: 242

Re: [SOLVED] Simple bulk sound-converting GUI?

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' yikes

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 big_smile


"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

#15 2012-04-29 21:01:03

GogglesGuy
Member
From: Rocket City
Registered: 2005-03-29
Posts: 610
Website

Re: [SOLVED] Simple bulk sound-converting GUI?

For people still looking,  I created a utility for that as well: https://aur.archlinux.org/packages.php?ID=46306 smile

Offline

Board footer

Powered by FluxBB