Thursday, March 29, 2007

So I swore off of re-encoding MPEG files...

...until I remembered that a lot of my source materials are either in PAL, or are taken from shoddy VHS (and in some cases, shoddy LD) and at bare minimum need either a framerate change or a quick color correction to be up to standard.


So, back to the MPEG mines. But I've found a lot of variables in my encoders which can change the outcome drastically... particularly, that of resizing.

See, PAL DVD's - as I've gone over before, I'm sure - are 720x576, while NTSC DVD's are 720x480. Despite the upgrade in resolution, they usually don't look any better though: the bitrate limit is the same for both resolutions, and if anything, encoding more bigger frames per second at PAL resolution will net you more fugly MPEG artifacts. Fun, huh? TMPGEnc and CCE both have built in scalers, to change the source resolution to whatever the hell you want in to be, in this case, 576 to 480. So I decided to remove that variable, which in TMPGEnc changes the resolution of the video file for no apparent reason, squishing it and making everything a bit too thin. So, using Video God - aka VirtualDub and it's myriad of plug-in filter magic - I used the generally loved Lanzcos3 filter to feed a pre-resized 720x480 file into my encoders.

Both TMPGEnc and CCE were set to the same specifications - 6mbps average bitrate, 2mbps minimum, 8mbps maximum. I could use CCE's peak bitrate of 9.8mbps, but since I have a total of 3 surround sound tracks, bandwidth would take a load in its' pants and be nowhere near DVD spec, thus the peak was dropped.

This is the original OVA Films DVD (resized to NTSC resolution in photoshop to not throw me off too hard), and... well, as you can see it's no looker to begin with. 80's anime, with flashing lights, speed lines and strange optical effects, is just asking to look like shit on low bitrate MPEG-2. There's a LOT of nasty MPEG related noise in the background, though D and Doris look OK for the most part. There's a liiiiiiiiittle bit of noise on her choker and right shoulder, but that's about all that's worth bringing up.

This is the CCE SP shot. The background looks okay at first, but check out Doris' shoulder and shoulder pad. Compare D's face for a minute or two. And, amazingly, check the fact that while the background is now softer and less defined, there's MORE grain over everything else! How the hell can that be?! All that grain wasn't there a second ago... unfortunately, CCE's downside is its' tendency to add noise ("digital grain") to everything. Even more frustrating is that the new grain on Doris' shoulder is random and rainbow colored (from the previous shot of Chula spitting spiders everywhere), making this shot look like it has composite artifacts, even though it's taken from a component, and possibly High Definition master. I guess compared to a $99 DVD recorder, or even some crappy freebie encoder that comes in Nero or whatever, this would be awesome quality... but hardly the pro-level stuff that makes everything in the consumer video editing (and professional!) world thinks is worth $2,000.

And then there was TMPGEnc Plus. On the one hand, Doris' shouldepad is still nice and noise free. Also, the background doesn't become mysteriously... soft, like it did in CCE. In some ways, TMPGEnc is a very good encoder that stays true to the source. Unfortunately, the same problems I found last time persist: D's face has a big nasty macroblock under his eye, Doris' skirt has come to life with squiggling Lovecraftian artifacts, and most frustratingly, the black outlines in Doris' clothes are STILL sharper, despite the accompanying artifacts.

Despite the horrible blocking, the TMPGEnc version - through a competent resize filter - winds up looking more like the original source video. This flaw sucks, to be sure, but really: do I want a grainy and rainbowing video, or a smooth and blocky video? It's like asking someone if they want AIDS or cancer: neither answer is "correct", but I think the second option is the latter of two evils, if only by a slight margin. That CCE still adds noise when softening the hell out of the transfer is all kinds of unacceptable, and if I wanted to soften the video in TMPGEnc I could do that without a layer of artificial dithering grain on top.

Procoder tests may happen if I can find a working copy to steal. Er, crack. Warez? Download! There we go. Yes, download.

Looks like my quest to find a perfect encoder has failed a little bit. As DVDShrink beats both TMPGEnc and CCE hands down, I'll use that for projects that don't need extensive remastering. While I regret that a layer of warm and crispy artifacts of one kind or another simply come with the territory of MPEG encoding, I'll continue playing with the encoder that sucks marginally less - in this case, TMPGEnc - and see if a tolerable result is instances like this is even possible.

We'll find a way.

Oh yeah, turns out I'm in the hole for $1,600+ on top of whatever debts I had before my apartment exploded. I try not to bitch about my personal life here, but I bring it up because if I ever had an incentive to open (Say what? I don't own that domain... or do I?), this would sure as hell be it. Stay tuned for more info. Hopefully.

Thursday, March 15, 2007

Artifact of a Misguided Past: or, Why I'm Giving Up MPEG Encoding

It's funny what decent source materials can lead you to learn.

Long story short(ish): I got my hands on the Korean HOKUTO NO KEN: Ken, The Great Bear Fist R3 DVD. It's a legit release from Hongdangmoo, and remains the first ever DVD release to feature the (entire) 1986 Toei Animation FIST OF THE NORTH STAR feature film in Japanese. It's also fullscreen (open-matte), and includes what appears to be the original theatrical ending, in which Raou basically beats Ken and then spares him either out of pity or compassion. Meanwhile, the Japanese video release (which came out as the second Raou saga was starting, I believe) had a new and poorly animated ending in which Kenshirou and Raou fight to a draw, and end up stopping anyway. It's also been remastered. With a comb filter. So the picture has been "smudged" a bit, but rainbows and dot crawl have been destroyed almost completely. It's not as nice as a new telecine of the original negative could be, but it looks better than any prior DVD or LD release, and that's good enough to please me plenty.

Anyone who's seen Fist of the North Star and knows a little bit about video encoding knows that this film is basically MPEG hell. Speed lines galore, hyper-fast fists, motion blurred gore, trailing lighting effects... there's literally no way to make this thing look good at low bit rates, or with a bad MPEG encoder. Considering my undying love for the phrase "YOU は SHOCK" and all that it implies, I want to make sure the inevitable Kentai Films DVD isn't a piece of crap, yes? Well... crappy or no, I am limited by the compatibility of cheap burned DVD-R technology, and while I've proven myself capable of burning DVD+R DL, they are a risk, since I can't guarantee that they'll play on much of anything other than whatever random DVD player I have to test. It's also simply a pain in the balls, though one I may be more willing to embrace the more prices on media go down.

The Korean R3 DVD is, naturally, a stacked DVD-9 with an average video bit rate of just under 6mbps. To fit JUST the feature, I'll have to squish that down to 4.5mbps, and that's before including the awesome LD extras (alternate ending and original theatrical trailer), something I wouldn't dream of denying Hokuto fans. So... I performed a little experiment with what I decided was the best MPEG encoder available to a po' boy like me - TMPGEnc Plus 2.5 (see last blog) - and decided to go to town at 4.5mbps on a "problem" scene: Kenshirou's legendary use of the Hokuto Hyakurekken (Hundred Crack Fist of the North Star).

I'm not even going to post screencaps. It's so painful I don't even want to bother taking them. Suffice to say that, after compressing everything TMPGEnc made this scene look like absolute pixelated shite, no matter what settings, filters and algorithms I used. It looked better in DVDShrink, which is often considered the worst of DVD compressing software (though as long as you're keeping things around 85% or higher, they still look pretty damn good - plus, it's free). So... the worst freeware DVD compression tool beats out the best MPEG software compression tool available on the market. By which I mean "the market with a software hack", as even CCE didn't impress me too much in the end, and for eons people have said it was the best MPEG-2 encoder evah. It doesn't artifact as bad, sure, but it does add mosquito noise (which is just as bad), and has a nasty tendency to change the colors, so it's out on principle.

The time has come for me to give up trying to fix the world. I have the know how, sure. But not the hardware to pull it off. I may someday buy ProCoder (since stealing it has failed), since the results I've seen first hand make me think it's a better encoder than anything on the market, for DVD's with extensive restoration that needs to be done - like Urotsukidoji 3: The Movie. But for DVD's where I just need to make the goddamn file smaller... yeah, I'm 50% through downloading a trial for InterVideo DVD Copy Platinum, which is oft considered to have the best recompression algorithm on the market, creating DVD's that are said to be wholly indistinguishable from their source material.

So transfers won't delay things anymore. In theory. My incompetence may, but you knew that already.

Best part in all this? The Hokuto Hyakkurekken scene has god-awful rainbow colored pixels from the encoder freaking out. It happens to look just like the worst-case scenario scenes on FUNimation DVD's, which are infamous via fans for horrible compression. Hmmmmm... interesting.

So, with this confessional* out of the way, how about some good news? Well, I don't have much. ANGEL COP VOL. 1 was finished, and while Vol. 2 and 3 were delayed a few days due to my lovely assistant feeling like crap, they've been delayed further since I recently flooded my apartment. A sink with a slippery handle and a slow drain are a VERY bad combination, and when all is said and done I won't be surprised if this comes to a few thousand dollars worth of damage (yeah, I can totally pay for that, no problem). It's been 6 days and we're finally no longer living on the office floor, though we are still waiting for the villainous Mold Man to return and both close our windows from the outside and put out doors back on their hinges. The only consolation I get is that my cat LOVES jumping from the hidden away bookshelf to the floor, which is like 7 feet tall. And he's tiny. It's awesome. Redundant, but awesome.

So, after cleaning up an inch of standing water, having my ceiling explode, and not eating or sleeping for about a week, you can imagine my work - important as it is to me - has taken a bit of a back-seat for the time being. Sad, but true.



Since the closest thing I have to good news today is "I have an incompetent MPEG encoder", I've decided to share with you something amusing I found on teh interwebz:

Check the 6th post down where a guy talks about a local video store and the "independant" releases they stock... funny, funny shit.

"6. They carry local titles and independent releases that Netflix doesn't, like Kentai Films "Salo: 120 Days of Sodom" (anamorphic widescreen 1.66:1, remastered, uncut, and uncensored). This sold recently for $120 on eBay, but they had it."

This was posted a year and 3 months ago... shame I didn't find it until just yesterday.

Funny, I was never informed of a video store profiting from my hard work! But this is what happens when you're a bootlegger. You get bootlegged, too. I've only ever authorized one site (and one individual) to sell rips of my DVD-R's, though some fansubbers offer up my older yaoi titles as "free fansubs", too. That doesn't bother me much - fansubbers, the old school crazy people who do it for free, are good people. They just don't have any concept that anime = profit, and should be applauded for their enthusiasm (and insanity). The rental store doing this... well, that pisses me off slightly, but in another sense, it's okay with me. See, there isn't anything I can do to stop it - what can I do, tell them they're using my copy written material? Ha! - so apart from the initial "WTF?" reaction, I'm amused and... in truth, a little bit honored by it. I'm not Cannibal King, and I don't have a legion of followers who buy whatever I release because I tell them to... but, maybe I will someday. Or at least a legion of yaoi buyers, hentai buyers and people who buy films I can't/don't want to describe. That people are willing to mention me by name (even when they don't have a goddamn clue WHO I am) could be a good thing in the long run.

Anyway, the point is Kentai Films - despite having been on life support for a goddamn year (nothing new) - isn't just gone yet. If anything, massive apartment fixing debt will push me to make more money than ever before. 'Course, I'll need to move everything back to where it was (and start sleeping occasionally) before I can start doing that... and I need to make money before I can relax. Vicious cycle if there ever was one.

*I consider this a confessional, considering how many goddamn hours and attempts I've made to improve and maintain video quality over the past several years without having a dedicated hardware encoder, which would SURELY give me better results than the cheesy software options I've had to deal with this whole time (my DVD recorder is better than TMPGEnc, and it's a piece of crap). I've learned a lot in that time, and I can put it to good use when I HAVE to make new encodes - such as when I convert PAL to NTSC, or when I'm restoring some horrible little download clip for DVD-R. Unfortunately, nothing I can do in these situations give me the quality I've been hoping for, so I may try one or two more encoders in the future before just calling the whole thing off. PAL-NTSC transfers are acceptable (not great though), and for special features culled from shitty sources, it's not a big deal how I encode them: they'll look like crap anyway. Still, the whole thing is an incredibly frustrating and humbling experience. Oh, well. Serves me right for being a perfectionist when VHS tapes are considered an acceptable master.