| View previous topic :: View next topic |
| Author |
Message |
seanroth n00b

Joined: 19 Apr 2006 Posts: 5 Location: California, USA
|
Posted: Wed May 17, 2006 2:59 am Post subject: .ogg to .mp3 |
|
|
| How do I go about converting an ogg vorbis file into an mp3? |
|
| Back to top |
|
 |
CptnObvious999 Apprentice

Joined: 19 Dec 2004 Posts: 292
|
Posted: Wed May 17, 2006 3:08 am Post subject: |
|
|
emerge ogg2mp3 and type "ogg2mp3 file.ogg file.mp3". You can also use directories and astericks if it helps.
Note: OGG Vorbis is a next generation codec so you will be lossing a lot of quality unless you set the mp3 bitrate up high like "ogg2mp3 *.ogg *.mp3 --bitrate=256" will put all the ogg files in the current directory to 256kbps mp3 files which is probly as high as you need it maybe even too high for the non-audiophiles (the oggs wil stay there unless you have the --delete flag on) |
|
| Back to top |
|
 |
seanroth n00b

Joined: 19 Apr 2006 Posts: 5 Location: California, USA
|
Posted: Wed May 17, 2006 3:24 am Post subject: |
|
|
Thanks! I'll give that a try. I'm converting some songs to mp3s for my windows friend who doesn't have an .ogg player. (songs I have rights to, of course ) |
|
| Back to top |
|
 |
01mf02 Veteran


Joined: 21 Nov 2004 Posts: 1070 Location: Innsbruck, Austria
|
Posted: Wed May 17, 2006 12:53 pm Post subject: |
|
|
| And why don't you give him an OGG player? |
|
| Back to top |
|
 |
CptnObvious999 Apprentice

Joined: 19 Dec 2004 Posts: 292
|
Posted: Wed May 17, 2006 5:15 pm Post subject: |
|
|
| 01mf02 wrote: | | And why don't you give him an OGG player? |
yeah, the only player I know of that support OGG on Windows right now is Winamp and VLC. Amarok is being ported to Windows though so thats something to look forward to. |
|
| Back to top |
|
 |
bekkra n00b


Joined: 13 Sep 2004 Posts: 57
|
Posted: Wed May 17, 2006 6:50 pm Post subject: |
|
|
Actually, the Zinf Audio Player works very well under Windows. It even has a usable library. I use it at work, trying it to see if it would be a good choice for a little coding support
Try it, instead of converting your files !
// _________________ Bugs don't "go away" ( Steve McGuire ) |
|
| Back to top |
|
 |
XenoTerraCide Veteran


Joined: 18 Jan 2004 Posts: 1418 Location: MI, USA
|
Posted: Wed Jun 07, 2006 8:34 pm Post subject: |
|
|
just out of curiousity how would I convert the otherway? mp3 > ogg
EDIT: will conversion destroy the mp3 or create a ogg leaving mp3 intact. I'd like to test the files first. _________________ I don't hang out here anymore, try asking on http://unix.stackexchange.com/ if you want my help. |
|
| Back to top |
|
 |
Sangeki Apprentice

Joined: 23 Apr 2005 Posts: 186
|
Posted: Wed Jun 07, 2006 9:10 pm Post subject: |
|
|
Try "mp32ogg" .
I doubt that it will delete the source files by default but just read the manpage and make a backup just in case. |
|
| Back to top |
|
 |
rada Apprentice

Joined: 21 Oct 2005 Posts: 202 Location: Ottawa, Canada
|
Posted: Wed Jun 07, 2006 10:42 pm Post subject: |
|
|
| You could also use OutLAME for XMMS and that can convert any file XMMS can play into MP3. |
|
| Back to top |
|
 |
sonicbhoc Veteran


Joined: 24 Oct 2005 Posts: 1805 Location: In front of the computer screen
|
Posted: Fri Jun 09, 2006 5:38 pm Post subject: |
|
|
| I'd just give your friend a copy of Winamp and call it a day. |
|
| Back to top |
|
 |
Enverex Guru

Joined: 02 Jul 2003 Posts: 501 Location: Worcester, UK
|
Posted: Sat Jun 10, 2006 11:46 am Post subject: |
|
|
| Windows media player can play them if you install the OGG codec. |
|
| Back to top |
|
 |
jettjunker Apprentice


Joined: 10 Sep 2005 Posts: 267
|
Posted: Sat Aug 26, 2006 3:00 am Post subject: ogg to mp3 |
|
|
I just got an ipod, so I need to convert my ogg files to mp3s (I plan on still using oggs for my system, but for a portable device it doesn't really matter... hdd space isn't an issue, so I'll just have doubles of my CDs). I hate to ask for something like this, but I've spent hours googling and trying various scripts that are too old or just plain don't work... So this post is one last effort before reripping and retagging all of me CDs.
At any rate, I need a script/program that can convert folders of ogg files into mp3s AND preserve the tags while doing it. I am just hoping someone knows of something that works, as I was getting no where fast on google.
Thanks for reading this even if you can't help me, and double thanks to anyone who can |
|
| Back to top |
|
 |
mw007 Apprentice


Joined: 08 Nov 2004 Posts: 260
|
Posted: Sat Aug 26, 2006 3:21 am Post subject: |
|
|
| I know you said you've tried a bunch of converters, but have you tried ogg2mp3? |
|
| Back to top |
|
 |
jettjunker Apprentice


Joined: 10 Sep 2005 Posts: 267
|
Posted: Sat Aug 26, 2006 4:08 am Post subject: |
|
|
I've tried 3 scripts called that, but I assume you mean the one in portage. (which I never came accross in my searches... dur, I should have checked that).
At any rate, it works fine for converstion, but it puts junk in the comments section (which is what I really need, as I organized my music through the comments).
I'll tinker around a little and see if I can figure out how to stop it from doing that... Though I know little about scripting/programing.
Thanks -- at the very least you saved me the reripping portion of my problem.
EDIT: I was unsuccessful at modifying it. The script has a section that looks like it is supposed to put in the comment tag, but it is commented out (and un-commenting it [and commenting out the insert-junk section] didn't work). I tried tinkering a bit, but it's way over my head. I ended up just spending an hour and a half copy/pasting the comments. At least I didn't have to rerip though. thanks. |
|
| Back to top |
|
 |
Gentree Watchman


Joined: 01 Jul 2003 Posts: 5077 Location: France, Old Europe
|
Posted: Sun Aug 27, 2006 6:10 pm Post subject: |
|
|
the downside of all this , converting in either direction , is that both formats use very different ways to compress so you will end up with poorer quality than a direct rip to either format.
 _________________ Linux, because I'd rather own a free OS than steal one that's not worth paying for.
KX7-333 , AthlonXP1800+ @2.3GHz
AthlonXP-M on A7N8X @ 2.6/2.4GHz (winter/summer)
2.6.32-hh1 : portage ~x86 |
|
| Back to top |
|
 |
jettjunker Apprentice


Joined: 10 Sep 2005 Posts: 267
|
Posted: Mon Aug 28, 2006 2:32 am Post subject: |
|
|
Oh, I know... but I'm going from 192 vbr oggs to 128 bit mp3s that will only be played on a portable device. I'm sure I won't notice a difference  |
|
| Back to top |
|
 |
ColeSlaw Apprentice


Joined: 19 Sep 2003 Posts: 176 Location: Kearney, NE USA
|
Posted: Mon Oct 23, 2006 2:36 am Post subject: |
|
|
I recently had a need to do this myself. Came up with a good little script called Audio_conv.py
| crleblanc at gmail dot com wrote: | This script was created as a simple tool for converting between several different audio formats under Linux, Unix and Windows (OS X should work, but not tested). Conversion works by converting the input file(s) to an intermediate wav file, optionally normalizing the wav, then writing out the output file with appropriate tag information.
There are lots of other scripts that do similar things, but I created this script to handle wildcards, work recursively, and handle filenames with spaces and other strange characters (question marks, single quotes, double quotes, etc). Hopefully this script saves you some time with file conversion, it should be especialy useful for making mp3 CDs for portable mp3 players. It may look complicated, but its actually quite simple to use; just look at some of the examples and play around with it a bit. Its released under the GNU GPL version 2.
<snip>
Requirements
You must have at least some of the following installed, depending on what you're using the script for (eg: if you're not reading or writing Flac files, you dont need Flac installed). The versions listed were used for testing, but any version with the same functionality should work. All of these programs are available in Debian or Ubuntu Linux. This script has been run under windows, but each dependency must be downloaded and installed (all are available for windows and *nix).
* »Python 2.4 or greater (using the subprocess module).
* »Mplayer to decode wma files (version 1.0pre5-3.3.4).
* »vorbis-tools to decode and encode ogg vorbis files (version 1.0.1).
* »lame to encode/decode mp3s (version 3.96.1).
* »mp3info for mp3 tags (version 0.8.4)
* »flac for flac files (version 1.1.1)
* »normalize for normalization (version 0.7.6) |
Hope this helps somebody out there! _________________ My Folding@home Stats!
Join the GLUE folding Team! |
|
| Back to top |
|
 |
feld Guru


Joined: 29 Aug 2004 Posts: 593 Location: WI, USA
|
Posted: Mon Oct 23, 2006 2:51 am Post subject: |
|
|
dirogg is what you want and it's in portage _________________ < bmg505> I think the first line in reiserfsck is
if (random(65535)< 65500) { hose(partition); for (i=0;i<100000000;i++) print_crap(); } |
|
| Back to top |
|
 |
synss Apprentice


Joined: 08 Mar 2006 Posts: 279 Location: Dijon (F) > Berlin > Tokyo > Erlangen (D)
|
Posted: Fri Feb 02, 2007 2:30 pm Post subject: A shell script |
|
|
I recently purchased an iPod and almost all of my music is in ogg, I wrote a short shell-script for the conversion. It works and you get the idea if you want to expand it, it only does what I need right now...
| Code: |
#!/bin/sh
# (c) Mathias Laurin, Tokyo, 20070220, GPLv2
# Dep: oggdec and lame
#
# Takes a filename as argument, use for loops or
# find for batch processing!
INFILE="$1"
MYPATH="$2"
#VERBOSE=1
# Quality / approx bitrate
#(HQ) -V0 245 # -V1 225 # -V2 190 # -V3 175
#(mid Q) -V4 165 # -V5 130 # -V6 115
#(low Q) -V7 100 # -V8 85 # -V9 65
LAMEARGS="-V5 --vbr-new"
LAMEARGS="$LAMEARGS --replaygain-fast"
#LAMEARGS="$LAMEARGS --quiet"
if [ "${INFILE##*.}" = "ogg" ]
then
echo "<<< $INFILE"
# set/create new directory and filename.mp3
OUTFILE=$(basename "${INFILE%ogg}mp3")
OUTPATH="${MYPATH:-.}/$(dirname "$INFILE")"
if [ -e "$OUTPATH/$OUTFILE" ]
then
# Skip encoding if the file already exists
echo "$OUTPATH/$OUTFILE already exists, skipping"
exit
fi
[ ! $DEBUG ] && \
[ ! -d "$OUTPATH" ] && mkdir -p "$OUTPATH"
# get ogginfo once
INFO="$(ogginfo "$INFILE")"
# parse tags
ARTIST="$(echo "$INFO" | awk 'BEGIN { IGNORECASE = 1; FS = "="}
/^[ \t\f\n\r\v]Artist=/ { print $2 }')"
[ -n "$ARTIST" ] || ARTIST="Anonymous"
ALBUM="$(echo "$INFO" | awk 'BEGIN { IGNORECASE = 1; FS = "="}
/^[ \t\f\n\r\v]Album=/ { print $2 }')"
[ -n "$ALBUM" ] || ALBUM="Untitled"
GENRE="$(echo "$INFO" | awk 'BEGIN { IGNORECASE = 1; FS = "="}
/^[ \t\f\n\r\v]Genre=/ { print $2 }')"
[ -n "$GENRE" ] || GENRE="0"
TITLE="$(echo "$INFO" | awk 'BEGIN { IGNORECASE = 1; FS = "="}
/^[ \t\f\n\r\v]Title=/ { print $2 }')"
[ -n "$TITLE" ] || TITLE="Untitled"
DISC="$(echo "$INFO" | awk 'BEGIN { IGNORECASE = 1; FS = "="}
/^[ \t\f\n\r\v]Disc=/ { print $2 }')"
#[ -n "$DISC" ] || DISC=
TRACK="$(echo "$INFO" | awk 'BEGIN { IGNORECASE = 1; FS = "="}
/^[ \t\f\n\r\v]Tracknumber=/ { print $2 }')"
[ -n "$TRACK" ] || TRACK="00"
#[ "$#TRACK" = "1" ] && TRACK="0$TRACK"
YEAR="$(echo "$INFO" | awk 'BEGIN { IGNORECASE = 1; FS = "="}
/^[ \t\f\n\r\v]Date=/ { print $2 }')"
[ -n "$YEAR" ] || YEAR="00"
# on-the-fly re-encoding
echo ">>> $OUTPATH/$OUTFILE"
if [ $VERBOSE ]
then
echo "$ARTIST"
echo "$ALBUM"
echo "$GENRE"
echo "$DISC$TRACK"
fi
oggdec -Q "$INFILE" -o - | lame "$LAMEARGS" --ta "$ARTIST" --tl "$ALBUM" --tg "$GENRE" --tt "$TITLE" --tn "$DISC$TRACK" --ty "$YEAR" - "$OUTPATH/$OUTFILE"
fi
|
First argument is filename.ogg, second optional argument is the output directory.
For using in a single directory
| Code: | | for n in *; do ogg2mp3.sh "$n"; done |
for a bunch of files
| Code: | | find . -name "*.ogg" -print0 | xargs -0 -I'{}' ogg2mp3.sh '{}' /path/to/somewhere/else |
should do _________________ Compress portage tree
Elog viewer
Autodetect swap
Last edited by synss on Wed Feb 21, 2007 12:01 pm; edited 1 time in total |
|
| Back to top |
|
 |
madisonicus Veteran


Joined: 20 Sep 2006 Posts: 1130
|
Posted: Fri Feb 02, 2007 6:27 pm Post subject: |
|
|
Some iPods are supported with Rockbox which basically patches the firmware to enable, among other things, ogg support.
-m _________________ Please add [SOLVED] to your message title if you feel that your question has been answered.
------
Intel Q9300 Core2 Quad * Gigabyte GA-EP35C-DS3R
Samsung x360
AMD64 x2 4200+ * TF7050-M2 * HTPC
ZOTAC ION A-U Mini-ITX * HTPC |
|
| Back to top |
|
 |
Akkara Administrator


Joined: 28 Mar 2006 Posts: 3715 Location: &akkara
|
Posted: Thu Jun 04, 2009 11:48 am Post subject: Re: ogg to mp3 |
|
|
| jettjunker wrote: | | II hate to ask for something like this, but I've spent hours googling and trying various scripts that are too old or just plain don't work... So this post is one last effort before reripping and retagging all of me CDs. |
If you are going to re-rip your CDs, I recommend to rip to .flac. This is a lossless format and it'll take more space than the usual ogg or mp3. But it means you'll be able to convert to .ogg, or .mp3, or for that matter any future format once an encoder becomes available, and suffer only one lossy degradation instead of two or more.
If interested, I had written a script to automate flac -> anything conversion, including flags for maintaining a .ogg or .mp3 mirror of your flac files. And there's replies on that thread with other suggestions for doing this. |
|
| Back to top |
|
 |
|