LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 03-26-2005, 12:30 AM   #1
caleb star
Member
 
Registered: Nov 2003
Location: Blankette Blankolina
Distribution: Blank Linux
Posts: 107

Rep: Reputation: 15
convert ogg to mp3


What program can I use to convert ogg files to mp3, and where can I find it?

Thanx.
 
Old 03-26-2005, 12:45 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Try the 'sox' program. It may be on your installation disk.
Using it is easy. sox <filename.ogg> <filename.mp3>

Look at the info page because there are many options.
 
Old 03-26-2005, 03:26 AM   #3
reddazz
LQ Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 77
There is a program called ogg2mp3.
 
Old 03-27-2005, 12:27 AM   #4
UltimateZer0
LQ Newbie
 
Registered: Sep 2003
Posts: 10

Rep: Reputation: 0
I use a script that I wrote called oggbatch. It goes something like this

Code:
#!/bin/bash

oggdec *ogg
lame --preset 192 -ms -h *wav
rm -f *ogg
rm -f *wav
done
Hope this is helpful.
 
Old 03-27-2005, 04:56 PM   #5
futhark
Member
 
Registered: Nov 2003
Location: Montréal (Can)
Distribution: FC4
Posts: 110

Rep: Reputation: 15
Is this a good idea? You're going to lose quality:
- You compress to mp3 and discard info in the process.
- By converting the mp3 to wav you don't lose anything.
- By converting the wav to ogg you lose some more.

I'm using ogg but I haven't tried to convert my mp3 library to that format. I only rip new cds into ogg.
 
Old 03-27-2005, 05:01 PM   #6
n_hendrick
Member
 
Registered: Jan 2004
Location: Canal Fulton OH.
Distribution: Ubuntu 15.04, Gentoo
Posts: 68

Rep: Reputation: 15
Everyone's always talking about xmms....try it, theres an option to change the input plug to LAME. You should be able to convert any audio file to mp3 within xmms. Thats what I do....but there are other open source techniques....
 
Old 03-27-2005, 08:13 PM   #7
benjithegreat98
Senior Member
 
Registered: Dec 2003
Location: Shelbyville, TN, USA
Distribution: Fedora Core, CentOS
Posts: 1,019

Rep: Reputation: 45
I would suggest the ogg2mp3 program that reddazz suggested because it keeps the id3 tags.
 
Old 01-04-2007, 07:38 AM   #8
flickerfly
LQ Newbie
 
Registered: Feb 2005
Location: Lanham, MD
Distribution: Gentoo
Posts: 5

Rep: Reputation: 0
You may want to check out a program for your distro called soundconverter. There is another called soundconvert that is different. I've found it very useful in this sort of situation. Note though that converting lossy formats to lossy formats degrades the quality. If you could pull from the original media or some such lossless format instead you'd be in better shape.
 
Old 01-04-2007, 07:40 AM   #9
miclem
Member
 
Registered: Jan 2005
Distribution: Mandriva 2009 Powerpack x64
Posts: 80

Rep: Reputation: 15
K3B will also convert files well & quickly.
 
Old 01-04-2007, 07:59 AM   #10
b0uncer
LQ Guru
 
Registered: Aug 2003
Distribution: CentOS, OS X
Posts: 5,131

Rep: Reputation: Disabled
Generally it's stupid to convert a compressed format to another. Consider this: if you have the originals, as you should have if they're not illegal (and I'm not sure if web-bought mp3s or other formats can legally be re-coded), and then you should use those originals or if they're wavs, then encode them. If you don't have the originals, consider if the files are legal, and anyway recoding them means recompressing which means losing quality as said already. The quality on most mp3 and ogg files is already compressed so low that it's just enough for a person who likes music, and recoding it over and over again makes it sound dull. I suggest you take the original discs where the sound is uncompressed, and recode from them.

EDIT:
Quote:
K3B will also convert files well & quickly.
but only with a plugin; not all distributions ship with that plugin.
 
Old 01-04-2007, 08:28 AM   #11
flickerfly
LQ Newbie
 
Registered: Feb 2005
Location: Lanham, MD
Distribution: Gentoo
Posts: 5

Rep: Reputation: 0
b0uncer, consider my situation where this process helpful and not illegal.

I have a collection of CDs ripped to ogg in another location. It took me many hours to convert them to ogg. This Christmas I received an MP3 player that doesn't support ogg so I'd like to have them in MP3 format. The CD media, because they take up space and are used infrequently are stored away in an inconvenient place. I can't access them at will. Until I can get them, it is helpful to simply convert what I need.

Next time I'm going to convert them to FLAC, a lossless format to remove this sort of hassle. (I hope).
 
Old 04-22-2021, 06:57 PM   #12
ab1jx
Member
 
Registered: Feb 2017
Posts: 88

Rep: Reputation: Disabled
Much of linux is about learning. This Bash looping technique is very useful

Code:
#!/bin/bash
for i in *.ogg; do
#    avconv -i "$i" -acodec libmp3lame -map_metadata 0:s:0 "${i:0:(-3)}mp3"
  sox $i $i.wav
done
I couldn't find a copy of avconv quickly, and sox wouldn't make mp3 files, so I converted the oggs to wav. I have another program that converts wav to mp3, it actually calls lame. The only problem with this is the naming, you end up with lots of file.ogg.wav. That stuff at the end of the avconv line is doing a substitution, I didn't notice it at first.

i loops through the filenames found by *.mp3, using $i gets the value of i.

Last edited by ab1jx; 04-22-2021 at 06:59 PM.
 
Old 04-22-2021, 07:48 PM   #13
TorC
Member
 
Registered: Dec 2020
Location: as far S and E as I want to go in the U.S.
Distribution: Fossapup64
Posts: 224

Rep: Reputation: 78
+1 @flickerfly -- Next time I'm going to convert them to FLAC, a lossless format to remove this sort of hassle. (I hope).

There is also ffmpeg

WAV to FLAC https://superuser.com/questions/1145...flac-in-ffmpeg
 
Old 04-22-2021, 08:13 PM   #14
ab1jx
Member
 
Registered: Feb 2017
Posts: 88

Rep: Reputation: Disabled
MP3 is a compromise, I'm not sure if anything's smaller, AAC maybe. But MP3 mostly sounds good and saves space, I can rarely tell the difference. It's very easy to find things that play it. I have about 18,000 mp3 files in 133 GB. I convert stuff to mp3, I find a lot of flac files on bitterents and make them into mp3 with stuff I've put here: https://sourceforge.net/projects/mp3progs/files/. I don't deal with the actual sound data, it's all about maniuplating files. flac makes a wav file from a flac, lame makes an mp3 from a wav, I write stuff that does directories full at once. And them use this on my mp3 collection to play them with a web browser https://sourceforge.net/projects/cgi-jukebox/ My new hobby, working on a better version.
 
  


Reply

Tags
convert, encode, lossless, mp3, ogg, soundconverter



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert Mp3 To Ogg TigerLinux Linux - General 11 02-12-2008 03:32 AM
Convert ogg to mp3 w/ ID Tag??? VorlonInfoTech Linux - Software 4 01-04-2007 02:22 PM
Program to Convert ogg to mp3 degraffenried13 Linux - General 3 06-27-2005 07:15 PM
can't convert mp3 to ogg Imek Linux - Software 3 07-13-2004 10:10 PM
Convert ogg to mp3 files? m0rl0ck Linux - Software 5 12-11-2003 01:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:20 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration