Recently I got a message from someone who, evidently, was plenty impressed with my work on Pinku VHS restoration. He asked me if I'd be interested in trying to restore an MPEG2 recording he had from an early 90s laserdisc. The title was 走れメロス!/HASHIRE MELOS! (Run Melos!), a 1992 theatrical film version of a classic Japanese take on a Greek folk tale. There was also a TV special animated in 1981, which was released dubbed in English back in the early 80s. It's also terrible. This one is far less so.
I told him, sure, I'd see what I can do, but reminded him that I can't work miracles. How good any source can be restored is squarely up to the source itself, and what those problems entail. His reply was, more or less, "don't worry, it's so bad that anything you can do would be an improvement." I'll be damned if he wasn't telling the truth.
I could pretend like I had this one down from the start, because I'm a video restoration demigod lording over other restoration peons, but I'll admit it: I was tempted to fuck this one up pretty badly. From the looks of things this was recorded from a less-than perfect to begin with LD straight into a middle of the road DVD recorder (or similar PC device), which did little to filter out the composite rainbows and added plenty of fugly mosquito noise and macroblocking, even on scenes that are relatively easy to compress.
Then again there could be some even more infuriating story behind this, as there's some really horrific color blocking, so I'm not convinced a DV connection wasn't used at some point in the chain... exactly why, I can't imagine. The audio was also the rarely wanted MPEG layer 2 .MPA format, which makes me wonder if a less than ideal encoder - say, TMPGEnc - was to blame? Without having the full story I can't be sure, but even when TMPGEnc is used properly (and the program is so 'effing complex, it's easy to screw it up), the quality simply isn't there. It was a godsend in the days of VCD, but we've come a long way since the days when blank DVDs were $8 a piece.
Anyway, left to my own devices with a 5+ gig MPEG file and far too much free time in AVISynth, I did what was possible. I'll admit it wasn't a hell of a lot:
Allow me, if I may, to point out why each filter is here, and exactly what it does. No, it won't be 'useful' unless (like me) you decide to become a crazy hermit who tries restoring shitty composite video all day, but some of you may still find it neat regardless.
While this line loads the D2V ("dummy" MPEG2 file), the "CPU" is the tricky part. This is a built-in deblocker, with values from '0' (off) to '6', more power performing more deblocking. The concept of a "deblocker" is to find chunks that specifically look like compression artifacts and then smooth them away temporally, using left over frames in the same GOP. It's an awesome theory, but because every frame in a GOP has a different level of compression, each frame will get a different level of deblocking. Particularly on higher settings, this will mean that the video will literally strobe between being in focus and being smeared beyond recognition, because the deblock filter understands compression gains versus actual "detail" or "noise". With this in mind, keep this as low as you can stand, 'off' if at all possible. You can't get rid of compression artifacts, only try to fuzz them out of existence, and if you're going direct to high bitrate DVD anyway that's just... well, stupid.
Oh, my GOD how I love BiFrost. Here's exactly what it does:
Goodbye, rainbows! The side-effect is... uh... so, did I mention that I <3 BiFrost? Naturally it can't conquer every composite artifact that you can throw at it, but it does a far better job than it has any right to do, and I no longer feel the need to purchase a hardware based comb filter for this nonsense. Why bother? Those results are fantastic!
Remember kiddies: ALWAYS use comb filters before you IVTC/Deinterlace. The interlaced frames have chroma information that gets discared in the process, so if you don't do this first, it's simply too late for it to do anything useful.
This, dear friends, is the one-two magic ULTRA COMBO!! that converts interlaced material into progressive material. Yes, I can do this by hand. And have. But so long as you don't convert the colorspace FIRST, the filter does all the work for you and (9 times out of 10) does a damn good job of it. I wouldn't recommend using this on most anime productions, seeing as how the IVTC algorithms out there are used to constantly changing live action material as opposed to the limited framerates you typically get out of animation, but seeing as how Melos was a theatrical movie (no video editing here!) with solid 3:2 pulldown and better than average animation, I've yet to notice any issues with the IVTC. The "post" part is the deinterlacing option, and for most anime should be fine-tuned... personally, I keep it at "0", since I'd rather have a frame or two of combing than a frame or two of deinterlacing. Your tolerance may - and likely, will - vary.
Could I tweak these settings to ensure I'm not losing my 3:2 pattern? Absolutely. But honestly, even with OCD paramater fudging, either you've got an NTSC transfer with decent 3:2 pattern or you don't. If you don't, you either need to do it by hand or keep it as-is. Because of later steps, keeping it interlaced isn't an option, so away we go.
As I've touched on in the past, levels are equal parts hard science and fine art. What really sucks on this particular source is the fact that there is "black" in the transfer, but only in the matte bars: the actual fade to black in the film just turns milky gray, and the hottest white is less offensive, but it certainly isn't the glowing torch white that a modern transfer could be. Having checked the levels "black" is roughly 10, but there's so much goddamn noise - compression artifacts, particularly - hiding in that "black" that I dropped it down slightly lower than I usually would. The rule of thumb I used was finding a fade to black sequence, and made that bastard fade to black - not charcoal gray, but the crushed singularity of a black hole. Similarly, already blown-out highlights were found and tested, and while I could, for all I know, be crushing the tiniest bit of contrast out of one or two special effects shots, I'm pretty confident that the healthier looking flesh tones and jet black hair are more important to the impact of the whole.
It's amazing how different proper levels can change everything. This is in no small part because all video is effectively grayscale with a compressed layer of color pixels riding on top of that, so if your black and white points are screwed up, your colors are too. I probably could have pushed the blacks and whites even harder without anyone noticing, but I'd run the risk of crushing blacks or blowing out whites recognizably if I did. I feel like I'm already pushing them just a bit too hard, but I'll grant that the gains of doing it are worth the potential sacrifices.
Remember how I just HAD to make everything progressive earlier? This is why:
Mmm, fake anamorphic upscaling... While upscaling doesn't grant you any "more" resolution than simply hitting 'zoom' on a widescreen TV, the simple fact of the matter is most TVs and DVD players really suck at upscaling HD content to their native resolution - forget NTSC! - so the less work that your hardware has to do, the better off it will look. I know, titles with field blending and video edits literally can't be upscaled without further damage done to the integrity of the image, but a theatrical film which has been properly converted into progressive 24fps video can be upscaled without any harm coming to the image. So, that's exactly what I did.
But there was something I did after "crop", but before "add borders"... what was it?
Yeah, that was it. Effectively a complex spatial noise reduction filter, RemoveGrain() is VERY good at what it does... of course, there's no "grain" here, only mosquito noise, but it frankly doesn't know the difference. Here's an example of the wonderful things it can do with a value of (2).
Unfortunately, the side effect is pretty obvious: the video gets softer, and kicking it up to (3) and higher is just hell on solid lines, forget anything resembling background details. Keep in mind that any actual NTSC based "noise" that was on the LD has since been smeared into blocky MPEG compression artifacts, so while I'm a firm believer that using noise reduction to get rid of film grain is stupid, we're actually just talking about removing a second layer of compression based noise, which is not the same thing. I know, it's ridiculous. I just want to point out that while I don't ever approve of using DVNR to "fix" perfectly good film based sources, I'm far more lineant on using NR to do exactly what it was always supposed to, which is get rid of video noise.
As for sharpening... what sharpening? I know, particularly when you're already smearing noise out of the source, and when the source is blurry to begin with, there's this lurking niggle in the back of your skull telling you to slap on some sort of sharpening filter to make everything clearer. I don't, for many reasons. One is that the Lanczos algorithm I'm using to upscale everything has a fairly limited "sharpen" feature built-in. The other is that these alsorithms don't know an outline from a compression artifact, and when using pre-compressed materials they tend to make them look worse in the long run. Finally, sharpening filters don't really work: there's no more detail going to magically pop out of a blurry frame, all it can do is try to boost the contrast, making edges more obvious. While Lanczos is subtle enough that it doesn't get on my nerves, using stuff like UnsharpMask, and even LimitedSharpen just drives me insane. I try to do all the work for you, but if you demand "sharp" video from a blurry LD transfer, I'm afraid you're on your own.
Yes, I COULD use one of those all in one scripts like mftoon(), but the sharpening aspect of the filter doesn't really thrill me, and the fact that it warps edges is just... freaky. It does a reasonably good job of denoising the living shit out of your source though, so if you have something along the lines of Melos - blurred AND noisy - you almost might as well... as for me, I'll save that for when I'm desperate to restore a third-gen VHS fansub, or something.
The last stage in all of this is to compress this a second time for DVD using CCE. This will likely cause some minor issues in and of itself, but it'll result in a higher quality transfer that uses less disc space overall. I can't guarantee that the above grabs will be 100% because of all the fun things that CCE does, but imagine me getting more compression flaws on top of the already shoddy source footage. Not a pretty thought, now is it? I may try tweaking the colors slightly before I give up, but not unless I'm totally convinced that it's for the best. Color Correction is just evil, for reasons I've pointed out in the past, and if I can avoid potentual further foulups by simply not doing it, it's worth considering.
Expect to see RUN MELOS! remastered at a torrent tracker and Usenet client near you, eventually. Ha, thought it was up already, didn't you? Much as I'd love to get this finished, I'm up to my eyeballs with a legitimate project that my new psuedo-employer wants to see done... like... yesterday. I'm also at least two weeks behind in restoring new Pinku, no thanks to the last 2 VHS tapes I've recorded being completely screwed up and thus worthless. I also intend to play the crap out of John Woo's Stranglehold when I'm done, so that means I need to get off my chubby keister and get everything else done, first.
I swear, when it rains it pours.