PDA

View Full Version : Blended 25p ---> IVTC'd (3:2) 20p ---> Telecined (2:1) 29.97i?


zoinbergs
12th October 2006, 12:49
Hey guys!

I'm in need a of a little help. I think I've got it figured out, but I'm not able to try it yet because I don't have the "unblend.dll" file (could anybody provide me with a copy since avisynth is down?). :D

In a nutshell:

I have a 25fps progressive clip that has been 3:2 pulldowned from it's original 20fps. It looks like this:

A B B C D
A B C D D

Common among 23.976p-->29.970i conversions, but I'm dealing with 20p original material instead. ;)

The fields have been blended instead of weaved, so as to create progressive 25fps video.

I'm trying to turn this video into a 20p clip, and I believe this would do the trick:

unblend()
Telecide()
Decimate(cycle=5)

Now supposing this here method worked, does anybody happen to know how to pull this down to a 29.97i clip? I believe it would simply be 2:1 pulldown, but I need to know if DGPulldown needs an input of 19.98fps or 20fps. If it handled the latter, would it utilize the drop-frame code?

I don't wanna mess with the audio because I don't think I have to in this case.. I don't want to speed it up from 30fps to 29.97fps.

I know I've almost got it.. I could just use a little push in the right direction!

Thank you SO MUCH for anybody who can shed some light on this subject! You'd be a total lifesaver for doing so. =)

I've looked high and low for info on this, and I've learned most of what I need to do without having to ask any questions. Hopefully you don't think I'm a lazy bastard looking to milk you of some easy help! Because I really do appreciate what you guys have to offer, and in no way would I ever take advantage of this forum.

Thank you again -- for looking at this post!

Cheers,
William

IceManTX
12th October 2006, 21:14
I can't give you any nudges as your question is over my head.

But I can point you to the unblend.dll file you seek!

http://mf.creations.nl/avs/filters/

Hope this helps.

zoinbergs
12th October 2006, 22:23
Well, I cannot seem to make unblend "reinterlace" the blended frames, but I must say good sir, your list of avisynth filters is considered absolutely priceless to me!!!!

Thank you thank you thank you!

I want to thank you most for giving me a good idea of what other nice filters are out there that I can use in my work! Boy am I gonna have fun tonight. ;)

zoinbergs
12th October 2006, 22:24
Hmmm.. I wonder, does Telecide() compare only interlaced material to try and recover the progressive frames? Or can it compare blended footage like what I've got!

Back to the laboratory...

Edit: Interlaced only.. no matter what parameters I set. :(

zoinbergs
12th October 2006, 22:48
I hate to ask another question...

But would pattern guidance, set as Telecide(guide=1) -- used for 3:2 pulldown of 23.976fps telecined material -- work for 20fps telecined material as well?

I mean, does Telecide operate with or without knowledge of the frame RATE, or does it just pay attention to the frame COUNT? In other terms, does it search for progressive frames with a 23.976fps goal in mind?

I guess setting AssumeFPS(29.97) would do the trick, and after Telecide and Decimate do their magic, setting it back to AssumeFPS(20) --- Or is any of this even necessary?

IceManTX
12th October 2006, 23:06
You are welcome, but those are not my filters so I cannot take credit for them.

My early attempts at all this have yielded great results with TIVTC using the TFM and TDecimate functions of it. Maybe this would work for you as well??

Check this thread out:

http://forum.doom9.org/showthread.php?t=82264

foxyshadis
12th October 2006, 23:16
Can you give us an idea of the blend pattern, if you can't post any sample at all? Unblend turns "A B C C/D D E" -> "A B C C D E", and only works for at most one 50/50 blend in a row. Removeblend is a little more flexible, but you might need restore24, and to get any real help from the blending experts a clip is really required.

zoinbergs
12th October 2006, 23:21
I'll have to look into that thread (my it's long!) when I get the chance...

Now I've been doing a little more research into this here problem of mine, and I kinda think I can relate mostly to what "restore24" has to offer.

(http://forum.doom9.org/showthread.php?s=&threadid=75432)

I installed all the necessary plugins to get restore24 to work, but I cannot seem to find a SmartDecimate plugin to work with AVS 2.5.6.

Any suggestions anyone?

zoinbergs
13th October 2006, 03:29
Here's a good example of the blending that I need to remove:

http://www.sendspace.com/file/zp3t0z

I believe it's traditional 3:2 pulldown, but with 20 original fps, not 23.976.

I think I need to accomplish something like this: "A A B B B/C C/D D D" ----> "A A B B C C D D" if I am correct.

I cannot get to frame C, as it lies entirely within two frames, B and D.

Thanks for your interest man! I really appreciate it.

___________________________________________________

Edit: Perhaps it can be looked at like this, instead..

A A B C D
A B C C D

Where I cannot get frame B all by itself.

Either way though, it's still 3:2 pulldown. I guess it just depends on what you prefer to be as the first frame (3 fields, or 2).

Anyone know the correct way to say "3:2" in the first place?

MOmonster
13th October 2006, 09:14
If this is restoreable than with FixBlendIVTC, restore24 and Mrestore canīt restore this doubleblends. After a look to your source, yes should work with this function and the recommed decimate. Nice tryout.

zoinbergs
13th October 2006, 10:24
Well I read somewhere that restore24 can fix 24p--->60i telecine with field blends, which it technically what I have..

So I've been working on putting together this script:

setmemorymax(384)

import("D:\PROGRAMS (P)\AviSynth v2.5.5\plugins\restore24\restore24.avs")


LoadPlugin("D:\PROGRAMS (P)\AviSynth v2.5.5\plugins\DGDecode.dll")
LoadPlugin("D:\PROGRAMS (P)\AviSynth v2.5.5\plugins\DeComb.dll")

LoadPlugin("D:\PROGRAMS (P)\AviSynth v2.5.5\plugins\AddGrain.dll")

LoadPlugin("D:\PROGRAMS (P)\AviSynth v2.5.5\plugins\MSmooth.dll")
LoadPlugin("D:\PROGRAMS (P)\AviSynth v2.5.5\plugins\MSharpen.dll")


LoadPlugin("D:\PROGRAMS (P)\AviSynth v2.5.5\plugins\restore24\LoadPluginEX.dll")

LoadPlugin("D:\PROGRAMS (P)\AviSynth v2.5.5\plugins\restore24\masktools.dll")
LoadPlugin("D:\PROGRAMS (P)\AviSynth v2.5.5\plugins\restore24\tdeint.dll")
LoadPlugin("D:\PROGRAMS (P)\AviSynth v2.5.5\plugins\restore24\kerneldeint.dll")
LoadPlugin("D:\PROGRAMS (P)\AviSynth v2.5.5\plugins\restore24\leakkerneldeint.dll")
LoadPlugin("D:\PROGRAMS (P)\AviSynth v2.5.5\plugins\restore24\avisynth_c.dll")

LoadCPlugin("D:\PROGRAMS (P)\AviSynth v2.5.5\plugins\restore24\smartdecimate.dll")
LoadCPlugin("D:\PROGRAMS (P)\AviSynth v2.5.5\plugins\restore24\ibob.dll")



Mpeg2Source("D:\TEMPORARY (T)\ALDirCut\ALDirCut.d2v", cpu=4, iPP=true)



AssumeTFF()

#DeBlock(quant=30)

#Lanczos4Resize(688,464)



a2=r24kernelbob(0)
a0=ibob() # Do I need this? Prolly not..

b2=matchbob()
b1=r24kernelbob(7) # Do I need this? Prolly not..
b0=a0 # Do I need this? Prolly not..


restore24(a2, b2)



#Tweak(bright=-25)




#Telecide(guide=1)

#Decimate(cycle=5)




#MSmooth(threshold=5, strength=3, highq=true, chroma=true)
#MSharpen(threshold=10, strength=100, highq=true)

#AddBorders(16,8,16,8)

#AddGrain(10,0,0)

But for some reason I cannot figure out how to get r24kernelbob or matchbob to work.

Does anybody know how to enable these, and/or perhaps confirm that I have this all scripted correctly?

I'm running AVS 2.5.5 with all the plugins necessary, but when I try and run this script it says:

(Script Error: there is no function named "r24kernelbob") and when I enable ibob instead, I get (Script Error: there is no function named "matchbob").



Also, does anybody know if a simple deblocking and/or resizing before running restore24 would improve results? I'm thinking yes on the deblocking, but no on the resize.

Thank you so much for any help you might offer!

zoinbergs
13th October 2006, 17:37
Alright, so I figured out what I needed to do to get r24kernelbob to work, and I decided to just use TDeint instead (as I read somewhere that matchbob is obsolete)....

b2=tdeint(mode=1,type=2)

is what I'm using now.


So I finally got over THAT hump.. but, not to my surprise :( It still doesn't work.

It says:

Invalid arguments to function "restore24"



Man I am so close I can feel it! There's gotta be something little and insignificant that I'm missing or something, because my head is spinning trying to figure this all out!


I sure hope Didee can grace me with some answers on this one, *hint hint* Thank you in advance!

foxyshadis
13th October 2006, 19:20
Even once you get it running, you won't have any real luck with it. I tried r24, rfps, and cdeblend for the exact same pattern, but MOmonster's FixBlendIVTC is the only one that actually fixes it.

zoinbergs
13th October 2006, 19:28
FixBlendIVTC! Why the heck have I not tried that yet!

Silly me! I bet it'll work like a charm, too!

Back to the lab!

zoinbergs
13th October 2006, 19:44
Sweet mother of pearl I could kiss you right now foxy!!!

It worked! It did it like a charm, too!

Why are all the easy solutions so hard to find anyhow!

Thank you thank you thank you thank you!

I believe this here thread is as good as closed. =)

foxyshadis
13th October 2006, 22:31
Thank MOmonster, he's the one who turned the idea into an amazingly accurate filter. =D

zoinbergs
14th October 2006, 01:42
Op, you're right!

But it is you who inspire him, as he has said so himself. :D