Name
SetVideoSize -- change output size of a video (V5.0)
Synopsis
SetVideoSize(id, width, height[, smooth])
Function
This function can be used to change the dimensions of a video. If the video is currently playing, it will be instantly scaled to fit the new dimensions. If it is not playing, the specified dimensions will be memorized until you call PlayVideo() the next time.

You can pass the special constant #KEEPASPRAT as either width or height. Hollywood will then calculate the size automatically by taking the aspect- ratio of the video into account. Alternatively, width and height can also be a string containing a percent specification, e.g. "50%".

Starting with Hollywood 5.1 you can pass the optional argument smooth which specifies whether or not anti-aliased interpolated scaling should be used. Please note that interpolated scaling is only available for videos played through Hollywood's platform independent video player without any hardware overlay.

Please note that this function must not be used for videos that are played back in layered mode. You can change the size of video layers using functions from layers library, e.g. ScaleLayer().

Inputs
id
identifier of the video whose size you want to change
width
desired new width for the video
height
desired new height for the video
smooth
optional: whether or not to use interpolated scaling; defaults to False (V5.1)
Example
SetVideoSize(1, 640, 480)
The code above scales video 1 to a resolution of 640x480 pixels.


SetVideoSize(2, "50%", "50%")
The code above shrinks video number 2 to half its size.

Show TOC