LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Zenwalk
User Name
Password
Zenwalk This forum is for the discussion of Zenwalk Linux.

Notices


Reply
  Search this Thread
Old 11-29-2011, 08:47 PM   #1
Javelin Dan
LQ Newbie
 
Registered: Oct 2011
Posts: 9

Rep: Reputation: Disabled
How to convert WAV or OGG files to MP3?


I'm a newbie trying to figure out how to convert downloaded audio files to MP3. I looked in the Zenwalk Manual, and it mentioned the softwares "Assunder" and "Lame" - neither of which I can find in Netpkg. I basically just want to rip CD's, convert to MP3, and load them on a flashdrive so I can plug it into my car radio. Any help would be appreciated. Thanks!
 
Old 11-29-2011, 08:55 PM   #2
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
easiest is to use ffmpeg

how shows here
http://www.mygnulinux.com/?p=56

but it has dependencies i don't use zenwalk but maybe this helps
http://packages.zenwalk.org/?p=ffmpe...rsion=snapshot

---------- Post added 30-11-11 at 10:55 ----------

easiest is to use ffmpeg

how shows here
http://www.mygnulinux.com/?p=56

but it has dependencies i don't use zenwalk but maybe this helps
http://packages.zenwalk.org/?p=ffmpe...rsion=snapshot
 
Old 11-30-2011, 03:54 AM   #3
cascade9
Senior Member
 
Registered: Mar 2011
Location: Brisneyland
Distribution: Debian, aptosid
Posts: 3,753

Rep: Reputation: 935Reputation: 935Reputation: 935Reputation: 935Reputation: 935Reputation: 935Reputation: 935Reputation: 935
FFmpeg might be easy to use, if you are the sort of person who likes using the command line, and can remember the commands.

IMO its easier to use a GUI CD ripper. Personally I prefer Rubyripper to the other linux CD rippers, but all should do a decent job for MP3s.

@ Javelin Dan- maybe it would help if you spelt the name right? Its 'asunder', not 'assunder'

http://littlesvr.ca/asunder/
 
Old 11-30-2011, 04:54 AM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
The K3B CD burning program is another program that can rip CDs. I checked the zenwalk site, and it is listed.
 
Old 11-30-2011, 10:27 AM   #5
Javelin Dan
LQ Newbie
 
Registered: Oct 2011
Posts: 9

Original Poster
Rep: Reputation: Disabled
Thanks to all who responded. Yeah, My spellin nevr was two gud. I'll try your suggestions and report back - may take a few days. Just to let you know, I'm not AT ALL comfortable with the command line - I'm OK with one or two simple commands, but get absolutely lost in long strings of code. So I'd like to do this as simply as possible; within a desktop environment if at all possible. Thanks again!
 
Old 11-30-2011, 10:30 AM   #6
vharishankar
Senior Member
 
Registered: Dec 2003
Distribution: Debian
Posts: 3,178
Blog Entries: 4

Rep: Reputation: 138Reputation: 138
I've actually written a script to do this.

You need oggdec and lame to do this:
Code:
#!/usr/bin/env python

# Simple python script to convert all ogg files in a current directory to mp3 format

import os
import os.path
 
def get_files (extensions):
	files = os.listdir (os.getcwd())
	retfiles = []
	for file in files:
		for extension in extensions:
			if (file.endswith (extension)):
				retfiles.append (file)
	
	return retfiles
		
def convert_to_mp3 ():
	oggfiles = get_files ([ '.ogg', '.ogm'])
	
	for ogg in oggfiles:
		ret1 = os.spawnlp (os.P_WAIT, 'oggdec', 'oggdec', ogg)
		if (ret1 == 0):
			rawfilename = os.path.splitext (ogg)
			wavfilename = rawfilename[0] + '.wav'
			mp3filename = rawfilename[0] + '.mp3'
			ret2 = os.spawnlp (os.P_WAIT, 'lame', 'lame', wavfilename, mp3filename)
			if (ret2 == 0):
				os.spawnlp (os.P_WAIT, 'rm', 'rm', wavfilename)

convert_to_mp3 ()
Save as ogg2mp3.py and make it executable. You can run it to convert all OGG files to MP3. It works in python 2.x. Not sure if it's compatible with python 3 though.

Run it from the command line as
Code:
./ogg2mp3.py
and it will convert all your OGG files in the current directory to MP3.

To make it usable anywhere on your system, you need to put this script in a directory like /usr/bin/ or /usr/local/bin/

Last edited by vharishankar; 11-30-2011 at 10:41 AM.
 
Old 11-30-2011, 05:59 PM   #7
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
hi

my link shows you how to convert.

the command is (as a non-root user)

Code:
ffmpeg -i trackX.wav trackX.mp3
I did not suggest ripping software but you already mentioned asunder
 
Old 12-06-2011, 09:15 AM   #8
Javelin Dan
LQ Newbie
 
Registered: Oct 2011
Posts: 9

Original Poster
Rep: Reputation: Disabled
Solved!

I just wanted to report back and chronicle my success for all the other raw newbies that follow in my footsteps. First, I want to thank everyone who responded. It was because of your response (plus some scrounging on the beginner’s forum) that I was able to figure this out. I know many of you monitor this forum regularly and try to help as many people as possible. Being a rank armature myself, most of the problems I had was simply in not knowing and having to figure out some basic stuff that most people would assume was common knowledge. Here’s what I did:

1). I went to the default repository and downloaded “Asunder”. My main problem here was lack of full knowledge of how to use the repository. I did not have a check mark next to “not installed” on the right side of the repository page. When I finally figured this out, it opened up a vast amount of available software that I didn’t previously know was there. Once revealed, I easily found “Asunder and downloaded it.

2.) I went to the first “restricted” repository and eventually found “Lame”. I say eventually because I first clicked on the restricted choice but saw the same repository I’d had before. I then remembered that whenever you change repositories, you have to click the “reload” button at the top right side of the page. Once done, all was well and I found “Lame”. Note: remember to re-select your default repository and reload the page before you leave!

3.) Using “Asunder” couldn’t be much easier, but a few footnotes are necessary for the beginner. Simply insert a CD of your choice, close out of “CD Player” that will automatically begin, select “Multimedia” from the applications menu, and click on “Asunder”. Note that the default format to save the ripped files is OOG. Simply go into the preferences tab and put a check next to Mp3. While there, de-select OGG or you will have files of both formats in your music folder – ask me how I know. Everything else is slick as snot! Click on “Rip” and find something to do for 5 or 10 minutes. When done, close out of “Asunder” and find your newly ripped files in your home folder, then drag-n-drop to your Music folder (or wherever you wish). Then, insert your flash drive, Mp3 player, etc, right click on your chosen music file, and click “send to” (select device). It’s really as simple as that! Last night I ripped about 7 Christmas CD’s and moved them to a flash drive that I plugged into the car radio so my wife can enjoy them while she drives without the hassle of shuffling multiple CD’s. If I can figure it out, anyone can! Enjoy your music!
 
Old 12-06-2011, 09:45 AM   #9
vharishankar
Senior Member
 
Registered: Dec 2003
Distribution: Debian
Posts: 3,178
Blog Entries: 4

Rep: Reputation: 138Reputation: 138
Glad to see you got a solution.

By the way, I always recommend lame for MP3 encoding. In the past I have had problems playing MP3s on hardware devices when the MP3s were generated from other programs like GStreamer or VLC (through some CD-ripping front-end programs). For some odd reason some of those MP3s show up as "unrecognized format" on some hardware media players. Probably has to do with variable bitrate MP3s or because some programs use the MP2 codec when MP3 is not available.

Last edited by vharishankar; 12-06-2011 at 09:47 AM.
 
Old 12-06-2011, 10:34 AM   #10
Javelin Dan
LQ Newbie
 
Registered: Oct 2011
Posts: 9

Original Poster
Rep: Reputation: Disabled
vharishankar -

Is this done automatically since I installed "Lame" or are there further steps I need to take that I don't know about? All the various CD's I ripped seem to play just fine so far...
 
Old 12-06-2011, 10:39 AM   #11
vharishankar
Senior Member
 
Registered: Dec 2003
Distribution: Debian
Posts: 3,178
Blog Entries: 4

Rep: Reputation: 138Reputation: 138
Quote:
Originally Posted by Javelin Dan View Post
vharishankar -

Is this done automatically since I installed "Lame" or are there further steps I need to take that I don't know about? All the various CD's I ripped seem to play just fine so far...
If it uses lame as the encoder it should be fine. Seeing its dependencies, I guess it uses lame so you should have no problem with the MP3s.

Note:
your test bed should be a hardware MP3 player if you use them. If it plays fine in your Linux system, that by itself is not a sign that the MP3 file would play fine in hardware player. However, if you aren't using any hardware MP3 players, you needn't worry.

Some of the cheaper type of hardware MP3 players also seem to have trouble with Variable Bitrate MP3s.

Last edited by vharishankar; 12-06-2011 at 10:42 AM.
 
Old 12-06-2011, 11:25 AM   #12
Javelin Dan
LQ Newbie
 
Registered: Oct 2011
Posts: 9

Original Poster
Rep: Reputation: Disabled
How do I check to make sure it is using "Lame" and how do I change it if not?
 
Old 12-07-2011, 06:53 AM   #13
vharishankar
Senior Member
 
Registered: Dec 2003
Distribution: Debian
Posts: 3,178
Blog Entries: 4

Rep: Reputation: 138Reputation: 138
Quote:
Originally Posted by Javelin Dan View Post
How do I check to make sure it is using "Lame" and how do I change it if not?
If it is listed as a dependency, I figure it must be using lame.

Also you can check if lame is running in the background during the encoding, by running top or checking System Activity (in KDE the key is Ctrl+Esc to bring up system tasks).

(Note: if a program uses libmp3lame directly, lame won't be running in the background)

Last edited by vharishankar; 12-07-2011 at 06:55 AM.
 
Old 12-07-2011, 08:07 AM   #14
Javelin Dan
LQ Newbie
 
Registered: Oct 2011
Posts: 9

Original Poster
Rep: Reputation: Disabled
Thank you - I truly appreciate your help!
 
  


Reply



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, OGG, WAV, CDA or FLAC to WMA JerryP Linux - Software 12 03-02-2014 04:23 PM
XMMS won't play mp3,wav,ogg files, but only audio cd Michaelx Slackware 10 06-29-2006 09:07 PM
what app to use to convert ogg to mp3 or wav under Community 10.1 tolstyi Mandriva 5 12-01-2004 05:03 AM
Convert ogg to mp3 files? m0rl0ck Linux - Software 5 12-11-2003 01:04 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Zenwalk

All times are GMT -5. The time now is 01:32 PM.

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