Posts: 133
Threads: 29
Joined: May 2023
this is what happens on final result using MCdegrainsharp and QTGCM deinterlace.. on the original footage is not too much visible but after the degrain is very very evident.
original footage: https://www.wcn.it/defect.zip
the problem seems related to some sort of fast interference (generated on the TBC) and red seems more influenced from it. the strange thing is that just on this tape is very very evident.
very thnak you for any help!
Posts: 11.112
Threads: 57
Joined: May 2017
Looks like some kind of aliasing.
1rst idea try:
1. denoising the separate fields before deinterlacing/ivtc.
2. applying Santiag with increased strength afterward.
will look at it after work.
Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Posts: 11.112
Threads: 57
Joined: May 2017
06.03.2025, 16:15
(This post was last modified: 06.03.2025, 16:50 by Selur.)
Here's what that first idea does:
# converting interlaced to half-height progressive for filtering (vsMCTemporalDenoise) (separate fields)
clip = core.resize.Bicubic(clip=clip, format=vs.YUV444P8, range_s="limited")
clip = core.std.SeparateFields(clip, tff=False)
clipEven = clip[::2] # resolution 720x288
clipEven = core.std.SetFrameProps(clip=clipEven, _FieldBased=vs.FIELD_PROGRESSIVE) # progressive
clipOdd = clip[1::2] # resolution 720x288
clipOdd = core.std.SetFrameProps(clip=clipOdd, _FieldBased=vs.FIELD_PROGRESSIVE) # progressive
# denoising using MCTemporalDenoise
clipEven = denoise.MCTemporalDenoise(i=clipEven, settings="very high", ncpu=10)
# denoising using MCTemporalDenoise
clipOdd = denoise.MCTemporalDenoise(i=clipOdd, settings="very high", ncpu=10)
# converting half-height progressive to interlacedbefore deinterlacing
clip = core.std.Interleave([clipOdd, clipEven])
clip = core.std.DoubleWeave(clip=clip, tff=False) # resolution 720x576
clip = core.std.SelectEvery(clip, 2, 0)
clip = core.std.SetFrameProps(clip=clip, _FieldBased=vs.FIELD_TOP) # tff
# Deinterlacing using TIVTC
clip = core.tivtc.TFM(clip=clip, chroma=True)
clip = core.tivtc.TDecimate(clip=clip, mode=7, rate=23.9760, dupThresh=0.04, vidThresh=3.50, sceneThresh=15.00)# new fps: 23.976
# Making sure content is preceived as frame based
clip = core.std.SetFrameProps(clip=clip, _FieldBased=vs.FIELD_PROGRESSIVE) # progressive
# applying anti aliasing using santiag
clip = antiAliasing.santiag(c=clip, strh=3, strv=3, nns=2, qual=2, pscrn=2, opencl=True)6
clip
2nd idea: using SpotLess before the deinterlacing and BasicVSR++ on the edges after Santiag. ( script, clip)
3rd idea: adding CodeFormer to before BasicVSR++ ( script, clip)
Hope these help to get it started.
Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Posts: 133
Threads: 29
Joined: May 2023
impressive result!, very very thank you for your time and your help Selur!
just tried the first script:
Failed to evaluate the script:
Python exception: invalid syntax (tempPreviewVapoursynthFile13_11_54_548.vpy, line 65)
Traceback (most recent call last):
File "src\\cython\\vapoursynth.pyx", line 3351, in vapoursynth._vpy_evaluate
File "C:\Users\Bfield\AppData\Local\Temp\tempPreviewVapoursynthFile13_11_54_548.vpy", line 65
clip = antiAliasing.santiag(c=clip, strh=3, strv=3, nns=2, qual=2, pscrn=2, opencl=True)6
^
SyntaxError: invalid syntax
and i think the "6" need to be removed
but after:
Failed to evaluate the script:
Python exception: name 'denoise' is not defined
Traceback (most recent call last):
File "src\\cython\\vapoursynth.pyx", line 3365, in vapoursynth._vpy_evaluate
File "src\\cython\\vapoursynth.pyx", line 3366, in vapoursynth._vpy_evaluate
File "C:\Users\Bfield\AppData\Local\Temp\tempPreviewVapoursynthFile13_12_59_789.vpy", line 90, in
clip = beforeDeCross(clip)
^^^^^^^^^^^^^^^^^^^
File "C:\Users\Bfield\AppData\Local\Temp\tempPreviewVapoursynthFile13_12_59_789.vpy", line 23, in beforeDeCross
clipEven = denoise.MCTemporalDenoise(i=clipEven, settings="very high", ncpu=10)
^^^^^^^
NameError: name 'denoise' is not defined
Posts: 11.112
Threads: 57
Joined: May 2017
Sorry, totally missed your post.
Uploaded a new dev to be sure we use the same versions.
Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Posts: 133
Threads: 29
Joined: May 2023
just downloaded but it's doing the same
Failed to evaluate the script:
Python exception: name 'denoise' is not defined
Traceback (most recent call last):
File "src\\cython\\vapoursynth.pyx", line 3365, in vapoursynth._vpy_evaluate
File "src\\cython\\vapoursynth.pyx", line 3366, in vapoursynth._vpy_evaluate
File "C:\Users\Bfield\AppData\Local\Temp\tempPreviewVapoursynthFile23_05_49_117.vpy", line 61, in
clip = beforeEnd(clip)
^^^^^^^^^^^^^^^
File "C:\Users\Bfield\AppData\Local\Temp\tempPreviewVapoursynthFile23_05_49_117.vpy", line 22, in beforeEnd
clipEven = denoise.MCTemporalDenoise(i=clipEven, settings="very high", ncpu=10)
^^^^^^^
NameError: name 'denoise' is not defined
Posts: 11.112
Threads: 57
Joined: May 2017
Are you sure you are using the latest dev?
=> please create a debug output, since I can't reproduce this here.
for me scripts like:
# Imports
import vapoursynth as vs
# getting Vapoursynth core
import ctypes
import sys
import os
core = vs.core
# Import scripts folder
scriptPath = 'F:/Hybrid/64bit/vsscripts'
sys.path.insert(0, os.path.abspath(scriptPath))
# Loading Support Files
Dllref = ctypes.windll.LoadLibrary("F:/Hybrid/64bit/vsfilters/Support/libfftw3f-3.dll")
# loading plugins
core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/MiscFilter/MiscFilters/MiscFilters.dll")
core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/DenoiseFilter/TTempSmooth/TTempSmooth.dll")
core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/DenoiseFilter/DFTTest/DFTTest.dll")
core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/DenoiseFilter/NEO_FFT3DFilter/neo-fft3d.dll")
core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/Support/DCTFilter.dll")
core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/DeblockFilter/Deblock/Deblock.dll")
core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/Support/libmvtools.dll")
core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/LSMASHSource.dll")
# Import scripts
import denoise
import validate
# Source: 'G:\TestClips&Co\files\test.avi'
# Current color space: YUV420P8, bit depth: 8, resolution: 640x352, frame rate: 25fps, scanorder: progressive, yuv luminance scale: limited, matrix: 470bg, format: MPEG-4 Visual
# Loading G:\TestClips&Co\files\test.avi using LWLibavSource
clip = core.lsmas.LWLibavSource(source="G:/TestClips&Co/files/test.avi", format="YUV420P8", stream_index=0, cache=0, 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 25fps
clip = core.std.AssumeFPS(clip=clip, fpsnum=25, fpsden=1)
# making sure the detected scan type is set (detected: progressive)
clip = core.std.SetFrameProps(clip=clip, _FieldBased=vs.FIELD_PROGRESSIVE) # progressive
# denoising using MCTemporalDenoise
clip = denoise.MCTemporalDenoise(i=clip, settings="very high", ncpu=10)
# adjusting output color from: YUV420P8 to YUV420P10 for NVEncModel
clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P10, range_s="limited")
# set output frame rate to 25fps (progressive)
clip = core.std.AssumeFPS(clip=clip, fpsnum=25, fpsden=1)
# output
clip.set_output()
get generated and work fine.
Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
|