Selur's Little Message Board

Full Version: Export fails w/ Vapoursynth de-interlacing
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm on ArchLinux using version 2025.05.17
Whenever I try to export a video it crashes during encoding no matter what as long as I use Vapoursynth de-interlacing.
When I switch to no Xsynth, everything works just fine. 


[attachment=3174]
1. Check the Vapoursynth Preview, it should show an error message.
2. Looking at the used script:
Code:
# Imports
import vapoursynth as vs
# getting Vapoursynth core
import sys
import os
core = vs.core
# Import scripts folder
scriptPath = '/usr/lib/python3.10/site-packages/'
sys.path.insert(0, os.path.abspath(scriptPath))
# Import scripts
import qtgmc
import validate
# Source: '/home/jonah/Desktop/VIDEO/HVR/00_0001_0000-00-00_000000.DV'
# Current color space: YUV411P8, bit depth: 8, resolution: 720x480, frame rate: 29.97fps, scanorder: bottom field first, yuv luminance scale: limited, matrix: 470bg, format: DV
# Loading /home/jonah/Desktop/VIDEO/HVR/00_0001_0000-00-00_000000.DV using LWLibavSource
clip = core.lsmas.LWLibavSource(source="/home/jonah/Desktop/VIDEO/HVR/00_0001_0000-00-00_000000.DV", format="YUV411P8", stream_index=0, cache=0, fpsnum=30000, fpsden=1001, prefer_hw=0)
frame = clip.get_frame(0)
# setting color matrix to 470bg.
clip = core.std.SetFrameProps(clip, _Matrix=vs.MATRIX_BT470_BG)
# setting color transfer (vs.TRANSFER_BT601), if it is not set.
if validate.transferIsInvalid(clip):
  clip = core.std.SetFrameProps(clip=clip, _Transfer=vs.TRANSFER_BT601)
# setting color primaries info (to vs.PRIMARIES_BT470_BG), if it is not set.
if validate.primariesIsInvalid(clip):
  clip = core.std.SetFrameProps(clip=clip, _Primaries=vs.PRIMARIES_BT470_BG)
# setting color range to TV (limited) range.
clip = core.std.SetFrameProps(clip=clip, _ColorRange=vs.RANGE_LIMITED)
# making sure frame rate is set to 29.97fps
clip = core.std.AssumeFPS(clip=clip, fpsnum=30000, fpsden=1001)
# making sure the detected scan type is set (detected: bottom field first)
clip = core.std.SetFrameProps(clip=clip, _FieldBased=vs.FIELD_BOTTOM) # bff
# adjusting color space from YUV411P8 to YUV444P16 for vsQTGMC
clip = core.resize.Bicubic(clip=clip, format=vs.YUV444P16, range_s="limited")
# Deinterlacing using QTGMC
clip = qtgmc.QTGMC(Input=clip, Preset="Slow", TFF=False, opencl=True) # new fps: 59.94
# Making sure content is preceived as frame based
clip = core.std.SetFrameProps(clip=clip, _FieldBased=vs.FIELD_PROGRESSIVE) # progressive
# adjusting output color from: YUV444P16 to YUV422P10 for ProResModel
clip = core.resize.Bicubic(clip=clip, format=vs.YUV422P10, range_s="limited", dither_type="error_diffusion")
# set output frame rate to 59.94fps (progressive)
clip = core.std.AssumeFPS(clip=clip, fpsnum=60000, fpsden=1001)
# output
clip.set_output()
The script looks fine. Atm. it's using LWLibavSource, maybe try using a different source filter like Bestsource or FFmpegSource2.

Cu Selur
I cannot use vsviewer since I cannot find a package for it on linux, and changing the sources didn't fix it. If this is just a lost cause lol, then I get it.
vsViewer source is available over at: https://github.com/Selur/vsViewer
You could copy the script from the script view and copy it into vapoursynth-editor and test it there.
Could be that the dv file you have isn't supported by any of them. Sad

Cu Selur
Thanks for the help, managed to get vsViewer working which returns this

Failed to evaluate the script:
Python exception: No module named 'qtgmc'
Traceback (most recent call last):
File "src/cython/vapoursynth.pyx", line 3387, in vapoursynth._vpy_evaluate
File "src/cython/vapoursynth.pyx", line 3388, in vapoursynth._vpy_evaluate
File "/tmp/tempPreviewVapoursynthFile19_30_54_274.vpy", line 11, in
import qtgmc
ModuleNotFoundError: No module named 'qtgmc'

And I definitely have qtgmc installed, so it definitely seems like it's one of those linux moments rather than anything wrong with any of the software itself. Thank you again.
Okay, fixed the qtgmc issue. Somehow, it was named qtgmc_h and it threw everything off.  But now I get this issue. In VapourSynth preview. 

Traceback (most recent call last):
File "src/cython/vapoursynth.pyx", line 3387, in vapoursynth._vpy_evaluate
File "src/cython/vapoursynth.pyx", line 3388, in vapoursynth._vpy_evaluate
File "/tmp/tempPreviewVapoursynthFile02_08_15_974.vpy", line 16, in
clip = core.lsmas.LWLibavSource(source="/home/jonah/Desktop/VIDEO/HVR/00_0001_0000-00-00_000000.DV", format="YUV411P8", stream_index=0, cache=0, prefer_hw=0)
^^^^^^^^^^
File "src/cython/vapoursynth.pyx", line 2895, in vapoursynth._CoreProxy.__getattr__
File "src/cython/vapoursynth.pyx", line 2701, in vapoursynth.Core.__getattr__
AttributeError: No attribute with the name lsmas exists. Did you mistype a plugin namespace or forget to install a plugin?


How fun, lol. And if I disable LWLIBAVSource, then I get the same error, but saying ffms2 doesn't exist.
Sounds like the Vapoursynth filter is missing.

Cu Selur