Author Archives: Multimedia Mike

FATE Opportunities In The Cloud

Just a few months ago, I couldn’t see any value in this fad known as cloud computing. But then, it was in the comments for that blog post that Tomer Gabel introduced me to the notion of using cloud computing for, well, computing. Prior to that, I had only heard of cloud computing as it pertained to data storage. A prime example of cloud computing resources is Amazon’s Elastic Compute Cloud (EC2).

After reading up on EC2, my first thought vis-à-vis FATE was to migrate my 32- and 64-bit x86 Linux compilation duties to a beefy instance in the cloud. However, the smallest instance currently costs $73/month to leave running continously. That doesn’t seem cost effective.

My next idea was to spin up an instance for each 32- or 64-bit x86 Linux build on demand when there was new FFmpeg code in need of compilation. That would mean 20 separate instances right now, instances that each wouldn’t have to run very long. This still doesn’t seem like a very good idea since instance computing time is billed by the hour and it’s rounded up. Thus, even bringing up an instance for 8 minutes of build/test time incurs a full billable hour. I’m unclear on whether bring-up/tear-down cycles of, say, 1 minute each, are each billed as separate compute hours, but it still doesn’t sound like a worthwhile solution no matter how I slice it.

A different architecture occurred to me recently: For each new code revision, spin up a new, single core compute instance and run all 20 build/test configurations serially. This would at long last guarantee that each revision is being built, at least for 32- and 64-bit x86 Linux. It’s interesting to note that I could easily quantify the financial cost of an SVN commit– if it took, say, 2-3 hours to build and test the 20 configs, that would amount to $.30 per code commit.

Those aren’t the only costs, though. There are additional costs for bandwidth, both in and out (at different rates depending on direction). Fortunately, I designed FATE to minimize bandwidth burden, so I wouldn’t be worried about that cost. Understand, though, that data on these compute instances is not persistent. If you need persistent storage, that’s a separate service called Elastic Block Store. I can imagine using this for ccache output. Pricing for this service is fascinating: Amazon charges for capacity used on a monthly basis, naturally, but also $.10 per million I/O requests.

This is filed under “Outlandish Brainstorms” for the time being, mostly because of the uncertain and possibly intractable costs (out of my own pocket). But the whole cloud thing is worth keeping an eye on since it’s a decent wager that prices will only decline from this point on and make these ideas and others workable. How about a dedicated instance loaded with the mphq samples archive, iterating through it periodically and looking for crashers? How about loading up a small compute instance’s 160 GB of space with a random corpus of multimedia samples found all over the web (I think I know people who could hook us up) which would start periodically and process random samples from the corpus while tracking and logging statistics about performance?

Klondike Moon SEQ

I played an old DOS game a few months ago by the title of Klondike Moon. I really didn’t comprehend it at all. The gameplay dealt with outerspace mining while the storyline was something about paying off your debt with the proceeds of your labor while also actively thwarting your opponents from making good on theirs. That struck me as odd– it wasn’t about stealing what they had, it was merely a scorched earth matter to ensure that they couldn’t prosper.


Klondike Moon Title

But taking a second look at it recently, I noticed that the CD-ROM has a VIDEOS/ subdirectory. Clearly, this directory holds the FMV for the game. Each FMV is actually spread across 3 files: A .VID file (I’m presuming this is the video data), a .SFX file (looks to be raw, unsigned, 8-bit PCM), and a small .SEQ file (I suspect this ties all the data together). There are 23 .SEQ files which are either 26, 37, 103, 114, 158, 312, or 1280 bytes large. These numbers all happen to be divisible by 11 if 15 is first subtracted away which leads me to believe that each contains a 15-byte header followed by a series of 11-byte records.

Meanwhile, the .VID files clearly begin with 768-byte palette. I don’t think that the frames are uncompressed, paletted images, or else the frames are not a common width.

I’m trying to remember a formula — I seem to recall something from the discrete math branch of mathematics — for doing remainder math, something involving an operator that looks like an equal sign but with 3 bars instead of the customary 2. It turns out that the concept I am searching for is modular arithmetic. I was hoping that this could lead me to a formula that would show me possible frame dimensions given the size of the files, but I’m too tired to figure it out right now. You’re welcome to study the files and their sizes, though.

MultimediaWiki page and samples, as is customary.

Lots of FATE Compiler Maintenance

I was working like a madman on FATE’s compilers tonight. Let’s see:

  • Added gcc 4.3.4 to all of my Linux configurations (x86_32, x86_64, and PPC), decommissioning 4.3.3
  • Added gcc 4.4.1 to Linux/32- and 64-bit x86, decommissioning 4.4.0 (had already done this for PPC some time ago)
  • Upgraded the gcc SVN snapshots for all 3 Linux machines
  • Upgraded the LLVM SVN snapshots for 32- and 64-bit x86 Linux; this does not solve the build problem for 64-bit (remind me again how LLVM will save us from the tyranny of gcc); Update: solved; thanks for the help in the comments
  • Temporarily solved the Intel C Compiler conflict with ccache by disabling ccache when building with icc, thereby crippling build capacity but keeping the builds honest

This all feels like it was way more work than it should have been. Opportunities for improvement abound, starting with my plot for auto-recompiling the gcc and LLVM snapshots and automatically placing the snapshots into service as outlined in a previous post. It should just take an evening if I can get down to it.

I know I have outstanding requests to add LLVM (32- and 64-bit) for Intel Mac. That sounds reasonable, and it would be great to hook up the auto-update script to that LLVM process as well.

Reflections On On2

I read something in the past few months which noted that, in this day and age, the ultimate phase of any tech startup’s business plan is to be purchased by Google. Viewed through that lens, On2 is about to live the dream, even though they existed years before Google, years before most people even knew what a search engine was.


Assorted logos of Duck, On2, and Google

So Google has announced its intention to purchase On2. Wow, it feels like the end of an era. It seems like I’ve had some relationship with On2 for the entire 9 years I’ve been into multimedia hacking. Something that got lost in yesterday’s coverage and commentary was that On2 started life as the Duck Corporation, also a codec company. During this period, they largely focused on gaming applications. But I’m pretty sure that RAD Game Tools kicked them out of that market with their Smacker and Bink technologies. However, files encoded with the Duck’s multimedia codecs were among the first I studied back around 2000-2001. So that always makes me sentimental.

Continue reading