then I would look through the source to see whats it about.
Here just looking through the source, some scenes are really noise while others are partially cleaned up.
So fo a final product one might want to thing about scene based filtering.
(I would at least filter the intro, and may be the dark scenes, way stronger than the rest,
Then I would probably check what BasicVSR++ or DPIRDenoise would do to the clip. (both require a recent NVIDIA CPU and the torchAddon, DPIRDenoise is probably better suited)
Leaving the ML stuff aside I would choose a DeGrain filter, SMDeGrain and TemporalDegrain are probably good starting points and tweak the settings to my liking.
Then I would probably add Declock_QED which usually is a good idea on DVD content, add SpotLess with a temporal radius of 2.
Code:
# Imports
import vapoursynth as vs
import os
import ctypes
# Loading Support Files
Dllref = ctypes.windll.LoadLibrary("i:/Hybrid/64bit/vsfilters/Support/libfftw3f-3.dll")
import sys
# getting Vapoursynth core
core = vs.core
# Import scripts folder
scriptPath = 'i:/Hybrid/64bit/vsscripts'
sys.path.insert(0, os.path.abspath(scriptPath))
# Loading Plugins
core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/SharpenFilter/CAS/CAS.dll")
core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/DenoiseFilter/CTMF/CTMF.dll")
core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/Support/DCTFilter.dll")
core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/DeblockFilter/Deblock/Deblock.dll")
core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/Support/libtemporalmedian.dll")
core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/GrainFilter/RemoveGrain/RemoveGrainVS.dll")
core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/GrainFilter/AddGrain/AddGrain.dll")
core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/DenoiseFilter/NEO_FFT3DFilter/neo-fft3d.dll")
core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/DenoiseFilter/DFTTest/DFTTest.dll")
core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/Support/EEDI3m.dll")
core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/ResizeFilter/nnedi3/NNEDI3CL.dll")
core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/Support/libmvtools.dll")
core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/Support/temporalsoften.dll")
core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/Support/scenechange.dll")
core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/Support/fmtconv.dll")
core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/MiscFilter/MiscFilters/MiscFilters.dll")
core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/SourceFilter/DGDecNV/DGDecodeNV.dll")
# Import scripts
import nnedi3_resample
import mvsfunc
import smdegrain
import SpotLess
import adjust
import havsfunc
# source: 'C:\Users\Selur\Desktop\title_t00.mkv'
# current color space: YUV420P8, bit depth: 8, resolution: 720x480, fps: 29.97, color matrix: 470bg, yuv luminance scale: limited, scanorder: top field first
# Loading C:\Users\Selur\Desktop\title_t00.mkv using DGSource
clip = core.dgdecodenv.DGSource("E:/Temp/mkv_58c8c6132152712942132531ae1f0232_853323747.dgi",fieldop=0)
# Setting color matrix to 470bg.
clip = core.std.SetFrameProps(clip, _Matrix=5)
clip = clip if not core.text.FrameProps(clip,'_Transfer') else core.std.SetFrameProps(clip, _Transfer=5)
clip = clip if not core.text.FrameProps(clip,'_Primaries') else core.std.SetFrameProps(clip, _Primaries=5)
# Setting color range to TV (limited) range.
clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=1)
# making sure frame rate is set to 29.970
clip = core.std.AssumeFPS(clip=clip, fpsnum=30000, fpsden=1001)
# setting field order to what QTGMC should assume (top field first)
clip = core.std.SetFrameProp(clip=clip, prop="_FieldBased", intval=2)
# Deinterlacing using QTGMC
clip = havsfunc.QTGMC(Input=clip, Preset="Fast", TFF=True, opencl=True) # new fps: 59.94
# make sure content is preceived as frame based
clip = core.std.SetFieldBased(clip, 0)
# adjusting frame count and rate with sRestore
clip = havsfunc.srestore(source=clip, frate=23.9760, omode=6, speed=9, thresh=16, mode=2)
# Color Adjustment
clip = adjust.Tweak(clip=clip, hue=0.00, sat=1.05, cont=1.00, coring=True)
clip = SpotLess.SpotLess(clip=clip, radT=2)
# applying deblocking using DeBlock QED
clip = havsfunc.Deblock_QED(clip)
# cropping the video to 700x480
clip = core.std.CropRel(clip=clip, left=8, right=12, top=0, bottom=0)
# removing grain using SMDegrain
clip = smdegrain.SMDegrain(input=clip, interlaced=False, opencl=True, device=-1)
# contrast sharpening using CAS
clip = core.cas.CAS(clip=clip, sharpness=0.700)
# set output frame rate to 23.976fps
clip = core.std.AssumeFPS(clip=clip, fpsnum=24000, fpsden=1001)
# Output
clip.set_output()/code]
Would be my starting point for tweaking.
Personally I would also boost the saturation a slight bit (1.05-1.1).
I would not apply AutoWhite since for my taste it would alter the general feel too much.
Also I would think about adding some light grain at the end, depending on the output bit rate I choose. (if you use high bit rates, grain can help give the image a slightly more 'alive' 'feeling', but for low bit rates it will only cause problems since it's a pain to compress.
Also if you want to upscale the content to 1280 you could:
Use something like:
[code]# Imports
import vapoursynth as vs
import os
import ctypes
# Loading Support Files
Dllref = ctypes.windll.LoadLibrary("i:/Hybrid/64bit/vsfilters/Support/libfftw3f-3.dll")
import sys
# getting Vapoursynth core
core = vs.core
# Import scripts folder
scriptPath = 'i:/Hybrid/64bit/vsscripts'
sys.path.insert(0, os.path.abspath(scriptPath))
import site
# Import libraries for onnxruntime
path = site.getsitepackages()[0]+'/onnxruntime_dlls/'
ctypes.windll.kernel32.SetDllDirectoryW(path)
# Loading Plugins
core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/Support/DCTFilter.dll")
core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/DeblockFilter/Deblock/Deblock.dll")
core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/GrainFilter/RemoveGrain/RemoveGrainVS.dll")
core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/GrainFilter/AddGrain/AddGrain.dll")
core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/DenoiseFilter/NEO_FFT3DFilter/neo-fft3d.dll")
core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/DenoiseFilter/DFTTest/DFTTest.dll")
core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/Support/EEDI3m.dll")
core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/ResizeFilter/nnedi3/NNEDI3CL.dll")
core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/Support/libmvtools.dll")
core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/Support/temporalsoften.dll")
core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/Support/scenechange.dll")
core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/Support/fmtconv.dll")
core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/MiscFilter/MiscFilters/MiscFilters.dll")
core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/SourceFilter/DGDecNV/DGDecodeNV.dll")
# Import scripts
import lostfunc
import adjust
import havsfunc
# source: 'C:\Users\Selur\Desktop\title_t00.mkv'
# current color space: YUV420P8, bit depth: 8, resolution: 720x480, fps: 29.97, color matrix: 470bg, yuv luminance scale: limited, scanorder: top field first
# Loading C:\Users\Selur\Desktop\title_t00.mkv using DGSource
clip = core.dgdecodenv.DGSource("E:/Temp/mkv_58c8c6132152712942132531ae1f0232_853323747.dgi",fieldop=0)
# Setting color matrix to 470bg.
clip = core.std.SetFrameProps(clip, _Matrix=5)
clip = clip if not core.text.FrameProps(clip,'_Transfer') else core.std.SetFrameProps(clip, _Transfer=5)
clip = clip if not core.text.FrameProps(clip,'_Primaries') else core.std.SetFrameProps(clip, _Primaries=5)
# Setting color range to TV (limited) range.
clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=1)
# making sure frame rate is set to 29.970
clip = core.std.AssumeFPS(clip=clip, fpsnum=30000, fpsden=1001)
# setting field order to what QTGMC should assume (top field first)
clip = core.std.SetFrameProp(clip=clip, prop="_FieldBased", intval=2)
# Deinterlacing using QTGMC
clip = havsfunc.QTGMC(Input=clip, Preset="Fast", TFF=True, opencl=True) # new fps: 59.94
# make sure content is preceived as frame based
clip = core.std.SetFieldBased(clip, 0)
# adjusting frame count and rate with sRestore
clip = havsfunc.srestore(source=clip, frate=23.9760, omode=6, speed=9, thresh=16, mode=2)
# Color Adjustment
clip = adjust.Tweak(clip=clip, hue=0.00, sat=1.05, cont=1.00, coring=True)
clip = lostfunc.DeSpot(o=clip)
# applying deblocking using DeBlock QED
clip = havsfunc.Deblock_QED(clip)
# cropping the video to 700x480
clip = core.std.CropRel(clip=clip, left=8, right=12, top=0, bottom=0)
from vsrealesrgan import RealESRGAN
# adjusting color space from YUV420P8 to RGBS for VsRealESRGAN
clip = core.resize.Bicubic(clip=clip, format=vs.RGBS, matrix_in_s="470bg", range_s="limited")
# resizing using RealESRGAN
clip = RealESRGAN(clip=clip, model=0, provider=1, device_id=0) # 1400x960, do not use the anime model on normal content.
# resizing 1400x960 to 934x720
# adjusting resizing
clip = core.fmtc.resample(clip=clip, w=934, h=720, kernel="lanczos", interlaced=False, interlacedd=False)
# letterboxing 934x720 to 1280x720
clip = core.std.AddBorders(clip=clip, left=174, right=172, top=0, bottom=0)
# adjusting output color from: RGBS to YUV420P8 for x264Model
clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P8, matrix_s="470bg", range_s="limited", dither_type="error_diffusion")
# set output frame rate to 23.976fps
clip = core.std.AssumeFPS(clip=clip, fpsnum=24000, fpsden=1001)
# Output
clip.set_output()
Note that I did no do any degrain since RealESRGAN usually does a good job on such sources, I also swapped SpotLess for DeSpot.
-> Hope this helps a bit.
The main thing is to find a good balance between denoising/degrain which causes smoothing while keeping details.