Handling MS-Windows AV Files in Linux

Date: Mon, 10 Mar 2003 14:18:28 -0800
To: Irish Linux Users Group (ilug@linux.ie)
Subject: Re: [ILUG] converting wma audio to something useful (or playing it?)
From: Rick Moen (rick@linuxmafia.com)

Quoting Brian Foster (blf@utvinternet.ie):

> I was recently e-mailed an audio file with a MIME type of
> `audio/x-ms-wma', which apparently is some M$ audio format known as
> wma (which I now forget, and don't really care, what it stands for).
> unfortunately, nothing on my Linux system can decipher, play, or
> convert this beastie.
> a Google(tm) search suggested the best bet is mplayer
> ( http://ftp.iasi.roedu.net/mirrors/ftp.mplayerhq.hu/MPlayer/releases/).
> no problems building/installing it, and it works fine with various
> other audio and/or video stuff, but not much luck here. actually, it
> does seem to partially grok the wma, displaying quite plausible info
> about the stream (e.g., artiste who probably recorded it, sample rate,
> etc.), but is quite pointedly not playing it.

I'm not expert at this, just a guy who's had a fair amount of luck with MPlayer and xine for various video/audio files.

"WMA" is Windows Media Audio, which has had at least two versions.[2] Current MPlayer versions purport to be able to play the original WMA and the later WMA9 formats: http://www.mplayerhq.hu/DOCS/codecs-status.html

Just to make sure you know for _sure_ what sort of media file you're working with, try "mplayer -identify [filename]".

Cheers, Live Faust, die Jung.
Rick Moen

[1] Starting with Microsoft Corporation's Win32 "Windows Media Player" v. 7.0 introduced with MS-Windows XP and MS-Windows 2000 SP3, many WMA files are now effectively in an (optional) third format, WMA9 obscured cryptographically (so-called "Digital Rights Management"), and users are probably creating such files without realising that they cannot be listened to on another system. (The same is true of Windows Media Video aka WMV.)

mplayer's internal, open-source codecs borrowed from ffmpeg (http://ffmpeg.sourceforge.net/) and avifile/wine are said to implement WMA 7 and 8, as well as WMV 1 and 2. However, WMA9 support also works using its ability to use Microsoft's Win32 WMA9 codec (without DRM = digitial restrictions management).

From: "Silent Partner" (sp@silentpartner.cx)
To: ilug@linux.ie
Subject: Re: [ILUG] converting wma audio to something useful (or playing it?)
Date: Mon, 10 Mar 2003 22:10:34 -0000

Quoting: "Brian Foster"
> presuming the audio file is Ok (I cannot check with windoze 'cuz I
> don't have/run/use/want windoze), does anyone have any suggestions on:

WMA is highly proprietary, and closed source. mplayer is the only utility outside of the windows platform that claims to be able to touch it.

Gives a script to use mplayer as a converter to dump the wma to wav without listening to it in mplayer.

autolame script will turn that wav into mp3 apparently.

But if mplayer has already let you down, then its hard to see it working in this scenario, leave it up to yourself to determine if its worth a shot or not.

Other than that, somthing like blaze media pro might install under wine, but its hard to see that or any other windows audio tool supporting the codec once removed from the OS where it gets the codec for free through api calls.

My 2c

Newsgroups: su.computers.linux
Date: Thu, 31 Oct 2002 01:13:33 -0800 (PST)
From: Eran Guendelman (erang@stanford.edu)
To: sulug-discuss@lists.Stanford.EDU
Subject: Re: stanford online and linux

On Thu, 24 Oct 2002, Akash Jain wrote:

> So I wonder what Stallman would say about this. Actually all MPlayer does
> is use the real Win32 DLLs to decode the stream - i.e. MPlayer is more of a
> Linux version of Media Player. As you said, the codec is still proprietary
> and so is the dll that decodes it - yet, we can use it in Linux like a black
> box - if it were a black box for security reasons (I don't condone security
> by obscurity though, *cough* webauth *cough*), would we complain as much?
> Maybe more....anyways, I tried using the Win32 DLLs from the mplayer distro
> with xine and it didn't work, then I fell asleep, I'll try with mplayer
> later today...

I think mplayer works for me with streaming videos, but what I usually do instead is download the stream using ASFRecorder and then play it using mplayer as a regular video (local file).

You can get ASFRecorder at http://asfrecorder.chat.ru/. Download the zip file, and while its contents look like a Windows program it also contains a single .c file in the source subdirectory which compiles fine (directly using gcc, not using the supplied Makefile) on my Linux machine. One thing to note is that it downloads the stream at the intended streaming rate (so an hour long class will take an hour to download).

[RM note: More at
See also http://linuxmafia.com/faq/Audio-video/video-files-support.html.]

http://www.stanford.edu/class/ee380/linuxplayer.html has:

Linux Player for Colloquium Tapes

Recently an open source player, mplayer, suitable for playing the EE380 Colloquium talks on some versions of Linux, has become available. The mplayer system can be downloaded from http://www.mplayerhq.hu/homepage.

Follow the installation instuctions carefully. When running ./configure, the script may complain about the version of gcc you are using. Red Hat shipped a broken compiler with some versions of Linux. The script checks for the bad version, since mplayer triggers the bug(s). Emperically, it appears that the compiler shipped with RH7.3 as upgraded from the Red Hat Web site is OK and generates a working player. I have not tried to compile with RH8.0 or any of the other distributions.

Be sure to download the Win32 codecs and install them per the instuctions.

The video button on the Web page is a hyperlink referencing the URL "http://stanford-online.stanford.edu/courses/ee380/YYMMDD-ee380-100.asx"
...where YYMMDD is the date of the lecture. The *.asx file is a play list of sorts and usually consists of a single entry:

ASF http://proedvid.stanford.edu/seminars/ee380/YYMMDD-ee380-100.wmv , which is the actual Windows Media Player file.

While mplayer has a playlist feature, it does not seem to grok *.asx files. To play a Colloquium video, type at the command line "mplayer http://proedvid.stanford.edu/seminars/ee380/YYMMDD-ee380-100.wmv"
...where YYMMDD is the date of the lecture to be viewed.

Windows Media Player has features that are not currently supported by mplayer, but mplayer does provide a path that makes CSL Colloquium materials available on Linux platforms.

Date: Fri, 05 Mar 2004 17:33:13 +1100 (EST)
From: Mike MacCana <mikem@cyber.com.au>
To: luv@luv.asn.au
Subject: Re: Convert avi to mpeg

On Fri, 5 Mar 2004, john wrote:

> Does anybody know of a program (Linux - Knoppix) that can convert AVI
> to MPG?

mencoder. Made by the mplayer people. Should be great unless YOU'RE COMPUTAR AM TEH TOO SLOW TO PLAY TIHS!!!!.


It's worth knowing that 'AVI' is just a wrapper format - just like Quicktime. AVIs can be MPEG, WMV, DivX, or a bunch of other formats. Quicktime, FYI, is almost always Sorenson, but can be MPEG or many other formats, too.


From: Paul (adidas@vx3lan.com)
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.6) Gecko/20040114
Newsgroups: alt.os.linux.suse
Subject: Re: How do I play wmv files...
Date: Thu, 30 Dec 2004 12:12:37 GMT

I've found xine to be the answer to all my video playing needs. With the win32all codec pack for xine, it can play everything including .mov, .wmv, .asf, divx, xvid — you name it. There's a few front-ends for xine also, including Kaffeine (KDE), or just plain Jane xine-ui.


Under the "xine" category at the top are the updated xine and libxine downloads. They used to offer w32allcodec pack, but doesn't seem like it, anymore. An outdated one that should work fine comes with SuSE as well as xine.