LinuxAnswers DiscussionThis forum is to discuss articles posted to LinuxAnswers.
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.
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).
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.
[~] : 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
Distribution: Gentoo Hardened using OpenRC not Systemd
Posts: 1,495
Rep:
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.
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?
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!)
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).
#!/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.
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.