1 (edited by pezgui 18-08-2013 22:25:09)

Topic: Width and Num

Hi

I'd like to change the Num generator based on the width of the video, how can i make this script work?

Width <= 1200 ? Eval("""
S = V.SVSuper("{rc:false,gpu:1, scale:{up:2, down:2}}")
A = S.SVAnalyse("{main:{coarse:{distance:-1, bad:{SAD:20}}},penalty:{pzero:1,pnbour:1000}}, refine:[{thsad:20}]}")
V.SVSmoothFps(S, A, "{rate:{num:50000,den:1001,abs:true},algo:21, mask:{area:30,cover:100,area_sharp:1.0},scene:{blend:false,mode:0,limits:{blocks:100}}}", url=URL, mt=100)
GetMTMode(false) > 0 ? distributor()
"""): last
Width > 1200 ? Eval("""
S = V.SVSuper("{rc:false,gpu:1, scale:{up:2, down:2}}")
A = S.SVAnalyse("{main:{coarse:{distance:-1, bad:{SAD:20}}},penalty:{pzero:1,pnbour:1000}}, refine:[{thsad:20}]}")
V.SVSmoothFps(S, A, "{rate:{num:60000,den:1001,abs:true},algo:21, mask:{area:30,cover:100,area_sharp:1.0},scene:{blend:false,mode:0,limits:{blocks:100}}}", url=URL, mt=100)
GetMTMode(false) > 0 ? distributor()
"""): last

I added V = V.Width, and i get an error saying there is ":" missing, so i change ": last" and i put after "distributor()" ... but nothing seems to work.


Thanks

Re: Width and Num

pezgui
Script is correct as I can see.

V = V.Width
Video = Video.Width is wrong operator because identifier Video was set to Videoclip and after apply this code it will be set to number (Videoclip width).
I recommend you to read Avisynth documentation.

Re: Width and Num

pezgui

Width <= 1200 ? Eval("""
blah-blah
""") :  Eval("""
blah-blah
""")

Re: Width and Num

Again Chainik, thanks.... you're awesome.

its working.