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 |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
 |
10-29-2003, 07:06 AM
|
#1
|
Member
Registered: Oct 2003
Location: UK
Distribution: Slackware 8.0
Posts: 56
Rep:
|
Converting wma to mp3
i recently changed from windows to linux (slackware 8.0) however a lot of my music is in the form of .wma files. Whats the best way of changing them to mp3 files in linux? I looked in sourceforge but i couldnt see anything of interest.
I've also got a similar problem with needing to convert .avi files to .mpg
scottie 
|
|
|
10-29-2003, 07:40 AM
|
#2
|
Senior Member
Registered: Dec 2002
Location: Mosquitoville
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,306
Rep:
|
you can use mplayer to output the .wma files to .wav then convert
the wav files how you wish.
|
|
|
10-29-2003, 08:42 AM
|
#3
|
Member
Registered: May 2003
Distribution: Ubuntu, Windows XP
Posts: 90
Rep:
|
to convert WMA to WAV using mplayer
mplayer -ao pcm -aofile "filename.wav" "filename.wma"
to convert WAV to MP3 using lame
lame --preset standard "filename.wav"
You can consult the man pages to get more information on the options
|
|
|
10-29-2003, 09:00 AM
|
#4
|
Member
Registered: Jun 2003
Location: Reading, UK
Distribution: Debian 3.0, LFS
Posts: 524
Rep:
|
Stop! Why do you want mp3's? If you have a personal mp3 player then that's ok, but if not, then convert them to oggs. A friend of mine with nothing better to do encoded one file in about 5 different quality mp3s and 7 different quality oggs. The oggs were listenable down to about level 3, which could fit a 5 minute song into 500KB. In general the result of his "study" was that oggs give better quality sound for smaller files, or if you prefer, small files for the same quality sound.
Guy
|
|
|
10-29-2003, 09:13 AM
|
#5
|
Member
Registered: Oct 2003
Location: UK
Distribution: Slackware 8.0
Posts: 56
Original Poster
Rep:
|
cool, any ideas how to convert .avi to .mpg?
scottie 
|
|
|
10-29-2003, 09:33 AM
|
#6
|
Member
Registered: Jun 2003
Location: Reading, UK
Distribution: Debian 3.0, LFS
Posts: 524
Rep:
|
Again, I don't mean to push you into something you don't want, but I would keep them as .avi. If they're not compressed, you want them in DivX or Xvid format. These are both great formats. The advantage is that they are much much smaller than any mpeg format.
However, the tool you will need for either format is transcode. It's the ultimate coder from anything to anything else pretty much. Although you'll probably need some codecs. It's console based though, but there are front-ends available. I believe that k3b should do the job, although it's primarily a CD burner (and a damn fine one at that). If not, dvd::rip definately works.
Guy
|
|
|
10-30-2003, 06:19 AM
|
#7
|
Member
Registered: May 2003
Distribution: Ubuntu, Windows XP
Posts: 90
Rep:
|
guygrifiths is right about OGG. Its better to convert to OGG than to MP3s, because I too believe that OGGs give better compression as well as maintain the sound quality than MP3s do. But still the difference is not very great to say that MP3s are totally obsolete. Ogg and Mp3 seem to be similar to Linux and Windows fighting their way through people.
guygrifiths is also right about converting to MPEG. Its better to leave the file as avi if its is compressed. If you want you could compress them using the DivX format.
Again, Mencoder can do that (comes with Mplayer).
Read the man pages for mplayer, under the encoding options, you will find information on the codecs you can use.
This will recompress an avi with mp3 for sound codec and mpeg4 ( which is said to be DivX 4/5 in the man page) for video codec.
mencoder -oac mp3lame -ovc lavc -lameopts preset=standard -lavcopts vcodec=mpeg4 -o "outputfile.avi" "inputfile.avi"
You can just as well encode the avi to mpeg just by changing the vcodec value to vcodec=mpeg1video or vcodec=mpeg2video.
You can even encode to a WMV just by setting vcodec=wmv1 or vcodec=wmv2
Check the available video codecs in the man page under -lavcopts , vcodec.
|
|
|
10-30-2003, 10:25 AM
|
#8
|
Member
Registered: Oct 2003
Distribution: Debian/unstable
Posts: 85
Rep:
|
Quote:
Originally posted by scottie
cool, any ideas how to convert .avi to .mpg?
|
There are legitimate reasons for wanting to do this, such as wanting to burn (s)vcds. The following instructions are written for vcd, but can easily be changed for svcd. They also assume an avi at resolution 352x240x23.98fps with 44100Hz 2channel audio. This is not the _only_ way to do things, but this is the way that results (for me) in the best quality mpegs/vcds with the least trouble.
First, make sure you have the following software: mplayer, mjpeg tools, toolame, and sox.
Unfortunately, mplayer/mencoder is currently unable to correctly convert a file to mpeg in one pass. So, I convert the video in one pass, the audio in another pass, and then multiplex them together. Begin by making two fifos (named pipes):
Code:
mkfifo vfifo; mkfifo afifo; ln -s vfifo stream.yuv
Now, convert the video:
Code:
mpeg2enc -n n -v 0 -f 2 -b 1024 -F 1 -o file.m1v < vfifo &; mplayer -ac dummy -ao null -vo yuv4mpeg -noframedrop file.avi
Next, convert the audio:
Code:
toolame -b 224 -m s afifo file.mp2 &; mplayer -vc dummy -vo null -ao pcm -nowaveheader -aofile afifo file.avi
Finally, multiplex the audio and video for a complete mpeg file:
Code:
mplex -f 1 file.m1v file.mp2 -o file.mpg
|
|
|
All times are GMT -5. The time now is 05:24 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|