Log in

View Full Version : Please help: determining type of interlacing and weak colors tweaking


jeffy
3rd March 2007, 00:24
Can somebody please help me, I need to determine what type of interlacing these samples have and what deinterlacer (preferably TDeint, LeakKernelDeint, KernelDeint, FieldDeinterlace without blending or something similar reasonably fast, not looking this time at MCBob, MVBob, TDeint+EEDI2...) should be used to get sort of optimal results without residual combing, jitter but with most details preserved. If not possible, something close to it :D

1) sample_wildcard.m2v
http://www.mytempdir.com/1239064

2) sample_sbs_1.m2v
http://www.mytempdir.com/1239071

3) sample_sbs_2.m2v
- this sample also needs some color tweaking, any suggestions how can I get naturally looking skin colors?
http://www.mytempdir.com/1239083

4) sample_the_nanny.m2v
http://www.mytempdir.com/1239092

Also for a future reference, I tried AssumeTFF with SeparateFields but I possibly don't know what to look for :o
What should I look for and where? VirtualDub or VirtualDubMod? Preview mode progressive or field order A/B? Zoom 100% or greater?

The source is a noisy analog TV capture. Thank you for help.

EDIT: Please get the samples. Each is somehow different.
Each is less than 20 MB, waiting is a small while and download speed about 100 kB/sec!

NEW EDIT:
5) sample_dtg.m2v
http://www.mytempdir.com/1250630
this one is driving me nuts!

NEW EDIT: 23rd March 2007
6) sample_ttw.demuxed.m2v
http://www.mytempdir.com/1266193

Spuds
4th March 2007, 03:13
I only pulled down the first clip to take a quick look. That one is a PAL video TFF. Looks like the bigger problem is there are some blended fields visible after a separatefields() in both the even and odd fields, not a ton but some and I don't know how to get rid of those. You can start with:

assumeTFF
tfm(d2v="sample_wildcard.d2v")
tdecimate(cycler=1,cycle=25)

or

telecide(guide=3,post=2,vthresh=15,show=false)

Terranigma
4th March 2007, 03:23
I haven't downloaded any of the samples, But here's something I came up with

interp = separatefields().eedi2(field=-2)
tdeint(mode=1,full=false,mthreshl=255,mthreshc=255,cthresh=255,mi=255,tryweave=true,edeint=interp).selectevery(2,0)

You'd need both Tdeint and EEDI2 which can be downloaded Here (http://web.missouri.edu/~kes25c/). See if this works :)

jeffy
4th March 2007, 05:40
Thank you for your help, but why didn't you download the samples?
Each is less than 20 MB, waiting is a small while and download speed about 100 kB/sec! (edited in the first post as well). Each is somewhat different.

I will try both the suggestions by Terranigma and Spuds.

jeffy
4th March 2007, 06:40
I have done each set of suggestions on each sample with target quantizer=2, Xvid, all settings default.

Please bear in mind these ratings are subjective and I don't want to offend anyone of you. Thank you.

1) sample_wildcard.m2v
Spuds - jerky but less than 2nd :)
Spuds - 2nd - jerky :(
Terranigma - jerky :(

2) sample_sbs_1.m2v
Spuds - jerky, combing :( :(
Spuds - 2nd - good, residual combing :) :(
Terranigma - combing much :( :(


3) sample_sbs_2.m2v
Spuds - jerky :(
Spuds - 2nd - good :)
Terranigma - combing :(

4) sample_the_nanny.m2v
Spuds - movie part so-so, credits jerky and low-res :) :(
Spuds - 2nd - credits are not jerky, movie so-so :( :(
Terranigma - combing left, credits combing :( :(

Third clip color tweaking: none both

Please, if you are aware of something better, post here. Thanks for your help.

Terranigma
4th March 2007, 16:19
Ok. I'll download your clips. Maybe these are hard-telecined pal videos or something.

Didée
4th March 2007, 16:36
It seems like the usual fieldblending crappola due to standards conversion. The question is not simply "how to deinterlace". The question is "how to dig the correct 24 fields out of every 50 fields." (23976 fields out of 50000 fields, to be exact.)

Search terms: fieldblending, blended fields, Restore24, Mrestore.


@ Terranigma: your posted settings with TDeint(eedi2) are quite funny. With all thresholds set to 255, TDeint considers everything as "this is NOT interlaced". So apart from a few sporadic field matches, it will leave almost everything as it is ...

Terranigma
4th March 2007, 16:41
@ Terranigma: your posted settings with TDeint(eedi2) are quite funny. With all thresholds set to 255, TDeint considers everything as "this is NOT interlaced". So apart from a few sporadic field matches, it will leave almost everything as it is ...

Yes, I know. I had a few pal videos that I was able to remove the blending/combing by properly matching the fields and leave everything as is. I was thinking that maybe he/she had one of these clips. :D


----------

I've downloaded sample 4, The Nanny. You could try using vinvere (http://forum.doom9.org/showthread.php?p=896352#post896352), or use a field blender like Didée mentioned.

Try This
function CSBlend (clip clp){
clp
separatefields()
dbl = mt_average( SelectEven(). bob(0,0.5),
\ SelectOdd(). bob(0,0.5),U=3,V=3 )
dblD = mt_makediff(clp,dbl,U=3,V=3)
shrpD = mt_makediff(dbl,dbl.removegrain(11),U=3,V=3)
DD = shrpD.repair(dblD,13)

dbl.mt_adddiff(DD,U=3,V=3)
return( last )}
or DDL (http://www.sendspace.com/file/uufh4f)
:D

Spuds
4th March 2007, 17:27
some tweaks to my original post .... should have been guide=2 and not 3 and made changed the interlaced thresholds.


mpeg2source("blabla.d2v",info=3)
ColorMatrix(interlaced=true,hints=true)
assumetff
tfm(d2v="blabla.d2v",mode=2,pp=6,cthresh=8)
tdecimate(cycler=1,cycle=25)

or

# Try both blend = true and false. If you have a lot of ghosting true should be better.
mpeg2source("blabla.d2v",info=3)
ColorMatrix(interlaced=true,hints=true)
assumetff
telecide(guide=2,post=2,vthresh=10,show=false,blend=true)

jeffy
4th March 2007, 17:47
Thank you to all, I will retry :D

Terranigma
4th March 2007, 17:53
jeffy, i'm not sure if you have mt_masktools or repair, (Which is required to activate csblend) so I'll post the links.

mt_masktools (http://manao4.free.fr/masktools-v2.0a30.zip)
Removegrain (http://avisynth.org/warpenterprises/files/removegrain_25_dll_20050501.zip) (Which Includes repair.dll)

jeffy
4th March 2007, 18:38
jeffy, i'm not sure if you have mt_masktools or repair, (Which is required to activate csblend) so I'll post the links.

mt_masktools (http://manao4.free.fr/masktools-v2.0a30.zip)
Removegrain (http://avisynth.org/warpenterprises/files/removegrain_25_dll_20050501.zip) (Which Includes repair.dll)
Thank you for the links.

Didée
5th March 2007, 03:24
You could try using vinvere (http://forum.doom9.org/showthread.php?p=896352#post896352),
Possible, but definetly suboptimal. Vinverse is suited for low-intensity residual combing, but not so much for general deinterlacing. Its result is similar to a 5-tap blur/sharpen kernel (like e.g. in ffdshow), just without the overshoot of the latter.
To expect are artefacts on the edges of the ghosts of high-contrast image features.
In any way, the result is removing the combing, but leave the blends.


Regarding CSDeblend:

function CSBlend (clip clp){
clp
separatefields()
dbl = mt_average( SelectEven(). bob(0,0.5),
\ SelectOdd(). bob(0,0.5),U=3,V=3 )
dblD = mt_makediff(clp,dbl,U=3,V=3)
shrpD = mt_makediff(dbl,dbl.removegrain(11),U=3,V=3)
DD = shrpD.repair(dblD,13)

dbl.mt_adddiff(DD,U=3,V=3)
return( last )}

OMG. Again an ... interesting script. ;)

Technically, the script is wrong. The result is correct, however, since Avisynth autmatically detects the wrong thing and doesn't do what you tell it to do, but instead a feasable substitute. :)

The error is "SeparateFields() ... Bob()", which is nonsense. Separated fields can't be bobbed (not in a way that makes sense). Avisynth detects this, and instead of Bob(), in fact it does BicubicResize() to just double the heights of the separated fields.

The correct way to write that script would be
function CSBlend (clip clp){
clp.separatefields()
Bicubicresize(width,height)
dbl = mt_average( SelectEven(),SelectOdd() ),U=3,V=3 )
... etcedited - there was a bob() left over, d'oh.

where, BTW, that

>> clp.separatefields().BicubicResize()
>> mt_average(even,odd)

in fact is nothing but a vertical blur with a radius little smaller than r=2.0, which could be written more obvious by mt_convolution. So the part

clp
separatefields()
dbl = mt_average( SelectEven(). bob(0,0.5),
\ SelectOdd(). bob(0,0.5),U=3,V=3 )

would become as simple as

dbl = clp.mt_convolution("1","1 5 8 5 1",U=3,V=3)

Nothing earthbreaking ... just to show that the complicated-looking (and strictly taken: incorrect) construct in fact is doing a very simple operation. :)


But after all, this still is only vertically blurring of the blending mess, with some post-sharpening. It removes the combing, but does nothing against the problem. Solving the problem is the playfield of the Restore scripts. (Not that they always win the game, but they try their best.) :)

Terranigma
5th March 2007, 18:22
Thanks Didée. You're the best. ;)

jeffy
11th March 2007, 16:10
Dideé, :thanks: very much. I am still evaluating the possibilities of different unblenders, not satisfied much :mad: (yet) :D.

jeffy
11th March 2007, 19:10
After having a hard time with the first four files (unresolved).... now I have a new, 5th file with its blending driving me nuts :eek:
Please see the NEW EDIT in the first post, can you have more suggestions? :thanks:

Terranigma
11th March 2007, 19:17
Check This (http://forum.doom9.org/showthread.php?t=123251) thread.

jeffy
11th March 2007, 19:51
Check This (http://forum.doom9.org/showthread.php?t=123251) thread.
Thank you, checking.

jeffy
11th March 2007, 20:09
My script (basic):
1)
SetMemoryMax(512)
Loadplugin("C:\Program Files\AviSynth 2.5\plugins\mt_masktools.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\DGDecode.dll")
Import("C:\Program Files\AviSynth 2.5\plugins\Mrestore.avs")
Import("C:\Program Files\AviSynth 2.5\plugins\Cdeblend.avs")
Import("C:\Program Files\AviSynth 2.5\plugins\restore24_RC1_WIP.avs")
MPEG2Source("sample_dtg.d2v",cpu=0)

tdeint(mode=1)
cdeblend()
Mrestore()

2)
SetMemoryMax(512)
Loadplugin("C:\Program Files\AviSynth 2.5\plugins\mt_masktools.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\DGDecode.dll")
LoadCPlugin("C:\Program Files\AviSynth 2.5\plugins\SmartDecimate.dll")
Import("C:\Program Files\AviSynth 2.5\plugins\Mrestore.avs")
Import("C:\Program Files\AviSynth 2.5\plugins\Cdeblend.avs")
Import("C:\Program Files\AviSynth 2.5\plugins\restore24_RC1_WIP.avs")
MPEG2Source("sample_dtg.d2v",cpu=0)
Restore24(numr=1250,deno=2500,useLL=true,r24deint=1,nr=-3)

Xvid, TQ2, single pass, all other settings default. Dissatisfied, again, both are stuttering :(. Please, can someone who has actually seen the clip no. 5 (or the other ones as well), post what seems as a optimal (good), watchable result for them?
What am I doing wrong?

Thank you to all, as usual.

Didée
11th March 2007, 21:07
You fed Restore24 with unsuited decimation values.

I'm not in the mood now of counting the unique fields, but the default decimation settings ( :D ) probably are correct for your sources.

Restore24(numr=2997,deno=6250,useLL=true,r24deint=1,nr=-3)

jeffy
11th March 2007, 21:42
You fed Restore24 with unsuited decimation values.

I'm not in the mood now of counting the unique fields, but the default decimation settings ( :D ) probably are correct for your sources.

Restore24(numr=2997,deno=6250,useLL=true,r24deint=1,nr=-3)
Didée, thank you. What could I expect feeding it the wrong values :eek: (didn't get it right even after reading Restore24 thread). Number 5 seems solved! When you are in the mood, I beg you, please, have a look at all the clips, as per the post 1. You did get the things right and I would like to leave this thread as a reference for PAL blends.


SetMemoryMax(512)
Loadplugin("C:\Program Files\AviSynth 2.5\plugins\mt_masktools.dll")
LoadPlugin("C:\Program Files\AviSynth 2.5\plugins\DGDecode.dll")
LoadCPlugin("C:\Program Files\AviSynth 2.5\plugins\SmartDecimate.dll")
Import("C:\Program Files\AviSynth 2.5\plugins\Mrestore.avs")
Import("C:\Program Files\AviSynth 2.5\plugins\Cdeblend.avs")
Import("C:\Program Files\AviSynth 2.5\plugins\restore24_RC1_WIP.avs")
MPEG2Source("sample_dtg.d2v",cpu=0)
Restore24(numr=2997,deno=6250,useLL=true,r24deint=1,nr=-3)

Terranigma
11th March 2007, 21:51
Didée, thank you. What could I expect feeding it the wrong values :eek: (didn't get it right even after reading Restore24 thread). Number 5 seems solved! When you are in the mood, I beg you, please, have a look at all the clips, as per the post 1. You did get the things right and I would like to leave this thread as a reference for PAL blends.

Didée's always right. :p