PDA

View Full Version : deinterlacing problem


nicco
31st August 2007, 01:15
I'm using this script on a DV PAL video source :


DirectShowSource("F:\FILM AOSTA\encoded\prova INT.avi",fps=25,audio=false)
edeintted = last.AssumeBFF().SeparateFields().SelectEven().EEDI2(field=-1)
TDeint(order=0,edeint=edeintted)
LanczosResize(640,512)

this deinterlacing method (auto from megui) produces really very good results (sharp and detailed video) except in this scene where a red logo zoom-in with fast rotation:

http://img337.imageshack.us/img337/83/interlaceartifactsac2.jpg (http://imageshack.us)


what can i do to avoid this horrible effect?

Ty:)

neuron2
31st August 2007, 01:48
You can start by posting a link to the unprocessed source video containing this scene.

nicco
31st August 2007, 10:41
here the link to the clip:

http://www.megaupload.com/?d=R6EPAJLQ

this clip is a part of a 1 hour movie, but i have the problem only in this scene, for the rest of the movie this deinterlacing method is the best

ajk
31st August 2007, 11:04
Diagnosing the problem and possibly improving TDeint() is of course good in the long run. But if it really is just that scene, a few frames long, I'd probably treat it separately with a couple of Trim() calls followed by anything from Bob().Selecteven() to Separatefields().Selecteven().EEDI2() to even MV/MCBob().Selecteven() and be done with it. If the transition between the methods is too striking it could be Dissolve()'d into the rest of the clip.

nicco
31st August 2007, 21:55
But if it really is just that scene, a few frames long, I'd probably treat it separately with a couple of Trim() calls followed by anything from Bob().Selecteven() to Separatefields().Selecteven().EEDI2() to even MV/MCBob().Selecteven() and be done with it. If the transition between the methods is too striking it could be Dissolve()'d into the rest of the clip.


Ty very much for your reply, can u post an avisynt example code?...sry but i am a bit neewbie:p

DarkT
31st August 2007, 22:46
I have similiar things happen with some sources, mostly I use a very similiar line on many of my anime, but I don't use Tdeint per-se - I use it as a post proccessor of TFM or what's it's called.

On most of my anime dvds it's clear and cool - but SOMETIMES, it will ruin the stuff in many places... I've been intending to post a script with .vob file for quite some time now - but never got to it... I suppose I'll try to squeeze it in amongst all of the encoding... If anyone is interested in what line gives me the same artifacts as the thread creator, it's:

interp = AssumeTFF().separatefields().SelectEven().eedi2(field=-1,pp=3)
deint = TDeint(mode=0,Order=1,type=1,AP=55,edeint=interp,slow=2)
TFM(d2v=d2vpath,clip2=deint,order=1,Mode=5).TDecimate(mode=1, hybrid=1, denoise=true)

ajk
2nd September 2007, 17:30
Ty very much for your reply, can u post an avisynt example code?...sry but i am a bit neewbie:p

Sure, if we alter your own example code it could be something like this:

DirectShowSource("DVsource.avi",fps=25,audio=false)

# Deinterlace fails with this part, frames 29 to 35 (or so), use just EEDI2() for this section
clip = last.trim(29,35).SeparateFields().SelectEven().EEDI2()

edeintted = last.AssumeBFF().SeparateFields().SelectEven().EEDI2(field=-1)
TDeint(order=0,edeint=edeintted)

# Then combine the problematic section with the rest of the video
last.trim(0,28) ++ clip ++ last.trim(36,66)

LanczosResize(640,512)

The idea is simply to treat the problematic part of the video in a different way. Of course this is not such a practical approach if the problem happens often in the video.

Atak_Snajpera
2nd September 2007, 18:35
@Nicco
Forget about TDeint and use Yadif deinterlacer. It's a lot better (no artifacts + sharp) and faster than TDeint

http://avisynth.org.ru/yadif/yadif.html

Examples:

LoadCplugin("...\Yadif.dll")
yadif(mode=0,order=1) #Top Field First (half frame rate)
yadif(mode=0,order=0) #Bottom Field First (half frame rate)

yadif(mode=1,order=1) #Top Field First (full frame rate)
yadif(mode=1,order=0) #Bottom Field First (full frame rate)

nicco
3rd September 2007, 00:27
Ty all for your answers, here my tests:


DirectShowSource("...\DVsource.avi",fps=25,audio=false)
edeintted = last.AssumeBFF().SeparateFields().SelectEven().EEDI2(field=-1)
TDeint(order=0,edeint=edeintted)
LanczosResize(640,512)
ConvertToYV12()


screens:

http://img126.imageshack.us/img126/7384/tdeinta1fu6.jpg (http://imageshack.us)

http://img212.imageshack.us/img212/4555/tdeintpreshy8.jpg (http://imageshack.us)



LoadCplugin("C:\Programmi\AviSynth 2.5\plugins\yadif\Yadif.dll")
DirectShowSource("...\DVsource.avi",fps=25,audio=false)
yadif(mode=0,order=0)
LanczosResize(640,512)
ConvertToYV12()

screens:

http://img180.imageshack.us/img180/376/yadifa1tc5.jpg (http://imageshack.us)

http://img180.imageshack.us/img180/6953/yadifpresnm8.jpg (http://imageshack.us)


Yadif is just really impressive! No more deinterlacing problem and almost the same quality of TDeint in high definition scenes (like in the second screen)

I think i will use Yadif for the entire movie!

acebrain
21st September 2007, 08:56
i was using tdeint(mode=1).mrestore(quality=2).vinverse() .But by using this my ripping was taking 17 hrs to rip .Then i tired yadif , but got some errors .

LoadCplugin("C:\Program\AviSynth 2.5\plugins\yadif\Yadif.dll")
unable to load C plugin .

LoadCplugin("C:\Program\AviSynth 2.5\plugins\Yadif.dll")
This plugin is not for AviSynth 2.5

Load_Stdcall_plugin("C:\Program Files\AviSynth 2.5\plugins\yadif.dll")
unable to load plugin
regards .
ace


.

midelic
21st September 2007, 09:27
Try english
LoadCplugin("C:\Program files\AviSynth 2.5\plugins\Yadif.dll")
not italian "Programmi"

acebrain
21st September 2007, 09:31
Try english
LoadCplugin("C:\Program files\AviSynth 2.5\plugins\Yadif.dll")
not italian "Programmi"

ya tried same problem

midelic
21st September 2007, 09:56
The good old kerneldeint seems to do the trick either, if is tweaked properly.It seems to me less artefact than Yadif too.

DirectShowSource("d:\utilitare\DVsource.avi",fps=25,audio=false)
leakkerneldeint(0,0,sharp=true)
LanczosResize(640,512)
converttoyv12()

http://img215.imageshack.us/img215/6654/96134656sx9.jpg

@acebrain
Try tritical's yadifmod ...is not C-plugin

nicco
21st September 2007, 10:04
1) You have to set the correct path where you unpacked Yadif.dll (Maybe you unpacked it into another directory or simply you do not have the plugin at all!!)

2) Use Avisynth 2.5.6 or 2.5.7

you can find the plugin and much more informations about how to make it work at
http://avisynth.org.ru/yadif/yadif.html

check it!

gl

@midelic

I prefered Yadif becouse it looks more sharp and clear in the whole movie for my taste

midelic
21st September 2007, 10:30
Actually I tested with a interleave script and between the two,... the kerneldeint script seems to me sharper(at least on the video at hand) ,but hey.....who am I? ...It is your taste.