Selur
16th October 2023, 14:55
I noticed something odd when I using (this avi (https://drive.google.com/file/d/1KsUWZbPSrtUBdmg9GzcrcCa_7hZVmZEQ/view?usp=drive_link))
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:
# 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()
Processing the script directly crashes when rendering the second frame.
when add to mod8:
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
it works fine.
using:
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
so seems like mod16 width is the problem.
when add to mod16:
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
it crashes.
=> Would be nice to know if others can reproduce this too.
Cu Selur
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:
# 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()
Processing the script directly crashes when rendering the second frame.
when add to mod8:
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
it works fine.
using:
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
so seems like mod16 width is the problem.
when add to mod16:
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
it crashes.
=> Would be nice to know if others can reproduce this too.
Cu Selur