vodesfunc.rescale_ext.scenes
apply_ranges
Apply saved descale ranges to prepared targets in candidate order.
Generate the range file with get_descale_ranges and prepare each selected RescaleBuilder (for final()) or vsscale.Rescale target.
The RB_Target frame prop is the 1-based target index, or 0 for unassigned source frames.
Example usage:
targets = [
RescaleBuilder(src).descale_raw(Bicubic(0, 1), 960, 540, src_width=960, src_left=-0.0625, src_top=-0.0625, src_height=540),
RescaleBuilder(src).descale(Lanczos(3), 960, 540),
]
targets = [t.double().linemask().errormask().downscale() for t in targets]
get_descale_ranges(targets, avg_error_thr=0.04, ind_error_thr=0.06, filename="example.toml")
clip = apply_ranges(targets, filename="example.toml")
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
targets
|
Sequence[RescaleTarget]
|
List of |
required |
filename
|
str | PathLike[str]
|
TOML file containing the results of a previous |
required |
Returns:
| Type | Description |
|---|---|
VideoNode
|
Final output of the picked target or the unfiltered input clip when none matched. |