conversion .mp3 <->.wav<->.ogg

Raito ulist at gs1.ubuntuforums.org
Sat Jul 22 12:53:32 UTC 2006


Reply, the Nautilus script doesn't seem to work. How do you use it? Do
you need anything else? I put it in the folder and made it executable,
selected it in the shell, then another file pops up fast before I can
catch its name and goes away, the mp3 is still an mp3. 



Do I need oggenc or something?



dan;227168 Wrote: 
> On 24/06/05, vern <vern at riseup.net> wrote:

> > Hi

> > is there a simple tool that does this conversion...??

> > []'s

> > Ian

> > 

> 

> I'm not too sure where I got this from but I think it works:

> 

> #!/bin/bash

> if [ ! -f "$1" ]; then

> 	echo "Usage: $(basename $0) <file.mp3> [Album name]"

> 	exit 1

> fi

> IN_FILE="$1"

> OUT_FILE="${IN_FILE%%.mp3}".ogg

> TOC_FILE="${IN_FILE%%.mp3}".toc

> mkfifo soundpipe

> oggenc -b 192 soundpipe -o "$OUT_FILE" > /dev/null 1>&2 &

> mplayer -quiet -ao pcm -aofile soundpipe -vo null -vc dummy "$IN_FILE"

> 2> /dev/null | grep -e author -e name > "$TOC_FILE"

> rm -f soundpipe

> TITLE=$(cat "$TOC_FILE" | grep " name:" | sed -e 's/ name: //g')

> ARTIST=$(cat "$TOC_FILE" | grep " author:" | sed -e 's/ author: //g')

> ALBUM=""

> [ -n "$2" ] && ALBUM="$2"

> vorbiscomment -a -t "ARTIST=$ARTIST" -t "TITLE=$TITLE" -t

> "ALBUM=$ALBUM" "$OUT_FILE"

> rm -f "$TOC_FILE"

> 

> Put it in your Nautilus scripts folder, make it executable, and then

> you can right click on your mp3 and select the script from the context

> menu.

> 

> Dan

> 

> 

> -- 

> http://www.danicity.co.uk

> chaz_249 at hotmail.com

> 

> http://www.nosoftwarepatents.com/

> 

> -- 

> ubuntu-users mailing list

> ubuntu-users at lists.ubuntu.com

> http://lists.ubuntu.com/mailman/listinfo/ubuntu-users


-- 
Raito




More information about the ubuntu-users mailing list