Oldskooler Ramblings

the unlikely child born of the home computer wars

The first 256-color game on the IBM PC

Posted by Trixter on October 1, 2017

In April of 1987, IBM announced the PS/2 line of systems. This was their advancement of the PC standard, but also an attempt come up with a new architecture that could not be cloned without paying a license fee. Of the new features announced, one of the most significant was the addition of MCGA, which created the 256-color mode 13h that we are so familiar with today. VGA was announced at the same time, which emulated all previous color standards including MCGA’s mode 13h.

This background is necessary to answer the following question: What was the first 256-color game on the PC? This was posed recently on a vintage gaming group on Facebook, but it’s a loaded question because it isn’t specific enough. It could mean any of the following:

  • What was the first PC game to use MCGA’s 256-color video mode (ie. mode 13h)?
  • What was the first PC game to use mode 13h to display more than 16 colors onscreen simultaneously? (Many early MCGA games physically used mode 13h only to reproduce the existing EGA/Tandy 16-color graphics the game shipped with, instead of taking full advantage of the extra colors mode 13h provided.)
  • What was the first PC game to fully take advantage of mode 13h to show (nearly) 256 colors onscreen simultaneously?

The aforementioned facebook group conversation devolved into relying on memories and friendly arguments. This is always dangerous, because our minds are not static records. To get an answer out of memories, you need a very large group of people coming to a consensus; even then, that’s not guaranteed to be the correct answer, just an agreed-upon answer. (Some historians would argue that collective memory is the only record that matters, but a discussion of archiving history is out of scope for this article.) In that facebook conversation, and previously reported in various places like Wikipedia, the answer was 688 Attack Sub. The latest executable file date in that game is 1989-03-04. (For reference, all dates in this article are of the format YYYY-MM-DD). That seemed a little late to me; tech adoption moved a little more slowly back then, but even still, it seemed odd that it would take two years for the first game to come out to take advantage of a new graphics standard. Was 688 Attack Sub really the first to support the 256-color mode provided by MCGA and VGA?

Research!

Thanks to MobyGames and various archives floating around the internet, we can perform actual research to answer these questions, instead of relying on memory and friendly arguments (which is what the facebook conversation eventually devolved into). I co-founded MobyGames for many reasons, but the biggest reason was to answer questions like this, so I immediately took up the task. Here was my methodology:

  1. I started at MobyGames by looking up all games that support VGA and MCGA in the years 1987, 1988, and 1989. Because MobyGames contributors are awesome, all of the search results provided screenshots, so it was easy to weed out any game that claimed VGA/MCGA support but was just displaying the same EGA 16-color graphics the game already had. In other words, for a game to be considered truly taking advantage of mode 13h, it had to display something other than the stock 16-color EGA/Tandy palette.
  2. I then analyzed screenshots to determine the number of unique colors in the screenshot. This was mostly used to determine if a game was actually displaying more than 16 colors, or just showing 16 and changing the palette via VGA color registers.
  3. Once I had a list of candidates, I then grabbed all revisions of the games in question and compared file dates of the executables, and used the latest file date as a “supported here first” date. (This is not the same as the game’s release date, ie. the date that the game was distributed by the publisher — those are much harder to verify due to lack of archived software publishing trade information, and besides that’s not the question I’m answering. I’m answering “who was first to support the tech”, not “who got their game into customer’s hands the quickest”.)
  4. Finally, I discarded everything after 1989-03-04, the executable file date of 688 Attack Sub, our known control point.

Here’s what I found, in chronological file date order:


1987-06-08: Thexder‘s earliest shipped revision shows a date of 1987-06-08 on a file named MAINPS, which is the executable overlay that provides “PS/2 graphics support” (ie. MCGA, ie mode 13h). This was surprising to learn, as I assumed Sierra’s AGI games would have supported it first, but the first AGI games to support mode 13h to display graphics of any sort have VG_GRAF.OVL file dates of 1987-11-16 or later. Thexder uses mode 13h to display graphics using 16 custom colors chosen to approximate how the game looks when running in its “best” mode, EGA 640×200.

Thexder-MCGA-mode


1987-12-16: Rockford: The Arcade Game displays 32 colors onscreen at once. (32 is significant; see Conclusions at the end of this article for an explanation.)

Rockford-title


1988-02-04: DeluxePaint added support for MCGA 256-color graphics in a version with an executable file date of 1988-02-04. While this isn’t a game, it played a large part in mode 13h support in games afterwards.

DeluxePaint-256


1988-10-05: Dream Zone uses digitized 16-gray-shade graphics as part of gameplay, then managed to eek out using one additional color when drawing the interface, for a total of 17 colors onscreen. This game is included here not because it is a serious contender in our research, but rather because it was the earliest PC game I could find that used digitized graphics that also used the MCGA palette registers to create a custom color palette — or, at the very least, used any of the default 256 colors that are created when mode 13h is initialized. (This beats out Moebius on the PC which has a later executable date.) Dream Zone is also notable in that it was created by the founders of Naughty Dog when they were 20 years old.

Dream-Zone-brother-room


1988-10-15: F-19 Stealth Fighter rasterizes the 3-D graphics using mostly the same 16 colors as as EGA during action gameplay, but when playing the game using MCGA, it uses the extra colors to draw the cockpit graphics using many color shades. This brings the number of colors up to 52 onscreen at once in typical gameplay.

f19-gameplay


1989-03-04: 688 Attack Sub starts off with a 210-color title screen and then uses many colors throughout gameplay: The Soviet control room (also pictured below) uses 73 colors; other screens produce a 16-color interface while an additional 16-element grayscale digitized picture is also shown; all elements of gameplay use a custom palette.

688-Attack-Sub-Title688-Attack-Sub-Soviet

Conclusions

Based on the above, let’s answer the questions we originally posed:

  • What was the first PC game to use MCGA’s 256-color video mode (ie. mode 13h)? Answer: Thexder.
  • What was the first PC game to use mode 13h to display more than 16 colors onscreen simultaneously? Answer: Rockford: The Arcade Game.
  • What was the first PC game to fully take advantage of mode 13h to show (nearly) 256 colors onscreen simultaneously? Answer: 688 Attack Sub.

Historical Context

Based on the above research, and my personal experience during this time period (if my own memory can be trusted), I can expand on these results with a little historical context. Consider this the “trivia” section of the article.

The “VGA” support in Thexder is truly MCGA support; this is reflected in the name of the graphics overlay, MAINPS, the PS part referring to mode 13h support as “PS/2 graphics” before the rest of the industry just started calling mode 13h “VGA graphics”. But if VGA also supports mode 13h, why don’t you see MCGA graphics when running Thexder on VGA systems? This is because the game is programmed to prefer EGA graphics over other display standards. Thexder’s native graphics are 640×200 in 8 colors as ported over from the original NEC PC-8801 version, which the developer emulated by running the game in EGA 640x200x16 mode. The developer felt the game looked best in its original graphics, so it shows the game that way on any system that can support EGA — and early PS/2 systems didn’t support VGA, only MCGA. So, the only way you can see the MCGA code/colors kick in is if you run it on an IBM PS/2 Model 25 or Model 30-8086, the only systems with MCGA graphics. If you don’t have one of these systems, you can force MCGA graphics to kick in by making a copy of your disk and then copying MAINPS to MAINEG, which will replace the EGA graphics code with the MCGA graphics code.

Rockford: The Arcade Game uses exactly 32 colors. Why is this interesting? Because it shows that the graphics were composed on an Amiga (most Amiga games were 32 colors), and instead of downconverting them to 16 colors like most PC ports did in the 1980s (see Airball for a typical example), the developer decided to support mode 13h so that all 32 colors could be displayed exactly. (Interestingly, the Amiga version of Rockford was released after the PC version.)

F-19 only barely supported mode 13h. It was a nice touch to draw the instrument panel using 32 shades of gray, but this is the only place in the game where additional colors are used. It serves the letter of the law, but not the spirit of the law.

688 Attack Sub makes use of DeluxePaint fonts on all versions of its title screen, which means it used DeluxePaint during development. Also, an earlier demo of the game while it was still being developed (date is 1988) shows that it originally did not support 256-color graphics. Was support of mode 13h in 688 Attack Sub considered only after a paint program existed they could use to create such graphics? Hopefully John Ratcliff, Michael Kosaka, or Wilfredo Aguilar can clarify the development timeline.

Disclaimers

I referred to 256-color mode as “mode 13h” because that’s the exact MCGA video mode in use for all games listed above. Later games used VGA’s flexibility to create 256-color modes in higher resolutions, or with multiple video pages, or split-screen, etc. but these were truly limited to VGA, and didn’t show up until 1990 or later. So I chose the exact technical term because it defined a consistent scope to use for comparisons. (If you want to do your own research down the rabbit hole of “What was the first game to tweak VGA into new video modes?” then you can use MobyGames to start that journey.

All of these answers are to the letter of the law, but not necessarily to the spirit of the law. In my completely subjective and unscientific opinion, the first PC game to truly show off MCGA with 200+ colors on every single screen is Mean Streets (because most of the screens were digitized in some way). Coupled with crude video sequences, and the ability to run at a decent speed on an IBM PS/2 Model 25, it’s a great early game to show off what MCGA was capable of.

MobyGames information may not be complete for the time periods researched. Given the nature of recording history, it may never be complete. If you feel I missed something, please contribute the missing game(s) to MobyGames so that future research can be more accurate.

Advertisements

Posted in Gaming, MobyGames, Vintage Computing | 6 Comments »

How to make better YouTube videos

Posted by Trixter on July 4, 2017

I’ve been dabbling with making content-specific videos for YouTube for many years.  Some of my videos have gotten a respectable amount of views and are full of nice comments, while other well-meaning content has forever fallen into the unwatched abyss.  It’s been fun, but I have been giving thought to producing slightly more polished and professional work to see if I can attract a larger audience and get them interested in retrocomputing and personal computing history.

It is easy to get carried away with investing a lot of time and money into making better videos, so I felt some research was warranted before barreling ahead.  I reached out to a few friends and acquaintances, some with podcasting or YouTube careers (ie. they earn their living making media) for some advice.  I also scoured several “How I make my YouTube content” videos from a few channels that make content similar to what I want to produce.  The advice and research was so helpful that I felt it could benefit anyone else in a similar position, so I’ve reproduced the best tips here.

Before reading on, be aware that these are all tips for you to make better videos that you are happier with.  This is not the same thing as making videos that get more views or are more easily monetized (which usually involves pressure to make videos you are unhappy with).

Don’t be afraid to write a script

It may seem daunting to watch some of your favorite YouTube presenters and see them rattling off perfect copy directly to the camera, and wonder how you could ever get that polished.  Some of them really are good at improvising in front of a camera, but it may surprise you to learn that some of them are actually reading from a teleprompter.  This isn’t a sign of weakness, but rather a way to speed everything up while ensuring accuracy: You can put notes in a script for any cutaways or graphics you want to use, which can help during video editing.  It also ensures you won’t forget anything you want to say or stumble over your words.

On a related note:

Don’t be afraid to put yourself in front of the camera

The only drawback to using a script is that you may find yourself with something you really want to say, but have no graphics or cutaways to illustrate what you’re presenting.  David Murray (aka The 8-Bit Guy) gave me the helpful advice that he uses himself talking on-camera as a fallback when he needs to fill video with something he lacks assets for.  (What a brilliant idea!)

There is another benefit to putting yourself on camera:  It may surprise you to learn that some of your potential audience is actually more interested in you than the material you’re presenting.  Content is king, but what gives a YouTube channel a personal feel is you, a unique person, with a unique viewpoint.  There is a portion of your audience that wants community more than information; they are already familiar with your video’s basic content, but they want to hear other opinions and viewpoints.  It reminds me of Douglas Adams’ quote about nerds:

“…a nerd is a person who uses the telephone to talk to other people about telephones. And a computer nerd therefore is somebody who uses a computer in order to use a computer.”

Nerds want to commune with other nerds, so no matter how awkward you feel, see if putting yourself in front of the camera feels right.  If you can show off who you are at the same time you present content, you win twice.

If you are worried about remembering what you want to say, or being awkward on camera, a cheap teleprompter can help reduce performance anxiety.

Background music is a quick way to add polish

If you think your videos feel “stale”, a quick way to add some production value is adding background music, as long as it isn’t distracting or makes the narration/talent hard to hear.  That’s obvious, but you can’t use any music you like because it might be copyrighted and/or not licensed for YouTube videos.  Luckily, there are repositories and catalogs of music you can use that are either public domain, Creative Commons-licensed, or otherwise free for non-commercial use:

YouTube Audio Library: The most obvious choice, and a good starting point.  Everything there can be used even if you monetize your videos, although a short credit/text in your video’s description may be required.  I like starting here because they allow filtering by duration.

Free Music Archive: A searchable catalog of tons of music with various licenses.  However, be sure to read the fine print, as not all music on the site is licensed for video.

Freeplay Music:  If you’re not monetizing your videos, all music on the site is available for you to use in any video for any length of time.  If you decide you want to go commercial with your content on YouTube, they offer paid licenses for you to use clips of music forever (ie. something like $250 to use one music track for unlimited numbers of videos or URLs).  Check individual licenses for details.

There are many others, as well as multiple resources for finding them, but the above should get you started.

Poor audio recording is WAY worse than poor video

Most people who watch YouTube are forgiving of poorly-created video because of cell phones:  Almost everyone has shot a shaky or poorly-lit cell phone video, and for most people, that kind of quality is “good enough” for getting the point across.  Humans are pretty good at filtering the signal from the noise when it comes to visual content.  Poor audio, however, is more jarring and requires more concentration to listen to.  Unlike bad video, poor audio is much more difficult (or impossible) to fix later in post-production.  If you recorded outside and wind noise completely drowned your voice out, or if you recorded inside in an empty or harsh room and your voice is echoing, there’s no way to fix that.  The only solution is to record decent audio in the first place.  That means:

  • Use the right tool for the right job:  Don’t use an omnidirectional microphone for recording just your voice, but instead use a cardioid mic for close vocal sources, or a shotgun mic for farther-away vocal sources.
  • Don’t record in a harsh room (bare walls, no carpet, etc.) no matter what the situation is.  If you have no choice, hang heavy blankets on the walls to try to stop sound from echoing.

If recording voiceover and podcasts, Jeremy Williams of tested.com swears by this combination:

  • Audio-Technica AT2020USB Cardioid Condenser USB Microphone: You don’t need a functional sound card to use this; it is powered by and transmits data over a single USB cable.  (Any cardioid condenser mic is acceptable, if you don’t want to use USB, but this specific model comes highly recommended.)
  • An AT2020 Foam Windscreen Pop Filter: To protect against plosives from ruining your audio.  Most windscreens and pop filters are cheap, so there’s no reason to skimp on this.
  • RODE PSA1 Swivel Mount Studio Microphone Boom Arm: Good voiceover means being able to record comfortably and consistently while reading copy, and a boom arm facilitates this.  It also makes it easy to store the mic out of the way when not in use.

Some people are wary of getting a dedicated microphone that is only good for picking up voice, and want something more versatile.  A lavaliere microphone of sufficient quality and placement can make a big difference in recording your voice if you are in front of the camera (or even off-camera) and lets you move around while you present your content.  You may also be able to use a field recorder, such as the Zoom H4n, for multiple scenarios.  Corey from My Life In Gaming uses a Zoom H4n for his narration, and it sounds very good, I came up to this site http://epicgifts.net/15-pokemon-gifts-for-true-fans where I was able to find the best gifts for gamers online, specially for those who love pokemon go. Corey was playing this new castle escape game, it seem very addicting so check it out first. And because it’s a field recorder, he can record his voice as well as two other audio tracks and mix them in the recorder to save time, or store them individually for flexibility in the video editor. Recently My friend bought this Zockersessel and he loves it, it’s really comfortable. .

Good lighting can drastically improve any shooting situation

All cameras record light bouncing off of objects.  The more light that hits a digital camera sensor, the less work the camera has to do.  To illustrate this for yourself, shoot some video outside on a sunny day, then shoot some video inside at night with all the lights on.  Even though your electric lights are bright enough for you to see comfortably at night, you’ll notice that the inside footage will have more noise and grain than the footage shot outdoors.  This isn’t limited to high-end cameras; it’s a general principle that works for any camera, including the camera on your cell phone.  More light — as long as it isn’t a harsh spotlight or casting visible shadows — makes all video footage better.

The best compromise to getting better light in your shots is to use at least two bright photography/videography lights with some softboxes to diffuse the light so it doesn’t cast harsh shadows.  Clint of Lazy Game Reviews was kind enough to let me know what he currently uses, and also used previously when his budget was tighter:

  • For those on a budget, Cowboy Studio makes some affordable lighting kits appropriate for video production.  They’re on the cheap side, but they perform admirably.
  • Clint currently uses LED Panels.  These are more expensive, but give more much more flexibility in how you can use them:  Some panels can run off of batteries, some have adjustable color temperature, and overall they generate less heat.

He concluded with the following:

I typically use at least three lights when I’m filming. Usually 2 LED panels in front/side and then something overhead, like another LED light or even just the light in my room.

Practical advice.

Use manual focus and tripods wherever possible (even cell phones)

Autofocus isn’t perfect; it can have a hard time tracking a moving subject, or “refocus” randomly for seemingly no reason when both the camera and subject are completely still.  If you are shooting a stationary (or mostly-stationary) subject, use a tripod, and use manual focus on your camera.  You’ll get consistent results every time.  Amazon makes a cheap, perfectly functional tripod that is great bang for the buck.

“But I shoot everything with my cell phone!”, you cry?  Not to worry, there are cheap cell-phone tripod adapters available from just about everywhere.  And any smartphone made in the last 3 years allows you to fix the focus while shooting, usually by tapping or long-pressing the area of the shot you want to keep focus-locked.

If you have more money than skill, shoot in 4k

If you have a camera or cell phone capable of 4k recording, try shooting everything in 4k even if you are making a 1080p video.  Why?  Because the extra resolution of 4k allows you do fix all sorts of errors in post-production.  Didn’t zoom in enough?  Is your subject framed a little left of center?  Was the camera rotated slightly on the tripod?  Forgot to film a quick close-up shot?  You can fix all of this in the video editor, and even though the 4k footage is manipulated, it still has more resolution than your 1080p target as long as you don’t zoom past a 1:1 ratio (ie. 100%) of the original footage.

Putting it all together

Armed with the above advice, I decided to revisit making videos, and came up with this on a whim:

While the result is far from optimal, it represents a quality baseline that I am happy with and that I feel can steadily improve on.  Here’s how the video was produced, from complete start to finish:

  1. Thought about what I was going to do and how I could make sure I could get video and photos while doing it: 20 minutes
  2. Performed the activity, gathering media along the way: 6 hours (much of it spent waiting for the chemical process to happen)
  3. Wrote a script that contained everything I wanted to say in the narration: 90 minutes
  4. Recorded the narration: 60 minutes (I needed several takes before I felt I sounded like I wanted to, which was a balance between formal, informal, and natural)
  5. Imported all assets into a video editor, laid down the audio track, cut video to the narration, researched license-free images from the web to fill in the gaps for areas I didn’t have original footage for, and researched license-free music to use as a background audio bed: 4 hours
  6. Export + encode + upload the result: 1 hour

So yes, it took ~14 hours to produce a 5-minute video, but that was because I was inexperienced, and I also could have cut the time down by doing some production tasks while I was waiting for the chemical reaction to finish, like researching the background audio beds, writing parts of the narration, or tracking down graphics I needed.  Before you think that’s crazy, a lot of top-notch YouTube content does indeed take 10+ hours to produce a 10-minute video, even when people are experienced.  It all depends on whether or not you require a script to stay focused, or whether you are capable of winging it.

The most important advice multiple people gave me was this:  Make sure you’re having fun.  If it stops being fun, then you’ve turned your hobby into a depressing chore and ruined it, so back off or change direction if you start hating what you’re doing.

For more tips and inspiration, here’s some leisure viewing:

https://youtu.be/rXHp5el-2cYI am

Posted in Digital Video | Leave a Comment »

How to explain programming to the total beginner

Posted by Trixter on June 6, 2017

Explaining what programming is in 2017 is likely best done by introducing the student to Scratch:  All logic is graphical, visual, and onscreen, which matches the most common output medium they’ll develop for.  But how do you explain programming like it’s 1979?

This topic came up recently in a vintage computer forum, where a long-time-listener-first-time-caller to the hobby decided they were going to do what they didn’t do in their youth:  Learn to program on their early home computers (which is one of the things they were originally marketed for anyway).  What struck me about this request is that the OP was truly coming from zero knowledge; they couldn’t comprehend how “ones and zeros” eventually turn into pac-man, or a drop-down menu, or a spreadsheet.

To help explain what programming itself is to the total layman, I came up with a metaphor that I thought was simple enough that I’d reproduce it here:  Programming is like cooking.

How is programming like cooking?  Well, how do you cook food?  To cook food, you need raw ingredients, cooking utensils, and recipes.  You read the recipe, which tells you which utensils to use on which ingredients and in which order.  The end result is a meal.  How does this relate to programming?  Like this:

  • Cooking utensils = CPU instructions
  • Raw ingredients = data
  • Recipe = A computer program

A program is a list of steps (recipe) that use different CPU instructions (utensils) to process data (ingredients) into a new format (a meal).  That’s all programming is.

Okay, but how do you make anything of any complexity, like a game or a drop-down menu?  Let’s extend our cooking metaphor:  Say you had to provide a ton of different, complex meals for a large catered event.  To do this, you have several recipes, each producing a different result.  For such a large event, it’s possible that some recipes exist only to create portions of food that themselves are used in larger recipes for a more complex meal.  The process is no different than making a single meal — you’re just doing it a lot more, with more recipes, for a bigger and more complex result.  How does this relate to programming? Like this:

  • Catered event = A complex thing the user sees on the screen
  • Many recipes = Many different programs
  • Smaller recipes that produce food to be fed into the larger recipes = Subroutines, library calls, API calls

I admit, I was eating lunch when I came up with this metaphor.  But maybe it can help you explain programming to your grandparents.

Posted in Programming, Vintage Computing | Leave a Comment »

Come to Vintage Computer Festival Midwest

Posted by Trixter on May 20, 2017

If you like vintage computers, and you like vintage people operating vintage computers, then come to the Vintage Computer Festival Midwest on September 9th and 10th this year.  I will be there, if you have always wanted the chance to laugh and point at me in Real Life(tm).

What makes VCFMW such a great show, in my totally biased opinion, is that it is 100% free to attend or have a table.  You use your table(s) to exhibit your collection, hold a competition or workshop, or even sell stuff — all are welcome as long as it relates to vintage computing.  There are things to see, things to operate, presentations to watch, and there’s a heck of a lot of Commodore stuff too.

Posted in Vintage Computing | Leave a Comment »

The End of a Perfect Day

Posted by Trixter on May 11, 2017

I remember a time when I was productive in my home life and my hobbies, both of which brought me great joy and validation.  What’s changed since then?  What’s happened to my output and my mental state?  Two things: Social media distraction and impostor syndrome.

Dealing with social media distraction has many gradients of severity and treatment, but being a member of Generation X gives me an advantage: Because I didn’t grow up with social media, it is easier for me to quit it cold turkey.  I’m going to gain back the time I waste on social media by cutting it out completely for several months, if not an entire year.  I might pop on once on a while to announce something, but it won’t be a daily check-up.  Back-of-the-napkin calculations suggest I will gain back at least 120 hours (that’s 5 days!) of free time per year giving up twitter and facebook alone.

Impostor Syndrome is possible to overcome if you can accept that you have provided real value at one or more points in your life.  If you accept that, there are various methods that can help.  I’ve adopted some, and they are indeed helping, such as keeping a file of nice things people have said about you, finding one person to confide in about feeling like a fraud, and — cliched as it is — “fake it ’til you make it”.  (If it’s good enough for Henry Rollins, it’s good enough to give it a shot.)

I want to get back to a time when I wasn’t worried about what people thought of me.  I want to feel like one of the smartest kids in the room again.  I want to will new things into existence because I feel they should exist and can help or entertain people.  Most importantly, I want to work on myself so that I am available for my family, and be mentally sound enough to not lose sight of how important that is.

To accomplish all this, I’ve removed all social media apps from my phone.  I’m also clearing out both of my email accounts, and being realistic about what I can and cannot accomplish for people.  (If I’ve volunteered to do something for you, I promise you’ll hear from me, but you might not like the answer.)  I might still be active on a forum or two, but with much less frequency.  If you need to contact me this year, please email me instead of trying to reach out to me over social media.

Self-improvement is a journey that requires a realistic world view and making some hard choices.  With sincere apologies to Johnny Marr and the late Kirsty MacColl:

No it’s not a pretty world out there
With people dying of their own despair
But in a written testimonial you’d say
You never really knew them anyway
I’ll never satisfy you
I’ll never even try to
I really couldn’t tell
It just depends what you remember
At the end of a perfect day

Posted in Lifehacks, Uncategorized | Tagged: | 2 Comments »

An informal comparison of intermediate editing codecs for Windows platforms

Posted by Trixter on April 2, 2017

Last year I volunteered to record an entire weekend’s worth of vintage computer talks.  Unsurprisingly, this also involved editing an entire weekend’s worth of vintage computer talks.  All of the footage was 1080p60, and was shot or delivered compressed (a mixture of AVCHD and H.264 MP4).  While this saves space, it is not always fluid to edit with, as compressed codecs arrange frames into groups that are highly dependent on each other.  The end result is that seeking around and cutting highly-compressed footage can feel sluggish even on extremely powerful systems.  My system was beefy for 2012, and can still surprisingly hold its own in 2017:  A 6-core/12-thread Core i7-980X with 24G of RAM, and 4TB of spinning-disk storage made up of 3x2TB disks in a RAID-5 array (capable of delivering up to 700MB/s sustained read speeds at the outer edges of the platter) with a 4th hot spare.  Despite the high specs, editing 1080p60 H.264 footage last year was sluggish to the point where I considered using an intermediate codec.

A quick primer on intermediate codecs

Intermediate codecs are used when you want to transcode your footage to something that is much easier for the computer to decompress, making it much faster to edit with.  There are two basic types, lossless, and lossy:

Lossless codecs exactly represent each original pixel in the source, and can be used interchangeably with the original footage through any number of processing or compression passes.  (Think of them as running the footage through PKZIP or 7-ZIP, but using more lightweight algorithms more suitable for decompression speed.)

Lossy codecs throw more information away, but do so in a manner that looks the same to human eyes.  They don’t match up with the original source pixel for pixel, but most people wouldn’t be able to tell the difference.  The resulting file sizes are much smaller than lossless codecs, but because some information is thrown away during the compression phase, you have to be careful running such footage through multiple processing or compression generations as the image could degrade unacceptably.  (For the old-timers: This is like what happens when you make a copy of a copy of a copy of a videotape: The end result is noisy, washed out, and barely watchable.)

Compressing into an intermediate codec takes time, so it is usually done during the ingestion process (such as with DaVinci Resolve or Adobe Prelude), or in a batch process overnight, or both.

Our test case

I decided at the time to pick a 10-minute piece of 1080p60 footage and transcode it to every intermediate codec that met the following criteria:

  1. Worked in Windows without Quicktime (Quicktime for Windows was discontinued in 2016 due to security flaws).  This eliminated ProRes and Avid’s DNxHD.
  2. Over 5 years old, compatible with Windows 7 or above, and relatively battle-tested
  3. Evidence of recommendation online by video content producers (ie. something more professional than, say, people doing anime music videos)
  4. Worked in Premiere Pro without crashing or odd behavior
  5. Didn’t demand more than 200MB/s out of the I/O subsystem to maintain 60fps playback (this was more to keep filesizes down than anything else)

Additionally, since my source footage was not high enough quality to require HDR-level processing, I was realistic and considered codecs that had a YUV 4:2:2 configuration (and eliminated codecs that could only do 4:2:0).  This led to the following codec list:

To provide some interesting comparisons, I also included the following:

  • YUV 4:2:2 8-bit uncompressed, to see what was possible given a fast I/O subsystem
  • Cinepak (1991), possibly the fastest useful single-core decompression codec ever made
  • HuffYUV (2000), the first popular free lossless codec for Windows

After my 10-minute 1080p60 sample was compressed into these codecs, I then defragmented my RAID array using mydefrag with a script that put all of the codec comparison files at the fastest area of the array (the beginning).  I then measured decompression speed using VirtualDub’s File->Run Video Analysis Pass feature, then measured I/O and CPU usage using Windows 7’s Resource Monitor.

Before reading on, I want to stress that the above criteria were the only factors considered.  There are many other things to consider if you have different production targets or workflow needs, such as 10-bit or 12-bit color depth, or iterative recompression stability.  These vary from codec to codec and are not discussed here.

The results

Here are the raw results (you might need a non-mobile browser to see this table correctly):

Codec Size in bytes Percent size of uncompressed Data loss Visual quality loss Decompression Frames Per Second MB read per second Decompression %CPU usage (6-core 12-thread i7 980X)
UTCodec 4:2:2 8-bit 35,859,227,004 24% lossless 1 164 367 39
Cinepak 8,951,457,910 6% lossy 3 129 57 9
Cineform (Medium HD) 11,872,682,448 8% lossy 2 64 51 12
Cineform (High HD) 13,293,520,304 9% lossy 2 62 57 12
Newtek SpeedHQ 4:2:2 9,763,299,366 7% lossy 2 55 24 8
Blackmagic Design MJPEG 10,146,513,708 7% lossy 2 38 28 16
YUV 4:2:2 8-bit uncompressed 149,270,431,900 100% lossless 1 85 704 4
Lagarith 28,375,743,340 19% lossless 1 29 41 11
Grass Valley HQX Lossless 35,888,010,830 24% lossless 1 33 75 9
Grass Valley HQX Offline 3,988,818,666 3% lossy 3 90 19 8
Grass Valley HQX Online Standard 7,854,558,164 5% lossy 2 74 38 8
Grass Valley HQX Online Fine 9,833,655,952 7% lossy 2 69 45 8
Grass Valley HQX Online Superfine 27,810,744,334 19% lossy 2 48 86 9
HuffYUV (FFmpeg variant, left, adaptive huffman) 35,918,114,616 24% lossless 1 44 99 12

From this data, I eliminated codecs that were not capable of playing back 1080p60 footage at the bare minimum requirement of 60 frames per second.  I also eliminated Cinepak (which was only included for teh lolz) and Grass Valley HQX Offline, since the visual quality of these were unacceptable and I did not want to edit with proxies (I was not in the field on a laptop, but was on my actual editing desktop system).  I also eliminated YUV 4:2:2 uncompressed, because the storage requirements of transcoding everything to an uncompressed format was not practical.

From the remaining data, I concluded the following:

Playback performance (best to worst)

  1. UTCodec 4:2:2 8-bit
  2. Grass Valley HQX Online Standard
  3. Grass Valley HQX Online Fine
  4. Cineform (Medium HD)
  5. Cineform (High HD)

File size (best to worst)

  1. Grass Valley HQX Online Standard
  2. Grass Valley HQX Online Fine
  3. Cineform (Medium HD)
  4. Cineform (High HD)
  5. UTCodec 4:2:2 8-bit

Conclusion

For over a decade, I assumed that Cineform was the gold standard of intermediates, and was indeed the codec I used whenever I needed an intermediate workflow.  Recently in an online discussion, a colleague who is a professional cameraman and editor extolled the virtues of Grass Valley HQX.  HQX was not in my original comparison, so I added it and re-ran all of these tests in the same hardware configuration.  I was surprised to see that Grass Valley HQX was a hair better than Cineform in all areas.  I will definitely give it a spin for my next project.

To be absolutely fair, Cineform is (still) no slouch, and has served me very well over the years.  You could do much worse than either Cineform or Grass Valley HQX; either of them should suit your needs for an intermediate codec on Windows.

If you have a multi-core processor and lots of free disk storage, UT Codec remains the fastest lossless codec available on modern hardware.  However, evaluate your project needs before committing to it, as not every project needs 100% lossless compression.

Finally, if you only work with 24p/30p material, just about any of these codecs will serve you well.

Update: I’ve recently found that Cineform performs much faster if you can handle the quality the “Medium HD” preset provides, which can exceed the playback rate of GV HQX.  But they’re both good to use.

Posted in Digital Video | Tagged: | Leave a Comment »

The failure of the Dreamcast

Posted by Trixter on March 22, 2017

The Dreamcast had a very short life; officially less than 3 years, although it felt like 4 because the Dreamcast continued to be sold in the US after it was officially discontinued.  I was recently part of a discussion where someone asserted that piracy was the major contributing factor to the failure of the Dreamcast, and I disagree.  The Dreamcast failed to achieve long-term acceptance, in my opinion, primarily because of the competition of the PS2.

The PS2 followed a long, very successful run of the PS1 and had more pull with Sony fans (Dreamcast sales dropped sharply in the USA when the PS2 USA launch date was announced).  Additionally, the PS2 was backward compatible with PS1 games, and was also a DVD player, both of which were very appealing.  Finally, some major developers and publishers did not support the platform (most notably Electronic Arts and Squaresoft), having been burned by Sega’s mismanagement of various aspects of prior consoles (such as announcing the Saturn early, which killed 32X sales, and also by the Saturn being very difficult to write code for due to its use of multiple processors).

If you were a brand-agnostic consumer with a choice between the PS2 and the Dreamcast, and you were trying to figure out which one was more special, you had a choice between a console that could play games on the internet (something only computer gamers cared about in 1999), or a console that could play hundreds of the previous generation’s games as well as DVDs. That was a one-two punch that the Dreamcast could only overcome through brand loyalty to SEGA, and it did so, admirably, for 3 rough years. Piracy was a problem for Dreamcast only after the Dreamcast was already on its way out, not the other way around.

I don’t view the Dreamcast as a complete and utter failure, but rather as a console that had a shorter-than-expected lifespan.

Posted in Gaming | 4 Comments »

BASIC Memories

Posted by Trixter on March 15, 2017

I contributed a few segments to The 8-Bit Guy‘s retrospective on BASIC that covered my thoughts and memories on growing up with BASIC during the home computer revolution.

Making quality video is difficult!  I had to perform several different takes before I was comfortable, and I screwed up the focus, and I needed better lighting.  And I’m fat.  But overall it went ok.  Except for being fat.

I envy those who can do YouTube videos full time, since it seems like a lot of fun.  I’ve collected over a hundred topic ideas for videos I’d like to do someday, but if I’m being realistic with myself, I won’t have the time.

Posted in Digital Video, Entertainment, Programming, Vintage Computing | Leave a Comment »

I talked about old PC audio methods

Posted by Trixter on January 1, 2017

I was recently a guest on the Upper Memory Block Podcast hangout #6, where the topic was PC sound methods and sound cards.  I spoke the most when the topic hovered around the PC speaker, Gravis Ultrasound, Covox Speech Thing, and a few other pre-MIDI topics.

There’s no real structure, and the whole thing is more of a conversation than having structure :-) but if you’d like to jump right to the PC speaker, seek to the 5-minute mark.

Posted in Vintage Computing | Leave a Comment »

Fear of Success

Posted by Trixter on December 19, 2016

When I have an exceptionally good idea, I think about it endlessly until it gets fleshed out and fully realized inside my head.  This is fun.  I like to work on these projects every night as a way to get to sleep.  It rarely results in actual sleep, but at least I have something to think about during bouts of insomnia.

The problem with this is that it leads to obsessing over the implementation of the idea, to the point where it manifests in a really unhealthy way.  When I coded some of my best demos, I would stay up until the wee hours of the morning multiple nights in a row to take advantage of the +2 INT bonus you get from hyperfocusing without distractions.  This led to being inefficient at work, being short with my family, and occasionally getting sick.  When I was fleshing out MobyGames with Brian Hirt, I spent every moment of my free time working on it for nearly two years, which damaged my relationship with my wife and my young children.

I’ve reconciled with my family for that period in our lives, but ever since then, I’ve been very careful about how I spend my time fleshing out my ideas.  If it looks like I’ll have enough pockets of free time that don’t impact anyone that needs me, or said project doesn’t require intense focus, only then can I actually work on a project.  This is a balancing act.  It took several planets to align for 8088 MPH to happen, complicated by not just my own time, but the time of everyone involved.  I’m amazed we pulled it off.  I’m also positively thrilled we pulled it off.

I have a new idea that is just begging to get out of my head and into the real world.  It’s a project that has an audience of thousands — not the largest audience, but it will make a real impact with that audience and save them thousands of hours of time, and that’s enough to make converting this idea into a concrete project.  It will require me to learn a new programming language, adopt community programming practices, use collaborative platforms, and will overall be a positive learning experience.

But, it will require a large amount of discipline, focus, and study.  So I’m afraid to start, because I know once I start, I won’t be able to stop.  I’m afraid of causing collateral damage by being unavailable to those around me.

So, I haven’t started.

Posted in Programming, Sociology | 3 Comments »