Log in

View Full Version : Vapoursynth: Upscaling Error


jay123210599
7th August 2025, 04:52
I tried upscaling a video using EwaLanczos from Vapoursynth, but I got this error: "vapoursynth.Error: placebo.Resample: Input bitdepth should be 8, 16 (Integer) or 32 (Float)!." How do I fix that?

GeoffreyA
7th August 2025, 11:43
Your source is 10-bit, causing the error. First, increase the bit depth with fmtc.bitdepth(), assuming you've got "fmtconv.dll" in your "vs-plugins" directory. Then, after calling Resample(), lower the depth to 10- or 8-bit. Generally, one will do that at the end, other processing having been done at higher precision. Instead of 16, which is sufficient, one could also use 32; but I believe libplacebo internally uses 16-bit precision.

from vapoursynth import core
clip = core.lsmas.LWLibavSource(r"src.mkv")

clip = clip.fmtc.bitdepth(bits=16)

clip = clip.placebo.Resample(width=1920, height=1080)

# Perform other processing

clip = clip.fmtc.bitdepth(bits=10)

clip.set_output()