LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General > LinuxAnswers Discussion
User Name
Password
LinuxAnswers Discussion This forum is to discuss articles posted to LinuxAnswers.

Notices


Reply
  Search this Thread
Old 07-10-2005, 09:46 AM   #31
acker
Member
 
Registered: Apr 2004
Location: Timisoara, Romania
Distribution: Debian
Posts: 90

Rep: Reputation: 15

Quote:
Originally posted by flebber

-waveheader is deprecated. Use -ao pcm:waveheader instead.
...
I am going to install lame but what is the go with waveheader.
Just edit the script and modify -ao pcm -waveheader with -ao pcm:waveheader, or even better take a look at the python script. (link is six, seven topics above).
 
Old 07-11-2005, 03:18 AM   #32
emokid
LQ Newbie
 
Registered: Jun 2005
Posts: 13

Rep: Reputation: 0
so do i just copy the code and put it in the editor??? or do i have to change stuff
 
Old 08-25-2005, 05:11 PM   #33
PeterRJG
Member
 
Registered: Jun 2005
Location: Northern NSW, Australia
Distribution: LXLE
Posts: 123

Rep: Reputation: 15
Or you could just download Audacity and use its export tool. Not trying to steal the OP's thunder here, but with Audacity you have an app that can do a whole lot of groovy things.
 
Old 08-27-2005, 12:30 AM   #34
kristyx
LQ Newbie
 
Registered: Apr 2003
Location: Malaysia
Distribution: Gentoo
Posts: 3

Rep: Reputation: 0
Excellent script! Easy to use and ran without a hitch Thanks a bunch!
 
Old 08-28-2005, 09:12 AM   #35
dibblethewrecke
Member
 
Registered: Nov 2003
Location: UK
Distribution: Arch Linux
Posts: 210

Rep: Reputation: 30
crashes on me
Code:
[~] : wmamp3 
mv: `1.wma' and `1.wma' are the same file
mv: `1.wma' and `1.wma' are the same file
Ripping 1.wma
MPlayer 1.0pre7-3.4.3 (C) 2000-2005 MPlayer Team
CPU: Intel Celeron 2/Pentium III Tualatin (Family: 6, Stepping: 1)
Detected cache-line size is 32 bytes
CPUflags:  MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 0
Compiled with runtime CPU detection - WARNING - this is not optimal!
To get best performance, recompile MPlayer with --disable-runtime-cpudetection.

Linux RTC init error in ioctl (rtc_irqp_set 1024): Permission denied
Try adding "echo 1024 > /proc/sys/dev/rtc/max-user-freq" to your system startup scripts.
Playing 1.wma.
ASF file format detected.
Clip info:
 name: American Idiot
 author: Green Day
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 44100 Hz, 2 ch, s16le, 128.0 kbit/9.07% (ratio: 16002->176400)
Selected audio codec: [ffwmav2] afm:ffmpeg (DivX audio v2 (FFmpeg))
==========================================================================
Checking audio filter chain for 44100Hz/2ch/s16le -> 44100Hz/2ch/s16le...


MPlayer interrupted by signal 11 in module: af_preinit
- MPlayer crashed by bad usage of CPU/FPU/RAM.
  Recompile MPlayer with --enable-debug and make a 'gdb' backtrace and
  disassembly. Details in DOCS/HTML/en/bugreports_what.html#bugreports_crash.
- MPlayer crashed. This shouldn't happen.
  It can be a bug in the MPlayer code _or_ in your drivers _or_ in your
  gcc version. If you think it's MPlayer's fault, please read
  DOCS/HTML/en/bugreports.html and follow the instructions there. We can't and
  won't help unless you provide this information when reporting a possible bug.
Encoding 1.wma
Could not find "audiodump.wav".
rm: cannot remove `audiodump.wav': No such file or directory
Name : mplayer
Version : 1.0pre7-1
 
Old 08-28-2005, 10:19 AM   #36
dibblethewrecke
Member
 
Registered: Nov 2003
Location: UK
Distribution: Arch Linux
Posts: 210

Rep: Reputation: 30
OK - i fixed it - you might find this a bit better:
Code:
for i in *.wma
do
	filename=`basename "$i" .wma`
	
	#Rip with Mplayer / encode with LAME
	echo "Ripping $i"
	mplayer -quiet -vo null -vc dummy -af volume=0,resample=44100:0:1 -ao pcm:waveheader "$i" 
	echo "Encoding $i to "$filename".mp3"
	lame -quiet -m s audiodump.wav -o "$filename".mp3

	rm audiodump.wav
done
Proper use of quotes removes all that need to convert spaces...
 
Old 09-20-2005, 09:08 AM   #37
fakie_flip
Senior Member
 
Registered: Feb 2005
Location: San Antonio, Texas
Distribution: Gentoo Hardened using OpenRC not Systemd
Posts: 1,495

Rep: Reputation: 85
Can .WMA format be converted to .MP3 format with mplayer without losing quality of the sound and file?
 
Old 09-20-2005, 09:10 AM   #38
fakie_flip
Senior Member
 
Registered: Feb 2005
Location: San Antonio, Texas
Distribution: Gentoo Hardened using OpenRC not Systemd
Posts: 1,495

Rep: Reputation: 85
I guess that I will not be able to use mplayer to convert my .WMA format files to MP3 format files because they are on an ntsf partition, and it is read only to Linux(about 15 gigabytes of music). Windows updater came and changed all my music to .WMA format files without my permission by trying to be proprietary.

Last edited by fakie_flip; 09-20-2005 at 09:12 AM.
 
Old 09-20-2005, 10:32 AM   #39
cadj
Member
 
Registered: Aug 2003
Location: Melbourne Australia
Distribution: Debian Stretch
Posts: 374

Original Poster
Rep: Reputation: 32
I had no issues with sound quality at all, as far as your NTFS partition goes, why not convert them on your linux partition, then burn the new mp3's to a cd(s) or dvds, then boot into windws and copy them back?
 
Old 09-20-2005, 06:11 PM   #40
JamieBrown
Member
 
Registered: Jan 2005
Location: Great Ayton, North Yorkshire, UK
Distribution: Gentoo, Mandriva, RHES, Debian
Posts: 61

Rep: Reputation: 15
The theory is that converting from any compressed format to any other compressed format will reduce quality because of the ways that the compression methods differ with each format. If you have a look at the offical Ogg Vorbis site it will explain that in some depth.

But as per cadj, I've never *noticed* any difference when I've done it. Regarding playing your WMA files - it is possible to play WMA in Linux, just a little awkward. The main problem I came across was that amaroK could play them, just wouldn't add them to the "Collection" section. But you can always play WMAs from mplayer on the command line, and there's probably other pretty clients like amaroK that will play them nicely for you. (Although I don't know of any, because I always use amaroK!)

Anyway, good luck!

Jamie
 
Old 09-27-2005, 06:23 PM   #41
kokoba
LQ Newbie
 
Registered: Jan 2005
Location: state of confusion
Distribution: Debian
Posts: 15

Rep: Reputation: 0
i tried running this, as i have a whole bunch of .wma's i want to convert into .mp3's (actually, i'd really love to use vorbis, but .mp3 is find for now). however, i get this error:

Quote:
mv: cannot stat `*.wma': No such file or directory
mv: cannot stat `*.[Ww][Mm][Aa]': No such file or directory
MPlayer 1.0pre7-3.3.5 (C) 2000-2005 MPlayer Team
CPU: Advanced Micro Devices Athlon 64 Clawhammer (Family: 8, Stepping: 8)
Detected cache-line size is 64 bytes
MMX2 supported but disabled
SSE2 supported but disabled
3DNow supported but disabled
3DNowExt supported but disabled
CPUflags: MMX: 1 MMX2: 0 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 0
Compiled for x86 CPU with extensions: MMX SSE



Opening joystick device /dev/input/js0
Can't open joystick device /dev/input/js0 : No such device
Can't init input joystick
Setting up LIRC support...
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support.
You will not be able to use your remote control.
Playing *.wma.
File not found: '*.wma'
Failed to open *.wma


Exiting... (End of file)
Could not find "audiodump.wav".
mv: cannot stat `*.wma': No such file or directory
rm: cannot remove `audiodump.wav': No such file or directory
i've tried just using audacity, but all i get when i import a .wma is a bunch of static (plus, i'd like to be able to convert them all at once).

am i missing something really obvious, or?
 
Old 09-27-2005, 09:24 PM   #42
cadj
Member
 
Registered: Aug 2003
Location: Melbourne Australia
Distribution: Debian Stretch
Posts: 374

Original Poster
Rep: Reputation: 32
show us your script.

it seems like mplayer is trying to read a file called "*.mp3"

Last edited by cadj; 09-27-2005 at 10:59 PM.
 
Old 09-27-2005, 10:46 PM   #43
kokoba
LQ Newbie
 
Registered: Jan 2005
Location: state of confusion
Distribution: Debian
Posts: 15

Rep: Reputation: 0
sorry about that. here's what i have in /usr/bin

Code:
#!/bin/bash

current_directory=$( pwd )

#remove spaces
for i in *.wma; do mv "$i" `echo $i | tr ' ' '_'`; done

#remove uppercase
for i in *.[Ww][Mm][Aa]; do mv "$i" `echo $i | tr '[A-Z]' '[a-z]'`; done

#Rip with Mplayer / encode with LAME
for i in *.wma ; do mplayer -vo null -vc dummy -af resample=44100 -ao pcm:waveheader $i && lame -m s audiodump.wav -o $i; done

#convert file names
for i in *.wma; do mv "$i" "`basename "$i" .wma`.mp3"; done

rm audiodump.wav
~
thanks so much--i am ridiculously incompetent without my free tech support/boyfriend.
 
Old 09-27-2005, 11:03 PM   #44
cadj
Member
 
Registered: Aug 2003
Location: Melbourne Australia
Distribution: Debian Stretch
Posts: 374

Original Poster
Rep: Reputation: 32
dibblethewrecke has made this a lot easier, by explaining that using quotes removes the need to remove spaces and uppercase, have a look, this may work for you.
Code:
for i in *.wma
do
	filename=`basename "$i" .wma`
	
	#Rip with Mplayer / encode with LAME
	echo "Ripping $i"
	mplayer -quiet -vo null -vc dummy -af volume=0,resample=44100:0:1 -ao pcm:waveheader "$i" 
	echo "Encoding $i to "$filename".mp3"
	lame -quiet -m s audiodump.wav -o "$filename".mp3

	rm audiodump.wav
done
if you have many folders/subfolders with wma's, use this at the top instead
Code:
for i in $(find -iname *.wma); do
this runs the 'find' command and processes the outputs
 
Old 09-28-2005, 03:27 PM   #45
kokoba
LQ Newbie
 
Registered: Jan 2005
Location: state of confusion
Distribution: Debian
Posts: 15

Rep: Reputation: 0
that works great, thank you!
 
  


Reply

Tags
amarok, convert, mp3, wma



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 wma to ogg lixy Linux - Software 20 10-12-2011 05:58 PM
convert wma > mp3? andrewlkho Linux - Software 31 08-20-2007 12:26 AM
wma to mp3 pulsez Linux - Newbie 5 10-27-2005 07:17 PM
Any program that can convert mp3 files to wma? josh_hd_new Linux - Newbie 1 01-21-2005 02:03 AM
how to convert a wma to mp3?? yenonn Linux - General 2 04-26-2004 07:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General > LinuxAnswers Discussion

All times are GMT -5. The time now is 10:21 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