ZenwalkThis forum is for the discussion of Zenwalk Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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!
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!
#!/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.
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!
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.
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...
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.