Thread: Vapoursynth
View Single Post
Old 23rd February 2020, 23:18   #3815  |  Link
_Al_
Registered User
 
Join Date: May 2011
Posts: 321
If trying to modify props and clip resolution is ridiculously small, it crashes, where no recovery is possible, it locks a PC.

Code:
rgb  = core.std.BlankClip(width=30, height=16, format=vs.RGB24)
rgb2 = rgb.std.PlaneStats(prop='PlaneStats')
PROP_NAME  = f'New_string_name_here'
def copy_prop(n,f):
   f_out = f[0].copy()
   f_out.props[PROP_NAME] = '{:.1f}'.format(f[1].props['PlaneStatsAverage']*100)
   return f_out
rgb = core.std.ModifyFrame(rgb, [rgb, rgb2], copy_prop)

Last edited by _Al_; 23rd February 2020 at 23:20.
_Al_ is offline   Reply With Quote