Monthly Archives: March 2006

Xan Binary Decoding

In the time-honored tradition of avoiding real work, I made an extension to xine that will decode Origin’s Xan codec (FourCC: Xxan). This is despite my long-standing policy that I will not invest any effort into making open source programs leverage closed, binary code in order to decode data.


Wing Commander IV Title

I have no intention of committing it to the xine codebase because, really, who cares? But let’s see MPlayer decode Xan data! Ha! Oh, why do I provoke them so? They’re going to have a workable decoder 20 minutes after I post this.

If you care, I posted the xine plugin code here: http://multimedia.cx/xan/. This is based on Mário Brito’s extensive Wing Commander research. It needs a very large table for decoding (128KB of data expressed in ASCII text) and that’s contained in xandata.h[.bz2]. Ideally, I think that table is supposed to be generated by some DLL function. Xan samples and the xanlib.dll are located at the MPlayer samples repository.

This particular plugin is based on one of my old reverse engineering experiments. The reason I took on this task is because loading xanlib.dll and calling into it isn’t especially difficult. At least, none of the relevant functions are dependent upon any external functions. Thus, I just used a few strategic mmap() functions and loaded the binary code directly into specific memory regions. Oh, the code only works on x86 architectures, of course.

Life Recorder Codecs

Security guru Bruce Schneier writes of “The Future of Privacy” in his latest Crypto-Gram newsletter. He hypothesizes on the future feasibility of a sort of “life recorder” that can serve as an absolute audio & video recorder for everything you see, say, and hear. Leave it to me to completely gloss over the dystopian sci-fi implications and go straight to the question that weighs heavily on the mind of a multimedia hacker– “What codecs will this device use?”

Let’s look at some numbers first: Schneier estimates 700 GB per/year would be required for constant video recording. The Rent soundtrack informs us that there are 525,600 minutes/year. Multiplied by 60 seconds/minute yields 31,536,000 seconds/year. Assuming a base-10 gigabyte the device will have 700 billion bytes at its disposal. That gives us a video bitrate of around 178 kbits/second. I’m not so sure about the quality there. Let’s assume that citizens are allowed to disable the life recorder during the nominal 8-hour sleep cycle. That brings the total yearly seconds down to 21,024,000. This brings the average bitrate up to around 266 kbits/second. This might be plausible, by today’s video codec technologies. The audio constraint of 200 GB/year would have no trouble encoding audio at a reasonable bitrate.

I can’t wait until the day when the best privacy advice we can give someone is to shake wildly and constantly in the hopes that the video encoder will have a poor chance of coping with the rapid scene change.

Blu-Ray Even Further Behind

Not to be outdone by the recent delay of HD-DVD technology, Sony has also delayed Blu-Ray consumer devices. Today’s IMDb Studio Briefing reports “that [Sony] has been forced to delay the launch of PlayStation 3 until November”. The reason cited is most curious: “to upgrade the copy-protection feature of its Blu-ray technology.”


Blu-Ray logo

The last I heard, Blu-Ray and HD-DVD were both supposed to leverage Advanced Access Content System (AACS) for content protection. Maybe Sony went off the reservation by implementing a separate DRM scheme? Or possibly there is much more to the story than can be fit in a 2-sentence news brief.

It has been a long time since I looked at that AACS stuff, there wasn’t much to look at. Let’s look again: Now, the site’s specification page contains 7 different PDF documents. Their FAQ page is still conspicuously empty, which is too bad since the #1 question I have is, “How is this scheme ever supposed to fly?” I can’t wait to read through all of the PDFs.

MPlayer Samples Archive Is Back

The MPlayer samples archive lives on. I hereby declare my old private samples repository deprecated. Further, I am now linking to the samples archive via individual MultimediaWiki pages. Feel free to do the same.

I just spent a few hours creating links from the Wiki into the samples archive– oh please, archive, don’t go away ever again— and creating new pages based on old formats I had forgotten about.