For me Hybrid then uses the following command line:
which looks fine to me.
Comparing those two I used:
to load the original and the reencode and then compare them and their histograms.
The output is identical. (also tried different histogram, but as expected they are identical)
Sorry, but I can't produce your problem and if I can't produce it, I can't fix it.
My guess is that, either you are doing something different or for some unknown reason whatever you used to compare these chose to convert them differently to rgb.
Cu Selur
ffmpeg -y -noautorotate -nostdin -threads 8 -i "G:\color_change_099.mkv" -map 0:0 -an -sn -color_primaries bt709 -color_trc bt709 -colorspace bt709 -color_range tv -pix_fmt yuv420p -fps_mode passthrough -vcodec ffv1 -coder 0 -context 0 -g 1 -level 1 -metadata encoding_tool="Hybrid 2024.11.10.1" "J:\tmp\2024-11-11@14_31_30_9810\color_change_099_reencoded_1_2024-11-11@14_31_30_9810_01.mkv"
Comparing those two I used:
# 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/Support/libhistogram.dll")
core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/LSMASHSource.dll")
# Import scripts
import validate
# Source: 'G:\color_change_099.mkv'
# Current color space: YUV420P8, bit depth: 8, resolution: 1920x1080, frame rate: 23.976fps, scanorder: progressive, yuv luminance scale: limited, matrix: 709, transfer: bt.709, primaries: bt.709, format: FFV1
# Loading G:\color_change_099.mkv using LWLibavSource
clip = core.lsmas.LWLibavSource(source="G:/color_change_099.mkv", format="YUV420P8", stream_index=0, cache=0, prefer_hw=0)
clip = core.hist.Classic(clip=clip)
reencode = core.lsmas.LWLibavSource(source="G:/color_change_099_reencoded.mkv", format="YUV420P8", stream_index=0, cache=0, prefer_hw=0)
reencode = core.hist.Classic(clip=reencode)
clip = core.std.Interleave([clip.text.Text("Org"),reencode.text.Text("Reencode")])
# output
clip.set_output()
The output is identical. (also tried different histogram, but as expected they are identical)
Sorry, but I can't produce your problem and if I can't produce it, I can't fix it.
My guess is that, either you are doing something different or for some unknown reason whatever you used to compare these chose to convert them differently to rgb.
Cu Selur