The MST3K DVD Video Improvement Project

Project Goal

  • Improve the video quality of MST3K episodes from my DVD collection so they look good on large modern screens.

Project Principals

  • Piracy is stealing. Stealing is bad. This project assumes the use of DVDs you own and the results are intended for personal use.
  • Don’t fix the movies. If MST3K used a cruddy transfer from the original movie, that crud is part of the “charm”.
    • The exception to this principle is video fixes that are applied to the whole video (e.g. noise reduction) that provide incidental benefit to the movies is fine.
    • Cave Dwellers (Season 3, episode 1) is an example of a movie that is theoretically fixable. It has intense ghosting in contrasty areas, but since that was only in the movie, it was left alone.
  • Balance. Retain detail while fixing as much as possible.
  • Target viewing on large modern displays.
  • Optimize for quality. Ignore considerations for storage or patience.
  • Plan for the future. It’s reasonable to expect AI tech to improve significantly in the coming years.

Introducing Formula 224

When the pandemic started I decided to re-watch my MST3K DVDs, but quickly ran into a problem. The video quality looked terrible on modern 55+ inch televisions. I foolishly decided to try and fix it. These are the results.

Inspired by Joel Hruska’s work with Star Trek: Deep Space Nine (Deep Space Nine Upscale Project Update: Variable Frame Rate DVDs Can Burn in Hell - ExtremeTech) I decided to dive deep into AVISynth (using the StaxRip front end) and Topaz Video Enhance AI.

Because I lacked video restoration skills, and because the forums that support AVISynth are scary (poor n00bs getting chewed out because they didn’t ask for help in exactly the right way) I decided to lurk deeply and use brute force to test suggestions that looked like they might be relevant to the challenges I was encountering. It took 224 mainline attempts, and over 10,000 side tests, to find a good combination of AVISynth plugins and settings that work well with MST3K episodes on DVD. “Formula 224” is so named to mark the culmination of two years of trial, error, forum lurking, frustration, and finally enough success that I considered the research portion of the project to finally be complete.

One noteworthy outcome from all this was that once I finished cleaning up the MPEG-2 video from the DVDs, I found that the need to actually upscale the shows to HD equivalent resolutions was not as important as I thought it would be. These cleaned videos have a resolution of 640x480 and playing them on a 65 inch TV looked surprisingly good. So I gave up on adding an upscale step to my workflow.

A Warning Before Proceeding

This process, in its current form, is not turnkey. Getting all the parts working is mildly technical, EXTREMELY compute intensive, and generally not for folks with weak hearts (or weak PCs). It is also, at this point, Windows only.

The Parts You Need

  • 7zip - $free
  • MakeMKV - $free (for DVDs)
    • Used to extract the video and audio from your DVDs (remember: piracy = bad, buying DVDs from Shout! Factory = good) to a file you can work with.
  • StaxRip - $free
    • So that I could get StaxRip running on multiple machines at home, I created a “frozen” stable instance of StaxRip that can be used without an installer. By now, it’s probably many versions behind the current one. That’s not really a big deal. What is a big deal is having a stable known good instance of StaxRip and all of its supporting parts - and there are oodles of supporting parts.
    • Note: I tend to use “StaxRip” and “AVISynth” interchangeably.
    • Download link: Microsoft OneDrive - Access files anywhere. Create docs with free Office Online.
    • The file named “!!IMPORTANT - Readme.txt” is, well, important. Read it.
  • Topaz Video Enhance AI - $199 (USD)
    • Video Enhance AI – Video Quality Software
    • Used for a final round of polish to clean up the bits that AVISynth couldn’t get.
    • Can be used for upscaling too, should anyone wish to try.
    • Technically this step is optional if you find that the quality output from StaxRip is sufficient.

Just a reminder that important details are in that “!!IMPORTANT - Readme.txt” file in the StaxRip download.

So, what does all this look like when you put it all together?
(the differences are MUCH more obvious when in motion)

Note: While I have example video clips, I’m not sure if they are sharable, so I’m using still images to play it safe.

Special Cases

Formula 227

Used for murky black and white episodes that have residual chroma “blobbing” that Formula 224 does not handle well. Used for:

s01e02
s01e03
s01e07
s01e08
s01e10
s01e12
s01e13
S02e05
(and others, but I have yet to evaluate further)

Formula 228
Derivation of Formula 227 used for murky color episodes with the same chroma “blobbing” problem. Used for:
s01e11
(and others, but I have yet to evaluate further)

s06e06 - Time of the Apes

This episode is my nemesis. Here are my notes from my last attempt to process this one before giving up:
This episode is a major pain to deinterlace because of major shimmer\edge-instability on the shadowrama when the movie behind it moves quickly (see 00:19:20 - 00:19:26). Frankly beyond my skill level to fix. Use “Time of the Apes” Steps 1, 2, and 3 - passing the results from Step 1 as the input to Step 2 and so on. While this will fix most of the shimmer, really tough instances remain and the overall video quality is getting dangerously close to the “soap opera effect”. Someone better than me should take a crack at this one.

Areas for Improvement

  • Video restoration is a highly subjective process - any part of this could be modified to suit individual tastes. My goal in creating this was to create something that looked good to me. My goal in sharing this is to establish something like a baseline.
  • The StaxRip collection of files is likely going to need some kind of version control, like GitHub, to really encourage community improvements. This is outside my scope to do.
  • Heck, the whole thing could really be packaged better. Also outside my scope to do.
  • Someone with real de-interlacing skills should take on s06e06 - Time of the Apes. I’m 100% sure that my method is flawed.
  • Per-episode fine tuned processing recipes, including color correction.
  • Alternative processing recipes for Rhino/Shout! DVD sources where appropriate.

Advanced Stuff - For Those Interested in Pushing Further

  • Because I’m a spineless forum lurker, I needed a way to run hundreds or thousands of multivariant tests. Like if an interesting AVISynth filter had 3 variables, say X Y and Z, and I wanted to test the interplay of 10 distinct values in each of those variables, well 10x10x10=1,000. Yikes. But it turns out that StaxRip can be slightly automated using PowerShell scrips so generating thousands of jobs is much less tedious. I’ve left some examples in the “.\StaxRip-v2.6.0-x64\Settings\Scripts” folder. You can look at them, so long as you promise to keep in mind that I learned just enough PowerShell to do what I needed - not necessarily how to do it properly. =)
  • On powerful multi-core systems with plenty of RAM, you can run more than one instance of StaxRip and all instances will pull from the same job queue.
  • If you’re feeling REALLY fancy, I managed to get multiple machines each running multiple instances of StaxRip pulling from a unified job queue. To do it, I changed my Microsoft OneDrive settings on all the machines to use C:\OneDrive as the OneDrive folder. Then extract the StaxRip instances into OneDrive. Run your main job-creating instance from that OneDrive location. Make your jobs, and run them. Then sync the OneDrive folders on any other machine you want to participate and (important!) run StaxRip from that instance. Like magic, you’ll see the job queue from the original machine and you can pull jobs from your remote instance.

Does the MST3K team know about this?
Kinda. I shared a video clip with @ivan. We’ll see where that leads…

Got Feedback? Improvements? Need Help?
I will try to keep up with this area, but I cannot promise a significant level of engagement (see below for why).

Why am I sharing this now?
This may be a bit of TMI transparency, but over the last 6 months my mental health has not been so great. My cognitive skills have diminished, and as a result I don’t have the problem-solving horsepower that got the project to this point. Heck - even putting this post together required me to pause a half dozen times to rest the ol’ brain.

Resolving this is still a work in progress, and is my top priority. To be on the safe side, I wanted to put all this together while I still have the wherewithal.

I, personally, think the results of this effort are nice enough that the broader MST3K community should have it. My sincere hope is that this is useful to some of you and will help enthusiasts to keep the legacy episodes of the show looking sharp for today’s audiences.

16 Likes

This is awesome! Thank you for all your hard work and experiments here. Great job!

3 Likes

This zoomed in side-by-side illustrates the benefits a bit better than the images in the original post.

5 Likes

Binary files like video are poorly suited to version control like Git. There’s not a reasonable way to calculate a delta (difference) between binary blobs, and given how video compression works, you’re likely going to get radically different frames each time you encode.

The best you could do is have some blob storage (in Git terms - Large File Storage or LFS) which basically just tracks that a given instance of a file is the Nth revision.

GitHub, the source control subsidiary of Microsoft, is also not going to tolerate copyrighted material you don’t own. Video game emulators and things that are hosted there are always careful to say you must not upload ROMs or point people to ROMs in any file, forum post, bug report, etc.

1 Like

Let me clarify - the part that needs version control is not the video output. It’s the tools and scripts that generate the video output.

Naturally posting MST3K episodes to GitHub would be a violation of Project Principal #1 which I’ll reiterate so no one misunderstands the intent here:

2 Likes

Now your wishes are squished in HD!!

2 Likes

I am deeply embarrassed to admit that it took me several moments to realize that was not a non sequitur. :man_facepalming:

…totally a sequitur. :+1:t2:

2 Likes

Side-by-side video clip!

With extra special thanks to @LadyShelley for her assistance in making sure this clip is okay to share, I can now present a brief video clip of what Formula 224 actually looks like compared to the original DVDs. Best viewed at full screen, or cast to a large TV to really see the difference.

Technical notes:

  • The left side video has been deinterlaced with a simple Bob method. This makes the comparison a bit more fair since most modern DVD playback systems will provide some form of deinterlacing.
  • The while doing the Bob deinterlace, the left side video was also allowed to double its frame rate to match the output of the Formula 224 process.
1 Like