View Single Post
Old 20th November 2022, 12:41   #1655  |  Link
flossy_cake
Registered User
 
Join Date: Aug 2016
Posts: 609
Quote:
Originally Posted by StainlessS View Post
I think that is why its best to use
Code:
d2v = "..."
Mpeg2Source(d2v)
TFM(d2v=d2v,...) # maybe PP = 0 for no post processing
It seems the clip already contains the necessary flags to handle it with ScriptClip.

Test clip (laundry sequence, soft telecine with bad edits on scene change): https://drive.google.com/file/d/1dwa...usp=share_link


Code:
file = "soft telecine.mkv"

LWlibavVideoSource(file, repeat=false)

ScriptClip(last, 
\ """

	fieldbased = propGetAny("_FieldBased")
	parity = GetParity(current_frame)
	
	if (!IsInt(fieldbased)){fieldbased="undefined"}
	else if (fieldbased==0){fieldbased = "progressive"}
	else if (fieldbased==1){fieldbased = "bottom field first"}
	else if (fieldbased==2){fieldbased = "top field first"}
	
	if (!IsBool(parity)){parity="undefined"}
	else if (parity==true){parity = "top field first"}
	else if (parity==false){parity = "bottom field first"}

	SubTitle("_FieldBased: " + fieldbased + "\n" + "GetParity:   " + parity, font="courier new", size=24, lsp=10)
	
\ """)

LanczosResize(720, 540)
Notably the _FieldBased frame property stays "progressive" the whole time, except for those combed frames on scene change.

It seems LWLibavVideoSource is the only source filter which actually sets the _FieldBased and parity values for each frame.

But it should be a trivial matter of returning a deinterlaced clip when _FieldBased != progressive.

Hard telecined is still problematic but I'm already getting ideas
edit: it looks like hard telecined doesn't contain any information to detect orphaned fields -- both _FieldBased and Parity remain locked at the same value for all frames.

Last edited by flossy_cake; 20th November 2022 at 12:49.
flossy_cake is offline   Reply With Quote