This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Deoldify Vapoursynth filter
(03.10.2025, 19:48)Selur Wrote:
Quote:In the new RC4, the following plugins: Retinex.dll, MiscFilters.dll, ReduceFlicker.dll
Will be automatically loaded by HAVC as needed.
It is not necessary that you add the loading of these plugins in the script.
Okay,.. sounds like a bad idea to me, but no problem.
I assume that you will only implement the autoloading for Windows.

MiscFilters: still hoping https://github.com/adworacz/zscene will be changed to not require an external call,...

Cu Selur

I tested it and it works. Here an example of loading the SCDetect filter

vsutils_dir: str = os.path.dirname(os.path.realpath(__file__)) MiscFilter_dir: str = os.path.join(vsutils_dir, "..", "..", "..", "..", "..", "vsfilters", "MiscFilter", "MiscFilters") def load_SCDetect_plugin() -> bool:     """     Ensures SCDetect VapourSynth plugin is loaded.     """     plugin_path = os.path.join(MiscFilter_dir, "MiscFilters.dll")     try:         if hasattr(vs.core, 'misc') and hasattr(vs.core.misc, 'SCDetect'):             HAVC_LogMessage(MessageType.INFORMATION,"[INFO] Plugin 'SCDetect' already loaded.")             return True         else:             vs.core.std.LoadPlugin(path=plugin_path)             HAVC_LogMessage(MessageType.INFORMATION, f"[INFO] Plugin 'SCDetect' loaded from: {plugin_path}")             return True     except Exception as error:         HAVC_LogMessage(MessageType.WARNING, "[WARNING] Plugin 'SCDetect': check/load failed ->", str(error))         return False

The code is path-independent and does not explicitly use directory separators.

Dan
Reply
Quote: The code is path-independent and does not explicitly use directory separators.
MiscFilter_dir: str = os.path.join(vsutils_dir, "..", "..", "..", "..", "..", "vsfilters", "MiscFilter", "MiscFilters")
It assumes, a specific structure. (and names),
Just saying, I think this is unwise, since it only works with the current structure and will break in case I ever rename or move a folder, or a non-Window setup is used.
So just from a design point of view, I would advise against this.
From my point of view, it would be better to throw an error if those filters are not available, but needed.
It's your thing, I just wanted to give my input.

Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Offline between (including) 29th of June and 5th of July => RochHarz Festival
Reply
(03.10.2025, 20:39)Selur Wrote:
Quote: The code is path-independent and does not explicitly use directory separators.
MiscFilter_dir: str = os.path.join(vsutils_dir, "..", "..", "..", "..", "..", "vsfilters", "MiscFilter", "MiscFilters")
It assumes, a specific structure. (and names),
Just saying, I think this is unwise, since it only works with the current structure and will break in case I ever rename or move a folder, or a non-Window setup is used.
So just from a design point of view, I would advise against this.
From my point of view, it would be better to throw an error if those filters are not available, but needed.
It's your thing, I just wanted to give my input.

Cu Selur

I'm not aware that HAVC is working also on not Windows OS, which are the supported OS ?

In such case could you privide the names of DLLs for the non Windows OS ?

Yes it is specific to Hybrid structure, so you should advise me in the case you decide to change it.
I provide an error in the case of loading error, so that the DLLs can be added manually in the script if needed.

I added this loading to be more free on which plugin load and use inside HAVC.
But the 2 approaches are not exclusive and can be used both.

Dan
Reply
Quote:I'm not aware that HAVC is working also on not Windows OS, which are the supported OS ?
Hybrid atm. does not offer torch add-on and similar on other OSs than Windows. (but this can be done Wink)

Quote:In such case could you privide the names of DLLs for the non Windows OS ?
Names depend on how you compile them to be named. Wink

Quote:I added this loading to be more free on which plugin load and use inside HAVC.
But the 2 approaches are not exclusive and can be used both.
fine, by me, just wanted to note that it seems like a bad design. Smile

Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Offline between (including) 29th of June and 5th of July => RochHarz Festival
Reply
Hello Selur,
  
    I added some changes to B&W methods (method 5 and new method 6) as shown below

:param BlackWhiteMode:      Method used by BlackWhiteTune to perform colors adjustments.                                 Allowed values are:                                       0 : Apply Contrast Limited Adaptive Histogram Equalization on Luma (default)                                       1 : Apply Simple Histogram Equalization on all RGB channels                                       2 : Apply CLAHE on all RGB channels                                       3 : method=0 and method=1 are merged                                       4 : Automatic brightness and contrast optimization with ScaleAbs                                       5 : Multi-Scale Retinex (HAVC) <-- "on Luma" replaced by "(HAVC)"                                       6 : Multi-Scale Retinex (B&W) <-- new method #6

 I hope that you can release an updated test version.

Thanks,
Dan
Reply
Uploaded a new test version.

Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Offline between (including) 29th of June and 5th of July => RochHarz Festival
Reply
I was finally able to find a way to get colorful and stable video clips.

Here a sample using Retinex (HAVC version) + "Video+Artistic" (Constrained-Chroma merge, veryvivid) + tweaks

https://archive.org/details/young-franke...etinex.mp4

The combine method Constrained-Chroma is already able to filter-out most of flashing colors, but to get the best result is possible to add to the above settings the temporal stabilizer

https://archive.org/details/young-franke...ilizer.mp4

Dan
Reply
Dan, these results are amazing!!!  A huge step forward.  I always thought there was something special about retinex, but it had many issues that now appear to be resolved.  
Looking forward for this to be released and reading the new user guide.
Reply
this retinex really gives good results
but why can't i load it in the hybrid preview

# Imports import vapoursynth as vs # getting Vapoursynth core import sys import os core = vs.core # Import scripts folder scriptPath = 'E:/Hybrid/64bit/vsscripts' sys.path.insert(0, os.path.abspath(scriptPath)) # loading plugins core.std.LoadPlugin(path="E:/Hybrid/64bit/vsfilters/ColorFilter/Retinex/Retinex.dll") core.std.LoadPlugin(path="E:/Hybrid/64bit/vsfilters/MiscFilter/MiscFilters/MiscFilters.dll") core.std.LoadPlugin(path="E:/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/LSMASHSource.dll") # Import scripts import vsdeoldify as havc import validate # Source: 'E:\download\Houdini Archival Footage.mp4' # Current color space: YUV420P8, bit depth: 8, resolution: 640x480, frame rate: 29.97fps, scanorder: progressive, yuv luminance scale: limited, matrix: 470bg, transfer: bt.709, primaries: bt.601 ntsc, format: AVC # Loading E:\download\Houdini Archival Footage.mp4 using LWLibavSource clip = core.lsmas.LWLibavSource(source="E:/download/Houdini Archival Footage.mp4", format="YUV420P8", stream_index=1, 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_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_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 29.97fps clip = core.std.AssumeFPS(clip=clip, fpsnum=30000, fpsden=1001) # making sure the detected scan type is set (detected: progressive) clip = core.std.SetFrameProps(clip=clip, _FieldBased=vs.FIELD_PROGRESSIVE) # progressive # changing range from limited to full range for clip = core.resize.Bicubic(clip, format=vs.YUV420P8, range_in_s="limited", range_s="full") # setting color range to PC (full) range. clip = core.std.SetFrameProps(clip=clip, _ColorRange=vs.RANGE_FULL) # changing color matrix from '470bg' to '709' for vsHAVC clip = core.resize.Bicubic(clip, matrix_in_s="470bg", matrix_s="709") # adjusting color space from YUV420P8 to RGB24 for vsHAVC clip = core.resize.Bicubic(clip=clip, format=vs.RGB24, matrix_in_s="709", range_in_s="full", range_s="full") # adding colors using HAVC clip = havc.HAVC_main(clip=clip, Preset="medium", VideoTune="balanced", ColorFix="none", ColorTune="none", BlackWhiteTune="none") # internally changing color matrix for YUV<>RGB to '470bg' undoing color matrix change for vsHAVC clip = core.std.Crop(clip=clip, left=2, right=2, top=0, bottom=0)# cropping to 636x480 # color adjustment using Retinex clip = core.retinex.MSRCP(input=clip, sigma=[25,80,250], fulls=True, fulld=True) # adjusting output color from: RGB24 to YUV420P10 for x265Model clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P10, matrix_s="470bg", range_in_s="full", range_s="full") # additional resize to allow target color sampling # set output frame rate to 29.97fps (progressive) clip = core.std.AssumeFPS(clip=clip, fpsnum=30000, fpsden=1001) # output clip.set_output()

2025-10-06 12:07:53.662 Failed to evaluate the script: Python exception: Failed to load E:/Hybrid/64bit/vsfilters/ColorFilter/Retinex/Retinex.dll. GetLastError() returned 126. The file you tried to load or one of its dependencies is probably missing. Traceback (most recent call last): File "src/cython/vapoursynth.pyx", line 3378, in vapoursynth._vpy_evaluate File "src/cython/vapoursynth.pyx", line 3379, in vapoursynth._vpy_evaluate File "C:\Users\nfoga\AppData\Local\Temp\tempPreviewVapoursynthFile12_07_53_393.vpy", line 11, in core.std.LoadPlugin(path="E:/Hybrid/64bit/vsfilters/ColorFilter/Retinex/Retinex.dll") File "src/cython/vapoursynth.pyx", line 3114, in vapoursynth.Function.__call__ vapoursynth.Error: Failed to load E:/Hybrid/64bit/vsfilters/ColorFilter/Retinex/Retinex.dll. GetLastError() returned 126. The file you tried to load or one of its dependencies is probably missing.

Whatever I do, I always get this error and it doesn't code accordingly
Maybe I didn't install something?

i use:
Hybrid_dev_2025.10.04-173743.exe
VapoursynthR72_torch_2025.09.25.7z
windows 11 pro
Reply
about Retinex: try installing Microsoft Visual C++ Redistributable 2013 Package
about using HAVC with Retinex like Dan64 showcased: that would require the non-public test version, only Dan64 has access to, and an updated torch environment. (the public releases of HAVC do not support this atm.)

Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Offline between (including) 29th of June and 5th of July => RochHarz Festival
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)