Log in

View Full Version : VapourSynth Audio Script


jay123210599
16th May 2025, 03:14
This is my script so far:

from vapoursynth import core

clip1 = core.lsmas.LWLibavSource(r"C:\Users\User\Downloads\Input.mkv")
clip1 = core.vivtc.VFM(clip1, 1)
clip1 = core.vivtc.VDecimate(clip1)

clip1.set_output()

Now I want the output to include the audio from my video. How do I do that?

Selur
16th May 2025, 12:28
You could use BestSource (https://github.com/vapoursynth/bestsource) for the audio:

clip1 = core.lsmas.LWLibavSource(r"C:\Users\User\Downloads\Input.mkv")
clip1 = core.vivtc.VFM(clip1, 1)
clip1 = core.vivtc.VDecimate(clip1)

audio1 = core.bs.AudioSource(r"C:\Users\User\Downloads\Input.mkv") # you probably might want to select a track,.. see BestSource documentation

clip1.set_output(0)
audio.set_output(1)
Whether the tool you use to process the script will handle the second output stream depends on that tool.