Home > Uncategorized > ogg to mp3

ogg to mp3

If you have a device in your home that does not reproduce ogg files. :(

#!/bin/sh

find . -name '* *' | sort | while read FILE
do
	NEWFILE=`echo ${FILE} | sed 's/ /_/g;'`
	mv "${FILE}" "${NEWFILE}"
done

for file in *.ogg
do
	ogg123 -d wav -f $file.wav $file 
	lame -m s -V 0 $file.wav
	rm $file
	rm $file.wav
done

find . -name '*ogg.wav.mp3*' | sort | while read FILE
do
	NEWFILE=`echo ${FILE} | sed 's/ogg.wav.mp3/mp3/g;'`
	mv "${FILE}" "${NEWFILE}"
done
Categories: Uncategorized
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.