Log in

View Full Version : ExBlend deblender - v1.04 - 18 Dec 2018


Pages : 1 2 [3]

flossy_cake
14th November 2025, 06:53
Somethings not adding up.

A frameblended 30i to 25i conversion shouldn't have this repeatable pattern of "every deinterlaced frame is a x% blend with previous frame". Mathematically it should have a VARIABLE blend pattern, and 1 in 5 frames should NOT be a blend. This is what I get in synthetic tests with ConvertFPS() (which uses frameblending).

Even if there are field cadence breaks, which I can simulate on a 30p sample with SeparateFields().DeleteFrame(0).Weave(). But maybe I'm not simulating the cadence break quite right, because I'm fairly confident this movie was shot at 30 so there must be some magic bodge that touches it in just the right way that makes every deinterlaced frame have the same blend amount.

wonkey_monkey
14th November 2025, 12:25
30fps would be incredibly unusual. There's no judder so I think it's just 24p sped up to 25p but badly transferred.

I didn't have much luck cleaning up residual ghosting, but I did notice that if you full rate deinterlace then it alternates between frames having a ghost of the previous frame and frames having a ghost of the future frame. So you can apply the same expr technique to both of these, and then merge. That way you end up with some future and past negative ghosts, but on average they're less visible.

Even scene changes don't come out too badly.

ffmpegsource2("remux.mkv")
bob(0.0, 1.0)

a = selecteven
prev_a = a.trim(0,-1) + a
a2 = expr(a, prev_a, "x y 0.2 * - 0.8 /")

b = selectodd
next_b = b.trim(1,0)
b2 = expr(b, next_b, "x y 0.2 * - 0.8 /")

return expr(a2, b2, "x y + 0.5 *")


(but use a better bobber)

Or if you can stomach a bit of residual interlacing at scene changes:

ffmpegsource2("remux.mkv")
separatefields

a = selecteven
prev_a = a.trim(0,-1) + a
a2 = expr(a, prev_a, "x y 0.25 * - 0.75 /")

b = selectodd
next_b = b.trim(1,0)
b2 = expr(b, next_b, "x y 0.25 * - 0.75 /")

interleave(a2,b2)
weave

flossy_cake
14th November 2025, 13:17
30fps would be incredibly unusual. There's no judder so I think it's just 24p sped up to 25p but badly transferred.

I didn't have much luck cleaning up residual ghosting, but I did notice that if you full rate deinterlace then it alternates between frames having a ghost of the previous frame and frames having a ghost of the future frame. So you can apply the same expr technique to both of these, and then merge. That way you end up with some future and past negative ghosts, but on average they're less visible.

Even scene changes don't come out too badly.

ffmpegsource2("remux.mkv")
bob(0.0, 1.0)

a = selecteven
prev_a = a.trim(0,-1) + a
a2 = expr(a, prev_a, "x y 0.2 * - 0.8 /")

b = selectodd
next_b = b.trim(1,0)
b2 = expr(b, next_b, "x y 0.2 * - 0.8 /")

return expr(a2, b2, "x y + 0.5 *")


(but use a better bobber)

Or if you can stomach a bit of residual interlacing at scene changes:

ffmpegsource2("remux.mkv")
separatefields

a = selecteven
prev_a = a.trim(0,-1) + a
a2 = expr(a, prev_a, "x y 0.25 * - 0.75 /")

b = selectodd
next_b = b.trim(1,0)
b2 = expr(b, next_b, "x y 0.25 * - 0.75 /")

interleave(a2,b2)
weave


Great, thank you very much. I feel like you just took this DVD from unwatchable to watchable :) :thanks:

And it works for the next movie in the series too so that one is saved from the trash heap as well.

I think it was just the last 2 movies that were shot on video, AI says it was likely shot at 29.97 but not definitively.

That blend pattern could be the result of a different blending algorithm or multiple conversions. The streaming service version is even worse, its 30p but has what appears to be 1:1:1:2 judder combined with a highly variable blend pattern. The fact there even is a 1:1:1:2 judder underneath all the blending seems to imply you are correct the movie probably was shot at 24p, I will need to do some more synthetic tests with ConvertFPS() . Maybe it's 24 blended to 50, or 24 blended to 25 and then framedoubled to 50.

wonkey_monkey
14th November 2025, 13:22
I think it was just the last 2 movies that were shot on video, AI says it was likely shot at 29.97 but not definitively.


Never believe AI. That is definltely 24fps film (sped up to 25fps). They were released direct to video.

flossy_cake
14th November 2025, 15:25
Never believe AI. That is definltely 24fps film (sped up to 25fps). They were released direct to video.

I think you are right that its 24fps originally but I think it's frameblended to 25i rather than sped up , cause i compared the music to the 30fps streaming service version and it sounds the same pitch

flossy_cake
14th November 2025, 15:28
I guess it doesn't matter if they are the same pitch cause we can pitch correct stuff anyway with TimeStretch, but the runtimes are almost identical only about 3 seconds difference

flossy_cake
15th November 2025, 15:57
Actually that's not adding up either, because even if it was 24 blended to 25, i don't think you can just deblend it to a 25p 1:1 cadence. Because deblending would just remove the blends that are attempting to smooth it out and you'd end up with stutter again.

So yeah, no idea what's going on with this movie.

I guess it's possible the 30fps streaming service version is actually based on a PAL 25fps speedup version that was frameblended to 30, and maybe that's why the runtimes are the same and also explains the uneven blend pattern (otherwise i would have expected the GGGBB pattern which ExBlend could have fixed)

Only one way to know for sure - buy the region 1 DVD. Not sure I wanna go that route as I've invested so much in this PAL version and I'm really happy with the result now. Kind of just wanna take the victory and call it a day lol.

Ran off an encode with x264 crf13 and quite happy with the result. Ended up lowering the deblend ratio to 0.175 as there are some scenes with actors heads moving on a bright blue sky background and the LCD-overdrive-esque trails were a bit too noticeable.

flossy_cake
18th November 2025, 13:23
Ordered the region 1 DVD — must get to the bottom of this :devil:

flossy_cake
24th November 2025, 12:54
Ordered the region 1 DVD — must get to the bottom of this :devil:

Aaaaand it's (https://www.amazon.com/Ultimate-Ernest-Collection-Jim-Varney/dp/B016P0GYP8?ie=UTF8) complete trash :eek:

Actual resolution: 240p and aliased to heck, plus it still has blended fields following no lockable pattern. And it's cropped to what looks like about 14:9 and then stretched horizontally to fill 16:9. Just complete trash, straight into the bin.

Luckily it contains some other unreleased movies and sketches and those are all in good NTSC quality, IVTC-able to true 480p with no field blending or vertical resolution loss.

So the PAL deblended versions of those 2 movies (Ernest Goes to Africa, Ernest in the Army) are actually the best versions available would you believe it! Now I feel like I got my time's worth from investing Avisynth repair time into it. The scene changes were still bad on the PAL versions after deblending, but managed to reduce the visual disturbance by using vinversed frames for the scenechanges in the first movie, and TFM.vinverse for scenechanges in the second movie. Then the amount of residual frameblending over scenechanges is very small and far less noticeable. The rest of the frames can all just be a subtraction of 17.5% of the previous frame for the first movie, and 17.5% of the next frame for the second movie. There were a couple of rogue scenes in the second movie where the blend direction flipped but roughly 99% of the movie is blended in the same direction thankfully so it didn't need manual editing of every scene.

I'll post some remux clips and such later if anyone's interested?