View Full Version : IVTC-ing only 2 frames within a 3000 frames encode
chros
19th September 2006, 20:02
I have got a vob (1887 frames) (Alien 4 teaser trailer) in which there are 2 frames in which are visible artifact (at separate places). (Source is a 4:3 , NTSC, 29.97fps)
after DGmpeg -> 23.976 fps
Megui reports when I Analyze (at the avisynth creation stage):
Progressive sections: 84
Interlaced sections: 2
Partialyy Static Sections: 71
Film Sections: 0
Source is declared progressive. -> do nothing
So can I deinterlace just these 2 frames ? And if I can, how ?
The MeGui created Avisynth script:
DGDecode_mpeg2source("Alien4.d2v",info=3)
ColorMatrix(hints=true)
#Not doing anything because the source is progressive
crop( 4, 54, -14, -60)
LanczosResize(640,368) # Lanczos (Sharp)
#denoise
Thanks
foxyshadis
19th September 2006, 21:00
full=false in tdeint or fielddeinterlace; some magic with IsCombed(); or just use Stickboy's ReplaceRange (http://www.avisynth.org/stickboy/jdl-range.avsi) to replace just those frames with deinterlaced ones.
The first three you have to be extremely careful with all the various thresholds or you'll get bad false positives, but they're easier if you have lots of frames and aren't sure where they all are.
Blue_MiSfit
20th September 2006, 01:05
could just trim the offending frames out, no? I know this is the dark side way of doing things, but it's only 2 frames!! :)
I know the syntax isn't great, but maybe (assuming the 2 frames are consecutive)
#pseudocode
a=last
b=a.trim(0,start of evil interlaced nonsense)
c=a.trim(end of evil interaced nonsense, end of file)
d=b+c
return(d)
~MiSfit
Mug Funky
20th September 2006, 01:33
try:
function deintframe(clip c, int frame, int "field")
{
field=default(field,1)
c.trim(0,frame-1)++c.trim(frame,frame).separatefields().selectevery(1,1-field)
\.assumefps(c.framerate()).eedi2(field=field)++c.trim(frame+1,0)
}
blahsource("blah.blh")
yourfiltershere()
deintframe(first_frame_number)
deintframe(second_frame_number)
Prettz
20th September 2006, 03:27
blahsource("blah.blh")
lol .blh
chros
21st September 2006, 10:40
... or just use Stickboy's ReplaceRange (http://www.avisynth.org/stickboy/jdl-range.avsi) to replace just those frames with deinterlaced ones.
Hhmmm, I didn't know that... Thanks.
could just trim the offending frames out, no?
This can be a good idea too, if I can't do anything else. Thanks.
Ps: see the above mentioned ReplaceRange function collection, there are functions for cutting.
@Mug Funky: I have tried it and it works very well.
Only the second framenumber varys after the 1st was modified.
I'll look into the function, why, and what it does.
Thanks.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.