VideoResolution#

class nominal.experimental.video_processing.VideoResolution(resolution_width=None, resolution_height=None, allow_upscaling=False)#

Bases: object

Width and height limits for video scaling, with optional upscaling.

resolution_width: int | None = None#

Maximum width of the video, in pixels. Unbounded if None. NOTE: MUST be divisible by 2.

resolution_height: int | None = None#

Maximum height of the video, in pixels. Unbounded if None. NOTE: MUST be divisible by 2.

allow_upscaling: bool = False#

If true, allow upscaling beyond original resolution (e.g. 1080p -> 4k)

scale_factor()#

Output a video filter flag usable with Ffmpeg to rescale a video to fit within this resolution.

Return type:

str