Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

Domains: forum.doom9.org / forum.doom9.net / forum.doom9.se

 

Go Back   Doom9's Forum > General > Newbies

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 28th August 2025, 15:14   #1  |  Link
szwab
Registered User
 
Join Date: Aug 2025
Posts: 6
Newbie seeking help with QTGMC 'memoryview' error on 1080i50 source

Hey guys,

I'm a beginner trying to get my head around a VapourSynth script and I've hit a wall. I've been wrestling with it for a while now, got some of the basics put together from reading forums and with AI assistance, but I'm completely stuck on a persistent error that seems to be above my paygrade.

My goal is to do a proper archival encode of a clean 1080i50 HDTV rip. The plan is to deinterlace with QTGMC, decimate it back to single rate, and then reverse the PAL speed-up to restore the original 23.976 fps. Afterwards, I want to run some light post-processing for minor chroma bleed and blocking before piping it all to ffmpeg with the audio slowed to match. The weird thing is, the script actually works perfectly fine if I use a simple QTGMC(Preset="Fast"). But as soon as I try to use a higher quality preset like "Slower" or "Very Slow", the script immediately fails with vapoursynth.Error: argument val was passed an unsupported type (memoryview). The error always happens when the clip is passed from QTGMC to the next filter in the chain. I've tried every sanitizing trick I could find, from core.std.Expr(clip, "x") to forcing a YUV->RGB->YUV conversion right after QTGMC, but nothing seems to touch this error. It feels like the slower presets are outputting a frame format that's just fundamentally incompatible with other plugins.

A sample from the HDTV rip (cut losslessly with ffmpeg, the original is a .ts file): https://files.catbox.moe/k3p33g.mp4

Here's the script that's failing.

Quote:
import sys
plugins_path = r'C:\Users\jopro\AppData\Local\Programs\VapourSynth\core\plugins'
if plugins_path not in sys.path:
sys.path.append(plugins_path)

import vapoursynth as vs
core = vs.core
import qtgmc
from dfttest2 import DFTTest, Backend

clip = core.lsmas.LWLibavSource(source=r"C:\Users\jopro\Downloads\sample.mp4")

clip = qtgmc.QTGMC(
clip,
Preset="Slower",
TFF=False,
TR2=0,
Sharpness=0.1,
ChromaMotion=True
)

clip = core.std.SelectEvery(clip, cycle=2, offsets=0)
clip = core.std.AssumeFPS(clip, fpsnum=24000, fpsden=1001)

clip = core.warp.AWarpSharp2(clip, depth=8, chroma=1, planes=)
clip = DFTTest(clip=clip, sigma=1, tbsize=1, backend=Backend.NVRTC())
final_clip = core.neo_f3kdb.Deband(clip=clip, y=32, cb=32, cr=32, grainy=16, grainc=16)

total_frames = final_clip.num_frames
def print_progress(n, f):
print(f"\rVapourSynth: Processing frame {n+1}/{total_frames}", end="", file=sys.stderr, flush=True)
return f
final_clip = core.std.ModifyFrame(clip=final_clip, clips=[final_clip], selector=print_progress)

final_clip.set_output()

So I'm really hoping someone here might have seen this memoryview issue before and knows the proper way to handle the output from QTGMC's more advanced modes. I'm also open to any feedback on the post-processing chain itself. Is AWarpSharp2 a reasonable choice for the minor chroma bleed on a clean digital source? And is DFTTest(sigma=1, tbsize=1) a good call for trying to preserve the film grain as much as possible? Also, maybe I should use some kind of fake grain plugin. Do you know any that would be well-suited? I feel like I'm so close to getting this to work but I'm just missing a key piece of the puzzle.

Any help or advice would be hugely appreciated. Thanks.
szwab is offline   Reply With Quote
 

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 17:19.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.