Breaking Eggs And Making Omelettes

Topics On Multimedia Technology and Reverse Engineering


Language Scavenger Hunt

July 24th, 2007 by Multimedia Mike

So many fun programming languages out there, and more emerging all the time. But who has time to learn them all? I certainly don’t, but I still want to learn. One issue I have is that I don’t learn that well by reading through a language reference or a tutorial. I learn best by doing, and when it comes to learning a new language, I learn best when I have a specific task I am trying to accomplish. To that end, I was thinking that it would nice to have a list of essential, yet simple, programming exercises, preferably ones that are suited for higher level languages. These would give me concrete goals to research whilst attempting to learn a new language. Further, I would build up a small repository of sample programs to which I could refer later. When I need to write something in Perl, my chief method of refreshing my skill is to look back on similar code I wrote as many as 10 years ago.

I did a cursory Google search for something along these lines, but came up empty-handed. It may be necessary to start assembling a list of my own. This would include items like:

  • Reading a file, line by line, and processing each line through a regular expression; or perhaps a more complicated, less sed-style textual processing application
  • Opening a socket to a web server and fetching a web page; perhaps screen-scrape something useful off of the fetched data
  • Write a simple web server (and consider carefully the security implications of what you produce)
  • If the language has a graphics API (e.g., through something like gd or SDL), create a canvas, draw some dots, lines, shapes, load a font and write some text, load an image and blt it; decode a video in real-time using FFmpeg
  • If the language has an API for accessing your favorite database, use it to connect to the db server, SELECT, INSERT, UPDATE, DELETE, etc.; understand how the API can organize query data into the language’s native data structures (e.g., Perl’s DBI can fetch the results into a hash array which is extremely useful and intuitive)

These are just a few ideas off the top of my head. Another important aspect would be specific exercises targeted at understanding the language’s native data structures since those tend to be a key selling point of many very high level languages.

Posted in Programming | 3 Comments »

WordCamp 2007, Day 2

July 22nd, 2007 by Multimedia Mike

The second day of WordCamp 2007 was far more technical than the first day, featuring presentations about things like optimization strategies WordPress to survive a possible Digg or similar network storm. Performance enhancements are always interesting from a technical perspective, but I rarely have motivation to set them up for the blogs hosted on this site. (For those in attendance, when the speaker queried why some of us weren’t using plugins such as wp-cache, I was the guy who yelled out, “Too lazy!”)

Try this talk title: Designing Massively Multiplayer Social Systems, delivered by one Rashmi Sinha. To be honest, a lot of it was very fluffy stuff about building online communities and well-known problems therein (think Digg mobs) and how unfair it is that the internet is quintessentially meritocratic vs. democratic. However, I did take away one very key item from her presentation: SlideShare— think YouTube, but for PowerPoint presentations. I had never heard of it before but the knowledge comes at a useful time since I still need to get that LinuxTag talk online. Further, it may be valuable to post my other presentations as well.

However, a few concerns occurred to me right away, chief among them is the fact that PowerPoint presentations do not do a terrific job of presenting things by themselves; they most often serve as visual aids. Indeed, if a set of presentation slides actually deliver a cohesive presentation without human intervention, they were not created properly. I wondered how this context-free principle would work on SlideShare, particularly for my recent FFmpeg presentation which was almost entirely pictures. Fortunately, it appears that SlideShare is smart enough to extract the embedded notes that presentation software allows you to make.

My very first practical concern is whether SlideShare only handles PowerPoint presentations. It turns out that it can also handle OpenOffice Impress presentation files (and PDF files). I uploaded my FFmpeg: Past, Present, and Future slides to the service to test it out. It mostly worked, except that I used a few special fonts which are not embedded in the file. I need to see if there’s a way to correct that. Plus, this was the first time that I saw the feature that SlideShare extracts and lists your notes– I need to expand those and re-upload the presentation.

Then again, it seems reasonable that OpenOffice can probably export a series of linked HTML pages with the properly rendered slide and all the accompanying notes. Maybe I’ll go with both routes, in deference to those on fringe computing platforms that don’t have a viable Flash solution.

Posted in General | 2 Comments »

WordCamp 2007, Day 1

July 21st, 2007 by Multimedia Mike

I had so much fun at last year’s WordCamp that I decided to register for this year’s festivities, which have been expanded to cover 2 days. I’m always on the lookout for ways to improve this blog and the communication it provides, as well new multimedia technology angles.

I'm going to WordCamp

The first talk of the day — PodCasting — was highly relevant to multimedia, in fact; it was about PodPress, a WordPress plugin that makes PodCasting more ergonomic. The author talked about how much complexity the PodPress plugin currently embodied, which actually confused me a little. To my thinking, the plugin just processes a little bit of a multimedia file in order to find its metadata and knows how to spit out that metadata along with a MIME type via PHP. But I oversimplify. Actually, the demo he gave presented the plugin in its slickness, going so far as to show you, the admin, how your PodCast will actually appear to the users of various services, most prominently iTunes, but also several other PodCasting client programs. Plus, the plugin deals with an impressive array of multimedia files and probably handles lots of idiosyncrasies that arise in various file types.

Next up was a debate regarding Blogging vs. Journalism featuring John C. Dvorak and Om Malik. It was an interesting discussion though I personally didn’t take very much away from it since I don’t care about the blog vs. serious news source distinction for the purpose of this research journal-style blog. One take-away point: Blogs and news sites have very distinct styles and stigmas attached– so, do you want your site to look like a blog or a news site?

It was during this talk that I started thinking… there was a 4.2 earthquake here early yesterday morning. Though it was scarcely notable in the grand scheme of things, if that earthquake had waited about 30 hours to strike — during a bloggers conference — it could have had unprecedented live internet coverage.

After lunch came a wonderfully animated speaker delivering her talk about Kicking Ass Content Connections. She spoke of how last year’s fad was tagging while this year’s fad is relationship building — and proceeded to extol the virtues of the latter. I thought it ironic that she would introduce the topic in that manner as the comparison immediately cast it in a negative light. However, this relationship building notion is something I ponder from time to time as I periodically seek out other blogs that deal with similar interests as this one. I generally find that the few blogs that pertain to the subjects at hand are all hosted right here @ But I keep searching, disbelieving that we could be alone in this vast universe called the internet. Another point she made was that even some of the most mundane blogs that record an individual’s tedious day to day activities may, at some time in the distant future, provide archaeologists a clue of what life was like in this day and age. During this discourse, I was reminded of this Onion article: Recently Unearthed E-Mail Reveals What Life Was Like In 1995.

Still, I must say that I admire her for the yeoman’s work she does in her primary role of documenting WordPress.

Next was Blog Monetization, a topic that I still stubbornly refuse to care about. However, a key takeaway point from the speaker was: would you read your blog if it wasn’t your blog? I.e., if someone else wrote the same content as you, would you find it interesting?

Contributing to WordPress was a tag team effort– As for the first speaker, I thought Tobey McGuire’s Peter Parker was delivering a convocation. But I have to give him credit because his pre-written and obviously oft-rehearsed speech worked surprisingly well. This led into the second speaker whose talk sounded incredibly familiar to me– because it’s basically the same speech I gave at LinuxTag last month. That’s because both presentations dealt broadly with how a prospective contributor can get up and running with helping on an open source development effort, so there is much room for similarity. (This also reminds me that I still need to post my presentation from LT’07. Really, I plan to do this, but I would like to properly annotate my slides for the web since the slides themselves provide zero context.)

The presenter for Designing the Obvious needs proper credit for his courage to dump his entire stock presentation the day of the conference and tailor a brand new, virtually slide-less presentation for this specific crowd. I jotted down a lot of ideas for how to improve my blogs based on the ensuing discussions, just as he warned would happen.

The last talk of today was delivered by a big Google guy who discussed benevolent search engine optimization (SEO) strategies. Quite interesting, though common sense stuff, and I didn’t take away much personally. I operate on a slightly different level for this blog in particular– my SEO strategy is to simply write about stuff that no one else on the entire internet writes about. However, this often comes with the caveat that no one else on the entire internet cares about the stuff.

Posted in General | 3 Comments »

Sega CD FMV VQ Analysis

July 20th, 2007 by Multimedia Mike

I have amassed quite a collection of Sega CD titles over my years of multimedia hacking. Since it was an early CD-based console, I reasoned that at least some of the games would contain full motion video (FMV). In fact, essentially all Sega CD games fall into one of the following 2 categories:

  1. Standard 16-bit Sega Genesis-type games that were enhanced by a Red Book CD audio soundtrack
  2. Games that were driven entirely by very low-quality FMV

Mad Dog McCree (Sega CD version) -- Mayor's daughter
Screenshot of Mad Dog McCree for the Sega CD, an FMV-driven FPS

Many Sega CD games, particularly those published by Sega itself, contain many large files with the extension .sga. I have never made much headway on understanding any of these files, save for the fact that many of them use sign/magnitude 8-bit PCM audio. As for the video codec, “Cinepak” or “Cinepak for Sega” is often thrown around. I can certify that it is not the stock Cinepak data commonly seen in the early FMV era. Though perhaps the Sega CD console was the proving ground for later Cinepak technologies. A lot of Sega CD FAQs around the internet were apparently plagiarized from each other, which must have originally been plagiarized from Sega marketing material because they all shallowly list one of the system’s graphical capabilities as “Advanced compression scheme.”

Read the rest of this entry »

Posted in Game Hacking, Reverse Engineering, Vector Quantization | 6 Comments »

« Previous Entries