Linux - SoftwareThis 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.
I tried two of the scripts and they didn't work for me. I need to convert WMA files to WAV files so that I can burn them to a cd using Xcdroast. This is the first time I am attempting to create a music cd and need a lot of help. I got these legally from BuyMusic.com. Hated to do it, but I wanted to be legal and I didn't want to wait any longer for a Linux supported product. They are in WMA format and I want to cut them to a Cd I can play in my car cd player. I tried this
mplayer Panama.wma -ao pcm -aofile Panama.wav
with one of the files and got the following message
Using GNU internationalization
Original domain: messages
Original dirname: /usr/share/locale
Current domain: mplayer
Current dirname: /usr/local/share/locale
MPlayer 0.90rc5-3.2.2 (C) 2000-2003 Arpad Gereoffy (see DOCS)
CPU: Intel Celeron 2/Pentium III Coppermine,Geyserville (Family: 6, Stepping: 6)
Detected cache-line size is 32 bytes
CPUflags: MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 0
Compiled for x86 CPU with extensions: MMX MMX2 SSE
Reading config file /usr/local/etc/mplayer/mplayer.conf: No such file or directory
Reading config file /root/.mplayer/config
Reading /root/.mplayer/codecs.conf: can't open '/root/.mplayer/codecs.conf': No such file or directory
Reading /usr/local/etc/mplayer/codecs.conf: 50 audio & 136 video codecs
font: can't open file: /root/.mplayer/font/font.desc
font: can't open file: /usr/local/share/mplayer/font/font.desc
Using Linux hardware RTC timing (1024Hz).
Can't open input config file /root/.mplayer/input.conf : No such file or directory
Can't open input config file /usr/local/etc/mplayer/input.conf : No such file or directory
Falling back on default (hardcoded) input config
Playing Panama.wma
ASF file format detected.
Clip info:
name: Panama
author: Van Halen
copyright: Copyright (c) (p) 2001 Warner Bros. Label. All rights reserved.
comments: Not Available
==========================================================================
Opening audio decoder: [ffmpeg] FFmpeg/libavcodec audio decoders
AUDIO: 44100 Hz, 2 ch, 16 bit (0x10), ratio: 16002->176400 (128.0 kbit)
Selected audio codec: [ffwmav2] afm:ffmpeg (DivX audio v2 (ffmpeg))
==========================================================================
Checking audio filter chain for 44100Hz/2ch/16bit -> 44100Hz/2ch/16bit...
AF_pre: af format: 2 bps, 2 ch, 44100 hz, little endian signed int
AF_pre: 44100Hz 2ch Signed 16-bit (Little-Endian)
PCM: File: Panama.wav (WAVE)
PCM: Samplerate: 44100Hz Channels: Stereo Format Signed 16-bit (Little-Endian)
PCM: Info: fastest dumping is achieved with -vc null -vo null
PCM: Info: to write WAVE files use -waveheader (default); for RAW PCM -nowaveheader.
AO: [pcm] 44100Hz 2ch Signed 16-bit (Little-Endian) (2 bps)
Building audio filter chain for 44100Hz/2ch/16bit -> 44100Hz/2ch/16bit...
Video: no video
Starting playback...
A: -0.0 0.0% 0%
Exiting... (End of file)
It created a little wav file which didn't play on anything. Any help ( and please make it easy, this is my first time and I do not know what I am doing ) would be very much appreciated. Thanks.
Jimmmac,
THis happened to me too. I can't play wma files that is converted in Windows Media Player 9 with protected content. I guess the wma files that you have is protected.
Is there a way to convert protected .wma's? In Canada, McDonalds started a free song promo from connect.com. Unfortunately all they offer is protected .wma's which I would much rather have in a better format like .ogg or .mp3. Any ideas?
I found a way around it all after I made this post. I just cut whatever I have to a music Cd. Then I copy them in Linux back to a directory and tell it to make it an .ogg format. It doesn't matter if it is protected or not. I then can do what I want with it. Does that make sense?
Here's a way to do the single line command with directory recursion:
Ogg Encoding:
Code:
for i in `find . -name "*.wma"` ;do mplayer -ao pcm -aofile "${i%.wma}.wav" "$i"; oggenc "${i%.wma}.wav"; rm "${i%.wma}.wav"; done
MP3 Encoding:
Code:
for i in `find . -name "*.wma"` ;do mplayer -ao pcm -aofile "${i%.wma}.wav" "$i"; lame -h "${i%.wma}.wav" "${i%.wma}.mp3"; rm "${i%.wma}.wav"; done
The above will convert every wma in the directory your currently in and every subdirectory below it. Both those command must be done in a bash shell if memory serves. I don't think it works with (t)csh or korn shells.
I found a way around it all after I made this post. I just cut whatever I have to a music Cd. Then I copy them in Linux back to a directory and tell it to make it an .ogg format. It doesn't matter if it is protected or not. I then can do what I want with it. Does that make sense?
Jimmmac
what program in linux did you use to burn the CD? the one I have xcdroast will only burn wav files.
Oh, I have no idea what any of this means! Haha I'm sorry. Okay, here's what I wanted to do. I wanted to make an artist page on myspace, and in order to upload songs, they have to be in mp3 form. The artist page is dedicated to R.E.M., and I wanted to take the songs from my wma playlist and convert them to mp3. If any of you have the patience, could you email me at rita_kelly48@hotmail.com and explain what must be done.. I would really appreciate it because I have no idea what these codes are, where they are placed, etc. Thanks.
A newbie, GREAT! Welcome to Linux. I am a semi-newbie in the sense that I am not as bright as many of the people who write on this forum. I never got anywhere with Mplayer until I downloaded a deb file (file to install a program) from on of my other forums. But I did convert my ogg music files (a very good linux format) to mp3 files using a program called Audacity. I was able to install Audacity with Xandros. But then your question is : How do I get my playlist files (probably wma format) into ogg files or mp3 files? Here is where you can discover something that I did. Put a music cd into a computer CD drive, then browse the Cd with Xandros File Manager. You might discover something that I did that will be very helpful. I am hesitant to say much more, because I am not sure of the legalities of working with wma files. But I think in my post, you will find a lot of answers.
Interesting! I had done the same thing! See below.
#!/usr/bin/perl -w
use strict;
foreach my $file (@ARGV) {
next if ($file !~ /\.wma$/i);
my $base = $file; $base =~ s/\.wma$//i;
system "mplayer \"$file\" -ao pcm -aofile \"$base.wav\"";
system "lame -h \"$base.wav\" \"$base.mp3\"";
unlink("$base.wav");
print "$base.wma converted to mp3.\n";
}
Hi folks
I know this is an old thread but it just helped me out and I thought I'd update the script - the line :
Quote:
Originally Posted by ravnx
system "mplayer \"$file\" -ao pcm -aofile \"$base.wav\"";
gave a 'deprecated' error with my later version of mplayer
so I changed it to
system "mplayer \"$file\" -ao pcm:file=\"$base.wav\"";
and it worked a treat
cheers
kev
well i couldn'tget any of those scripts to work for me, i to got that depreciated erro, but upon fixing that the second shorter perl script just does nothing, and all the other sripts bash and perl, and just the command all jsut say they cant find the file over and over again and do nothing.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.