Yesterday, 21:34
(Yesterday, 21:08)Dan64 Wrote: You can try to recover them with this script (please install last RC5)
# Imports
import vapoursynth as vs
# getting Vapoursynth core
import sys
import os
core = vs.core
# Import scripts folder
scriptPath = 'D:/Programs/Hybrid/64bit/vsscripts'
sys.path.insert(0, os.path.abspath(scriptPath))
# loading plugins
core.std.LoadPlugin(path="D:/Programs/Hybrid/64bit/vsfilters/Support/fmtconv.dll")
core.std.LoadPlugin(path="D:/Programs/Hybrid/64bit/vsfilters/Support/libllvmexpr.dll")
core.std.LoadPlugin(path="D:/Programs/Hybrid/64bit/vsfilters/MiscFilter/MiscFilters/MiscFilters.dll")
core.std.LoadPlugin(path="D:/Programs/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/LSMASHSource.dll")
# Import scripts
import color
import vsdeoldify as havc
import validate
clip = core.lsmas.LWLibavSource(source="Crvena_Zvezda_Fiorentina_1966.mkv", format="YUV420P8", stream_index=0, cache=0, fpsnum=25, prefer_hw=0)
clip = clip[20:] # skip test color
clip = core.std.Crop(clip=clip, left=20, right=20, top=4, bottom=4)# cropping to 1240x952
# Resizing using bicubic spline
clip = core.resize.Spline36(clip, width=1280, height=960)
frame = clip.get_frame(0)
# setting color matrix to 709.
clip = core.std.SetFrameProps(clip, _Matrix=vs.MATRIX_BT709)
# setting color transfer (vs.TRANSFER_BT709), if it is not set.
if validate.transferIsInvalid(clip):
clip = core.std.SetFrameProps(clip=clip, _Transfer=vs.TRANSFER_BT709)
# setting color primaries info (to vs.PRIMARIES_BT709), if it is not set.
if validate.primariesIsInvalid(clip):
clip = core.std.SetFrameProps(clip=clip, _Primaries=vs.PRIMARIES_BT709)
# 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
# adjusting color space from YUV420P8 to RGB24 for vsColorAdjust
clip = core.resize.Bicubic(clip=clip, format=vs.RGB24, matrix_in_s="709", range_in_s="limited", range_s="full")
# stabilize colors using ColorAdjust (HAVC)
clip = havc.HAVC_ColorAdjust(clip=clip, BlackWhiteTune="strong", BlackWhiteMode=5, BlackWhiteBlend="True", ReColor=False)
clip = havc.HAVC_tweak(clip, hue = 20, sat = 3.5, bright = 0, cont = 1.0, gamma = 1.0)
clip = havc.HAVC_adjust_rgb(clip, strength=0.6, factor=(0.8, 1.10,1))
clip = havc.HAVC_bw_tune(clip)
# adjusting output color from: YUV444PS to YUV420P10 for x265Model
clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P10, matrix_s="709", dither_type="error_diffusion")
# set output frame rate to 25fps (progressive)
clip = core.std.AssumeFPS(clip=clip, fpsnum=25, fpsden=1)
# output
clip.set_output()
Let me know if instead you prefer recolor the clip.
Dan
This was just an attempt on my part to colorize
If there is another better way, of course I'd better implement it
My goal is to implement the best possible option for this type of video