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.

help please
#34
I downloaded the latest dev build first thing first.  The overwrite input color matrix via Filtering/misc is set to SMPTE170m same as before   i loaded an episode  with no filter enabled, no custom scripts except 1 in before end, this is the generated script, 

# Imports
import sys
import os
import vapoursynth as vs
# getting Vapoursynth core
core = vs.core
# Import scripts folder
scriptPath = 'C:/Program Files/Hybrid/64bit/vsscripts'
sys.path.insert(0, os.path.abspath(scriptPath))
# loading plugins
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/DeinterlaceFilter/TIVTC/libtivtc.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/LSMASHSource.dll")
# defining beforeEnd-function - START
def beforeEnd(clip):
clip = core.text.FrameProps(clip)
clip.set_output()
return [clip]
# defining beforeEnd-function - END

# Import scripts
import validate
# Source: 'D:\Season 4 disk 1\A1_t00.mkv'
# Current color space: YUV420P8, bit depth: 8, resolution: 720x480, frame rate: 29.97fps, scanorder: bottom field first, yuv luminance scale: limited, matrix: 170m, format: mpeg-2
# Loading 'D:\Season 4 disk 1\A1_t00.mkvÄ using LWLibavSource
clip = core.lsmas.LWLibavSource(source="D:/Season 4 disk 1/A1_t00.mkv", format="YUV420P8", stream_index=0, cache=0, prefer_hw=0)
frame = clip.get_frame(0)
# setting color matrix to 170m.
clip = core.std.SetFrameProps(clip, _Matrix=vs.MATRIX_ST170_M)
# setting color transfer (vs.TRANSFER_BT601), if it is not set.
if validate.transferIsInvalid(clip):
clip = core.std.SetFrameProps(clip=clip, _Transfer=vs.TRANSFER_BT601)
# 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.
prop_name = '_Range' if core.core_version.release_major >= 74 else '_ColorRange'
clip = core.std.SetFrameProps(clip=clip, **{prop_name: 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: bottom field first)
clip = core.std.SetFrameProps(clip=clip, _FieldBased=vs.FIELD_BOTTOM) # scan type: bottom field first
# Deinterlacing using TIVTC
clip = core.tivtc.TFM(clip)
clip = core.tivtc.TDecimate(clip) # new fps: 23.976
# Making sure content is preceived as frame based
clip = core.std.SetFrameProps(clip=clip, _FieldBased=vs.FIELD_PROGRESSIVE) # scan type: progressive
[clip] = beforeEnd(clip)
# clip current meta; color space: YUV420P8, bit depth: 8, resolution: 720x480, fps: 23.976, color matrix: 170m, yuv luminance scale: limited, scanorder: progressive, full height: true
# set output frame rate to 23.976fps (progressive)
clip = core.std.AssumeFPS(clip=clip, fpsnum=24000, fpsden=1001)
# output
clip.set_output()
# clip current meta; color space: YUV420P8, bit depth: 8, resolution: 720x480, fps: 23.976, color matrix: 170m, yuv luminance scale: limited, scanorder: progressive, full height: true (Meta)
# script was created by Hybrid 2026.05.05.1

Yet in my preview windows i have this so the override does not work, regardless of what the script claims, I have 470bg colormatrix and primaries, 

https://ibb.co/Z0MSZ6N


Next  i added this at the top of my before end command, 

# matrix smpte170m
# transfer bt601
# primaries smpte170m
# colorrange limited        

and got this, 

https://ibb.co/R4YYtbPs
                    
lastly I added tthe actual command to force it,

# matrix smpte170m
# transfer bt601
# primaries smpte170m
# colorrange limited

clip = core.std.SetFrameProps(clip, _Matrix=6, _Transfer=6, _Primaries=6, _Range=1)
clip = core.text.FrameProps(clip)
clip.set_output()

https://ibb.co/Z1VPjqkK

As you can see the issue is not with customs commands, the override is broken. Also it would be nice to know the proper tag for SMPTE170m primaries, the tag alone didn't work  (pic 2). Hope this helps with your troubleshooting.........

O, and even with clip = core.std.SetFrameProps(clip, _Matrix=6, _Transfer=6, _Primaries=6, _Range=1) confirmed at the end of chain, and smpte170m override set hybrid still does this when output to png, -vcodec png -dpi 0 -dpm 0 -pred 0 -vf zscale=matrixin=470bg:matrix=470bg,format=rgb24 -pix_fmt rgb24
Reply


Messages In This Thread
help please - by lsd4me2 - 01.04.2026, 21:36
RE: help please - by Selur - 02.04.2026, 06:56
RE: help please - by lsd4me2 - 03.04.2026, 19:06
RE: help please - by Selur - 03.04.2026, 19:22
RE: help please - by lsd4me2 - 06.04.2026, 02:39
RE: help please - by Selur - 06.04.2026, 05:06
RE: help please - by lsd4me2 - 06.04.2026, 05:56
RE: help please - by Selur - 06.04.2026, 06:01
RE: help please - by lsd4me2 - 06.04.2026, 06:14
RE: help please - by Selur - 06.04.2026, 07:20
RE: help please - by lsd4me2 - 06.04.2026, 07:51
RE: help please - by Selur - 06.04.2026, 10:50
RE: help please - by lsd4me2 - 06.04.2026, 18:21
RE: help please - by Selur - 06.04.2026, 18:24
RE: help please - by Selur - 06.04.2026, 19:12
RE: help please - by lsd4me2 - 16.04.2026, 01:20
RE: help please - by Selur - 16.04.2026, 08:56
RE: help please - by lsd4me2 - 16.04.2026, 09:21
RE: help please - by Selur - 16.04.2026, 09:47
RE: help please - by lsd4me2 - 16.04.2026, 12:52
RE: help please - by Selur - 16.04.2026, 13:00
RE: help please - by lsd4me2 - 16.04.2026, 14:15
RE: help please - by Selur - 16.04.2026, 14:45
RE: help please - by lsd4me2 - 16.04.2026, 15:05
RE: help please - by Selur - 16.04.2026, 15:40
RE: help please - by lsd4me2 - 16.04.2026, 17:23
RE: help please - by Selur - 16.04.2026, 18:34
RE: help please - by lsd4me2 - Yesterday, 03:58
RE: help please - by Selur - Yesterday, 04:29
RE: help please - by lsd4me2 - Yesterday, 06:52
RE: help please - by Selur - Yesterday, 09:20
RE: help please - by lsd4me2 - Yesterday, 10:23
RE: help please - by Selur - Yesterday, 11:21
RE: help please - by lsd4me2 - Today, 02:37
RE: help please - by Selur - 11 hours ago

Forum Jump:


Users browsing this thread: 1 Guest(s)