FLV+VP6 Seemed Like A Good Idea At The Time But Now It’s More Like That Trip To Vegas
I think everyone who actually reads this is aware that FLV is one of the worst containers ever used in the history of pretty much anything. For starters it absolutely abuses timecodes, so when I take a timecode v2 dump and look and see lots of numbers around 30fps, it’s pretty much guaranteed to actually be 30fps.
Another thing FLV likes to do is give itself some random as hell resolutions, such as 583×437, when using H.264 which is generally a YV12 codec, that is, chroma subsampling is done at 4:2:0 which would force the resolution to be divisible by 2 (mod2) although VP6 allows pretty much whatever you want to do.
The video I was asked to deal with today was VP6 at that resolution at 30fps in FLV. The problem I actually had on it was that there was some luma blending. Now I figured a simple MergeChroma(last.Trim(1,0)) (cut the first frame of the chroma so that it’s no longer a frame behind the luma, for those non-avisynth using people) would do the job however it turned out to be more difficult than I thought.
See, Japan has this love of REALLY BAD framerate conversions, and one of the worst framerate conversion methods blends the luma and chroma channels to interpolate motion and whatnot. This was most definitely the case here, and eventually I decided to just freezeframe some really bad bits and leave the rest of it as is, seeing as 30fps is hardly going to make a single frame noticable to the regular human eye.
After messing around a bit more and with the help of Kuukunen, it was found that the blending was in a 4:5 pattern: Definite proof of blended interpolation framerate conversion from 24fps to 30fps. I think this is where I would like to give P.A. Works and whoever else worked on this a big warm FUCK YOU. Naturally I shouldn’t be ripping things but it’s available for free on their site and I happen to be involved in an English translation project for it.
Now, as I’ve been speaking about this on IRC to a few people, some of them commented “Just decimate the 5th frame seeing as that’s the bad one.” The issue with blended interpolation framerate conversions is that they don’t just blend 2 frames to make an extra one, they mess with ALL frames to preserve smoothness of motion, albeit introducing blending as well. That means that there is effectively nothing one can do about it, although Kuukunen suggested the following, which basically takes the 2 worst frames in any set of 5 and blends them to get back down to 24fps, with some funky 3-way blends.
s = last
s0 = s.selectevery(5,0)
s1 = s.selectevery(5,1)
s2 = s.selectevery(5,2)
s3 = s.selectevery(5,3)
s4 = s.selectevery(5,4)
interleave(s0,s1,s2,s3.overlay(s4,opacity=0.5))
assumefps(24000,1001)
I can’t say I liked the result of that, but either way Japan has proven once again that it knows nothing about quality video mastering. The industry strikes again I guess. I could maybe write a letter to the studio informing them of how they’re Doing It WrongTM and they might even send me really low res lossless clips and ask for 1080p upscaled H.264, but I don’t see that happening here.
On the side, I happen to be turning 21 today, and if anyone feels like contributing to something they should message me on Rizon ( ´∀`)
Comments
One Response to “FLV+VP6 Seemed Like A Good Idea At The Time But Now It’s More Like That Trip To Vegas”
Leave a Reply
So that’s what it was. Oh well, at least give it to them that while they might be Doing It Wrong™, Madman and other PAL companies are Doing It Worse™.