Vapoursynth ReplaceMultiple

From wiki.selur.net
Revision as of 09:51, 16 November 2026 by Selur (talk | contribs) (New filter page (via create-page on MediaWiki MCP Server))
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

ReplaceMultiple replaces ranges of consecutive frames with frames interpolated between the frame before and the frame after each range.

Filtering → Vapoursynth → Frame → Replace

ReplaceMultiple controls in Hybrid
ReplaceMultiple controls in Hybrid

What it does

Each range is given as [first, last]. All frames in it are rebuilt from the frame just before and the frame just after the range; for example [5, 6] is rebuilt from frames 4 and 7. A range can be 1 to 10 frames long. The clip keeps its length and frame rate. For single frames, ReplaceSingle is simpler.

Requirements

  • svp, svp_gpu: SVP must be installed (only then are they listed).
  • rife: a Vulkan-capable GPU.
  • mv: CPU; the mvgpu implementation needs Vulkan.

Settings

Control Parameter Range / values Hybrid default Meaning
Frames intervals ranges, e.g. [1, 3], [100, 100] empty Ranges to replace, each 1–10 frames, not touching the first or last frame of the clip. Empty = the filter does nothing.
Method method mv, svp, svp_gpu, rife mv Interpolator: MVTools, SVP on the CPU, SVP on the GPU, or RIFE.
RIFE: Model – RIFE models rife-v4.5 (ensemble) RIFE model (method rife).
RIFE: TTA / UHD – on/off off / off Test-time augmentation (not available for v4 models); UHD mode for large frames (method rife).
Debug debug on/off off Writes the method and the range start onto the interpolated frames in the preview.
Tools: MV – mvgpu, mvutensils, mv – MVTools implementation (method mv).

Example

Frames [100, 101], [200, 200] (the field is empty by default, which writes nothing), otherwise default settings, on a 10-bit YUV 4:2:0 source (640x356):

from ReplaceMultipleFrames import ReplaceMultipleFrames
fmf = ReplaceMultipleFrames(clip=clip, intervals=[[100, 101], [200, 200]], method="mv", tools={'mv': 'mvutensils'})
clip = fmf.out

How Hybrid calls it

  • Color formats: svp and svp_gpu work on 8-bit YUV 4:2:0, mv on 8–16-bit YUV, rife on 32-bit float RGB; the clip is converted as needed.
  • The ranges are passed as entered. A range longer than 10 frames, or one that touches the first or last frame, stops the script with an error.
  • RIFE options are only written for method rife.
  • Replaced frames keep the frame properties (such as the frame duration) of the original frame.
  • Frame count and frame rate do not change.

Sources