generic ¶
Classes:
-
ClipLengthError
–Raised when a generic clip length error occurs.
-
FormatsMismatchError
–Raised when clips with different formats are given.
-
FormatsRefClipMismatchError
–Raised when a ref clip and the main clip have different formats.
-
FramePropError
–Raised when there is an error with the frame props.
-
FramerateMismatchError
–Raised when clips with a different framerate are given.
-
FramerateRefClipMismatchError
–Raised when a ref clip and the main clip have a different framerate.
-
FramesLengthError
– -
InvalidColorFamilyError
–Raised when the given clip uses an invalid format.
-
InvalidFramerateError
–Raised when the given clip has an invalid framerate.
-
InvalidSubsamplingError
–Raised when the given clip has invalid subsampling.
-
InvalidTimecodeVersionError
–Raised when an invalid timecode version is passed.
-
InvalidVideoFormatError
–Raised when the given clip has an invalid format.
-
LengthMismatchError
–Raised when clips with a different number of total frames are given.
-
LengthRefClipMismatchError
–Raised when a ref clip and the main clip have a different number of total frames.
-
ResolutionsMismatchError
–Raised when clips with different resolutions are given.
-
ResolutionsRefClipMismatchError
–Raised when a ref clip and the main clip have different resolutions.
-
TopFieldFirstError
–Raised when the user must pass a TFF argument.
-
UnsupportedColorFamilyError
–Raised when an undefined color family value is passed.
-
UnsupportedSubsamplingError
–Raised when an undefined subsampling value is passed.
-
UnsupportedVideoFormatError
–Raised when an undefined video format value is passed.
-
VariableFormatError
–Raised when clip is of a variable format.
-
VariableResolutionError
–Raised when clip is of a variable resolution.
ClipLengthError ¶
Bases: CustomOverflowError
Raised when a generic clip length error occurs.
FormatsMismatchError ¶
FormatsMismatchError(
func: FuncExceptT,
formats: Iterable[VideoFormatT | HoldsVideoFormatT],
message: SupportsString = "All specified formats must be equal!",
**kwargs: Any
)
Bases: MismatchError
Raised when clips with different formats are given.
Methods:
-
check
–
Source code
202 203 204 205 206 207 208 209 |
|
check classmethod
¶
check(
func: FuncExceptT,
/,
*formats: VideoFormatT | HoldsVideoFormatT,
**kwargs: Any,
) -> None
Source code
213 214 |
|
FormatsRefClipMismatchError ¶
FormatsRefClipMismatchError(
func: FuncExceptT,
clip: VideoFormatT | HoldsVideoFormatT,
ref: VideoFormatT | HoldsVideoFormatT,
message: SupportsString = "The format of ref and main clip must be equal!",
**kwargs: Any
)
Bases: MismatchRefError
, FormatsMismatchError
Raised when a ref clip and the main clip have different formats.
Methods:
-
check
–
Source code
220 221 222 223 224 225 226 227 228 |
|
check classmethod
¶
check(
func: FuncExceptT,
clip: VideoFormatT | HoldsVideoFormatT,
ref: VideoFormatT | HoldsVideoFormatT,
/,
**kwargs: Any,
) -> None
Source code
232 233 234 235 236 237 238 239 240 |
|
FramePropError ¶
FramePropError(
func: FuncExceptT,
key: str,
message: SupportsString = 'Error while trying to get frame prop "{key}"!',
**kwargs: Any
)
Bases: CustomKeyError
Raised when there is an error with the frame props.
Source code
386 387 388 389 390 391 392 393 |
|
FramerateMismatchError ¶
FramerateMismatchError(
func: FuncExceptT,
framerates: Iterable[VideoNode | Fraction | tuple[int, int] | float],
message: SupportsString = "All the framerates must be equal!",
**kwargs: Any
)
Bases: MismatchError
Raised when clips with a different framerate are given.
Methods:
-
check
–
Source code
340 341 342 343 344 345 346 347 |
|
check classmethod
¶
check(
func: FuncExceptT,
/,
*framerates: VideoNode | Fraction | tuple[int, int] | float,
**kwargs: Any,
) -> None
Source code
351 352 353 354 |
|
FramerateRefClipMismatchError ¶
FramerateRefClipMismatchError(
func: FuncExceptT,
clip: VideoNode | Fraction | tuple[int, int] | float,
ref: VideoNode | Fraction | tuple[int, int] | float,
message: SupportsString = "The framerate of the ref and main clip must be equal!",
**kwargs: Any
)
Bases: MismatchRefError
, FramerateMismatchError
Raised when a ref clip and the main clip have a different framerate.
Methods:
-
check
–
Source code
360 361 362 363 364 365 366 367 368 |
|
check classmethod
¶
check(
func: FuncExceptT,
clip: VideoNode | Fraction | tuple[int, int] | float,
ref: VideoNode | Fraction | tuple[int, int] | float,
/,
**kwargs: Any,
) -> None
Source code
372 373 374 375 376 377 378 379 380 |
|
FramesLengthError ¶
FramesLengthError(
func: FuncExceptT,
var_name: str,
message: SupportsString = '"{var_name}" can\'t be greater than the clip length!',
**kwargs: Any
)
Bases: CustomOverflowError
Source code
52 53 54 55 56 57 58 59 |
|
InvalidColorFamilyError ¶
InvalidColorFamilyError(
func: FuncExceptT | None,
wrong: VideoFormatT | HoldsVideoFormatT | ColorFamily,
correct: (
VideoFormatT
| HoldsVideoFormatT
| ColorFamily
| Iterable[VideoFormatT | HoldsVideoFormatT | ColorFamily]
) = YUV,
message: SupportsString = "Input clip must be of {correct} color family, not {wrong}!",
**kwargs: Any
)
Bases: CustomValueError
Raised when the given clip uses an invalid format.
Methods:
-
check
–Check whether the given values are correct, and if not, throw this exception.
Source code
110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 |
|
check staticmethod
¶
check(
to_check: VideoFormatT | HoldsVideoFormatT | ColorFamily,
correct: (
VideoFormatT
| HoldsVideoFormatT
| ColorFamily
| Iterable[VideoFormatT | HoldsVideoFormatT | ColorFamily]
),
func: FuncExceptT | None = None,
message: SupportsString | None = None,
**kwargs: Any
) -> None
Check whether the given values are correct, and if not, throw this exception.
Parameters:
-
to_check
¶VideoFormatT | HoldsVideoFormatT | ColorFamily
) –Value to check. Must be either a ColorFamily value, or a value a ColorFamily can be derived from such as VideoFormat.
-
correct
¶VideoFormatT | HoldsVideoFormatT | ColorFamily | Iterable[VideoFormatT | HoldsVideoFormatT | ColorFamily]
) –A correct value or an array of correct color families.
-
func
¶FuncExceptT | None
, default:None
) –Function returned for custom error handling. This should only be set by VS package developers.
-
message
¶SupportsString | None
, default:None
) –Message to print when throwing the exception. The message will be formatted to display the correct and wrong values (
{correct}
and{wrong}
respectively). -
kwargs
¶Any
, default:{}
) –Keyword arguments to pass on to the exception.
Raises:
-
InvalidColorFamilyError
–Given color family is not in list of correct color families.
Source code
134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 |
|
InvalidFramerateError ¶
InvalidFramerateError(
func: FuncExceptT,
clip: VideoNode | Fraction,
message: SupportsString = "{fps} clips are not allowed!",
**kwargs: Any
)
Bases: CustomValueError
Raised when the given clip has an invalid framerate.
Methods:
-
check
–Check whether the given values are correct, and if not, throw this exception.
Source code
408 409 410 411 412 413 414 415 |
|
check staticmethod
¶
check(
func: FuncExceptT,
to_check: VideoNode | Fraction | tuple[int, int] | float,
correct: (
VideoNode
| Fraction
| tuple[int, int]
| float
| Iterable[VideoNode | Fraction | tuple[int, int] | float]
),
message: SupportsString = "Input clip must have {correct} framerate, not {wrong}!",
**kwargs: Any
) -> None
Check whether the given values are correct, and if not, throw this exception.
Parameters:
-
to_check
¶VideoNode | Fraction | tuple[int, int] | float
) –Value to check. Must be either a VideoNode holding the correct framerate, a Fraction, a tuple representing a fraction, or a float.
-
correct
¶VideoNode | Fraction | tuple[int, int] | float | Iterable[VideoNode | Fraction | tuple[int, int] | float]
) –A correct value or an array of correct values.
-
func
¶FuncExceptT
) –Function returned for custom error handling. This should only be set by VS package developers.
-
message
¶SupportsString
, default:'Input clip must have {correct} framerate, not {wrong}!'
) –Message to print when throwing the exception. The message will be formatted to display the correct and wrong values (
{correct}
and{wrong}
respectively). -
kwargs
¶Any
, default:{}
) –Keyword arguments to pass on to the exception.
Raises:
-
InvalidFramerateError
–Given framerate is not in list of correct framerates.
Source code
417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 |
|
InvalidSubsamplingError ¶
InvalidSubsamplingError(
func: FuncExceptT,
subsampling: str | VideoFormatT | HoldsVideoFormatT,
message: SupportsString = "The subsampling {subsampling} is not supported!",
**kwargs: Any
)
Bases: CustomValueError
Raised when the given clip has invalid subsampling.
Source code
179 180 181 182 183 184 185 186 187 188 189 190 |
|
InvalidTimecodeVersionError ¶
InvalidTimecodeVersionError(
func: FuncExceptT,
version: int,
message: SupportsString = "{version} is not a valid timecodes version!",
**kwargs: Any
)
Bases: CustomValueError
Raised when an invalid timecode version is passed.
Methods:
-
check
–Check whether the given values are correct, and if not, throw this exception.
Source code
466 467 468 469 470 471 472 473 |
|
check staticmethod
¶
check(
func: FuncExceptT,
to_check: int,
correct: int | Iterable[int] = [1, 2],
message: SupportsString = "Timecodes version be in {correct}, not {wrong}!",
**kwargs: Any
) -> None
Check whether the given values are correct, and if not, throw this exception.
Parameters:
-
func
¶FuncExceptT
) –Function returned for custom error handling. This should only be set by VS package developers.
-
to_check
¶int
) –Value to check. Must be an integer representing the timecodes version.
-
correct
¶int | Iterable[int]
, default:[1, 2]
) –A correct value or an array of correct values. Defaults to [1, 2] (V1, V2).
-
message
¶SupportsString
, default:'Timecodes version be in {correct}, not {wrong}!'
) –Message to print when throwing the exception. The message will be formatted to display the correct and wrong values (
{correct}
and{wrong}
respectively). -
kwargs
¶Any
, default:{}
) –Keyword arguments to pass on to the exception.
Raises:
-
InvalidTimecodeVersionError
–Given timecodes version is not in list of correct versions.
Source code
475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 |
|
InvalidVideoFormatError ¶
InvalidVideoFormatError(
func: FuncExceptT,
format: VideoFormatT | HoldsVideoFormatT,
message: SupportsString = "The format {format.name} is not supported!",
**kwargs: Any
)
Bases: CustomValueError
Raised when the given clip has an invalid format.
Source code
91 92 93 94 95 96 97 98 99 100 |
|
LengthMismatchError ¶
LengthMismatchError(
func: FuncExceptT,
lengths: Iterable[int | Sized],
message: SupportsString = "All the lengths must be equal!",
**kwargs: Any
)
Bases: MismatchError
Raised when clips with a different number of total frames are given.
Methods:
-
check
–
Source code
295 296 297 298 299 300 301 302 |
|
LengthRefClipMismatchError ¶
LengthRefClipMismatchError(
func: FuncExceptT,
clip: int | RawNode,
ref: int | RawNode,
message: SupportsString = "The main clip and ref clip length must be equal!",
**kwargs: Any
)
Bases: MismatchRefError
, LengthMismatchError
Raised when a ref clip and the main clip have a different number of total frames.
Methods:
-
check
–
Source code
313 314 315 316 317 318 319 320 321 |
|
ResolutionsMismatchError ¶
ResolutionsMismatchError(
func: FuncExceptT,
resolutions: Iterable[Resolution | VideoNode],
message: SupportsString = "All the resolutions must be equal!",
**kwargs: Any
)
Bases: MismatchError
Raised when clips with different resolutions are given.
Methods:
-
check
–
Source code
252 253 254 255 256 257 258 259 |
|
check classmethod
¶
check(
func: FuncExceptT, /, *resolutions: Resolution | VideoNode, **kwargs: Any
) -> None
Source code
263 264 |
|
ResolutionsRefClipMismatchError ¶
ResolutionsRefClipMismatchError(
func: FuncExceptT,
clip: Resolution | VideoNode,
ref: Resolution | VideoNode,
message: SupportsString = "The resolution of ref and main clip must be equal!",
**kwargs: Any
)
Bases: MismatchRefError
, ResolutionsMismatchError
Raised when a ref clip and the main clip have different resolutions.
Methods:
-
check
–
Source code
270 271 272 273 274 275 276 277 278 |
|
check classmethod
¶
check(
func: FuncExceptT,
clip: Resolution | VideoNode,
ref: Resolution | VideoNode,
/,
**kwargs: Any,
) -> None
Source code
282 283 284 285 |
|
TopFieldFirstError ¶
TopFieldFirstError(
func: FuncExceptT,
message: SupportsString = "You must set `tff` for this clip!",
**kwargs: Any
)
Bases: CustomValueError
Raised when the user must pass a TFF argument.
Source code
399 400 401 402 |
|
UnsupportedColorFamilyError ¶
Bases: CustomValueError
Raised when an undefined color family value is passed.
UnsupportedSubsamplingError ¶
Bases: CustomValueError
Raised when an undefined subsampling value is passed.
UnsupportedVideoFormatError ¶
Bases: CustomValueError
Raised when an undefined video format value is passed.
VariableFormatError ¶
VariableFormatError(
func: FuncExceptT,
message: SupportsString = "Variable-format clips not supported!",
**kwargs: Any
)
Bases: CustomValueError
Raised when clip is of a variable format.
Source code
69 70 71 72 |
|
VariableResolutionError ¶
VariableResolutionError(
func: FuncExceptT,
message: SupportsString = "Variable-resolution clips not supported!",
**kwargs: Any
)
Bases: CustomValueError
Raised when clip is of a variable resolution.
Source code
78 79 80 81 |
|