Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RGB24 not working #8

Closed
Selur opened this issue Jun 3, 2023 · 2 comments
Closed

RGB24 not working #8

Selur opened this issue Jun 3, 2023 · 2 comments

Comments

@Selur
Copy link

Selur commented Jun 3, 2023

I'm using portable Vapoursynth R62 on Windows 11
Using:

# Imports
import vapoursynth as vs
# getting Vapoursynth core
core = vs.core
# Loading Plugins
core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/SubtitleFilter/VSFilterMod/VSFilterMod.dll")
core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/Support/libimwri.dll")
# source: 'C:/Users/Selur/Desktop/hybrid_test/croquants.png'
# current color space: RGB24, bit depth: 8, resolution: 720x480, fps: 25, color matrix: 470bg, yuv luminance scale: limited, scanorder: progressive
# Loading C:\Users\Selur\Desktop\hybrid_test\croquants.png using vsImageReader
clip = core.imwri.Read(["C:/Users/Selur/Desktop/hybrid_test/croquants.png"])
clip = core.std.Loop(clip=clip, times=6050)
# Input color space is assumed to be RGB24
# Setting color transfer info (470bg), when it is not set
clip = clip if not core.text.FrameProps(clip,'_Transfer') else core.std.SetFrameProps(clip, _Transfer=5)
# Setting color primaries info (), when it is not set
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 25
clip = core.std.AssumeFPS(clip=clip, fpsnum=25, fpsden=1)
# Converting to target color sampling
clip = core.std.SetFrameProp(clip=clip, prop="_FieldBased", intval=0) # progressive
# Loading C:\Users\Selur\Desktop\hybrid_test\hector.ass using VSFilterMod
clip = core.vsfm.TextSubMod(clip=clip, file="C:/Users/Selur/Desktop/hybrid_test/hector.ass")
clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P8, matrix_s="470bg", range_s="limited")
# set output frame rate to 25fps (progressive)
clip = core.std.AssumeFPS(clip=clip, fpsnum=25, fpsden=1)
# Output
clip.set_output()

fails, using:

# Imports
import vapoursynth as vs
# getting Vapoursynth core
core = vs.core
# Loading Plugins
core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/SubtitleFilter/VSFilterMod/VSFilterMod.dll")
core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/Support/libimwri.dll")
# source: 'C:/Users/Selur/Desktop/hybrid_test/croquants.png'
# current color space: RGB24, bit depth: 8, resolution: 720x480, fps: 25, color matrix: 470bg, yuv luminance scale: limited, scanorder: progressive
# Loading C:\Users\Selur\Desktop\hybrid_test\croquants.png using vsImageReader
clip = core.imwri.Read(["C:/Users/Selur/Desktop/hybrid_test/croquants.png"])
clip = core.std.Loop(clip=clip, times=6050)
# Input color space is assumed to be RGB24
# Setting color transfer info (470bg), when it is not set
clip = clip if not core.text.FrameProps(clip,'_Transfer') else core.std.SetFrameProps(clip, _Transfer=5)
# Setting color primaries info (), when it is not set
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 25
clip = core.std.AssumeFPS(clip=clip, fpsnum=25, fpsden=1)
# Converting to target color sampling
clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P8, matrix_s="470bg", range_s="limited")
clip = core.std.SetFrameProp(clip=clip, prop="_FieldBased", intval=0) # progressive
# Loading C:\Users\Selur\Desktop\hybrid_test\hector.ass using VSFilterMod
clip = core.vsfm.TextSubMod(clip=clip, file="C:/Users/Selur/Desktop/hybrid_test/hector.ass")
# set output frame rate to 25fps (progressive)
clip = core.std.AssumeFPS(clip=clip, fpsnum=25, fpsden=1)
# Output
clip.set_output()

(moved the RGB24 -> YUV420P8 conversion before the filter crashes.

hector.zip contains the used ass and image file.

@Masaiki
Copy link
Owner

Masaiki commented Jun 4, 2023

i have fixed this before
you can test with this build

@Selur
Copy link
Author

Selur commented Jun 4, 2023

Thanks, I can confirm that it works using that version. :) 👍

@Selur Selur closed this as completed Jun 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants