11-07-2019, 05:14 AM
|
|
Free Member
|
|
Join Date: Jul 2012
Posts: 159
Thanked 15 Times in 15 Posts
|
|
Hi maby someone know how to tweak this line tbc sortof or it align all field lines after a reference clip
itīs very slow
example Clip A is a bad align clip and Clip B is the good align clip of the same video or movie as Clip A
NonlinUSM you can find here http://avisynth.nl/index.php/NonlinUSM
Code:
#SetMemoryMax(1920)
#SetMTMode(1,8)
a=AVISource("D:\titanic\titanicSvideo_EDIT720.avi").Trim(463,2463)
b=AVISource("D:\titanic\titanicES10NoTBC_EDIT720.avi").Trim(17,2017)#.crop(0,0,-70,-0).AddBorders(70,0,0,0)# ES10 Capture
aa=a.AssumeTFF().SeparateFields()
bb=b.AssumeTFF().SeparateFields()
#287 or 288x2=576 Lines PAL
return stackverticaln(aa,bb,287).FlipVertical().Weave()
function stackverticaln(clip v,clip vv, int n) {
n<1?get_line(v,vv,n):stackvertical(get_line(v,vv,n),stackverticaln(v,vv,n-1))
}
function get_line(clip aa,clip bb,int field_line)
{
line=field_line
top=line
bottom=287-line
clipf=aa.crop(0,top,-0,-bottom)
a_ref = aa.ConvertToYV12().NonlinUSM(60.0,2.6,6.0,8.5).greyscale().ConvertToYUY2().crop(0,top,-0,-bottom).AddBorders(0,0,0,1)
b_ref = bb.ConvertToYV12().NonlinUSM(60.0,2.6,6.0,8.5).greyscale().ConvertToYUY2().crop(0,top,-0,-bottom).AddBorders(0,0,0,1)
c_ref = Interleave(a_ref, b_ref)
mdata = DePanEstimate(c_ref,trust=0.01,dxmax=80,dymax=0)
c_stab = DePan(Interleave(clipf,clipf), data=mdata,offset=1,subpixel=2)
bb_stab = c_stab.SelectEvery(4, 1)
bbb_stab = c_stab.SelectEvery(4, 3)
return Interleave(bb_stab,bbb_stab)
}
|
Someday, 12:01 PM
|
|
Ads / Sponsors
|
|
Join Date: ∞
Posts: 42
Thanks: ∞
Thanked 42 Times in 42 Posts
|
|
|
11-13-2019, 11:45 PM
|
|
Site Staff | Video
|
|
Join Date: Dec 2002
Posts: 14,174
Thanked 2,576 Times in 2,188 Posts
|
|
I'm not really clear on what's happening here. It separates fields, blurs/sharpens and stabilizes.
That's not TBC.
At very best, that may hide timing errors, but that's true of any temporal blurring, or blurring in general. It's not pretty, but it can sometimes make terrible video more tolerable. Not enjoyable, just tolerable.
|
11-14-2019, 12:05 AM
|
|
Free Member
|
|
Join Date: Jul 2012
Posts: 159
Thanked 15 Times in 15 Posts
|
|
Hi SeparateFields() i use it to deinterlace so i can compare line after line to the reference clip
about this avisynth script i was thinking if itīs possible to run the same video or movie 2 times one time without ES10 and one time with ES10
and then align line by line the clip without ES10 to get it as good as with ES10 clip but without ES10īs DNR effects
Code:
a_ref = aa.ConvertToYV12().NonlinUSM(60.0,2.6,6.0,8.5).greyscale().ConvertToYUY2().crop(0,top,-0,-bottom).AddBorders(0,0,0,1)
b_ref = bb.ConvertToYV12().NonlinUSM(60.0,2.6,6.0,8.5).greyscale().ConvertToYUY2().crop(0,top,-0,-bottom).AddBorders(0,0,0,1)
c_ref = Interleave(a_ref, b_ref)
mdata = DePanEstimate(c_ref,trust=0.01,dxmax=80,dymax=0)
#this compare one line from Clip A to Clip B(the reference clip)
stackverticaln function calls get_line function 287 times to get a full frame so stackverticaln function stacks vertical all the lines it gets from the get_line function line by line
get_line function returns one line from Clip A but with the horizontal Offset that Clip B has
the sharpens that i do does not effect the final frame at all i only do the sharpens because the compare funtion DePanEstimate works better to compare the clips
if i understand correct DePanEstimate returns only the offset data that can be use to other functions
Last edited by jjdd; 11-14-2019 at 12:45 AM.
|
11-14-2019, 01:43 AM
|
|
Free Member
|
|
Join Date: Jul 2012
Posts: 159
Thanked 15 Times in 15 Posts
|
|
if you edit like this for example it only stacks 10 lines in the middle of the frame and works mush faster to good for testing
Code:
return stackverticaln(aa,bb,135).FlipVertical().Weave()
function stackverticaln(clip v,clip vv, int n){
n<125?get_line(v,vv,n):stackvertical(get_line(v,vv,n),stackverticaln(v,vv,n-1))
}
stackverticaln function loops and stack vertical line number 135,134,133,132,131,130,129,128,127,126,125
|
Similar Threads
|
Thread |
Thread Starter |
Forum |
Replies |
Last Post |
Avisynth can't open script? What am I doing wrong?
|
unclescoob |
Restore, Filter, Improve Quality |
14 |
03-27-2019 11:03 AM |
Doubling Avisynth script to remove comets?
|
sirbyron |
Restore, Filter, Improve Quality |
19 |
01-20-2019 08:55 PM |
Problem with custom script in Avisynth to stabilize video?
|
benzio |
Restore, Filter, Improve Quality |
0 |
03-07-2018 11:27 AM |
VCR simulator script, Avisynth fake VHS look!
|
jmac698 |
Restore, Filter, Improve Quality |
1 |
02-12-2018 06:17 AM |
Avisynth script to fix offset interlacing?
|
lordsmurf |
Restore, Filter, Improve Quality |
4 |
02-10-2018 05:34 PM |
All times are GMT -5. The time now is 11:00 AM
|