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. |
16th October 2023, 14:55 | #1 | Link |
Registered User
Join Date: Oct 2001
Location: Germany
Posts: 7,259
|
RemoveDirt crashes depending on mod
I noticed something odd when I using (this avi)
MPEG-4 Visual, color space: YUV420P8, bit depth: 8, resolution: 1500x1080, fps: 24, color matrix: 709, yuv luminance scale: limited, scanorder: progressive and the following script: Code:
# Imports import vapoursynth as vs # getting Vapoursynth core import sys import os core = vs.core # Import scripts folder scriptPath = 'F:/Hybrid/64bit/vsscripts' sys.path.insert(0, os.path.abspath(scriptPath)) # Loading Plugins core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/GrainFilter/RemoveGrain/RemoveGrainVS.dll") core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/DenoiseFilter/RemoveDirt/RemoveDirtVS.dll") core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/vslsmashsource.dll") # Import scripts import removeDirt # current color space: YUV420P8, bit depth: 8, resolution: 1500x1080, fps: 24, color matrix: 709, yuv luminance scale: limited, scanorder: progressive # Loading C:\Users\Selur\Desktop\RemoveDirtCras\RemoveDirtConfusion.avi using LWLibavSource clip = core.lsmas.LWLibavSource(source="G:/clips/RemoveDirtCrash/RemoveDirtConfusion.avi", format="YUV420P8", stream_index=0, cache=0, prefer_hw=0) # Setting detected color matrix (709). clip = core.std.SetFrameProps(clip, _Matrix=1) # Setting color transfer info (709), when it is not set clip = clip if not core.text.FrameProps(clip,'_Transfer') else core.std.SetFrameProps(clip, _Transfer=1) # Setting color primaries info (), when it is not set clip = clip if not core.text.FrameProps(clip,'_Primaries') else core.std.SetFrameProps(clip, _Primaries=1) # Setting color range to TV (limited) range. clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=1) # making sure frame rate is set to 24 clip = core.std.AssumeFPS(clip=clip, fpsnum=24, fpsden=1) clip = core.std.SetFrameProp(clip=clip, prop="_FieldBased", intval=0) # progressive clip = removeDirt.RemoveDirt(input=clip, limit=10) # set output frame rate to 24fps (progressive) clip = core.std.AssumeFPS(clip=clip, fpsnum=24, fpsden=1) # Output clip.set_output() when add to mod8: Code:
clip = core.std.AddBorders(clip=clip, left=2, right=2, top=2, bottom=2) # add borders to archive mod 8 (vsRemoveDirt) - 1504x1084 # denoising using VsRemoveDirt clip = removeDirt.RemoveDirt(input=clip, limit=10) clip = core.std.CropRel(clip=clip, left=2, right=2, top=2, bottom=2) # removing borders (vsRemoveDirt) - 1500x1080 using: Code:
clip = core.std.AddBorders(clip=clip, left=2, right=2, top=0, bottom=0) # add borders to archive mod 8 (vsRemoveDirt) - 1504x1080 # denoising using VsRemoveDirt clip = removeDirt.RemoveDirt(input=clip, limit=10) clip = core.std.CropRel(clip=clip, left=2, right=2, top=0, bottom=0) # removing borders (vsRemoveDirt) - 1500x1080 when add to mod16: Code:
clip = core.std.AddBorders(clip=clip, left=4, right=4, top=4, bottom=4) # add borders to archive mod 16 (vsRemoveDirt) - 1508x1088 # denoising using VsRemoveDirt clip = removeDirt.RemoveDirt(input=clip, limit=10) clip = core.std.CropRel(clip=clip, left=4, right=4, top=4, bottom=4) # removing borders (vsRemoveDirt) - 1500x1080 => Would be nice to know if others can reproduce this too. Cu Selur Last edited by Selur; 16th October 2023 at 15:36. |
17th October 2023, 17:20 | #3 | Link |
Registered User
Join Date: Oct 2001
Location: Germany
Posts: 7,259
|
I uploaded the two RemoveDirt libaries I got (RemoveDirtVS.dll and vsremoveDirt.dll) to my GoogleDrive.
RemoveDirtVS.dll was from (https://forum.doom9.org/showthread.php?t=169771 when the download worked and no clue where the other was from, but both have this issue. If someone has a newer RemoveDirt build which might fix this, please let me know. Cu Selur |
18th October 2023, 01:11 | #4 | Link |
Registered User
Join Date: May 2011
Posts: 321
|
same results as you described, original video crushed, it worked with first crop(mod8), not the second(mod16), used this script:
Code:
import vapoursynth as vs from vapoursynth import core def RemoveDirt(input, repmode=16, remgrainmode=17, limit=10): cleansed = core.rgvs.Clense(input) sbegin = core.rgvs.ForwardClense(input) send = core.rgvs.BackwardClense(input) scenechange = core.rdvs.SCSelect(input, sbegin, send, cleansed) alt = core.rgvs.Repair(scenechange, input, mode=[repmode,repmode,1]) restore = core.rgvs.Repair(cleansed, input, mode=[repmode,repmode,1]) corrected = core.rdvs.RestoreMotionBlocks(cleansed, restore, neighbour=input, alternative=alt, gmthreshold=70, dist=1, dmode=2, noise=limit, noisy=12) return core.rgvs.RemoveGrain(corrected, mode=[remgrainmode,remgrainmode,1]) clip = core.ffms2.Source("RemoveDirtConfusion.avi") clip = RemoveDirt(input=clip, limit=10) clip.set_output() |
Thread Tools | Search this Thread |
Display Modes | |
|
|