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 1st July 2016, 15:28   #1  |  Link
GMJCZP
Registered User
 
GMJCZP's Avatar
 
Join Date: Apr 2010
Location: I have a statue in Hakodate, Japan
Posts: 754
Code equivalent for TIVTC [SOLVED]

Hi folks:
I need to take a sequence of IVTC to TIVTC equivalent. Here the code:

DoubleWeave()
Pulldown(0,2)

The idea is maintain the same pattern detected. Thanks.
__________________
By law and justice!

GMJCZP's Arsenal

Last edited by GMJCZP; 5th July 2016 at 01:49.
GMJCZP is offline   Reply With Quote
Old 2nd July 2016, 04:22   #2  |  Link
ChiDragon
Registered User
 
ChiDragon's Avatar
 
Join Date: Sep 2005
Location: Vancouver
Posts: 600
I don't understand. Why use TIVTC if the manual IVTC works?
ChiDragon is offline   Reply With Quote
Old 2nd July 2016, 04:33   #3  |  Link
GMJCZP
Registered User
 
GMJCZP's Avatar
 
Join Date: Apr 2010
Location: I have a statue in Hakodate, Japan
Posts: 754
The source is mpge1 (progressive). With TIVTC could be free of artifacts.
__________________
By law and justice!

GMJCZP's Arsenal
GMJCZP is offline   Reply With Quote
Old 2nd July 2016, 04:46   #4  |  Link
ChiDragon
Registered User
 
ChiDragon's Avatar
 
Join Date: Sep 2005
Location: Vancouver
Posts: 600
Now I really don't understand. You want to IVTC a progressive source?
ChiDragon is offline   Reply With Quote
Old 2nd July 2016, 04:56   #5  |  Link
GMJCZP
Registered User
 
GMJCZP's Avatar
 
Join Date: Apr 2010
Location: I have a statue in Hakodate, Japan
Posts: 754
Of course because the video present repeated frames (NTSC VCD). With manual IVTC now run smoothly but with artifacts. I think the key is tuning Tdecimate with ovr option.
__________________
By law and justice!

GMJCZP's Arsenal

Last edited by GMJCZP; 2nd July 2016 at 05:02.
GMJCZP is offline   Reply With Quote
Old 2nd July 2016, 05:28   #6  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 3,030
So, you just wanna remove duplicated frames in a progressive source, right? How about using TDecimate alone, or something like DeDup and manually tweak parameters to get the best results? I mean, I would probably do it that way. Anyway, if someone else has a better solution, feel free to write it down.
FranceBB is online now   Reply With Quote
Old 2nd July 2016, 05:58   #7  |  Link
GMJCZP
Registered User
 
GMJCZP's Avatar
 
Join Date: Apr 2010
Location: I have a statue in Hakodate, Japan
Posts: 754
Thank you FranceBB.
If exist others alternatives to TIVTC are welcome. I want the final video free of artifacts and 23,976 fps (the source is an animated video).
__________________
By law and justice!

GMJCZP's Arsenal
GMJCZP is offline   Reply With Quote
Old 2nd July 2016, 06:07   #8  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,706
Quote:
Originally Posted by GMJCZP View Post
(the source is an animated video).
Oh .......

You do understand that animated videos often have dozens of duplicate frames, right? If you start decimating duplicates, you will end up with a mess.

Just watch the cartoon and enjoy it as is.
johnmeyer is offline   Reply With Quote
Old 2nd July 2016, 06:18   #9  |  Link
GMJCZP
Registered User
 
GMJCZP's Avatar
 
Join Date: Apr 2010
Location: I have a statue in Hakodate, Japan
Posts: 754
John, I want find the correct pattern with the tfm+tdecimate combo, the matter is I don't know carry the pattern of the manual IVTC to TIVTC.
PD: the frames repeats each 26-32 frames approximately.
__________________
By law and justice!

GMJCZP's Arsenal

Last edited by GMJCZP; 2nd July 2016 at 06:25.
GMJCZP is offline   Reply With Quote
Old 2nd July 2016, 06:26   #10  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,706
The point I was trying to make is that animated film often does not have any sort of pattern.

Read the TDecimate documentation, and pay attention to mode=1.
johnmeyer is offline   Reply With Quote
Old 2nd July 2016, 06:43   #11  |  Link
GMJCZP
Registered User
 
GMJCZP's Avatar
 
Join Date: Apr 2010
Location: I have a statue in Hakodate, Japan
Posts: 754
I read that there are five possible routines for Pulldown:

Pulldown(0,2) Eureka!
Pulldown(0,3)
Pulldown(1,3)
Pulldown(1,4)
Pulldown(2,4)

I suspect that with ovr (overrides) option of Tdecimate (see Tdecimate documentation) and sequence of + and - you can find the pattern.
__________________
By law and justice!

GMJCZP's Arsenal

Last edited by GMJCZP; 2nd July 2016 at 06:51.
GMJCZP is offline   Reply With Quote
Old 2nd July 2016, 16:54   #12  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,706
Quote:
Originally Posted by GMJCZP View Post
I suspect that with ovr (overrides) option of Tdecimate (see Tdecimate documentation) and sequence of + and - you can find the pattern.
You are not understanding. Animation, especially anime and older cell animation, often repeats a frame many, many, many times as the character pauses to look at something, or the camera takes a long shot. Repeating frames saves having to draw more frames, something that take huge amounts of time and money.

I've transferred lots of old 16mm prints of cartoons and walked through them frame-by-frame. This completely eliminates the entire video process, so telecine and pulldown never enter into the mix. The film itself contains repeated frames. If you then telecine this material by adding pulldown, you get pulldown field repeats on top of frame repeats. Undoing this requires a different approach than looking for patterns.

The point I have made twice and will now make for the last time is that these pauses have no pattern whatsoever and depend on the story line and character action.

Finally, please, please read the TDecimate documentation and read what it says about mode=1. This is the mode for animation and if you read the documentation, it tells you how TDecimate "solves" the problem of irregular repeated frames in telecined material and how to handle it.

The work has already been done for you: no need to reinvent the wheel.
johnmeyer is offline   Reply With Quote
Old 2nd July 2016, 17:44   #13  |  Link
GMJCZP
Registered User
 
GMJCZP's Avatar
 
Join Date: Apr 2010
Location: I have a statue in Hakodate, Japan
Posts: 754
Quote:
Originally Posted by johnmeyer View Post
If you then telecine this material by adding pulldown, you get pulldown field repeats on top of frame repeats. Undoing this requires a different approach than looking for patterns.

Finally, please,

The work has already been done for you: no need to reinvent the wheel.
It's not my invention, manual IVTC (not adding pulldown) is in Avisynth documentation (see Pulldown).

In this moment I am try other alternative, work in progress...
__________________
By law and justice!

GMJCZP's Arsenal
GMJCZP is offline   Reply With Quote
Old 2nd July 2016, 18:39   #14  |  Link
GMJCZP
Registered User
 
GMJCZP's Avatar
 
Join Date: Apr 2010
Location: I have a statue in Hakodate, Japan
Posts: 754
Thanks everyone for your help.
John , I understand your point of view, using a progressive video doubleweave is something extreme. Thanks.
But if the video is originally film I had to keep trying . Now I know that I was drowning in a glass of water and the solution was simply:

ChangeFPS(24000,1001)
The difficult simplicity!

Now if the video was mpeg2 with 3:2 pulldown with this pattern (and perhaps DHT) a solution would have been:

AnimeIVTC(mode=3, pattern=3)
Interestingly also it works in this case.

Now me another question is, will you be working properly decimation pattern (- +) in Tdecimate?
__________________
By law and justice!

GMJCZP's Arsenal

Last edited by GMJCZP; 2nd July 2016 at 19:04.
GMJCZP is offline   Reply With Quote
Old 2nd July 2016, 22:36   #15  |  Link
FranceBB
Broadcast Encoder
 
FranceBB's Avatar
 
Join Date: Nov 2013
Location: Royal Borough of Kensington & Chelsea, UK
Posts: 3,030
johnmeyer is right, but @GMJCZP I understand what you wanna do as well, so let's try to clarify it a bit more xD

So... let's start from the beginning:
a video can be progressive, telecined or interlaced;
in case of NTSC videos, if they are interlaced they have been made in 29.970 and then they have been interlaced 60i; if they are telecined, instead, it means that they have been "converted" from 23.976 to 29.970 by duplicating frames in a constant pattern and then interlaced to 60i.
So far, so good (and we all know these things).
Now... what johnmeyer basically said is that anime are not as movies, which means that, since drawing several scenes and animate them costs a lot of money,
they try to avoid to animate characters as much as they can, which leads to several repeated frames (by purpose).
So you are gonna have repeated frames anyway, because they are intentional.
That said, let's assume we have a 23.976 fps progress video which has been converted to 29.970 progress and then interlaced to 60i (telecine).
If you run a decimating filter through it, it will be "confused" by all the repeated frames it will find, which will be the ones duplicated during production/animation (to save money) plus the ones created during the telecine process.
That's what he was trying to tell you.
On the other hand, I got your point, because you have a telecined source which has been wrongly deinterlaced instead of applying an IVTC.
Anyway, I can tell you that on telecined sources, this would probably get the job done and return you an acceptable 23.976 fps progressive file:

tfm(mode=1,pp=5,slow=2,micmatching=2,clip2=tdeint(mode=2,type=3))
tdecimate()

Anyway, since you have a deinterlaced file to be used as source, I suggest you to get the original NTSC telecined file and then use what I wrote above.
Besides, you said that there are "artifacts" in your output, right?
But... decimating filters don't do anything like blending or interpolating etc... they just "decimate" (remove frames) (note: not entirely true, there are filters that blend two frames together, like when interlaced NTSC DVD are converted to PAL, but that's NOT the case), so... what do you exactly mean by "artifacts"?
I mean, in the very worse case, they won't get the right telecine pattern because they are confused by the duplicated frames and they will simply remove the wrong frames, making your video looks even less smooth than before, but without any artifacts of course, so what do you exactly mean by that?
Don't get me wrong, I'm just trying to understand.

p.s @johnmeyer... if I got you wrong, feel free to tell me.

Last edited by FranceBB; 2nd July 2016 at 22:43.
FranceBB is online now   Reply With Quote
Old 2nd July 2016, 22:42   #16  |  Link
GMJCZP
Registered User
 
GMJCZP's Avatar
 
Join Date: Apr 2010
Location: I have a statue in Hakodate, Japan
Posts: 754
Thanks again FranceBB.
In short, the video is originally progressive film, but to pass it to NTSC VCD the owners instead of using 3:2 pulldown used something like ChangeFPS(30000,1001). This is the reason why there were repeated frames and video remained so progressive (I think that VCD is always progressive, no?).
All I did was revert the change with ChangeFPS(24000,1001). So repeated frames was removed.
__________________
By law and justice!

GMJCZP's Arsenal

Last edited by GMJCZP; 2nd July 2016 at 23:05.
GMJCZP is offline   Reply With Quote
Old 3rd July 2016, 00:57   #17  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,706
Quote:
Originally Posted by FranceBB View Post
p.s @johnmeyer... if I got you wrong, feel free to tell me.
One key point is wrong: the pulldown is done by repeating fields, not frames. This is a very important distinction, especially in this case because the repeats included in the animation are complete frames, whereas the repeats added in order to make 23.976 progressive film play on a 29.97 frames per second (nominally 60 fields per second) NTSC TV set are all done by repeating fields. The term "3:2 pulldown" refers to the fact that 3 fields from the same frame are shown in a row, the top and bottom from an original frame of film, and then the next frame of 29.97 video is a repeat of the top field from the previous frame, and then the bottom field of the next frame. Some people get confused by this and think the frame which has fields from two adjacent frames will look horrible, but they forget that video is a continuous process, and the motion on the top frames is always going forward and the motion on the bottom frame is always going forward. While your mind does "sense" a little more judder because of the repeats, there is no other artifact (i.e., no blurring, and no backwards/forwards motion like you get when you reverse field dominance).

And yes, VCD is always progressive. SVCD and XVCD did allow for interlaced video, but not VCD.
johnmeyer is offline   Reply With Quote
Old 3rd July 2016, 01:21   #18  |  Link
GMJCZP
Registered User
 
GMJCZP's Avatar
 
Join Date: Apr 2010
Location: I have a statue in Hakodate, Japan
Posts: 754
Quote:
Originally Posted by johnmeyer View Post
And yes, VCD is always progressive. SVCD and XVCD did allow for interlaced video, but not VCD.
This explains the absence of 3:2 pulldown in the VCD.
Now, it can make a test with Tdecimate and decimate pattern?
__________________
By law and justice!

GMJCZP's Arsenal
GMJCZP is offline   Reply With Quote
Old 3rd July 2016, 01:23   #19  |  Link
Motenai Yoda
Registered User
 
Motenai Yoda's Avatar
 
Join Date: Jan 2010
Posts: 709
@johnmeyer just a thing, in the old fashion era of crt tv, the presentation order of fields was alternate, so when in a frame the top field is subsequent to the bottom field, this doesn't matter cos in a frame the bottom field was displayed first, and the temporal order was respected.
__________________
powered by Google Translator
Motenai Yoda is offline   Reply With Quote
Old 3rd July 2016, 02:09   #20  |  Link
johnmeyer
Registered User
 
Join Date: Feb 2002
Location: California
Posts: 2,706
Quote:
Originally Posted by Motenai Yoda View Post
@johnmeyer just a thing, in the old fashion era of crt tv, the presentation order of fields was alternate, so when in a frame the top field is subsequent to the bottom field, this doesn't matter cos in a frame the bottom field was displayed first, and the temporal order was respected.
Yes, I agree. Field order has no meaning in an analog world: it's just one field after another.
johnmeyer is offline   Reply With Quote
Reply

Tags
decimate, film, pattern, tivtc, vcd

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 13:37.


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