Selur
3rd July 2022, 15:18
Hi,
I'd like to have a small function wrapper for CropRel, with a 'show'-parameter which would simply show the lines of a rectangle instead of actually cropping,....
function ShowWrapCropRel(cllip: vs.VideoNode, left: int=0, top: int=0, right: int=0, bottom: int=0, show: bool:False) -> vs.VideoNode:
if show:
return core.std.CropRel(clip=clip, left=2, right=2, top=2, bottom=2)
else:
# no 'good' idea, how to do it #
Only think that pops to mind would be to create a line horizontal (bright green) Blankclip and another verical (bright green) Blankclip and then use havsfunc.Overlay to overlay the lines on the frame.
-> There must be an easier way to do this right?
Cu Selur
I'd like to have a small function wrapper for CropRel, with a 'show'-parameter which would simply show the lines of a rectangle instead of actually cropping,....
function ShowWrapCropRel(cllip: vs.VideoNode, left: int=0, top: int=0, right: int=0, bottom: int=0, show: bool:False) -> vs.VideoNode:
if show:
return core.std.CropRel(clip=clip, left=2, right=2, top=2, bottom=2)
else:
# no 'good' idea, how to do it #
Only think that pops to mind would be to create a line horizontal (bright green) Blankclip and another verical (bright green) Blankclip and then use havsfunc.Overlay to overlay the lines on the frame.
-> There must be an easier way to do this right?
Cu Selur