Try to Make It a Clean Operation

And now they improve us!
And now they improve us!

When I first started to experiment with remastering Wing Commander IV’s FMV clips, I was astonished I could get them to work in-game in the GOG release. The GOG release uses the DVD edition’s VOB video files. The VOB (Video OBject) container is an antiquated format; it dates back to 1995 with the creation of DVD-Video standards. As such, it predates the advent of even the h.264 codec (the current minimum standard for High Definition video encoding) by seven years – so I was astounded to find that I could get a VOB container to accept an h.264 video stream.

However, even h.264 is getting long in the tooth at this point, at 14 years old itself. The beauty of this project is we’re establishing our own environment for game and media files. We’re not limited by what we can cram into creaky old formats, crossing our fingers and hoping it works. Also, we have Pedro – who beats standards and formats into submission with code and an iron will!

I mentioned to the team that there are newer, more efficient video formats that we could use. My personal preference is h.265 (the successor to h.264). It didn’t take long for Pedro to modify the game to play these newer formats, even though h.265 is far more complex and computationally demanding than its predecessor.

It may not look like much, but this noise pattern makes all the difference
It may not look like much, but this noise texture makes all the difference

Quality, Quality, Quality!

But we didn’t stop there. As mentioned in previous articles, film grain plays a vital part in our psychological acceptance that we’re seeing high-resolution footage. You may not notice it – but if it’s absent, footage looks soapy and smooth. Actors appear unnatural, as if their skin is made of plastic. While the AI routines I use do a wonderful job of upscaling resolution, they also tend to strip out film grain. In fact, I ended up re-adding ersatz film grain, which is a large part of what makes the artificially upscaled video look sharp and highly detailed.

Unfortunately, video compression is anathema to fine detail. In my efforts to squeeze as much image quality into the smallest file sizes possible, the film grain was always the first casualty. The smaller the file sizes get, the more the grain disappears. You swiftly reach an optimisation ceiling – where if you get much smaller in terms of file size, you lose all crispness in your videos.

I hit on an idea – what if we could overlay the film grain as a texture in real-time, rather than encoding it into the videos? That way, it wouldn’t need to be baked into the video files, which would free me up to be far more aggressive with compression. I ran it past Pedro and he confirmed it would be possible – and just recently, he’s incorporated it into the build. I’m proud to say, it looks fantastic.

DVD, HD Pack 5.0 and WCIV Remastered comparison

Less Is More

So what are the benefits to you, the player? You get the highest quality FMV we can deliver, looking as close to native HD as it possibly can, with file sizes that won’t hog your valuable hard drive or SSD space. Let’s run some numbers on how large these combined video files are:

  • WCIV DVD Edition: 6.931GB (360p MPEG-II VOB)
  • WCIV HD Pack V5.0: 6.918GB (1080p h.264 VOB)
  • WCIV – Remastered: 4.457GB (1080p 60fps h.265 MP4)

Our new FMV takes up ~64% of the storage space of both the original game’s DVD video and the latest version of my HD Video Pack. This is despite running at 60fps for smoother motion (Pedro has added a toggle to make this optional), improving the image fidelity and containing all three supported audio languages – English, German and French. I hope you’ll agree, that’s not a bad use of development time.