heuristics ¶
Functions:
-
video_heuristics–Determine video heuristics from frame properties.
video_heuristics ¶
video_heuristics(
clip: VideoNode,
props: Mapping[str, Any] | bool | None = None,
prop_in: bool = True,
assumed_return: bool = False,
) -> dict[str, PropEnum] | tuple[dict[str, PropEnum], list[str]]
Determine video heuristics from frame properties.
Parameters:
-
(clip¶VideoNode) –The input clip.
-
(props¶Mapping[str, Any] | bool | None, default:None) –Source properties used to retrieve values.
- If True: uses the frame properties from the clip when available.
- If a Mapping is passed: uses the frame properties from it when available.
- If any other value or frame properties unavailable: values are inferred from the clip's resolution.
-
(prop_in¶bool, default:True) –If True, returns a dict with keys in the form
{prop_name}_in(e.g.,matrix_ininstead ofmatrix).For more details, see the Resize docs.
-
(assumed_return¶bool, default:False) –If True, returns the assumed props as a list alongside the heuristics.
Returns:
-
dict[str, PropEnum] | tuple[dict[str, PropEnum], list[str]]–A dict containing all determinable video heuristics, optionally using key names derived
-
dict[str, PropEnum] | tuple[dict[str, PropEnum], list[str]]–from the resize plugin.
Source code in vstools/functions/heuristics.py
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 | |