Hey everybody,
I was trying to restore some VHS footage I captured some months ago and the input footage is PAL Interlaced (Top Field First). I'd like to export it out of Avisynth keeping the interlacing, as I don't want to deinterlace it. Can anybody tell me how to do it? I assume I should do something like a deinterlace > reinterlace process as I have to crop and resize my footage.
Thank you.
Try StreamFab Downloader and download from Netflix, Amazon, Youtube! Or Try DVDFab and copy Blu-rays! or rip iTunes movies!
+ Reply to Thread
Results 1 to 11 of 11
Thread
-
-
Exactly what you want to do will depend on the filtering. But something as simple as SeparateFields(), filter(), Weave() may be sufficient. Or QTGMC(preset="fast"), filter(), SeparateFields().SelectEvery(4,0,3).Weave().
-
I tried both methods but they dont' work ;-(
This is the script I wrote down:
INPUT
AssumeTFF().SeparateFields()
Trim/Fade
Crop/Lanczos4Resize
DeHalo_alpha/MosquitoNR/WhiteBalance/Tweak/MSharpen/GrainFactory3
Weave()
Any idea? -
What was the error? Try adding AssumeFieldBased() and AssumeTFF() just before the Weave().
-
You are not allowed to perform any processing that affecting spatial structure of data. To resize interlaced video first it need to be deinterlaced then processed then it can be reinterlaced - exception from this if you perform resizing exactly by 2 or generally even factor .
Generally for trimming video, it is way more safe to deal with deinterlaced video - frequently it can be seen that some professional broadcasters (public one) may have problems with field dominance due lack of proper deinterlacing before processing. -
-
+1 pandy
You unfortunately must deinterlace prior to any re-sizing operation. There is no way around that. I don't like deinterlacing, so I try to always avoid any re-sizing.
Your code will work for filters that don't look ahead or behind in time (i.e., are not temporal). For temporal filters, you must take your separated fields, and apply the filter to the even and odd fields as separate operations. You then interleave those modified even and odd fields, and then do the weave.
This post from an old guide explains it better:
"If you want to process interlaced video (thus leaving it interlaced), you should remember the following issue. When using only a spatial smoother, it is sufficient to use:
SeparateFields()
Filter(...)
Weave()
But when using a spatio-temporal smoother (or just a temporal smoother), this produces incorrect results. The reason is that the temporal smoothing occurs over two fields from the same frame (this happens for half the number of frames). To avoid this, you should put them in different clips:
SeparateFields()
even = SelectEven(last).Filter(...)
odd = SelectOdd(last).Filter(...)
Interleave(even, odd)
Weave()
"
Code:function filldropsI (clip c) { even = c.SeparateFields().SelectEven() super_even=MSuper(even,pel=2) vfe=manalyse(super_even,truemotion=true,isb=false,delta=1) vbe=manalyse(super_even,truemotion=true,isb=true,delta=1) filldrops_e = mflowinter(even,super_even,vbe,vfe,time=50) odd = c.SeparateFields().SelectOdd() super_odd=MSuper(odd,pel=2) vfo=manalyse(super_odd,truemotion=true,isb=false,delta=1) vbo=manalyse(super_odd,truemotion=true,isb=true,delta=1) filldrops_o = mflowinter(odd,super_odd,vbo,vfo,time=50) evenfixed = ConditionalFilter(even, filldrops_e, even, "YDifferenceFromPrevious()", "lessthan", "0.1") oddfixed = ConditionalFilter(odd, filldrops_o, odd, "YDifferenceFromPrevious()", "lessthan", "0.1") Interleave(evenfixed,oddfixed) Weave() }
-
What do you mean by "they don't work /nothing happened ? /no results ?"
DO you see anything ? or just original source ?
Any error message ?
Post your full script -
All right, this is my script:
DirectShowSource("InputFootage.vob")
AssumeTFF().SeparateFields()
Trim(275,0)
FadeIn(50).FadeOut(50)
Crop(20,0,-20,0)
Lanczos4Resize(720,288)
DeHalo_alpha(rx=2.0, ry=2.0, darkstr=1.0, brightstr=1.0, lowsens=50, highsens=50, ss=1.5)
MosquitoNR(strength=18, restore=128, radius=2, threads=0)
WhiteBalance(r1=235, g1=249, b1=249, r2=3, g2=11, b2=4)
Tweak(bright=2.25, sat=0.925)
daa().daa().daa()
MSharpen(threshold=10, strength=100, highq=true, mask=false)
GrainFactory3(2,1,1,65,71,85,1.5,1.3,1.1)
AssumeFieldBased().Weave()
The result is quite strange, as it is rendered progressive but it shows the classic interlace flicker, which is much more noticeable than the source footage.
Please johnmeyer, according to your quote to that old guide, can you tell me how do I have to modify my script? Thank you. -
There's quite a lot wrong with that script even before going into how to filter interlaced footage. Maybe you could also make available 10 seconds or so from the source.
DirectShowSource("InputFootage.vob")
Trim(275,0)
FadeIn(50).FadeOut(50)
FadeIO0(50)
Tweak(bright=2.25, sat=0.925)
Tweak(bright=2.25, sat=0.925,Coring=False)
although, again, a sample would be helpful.
Similar Threads
-
AVIsynth video processing
By Tafflad in forum Newbie / General discussionsReplies: 4Last Post: 27th Oct 2013, 12:55 -
Vegas Video- Strange interlacing with 2nd video stream
By JDMils in forum Authoring (Blu-ray)Replies: 7Last Post: 9th Sep 2013, 07:21 -
Batch processing all my video files.
By Paxmilitaris in forum Newbie / General discussionsReplies: 1Last Post: 25th Mar 2013, 16:43 -
Readyboost and video processing
By snafubaby in forum Authoring (DVD)Replies: 7Last Post: 23rd Jul 2012, 21:00 -
video processing - languages and libraries?
By possom in forum ProgrammingReplies: 2Last Post: 17th Jul 2012, 22:15