LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 08-23-2004, 02:33 AM   #1
Scrag
Member
 
Registered: Mar 2004
Location: Wisconsin
Distribution: Kali Linux
Posts: 122

Rep: Reputation: 15
Convert .wma to .mp3....


Anybody know of a good linux converter from .wmv to .mp3? Hopefully command line so I can convert may thousands of .wmv to .mp3 through shell script.

Please advise!

Thanks!!!!

Last edited by Scrag; 08-24-2004 at 01:58 AM.
 
Old 08-23-2004, 03:23 AM   #2
Crashed_Again
Senior Member
 
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503

Rep: Reputation: 57
Isn't .wmv the Windows Video file format? I'm lost...
 
Old 08-24-2004, 12:51 AM   #3
Scrag
Member
 
Registered: Mar 2004
Location: Wisconsin
Distribution: Kali Linux
Posts: 122

Original Poster
Rep: Reputation: 15
Oopps....

What I meant to say is, I have lots of .wma (Windows Media AUDIO), that I'd like to convert to .mp3. Any ideas as to a good program to do this?? If possible, i'd like something command line interface to write maybe a shell script to do them all at once since I have a lot of 'em.

Thanks!


Last edited by Scrag; 08-24-2004 at 12:52 AM.
 
Old 08-25-2004, 04:02 AM   #4
J_Szucs
Senior Member
 
Registered: Nov 2001
Location: Budapest, Hungary
Distribution: SuSE 6.4-11.3, Dsl linux, FreeBSD 4.3-6.2, Mandrake 8.2, Redhat, UHU, Debian Etch
Posts: 1,126

Rep: Reputation: 58
Just a dirty idea (never tried it myself):

Mplayer can play movies with wma audio streams, if it is installed together with its win32codecs package.

Mplayer can extract the audio stream (-dumpaudio option).

I do not know if it can extract audio directly into mp3 format (if so, you will still need lame encoder to do that), but I know it can extract audio into pcm format, which can be then encoded to mp3.

The above way is the dirty way because it requires the installation of two programs (mplayer and lame), the conversion is possibly made in at least two steps and it may require quite a lot of temporary disk space (if the intermediate pcm format should be used). However, both mplayer and lame are command-line programs, so the conversion process can be automated by a script.

I do not know if there is a clean way for conversion - maybe not, since nobody except me replied to your question. I did a short google search in this matter, but found nothing.

Good luck
 
Old 08-25-2004, 04:09 AM   #5
Thoreau
Senior Member
 
Registered: May 2003
Location: /var/log/cabin
Distribution: All
Posts: 1,167

Rep: Reputation: 45
konverter via kde does that I believe
 
Old 08-25-2004, 10:18 AM   #6
Rathann
Member
 
Registered: Jul 2004
Location: Poland
Distribution: RedHat 7.3/8.0/9, Fedora Core 1/2/3/4
Posts: 35

Rep: Reputation: 15
Quote:
Originally posted by J_Szucs
Just a dirty idea (never tried it myself):

Mplayer can play movies with wma audio streams, if it is installed together with its win32codecs package.

Mplayer can extract the audio stream (-dumpaudio option).
Dumping audio is useless, because it will dump it in the original format. What you really want is -ao pcm.
Quote:

I do not know if it can extract audio directly into mp3 format (if so, you will still need lame encoder to do that), but I know it can extract audio into pcm format, which can be then encoded to mp3.

The above way is the dirty way because it requires the installation of two programs (mplayer and lame), the conversion is possibly made in at least two steps and it may require quite a lot of temporary disk space (if the intermediate pcm format should be used). However, both mplayer and lame are command-line programs, so the conversion process can be automated by a script.

I do not know if there is a clean way for conversion - maybe not, since nobody except me replied to your question. I did a short google search in this matter, but found nothing.
It's possible to avoid excessive disk usage by means of FIFO pipe. You create a pipe special file (man mkfifo), make MPlayer output to it (man mplayer) and LAME read from it.

Regards,
R.
 
Old 08-27-2004, 02:04 AM   #7
J_Szucs
Senior Member
 
Registered: Nov 2001
Location: Budapest, Hungary
Distribution: SuSE 6.4-11.3, Dsl linux, FreeBSD 4.3-6.2, Mandrake 8.2, Redhat, UHU, Debian Etch
Posts: 1,126

Rep: Reputation: 58
Quote:
Dumping audio is useless, because it will dump it in the original format. What you really want is -ao pcm.
Then how about this one:

mencoder -ovc frameno -oac mp3lame -o temporary.avi file.wma
mplayer -dumpaudio temporary.avi
mv stream.dump file.mp3

This could do transcoding to mp3 without extracting to pcm, so it could save diskspace.
In theory... Cause I never tried this one, either (Never happened to find a single wma file so far...)

Last edited by J_Szucs; 08-27-2004 at 02:05 AM.
 
Old 08-28-2004, 04:24 PM   #8
Rathann
Member
 
Registered: Jul 2004
Location: Poland
Distribution: RedHat 7.3/8.0/9, Fedora Core 1/2/3/4
Posts: 35

Rep: Reputation: 15
Quote:
Originally posted by J_Szucs
Then how about this one:

mencoder -ovc frameno -oac mp3lame -o temporary.avi file.wma
mplayer -dumpaudio temporary.avi
mv stream.dump file.mp3

This could do transcoding to mp3 without extracting to pcm, so it could save diskspace.
In theory... Cause I never tried this one, either (Never happened to find a single wma file so far...)
Well, I admit, I haven't thought of that one. It's quite smart. Personally, I saved space using the fifo method I described earlier.
 
Old 11-30-2013, 11:03 PM   #9
catalystyc
LQ Newbie
 
Registered: Nov 2013
Posts: 1

Rep: Reputation: Disabled
There could be a better way...

I searched a bit, but as long as you have enough internet to view this forum, you could go to online-convert.com
And convert it online. You upload the file and download the converted version. Worked quickly and perfectly for me.
 
Old 12-01-2013, 12:16 AM   #10
Scrag
Member
 
Registered: Mar 2004
Location: Wisconsin
Distribution: Kali Linux
Posts: 122

Original Poster
Rep: Reputation: 15
Awesome. Thanks for the response. I posted this in 2004. Better late than never!!
 
Old 12-01-2013, 12:42 AM   #11
cascade9
Senior Member
 
Registered: Mar 2011
Location: Brisneyland
Distribution: Debian, aptosid
Posts: 3,753

Rep: Reputation: 934Reputation: 934Reputation: 934Reputation: 934Reputation: 934Reputation: 934Reputation: 934Reputation: 934
Konverter (qt/kde) or converter (gtk) will do the job, and there are other programs as well, but a lossy to lossy conversion will always result in lower quality. Rerip them.

Quote:
Originally Posted by catalystyc View Post
I searched a bit, but as long as you have enough internet to view this forum, you could go to online-convert.com
And convert it online. You upload the file and download the converted version. Worked quickly and perfectly for me.
Not a god idea. 'Thousands' of files is going to eat a huge amount of bandwidth. Besides that, you never know what logs the conversion will create, or who the logs are being sent to.
 
Old 12-01-2013, 04:21 AM   #12
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,349

Rep: Reputation: 346Reputation: 346Reputation: 346Reputation: 346
ffmpeg + lame is great for that.

If $i is your input file, $wav is the wav file name, and $mp3 the mp3 output file name:

Code:
ffmpeg -sameq -i "$i" "$wav"
lame -p -m s --cbr -q 2 -b 320 "$wav" -o "$mp3"
rm -f "$wav"
That will produce a 320k CBR mp3 and will work for every file format that ffmpeg understands, not just wma.

I wouldn't use mplayer/mencoder as iirc it encodes on the fly, whereas ffmpeg doesn't.

I've also just seen that this post is from 2004! Well hopefully someone will find this info useful.

Last edited by dive; 12-01-2013 at 04:29 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
how do i convert wmv to flv using ffmpeg? farmerjoe Linux - Software 0 11-15-2005 02:20 PM
Util to convert .wmv to mpeg? PaganHippie Linux - Software 2 10-11-2005 09:43 PM
unable to play wmv + convert verbose Linux - General 3 07-17-2005 03:16 PM
convert wmv to mpeg-4? cs-cam Linux - Newbie 2 01-17-2005 04:36 PM
How would I convert WMV to MPEG? db391 Linux - Software 6 11-16-2004 05:17 PM

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

All times are GMT -5. The time now is 07:53 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration