Log in

View Full Version : idiotproof dv pal deinterlacer


smok3
29th April 2006, 13:06
i tested few (kernel, greedy, ect), still good old smartdeinterlacer for virtualdub seems to be the easiest to use and to get the results without a lot of blending and without a lot of small non-deinterlaced areas (that should get deinterlaced.)

so what are your suggestions for such deinterlacer for avisynth?
features:
- easy to setup, no or minimum tweaking
- relatively good results considering vertical resolution
- NO small areas that should get deinterlaced.
- relatively fast

p.s. also, a good script or setup that will run this on dual-cpuer perfectly?

foxyshadis
29th April 2006, 17:51
Did you try mvbob's securedeint? (I'd recommend mvbob except you said fast...) I've had success without needing to tweak anything. It's not nearly as fast as the plugin ones, but not nearly as slow as the full mvbob either. (Of course you can set it to use something other than eedi2 for a lot more speed.)

smok3
29th April 2006, 20:40
i suspect mvbob is a bunch of avisynth functions that need bunch of plugins? (is there a distro of all those, so i get all the correct versions in one go?)

scharfis_brain
29th April 2006, 20:51
http://home.arcor.de/scharfis_brain/mvbob/mvbob.rar

securedeint() is the deinterlacer of choice if you have some handycom footage because it never leaves residual combing.
It supports several interpolation modes like cubic, kernel oder EDI.
default is EDI for best edge definition.

Chainmax
29th April 2006, 20:57
What would be the image quality and speed differences between this:

Interp = SeparateFields().SelectEven().EEDI2(field=0)
Deinted = TDeint(order=0,field=0,edeint=Interp)
TFM(mode=6,order=0,PP=7,slow=2,mChroma=true,Clip2=Deinted)
TDecimate(mode=1)

and this:

Deinted = SecureDeint()
TFM(mode=6,order=0,PP=7,slow=2,mChroma=true,Clip2=Deinted)
TDecimate(mode=1)

?

scharfis_brain
29th April 2006, 21:05
because all deinterlacers except smoothdeinterlace and my securedeint WILL suffer the hole-problem (residual combing) with patterned moving structures especially with short shutter speeds.

all other deinterlacers are only secure to use, if your footage is telecined or fieldblended stuff.

buzzqw
29th April 2006, 21:49
sorry... :confused:...

i have a pal videocam (25fps interlaced), and for deinterlaced i usually do or leakkerneldeint or tomsmocomp...

why to decimate ?

BHH

smok3
30th April 2006, 14:22
scharfis_brain: tnx, so this is what iam trying now:

1. i put everything in that rar into avisynth/plugins
2. renamed mvbob.avs into mvbob.avsi
3. used a script like:

directshowsource("file.avi")
securedeint()

edit: i got 50p out of this, can you give an example of usage to get 25p?
edit2: the image looks like drawn with some crayons, whats up with that?
cropped example:
http://somestuff.org/avs/para_securedeint_crayons.jpg

q1. must i tell the securedeint whats the field order somehow?
q2. do you see anything especially dumb in my procedure?

scharfis_brain
30th April 2006, 19:27
- use selecteven() or selectodd() after securedeint() to get 25p
- this is due to the EDI-interpolation. tell securedeint to use cubic or kernel interpolation. but that will end up with stairstepping. the crayon-effect won't be noticeable that much with movement.
- to tell securedeint the fieldorder, just use assumebff() or assumetff() before it.
- use AVIsource instead of dierectshowsource(). enable ffvfw as decoder for DV. enable YV12-output in ffvfw.

Chainmax
30th April 2006, 19:40
because all deinterlacers except smoothdeinterlace and my securedeint WILL suffer the hole-problem (residual combing) with patterned moving structures especially with short shutter speeds.

all other deinterlacers are only secure to use, if your footage is telecined or fieldblended stuff.

Was that an answer to my question? If so, I don't understand it.

MOmonster
30th April 2006, 23:15
Was that an answer to my question? If so, I don't understand it.
The speed of securedeint depends on the kernel you choose. Of course the EDI-interpolation will be really slow, cubic will be faster. So there is no basic answer for your speed question.
The big advantage of securedeint for real interlaced sources scharfis_brain has described and because you can choose the interpolation kernel in case of quality I prefer securedeint.

Chainmax
1st May 2006, 03:23
I see, I meant the comparison with the EDI kernel in mind.

scharfis_brain
1st May 2006, 09:57
I precisely answered your question, Chainmax.

tdeint & kerneldeint leave holes in difficult scenes on true interlaced contents. securedeint does not.

Sure, the interpolation method isn't any different to tdeint or kerneldeint if you set securedeint's parameters accordingly.

But securedeint has a more reliable motionmask as it better catches static areas and never get fooled by patterned movements that are prone to leave weaving-holes with the tdeint or kerneldeint.

Now, was this an answer enough?

Chainmax
1st May 2006, 16:45
There's no need for sarcasm. You started your answer with a "because", which threw me off since I didn't ask a "why". Adding that most questions here are similar, you'll see why I wasn't sure who you were answering to. Now I understand and see that securedeint is better used for true interlaced, not IVTC postprocessing. Thanks :).

Staz
3rd May 2006, 11:30
Hey scharfis_brain!
looks realy nice!

I'm about to test your securedeint.

Does my script look ok?

LoadPlugin("C:\PROGRA~1\GORDIA~1\DGMPGDec\DGDecode.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\AviSynthPlugins\UnDot.dll")
import("C:\PROGRA~1\GORDIA~1\AviSynthPlugins\mvbob.avs")

mpeg2source("I:\TEST\securedeinttrial.d2v")
assumeTFF()
securedeint()
selecteven()

Thanks very much!

smok3
12th May 2006, 12:42
ok, so iam testing this:

# avisynth pal dv deinterlacing skript
avisource("file.avi", fourCC="DVSD")
#no audio get throught here?
assumebff()
securedeint()
selecteven()

but i get no audio through..., any clues?

Guest
12th May 2006, 13:33
You need an audio source call and AudioDub(), e.g.:

avisource("file.avi", fourCC="DVSD")
assumebff()
securedeint()
vid=selecteven()
aud=WAVSource()
AudioDub(vid,aud)

There are different audio source functions for different kinds of audio. A popular collection of them is NicAudio.dll.

ariga
12th May 2006, 14:08
You need an audio source call and AudioDub()
Does that depend on what codec is used. Coz I use cedocida and get audio with just avisource !

smok3
12th May 2006, 14:11
right, but in this case my 'file.avi' allready contains audio.
so what about that?

edit: well this seems to work:

# avisynth pal dv deinterlacing skript
file="somefile.avi"
a=avisource(file, fourCC="DVSD")
b=directshowsource(file)
a=assumebff(a)
a=securedeint(a)
a=selecteven(a)
AudioDub(a,b)

scharfis_brain
12th May 2006, 14:13
You need an audio source call and AudioDub(), e.g.:

avisource("file.avi", fourCC="DVSD")
assumebff()
securedeint()
vid=selecteven()
aud=WAVSource()
AudioDub(vid,aud)


Nice idea neuron2.

AVS often gets confused by more or less complex scripts and 'forgets' the audio.

maybe this already helps:

in=avisource("file.avi", fourCC="DVSD")
in.assumebff()
securedeint()
out=selecteven()
AudioDub(out,in)

also one needs to restart VDub, if the Audio vanishes. This will reset some things in AVS.

smok3
12th May 2006, 14:27
scharfis, nope, audio seems to be lost (in my case) just after avisource function, the example that combines avisource and directshow is in my previous post (not very clever i guess.)

scharfis_brain
12th May 2006, 14:30
it is not that bad at all. but there may be some async with directshowsource when doing random access.


but I personally would prefer to convert the DV.avi from type-1 to type-2.
Then audio should work with avisoure alone.

EDIT: or maybe a new version of AVS already fixes this issue.

smok3
12th May 2006, 14:42
right, i forgot about the existance of the 'type's' allready, that did the trick, the utility used for 'conversion' was this:
http://www.videohelp.com/tools?tool=DV_Type_1_to_DV_Type_2_Converter