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

Reply
 
Thread Tools Search this Thread Display Modes
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
Old 28th August 2025, 15:44   #2  |  Link
Selur
.
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,860
Not helping with the problem, but about the video: it's not interlaced, but fields shifted (when using QTGMV, every frame is doubled in the output) => instead of QTGMC you should just use TFM()

Not sure what qtgmc script you use, using this, I have no problem with slower presets.
(note that slower presets, by default, will not preserve more grain, but usually are more likely to remove it,...this might be interesting)

Quote:
Is AWarpSharp2 a reasonable choice for the minor chroma bleed on a clean digital source?
Yes, if you restrict the planes to the chroma planes. (by default all planes get processed)

Quote:
And is DFTTest(sigma=1, tbsize=1) a good call for trying to preserve the film grain as much as possible
No clue. Does that even do anything?

=> it's definitely not some fundamentally incompatibility of qtqmc with other filters, but no clue what's causing this for you.

Cu Selur
__________________
Hybrid here in the forum, homepage, its own forum
Selur is offline   Reply With Quote
Old 28th August 2025, 16:13   #3  |  Link
szwab
Registered User
 
Join Date: Aug 2025
Posts: 6
Thanks Selur! I'm not home right now, but I'll try using TFM once I'm home. Any recs for better grain preservation/fake grain? I don't remember reading anything about sigma=1 and tbsize=1 being good parameters for DFTTest, so that's likely just an AI halkucination. My bad.
szwab is offline   Reply With Quote
Old 28th August 2025, 16:17   #4  |  Link
Selur
.
 
Selur's Avatar
 
Join Date: Oct 2001
Location: Germany
Posts: 7,860
Read the thread I linked to, it has quite a few recommendations for grain retention.
__________________
Hybrid here in the forum, homepage, its own forum
Selur is offline   Reply With Quote
Old 28th August 2025, 19:11   #5  |  Link
Z2697
Registered User
 
Join Date: Aug 2024
Location: Between my two ears
Posts: 958
Why do denoise if goal is to preserve noise.
Z2697 is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 18:03.


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