Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 9th March 2014, 14:11   #1  |  Link
bxyhxyh
Registered User
 
Join Date: Dec 2011
Posts: 354
TDecimate Override

I need to use TDecimate on two videos and combine them.

If I just decimate separately, combination of them can be lead to jerky video.
So I need to override second decimatation as first decimation.

How do I do this?

Code:
s=source
d1=s.decrawlfilter1()
d2=s.decrawlfilter2()
d1=d1.tfm().tdecimate()
d2=d2.tfm().tdecimate()   # This decimation should be overrided by previous decimation.

ConditionalFilter(d1,d2,d1,"YDifferenceFromPrevious", ">", "0.6")
bxyhxyh is offline   Reply With Quote
Old 9th March 2014, 16:44   #2  |  Link
Guest
Guest
 
Join Date: Jan 2002
Posts: 21,907
Combine the clips before applying IVTC?

d1=s.decrawlfilter1()
d2=s.decrawlfilter2()
combined = d1++d2
combined.tfm().tdecimate()

It's not clear why the clip would become jerky doing it the original way. I might possibly expect a glitch at the junction.
Guest is offline   Reply With Quote
Old 9th March 2014, 17:50   #3  |  Link
bxyhxyh
Registered User
 
Join Date: Dec 2011
Posts: 354
Oh, sorry my English is not good.

What I wanted is to replace frames that decrawfilter1() couldn't fix with decrawfilter2() could. But decimation can be different on two videos because of moving dots.
In my case, d1 and d2 has one frame difference for some parts.

For example d1's 1010th frame is equal to d2's 1011th frame, if i replace d1's 1010th frame with d2's 1010th frame, video becomes jerky.

Last edited by bxyhxyh; 9th March 2014 at 18:13.
bxyhxyh is offline   Reply With Quote
Old 9th March 2014, 18:30   #4  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,015
The calculations can be different for both tfm and tdecimate, because you are applying a different dotcrawl filter before TIVTC

One way to do this is decide which version you want, then generate an output log file for both TFM(output="TFMlog.txt") and TDecimate(output="TDecimatelog.txt") , then use that output log file as input file for the 2nd version

Also, are you using a frame accurate source filter ?
poisondeathray is offline   Reply With Quote
Old 10th March 2014, 03:33   #5  |  Link
colours
Registered User
 
colours's Avatar
 
Join Date: Mar 2014
Posts: 308
Code:
s = source
d1 = s.decrawlfilter1()
d2 = s.decrawlfilter2()
d12 = stackvertical(d1,d2).tfm().tdecimate()
d1 = d12.crop(0,0,source.width(),source.height())
d2 = d12.crop(0,source.height(),source.width(),source.height())

ConditionalFilter(d1,d2,d1,"YDifferenceFromPrevious", ">", "0.6")
This may be considerably slower (both decrawl filters are always called for every frame), but doesn't require a separate pass for getting metrics. Alternatively, you could decimate after using ConditionalFilter, instead of before; assuming TFM doesn't match from the wrong field, this should work too.

Code:
s = source
d1 = s.decrawlfilter1().tfm()
d2 = s.decrawlfilter2().tfm()
ConditionalFilter(d1,d2,d1,"YDifferenceFromPrevious", ">", "0.6")
tdecimate()
colours is offline   Reply With Quote
Old 10th March 2014, 10:53   #6  |  Link
bxyhxyh
Registered User
 
Join Date: Dec 2011
Posts: 354
Quote:
Originally Posted by poisondeathray View Post
One way to do this is decide which version you want, then generate an output log file for both TFM(output="TFMlog.txt") and TDecimate(output="TDecimatelog.txt") , then use that output log file as input file for the 2nd version
I've tried this method, but it said crc doesn't match.

Quote:
Originally Posted by colours View Post
This may be considerably slower (both decrawl filters are always called for every frame), but doesn't require a separate pass for getting metrics. Alternatively, you could decimate after using ConditionalFilter, instead of before; assuming TFM doesn't match from the wrong field, this should work too.

Code:
s = source
d1 = s.decrawlfilter1().tfm()
d2 = s.decrawlfilter2().tfm()
ConditionalFilter(d1,d2,d1,"YDifferenceFromPrevious", ">", "0.6")
tdecimate()
I've tried it too. It won't work because of duplicate of d1, some frames remain dot crawled.

My last resort is this
Code:
s = source
s.decrawlfilter1().decrawlfilter2()
TFM().TDecimate()
Since they don't delete so much details. It should be ok.

Last edited by bxyhxyh; 10th March 2014 at 10:58.
bxyhxyh is offline   Reply With Quote
Reply

Tags
decimation

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 18:48.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2022, vBulletin Solutions Inc.