09.08.2026, 04:47
Hybrid appears to use this code for ColorMatrix in AviSynth:
https://github.com/sorayuki/ColorMatrix
I use this filter when I have videos that have no VUI metadata, and it will need to be *something* or the video will render incorrectly on various sites and players. Usually this needs to be BT.709 for all three (Color primaries, Transfer characteristics, and Color matrix).
This is my preferred workflow in Hybrid using AviSynth for this:
Filtering -> Misc -> Overwrite input color matrix -> Rec.601
Filtering -> AviSynth -> Color -> Matrix -> Rec.601 to Rec.709
x264 -> VUI -> Color Primaries / Transfer Characteristics / Color Matrix -> all to 709
I've been using this for a long time now, and I only *just* discovered that there is a slight color shift that shouldn't be happening. This color shift doesn't happen with Vapoursynth.
Instead of complaining about it here, I used AI. I know that is probably frowned upon, however, it seems to have correctly identified the problem and vibed out a fix.
Here is the shift that I had:
The above is an animated PNG. It shows the original frame capture for 1 second, then the frame capture output from Hybrid using the above workflow for 1 second, then repeats.
It is *not* that noticeable, however, it *is* incorrect. Look closely at the green grass and you will see it shift to a slightly more yellow shade. The blue sky also shifts, although it is not as immediately noticeable as the green grass shift, at least for me.
The AI (in this case, ChatGPT 5.6 Sol at the Pro reasoning level, which is the current highest) determined that the image is actually shifting from FCC → SMPTE 240M instead of from Rec.601 → Rec.709.
This is because the sorayuki build back in February 2018 added Rec.2020 support, but did so incorrectly. Adding Rec.2020 changed the total supported matrices from four to five. However, its constructor was never changed to multiply by five. Therefore, its results were skewed:
https://rentry.co/97vkywpq
I tested this in Vapoursynth: I did a color matrix conversion from FCC → SMPTE 240M, and the same frame showed the exact same color shift that is happening when doing a color matrix conversion from Rec.601 → Rec.709 in AviSynth, which seems to confirm what the AI determined.
Here's the AI's vibe coded fork which corrects the bug:
https://github.com/BlohoJo/ColorMatrixCorrected
I'm not sure how, but it was able to patch the two binaries that Hybrid currently uses:
ColorMatrix64.dll
colormatrix.dll
I tested the above two binaries and they seem to be working correctly. They are the same file sizes as the ones that ship with Hybrid.
It was also able to compile the following two binares from its vibe-coded source:
ColorMatrix64.dll
colormatrix.dll
These are smaller sized binaries. I tested these as well, and they also appear to be working correctly.
Not sure if you want to use these as they are vibe coded, however, at least they are correct now.
(I was only able to test Rec.601 → Rec.709.)
https://github.com/sorayuki/ColorMatrix
I use this filter when I have videos that have no VUI metadata, and it will need to be *something* or the video will render incorrectly on various sites and players. Usually this needs to be BT.709 for all three (Color primaries, Transfer characteristics, and Color matrix).
This is my preferred workflow in Hybrid using AviSynth for this:
Filtering -> Misc -> Overwrite input color matrix -> Rec.601
Filtering -> AviSynth -> Color -> Matrix -> Rec.601 to Rec.709
x264 -> VUI -> Color Primaries / Transfer Characteristics / Color Matrix -> all to 709
I've been using this for a long time now, and I only *just* discovered that there is a slight color shift that shouldn't be happening. This color shift doesn't happen with Vapoursynth.
Instead of complaining about it here, I used AI. I know that is probably frowned upon, however, it seems to have correctly identified the problem and vibed out a fix.
Here is the shift that I had:
The above is an animated PNG. It shows the original frame capture for 1 second, then the frame capture output from Hybrid using the above workflow for 1 second, then repeats.
It is *not* that noticeable, however, it *is* incorrect. Look closely at the green grass and you will see it shift to a slightly more yellow shade. The blue sky also shifts, although it is not as immediately noticeable as the green grass shift, at least for me.
The AI (in this case, ChatGPT 5.6 Sol at the Pro reasoning level, which is the current highest) determined that the image is actually shifting from FCC → SMPTE 240M instead of from Rec.601 → Rec.709.
This is because the sorayuki build back in February 2018 added Rec.2020 support, but did so incorrectly. Adding Rec.2020 changed the total supported matrices from four to five. However, its constructor was never changed to multiply by five. Therefore, its results were skewed:
https://rentry.co/97vkywpq
I tested this in Vapoursynth: I did a color matrix conversion from FCC → SMPTE 240M, and the same frame showed the exact same color shift that is happening when doing a color matrix conversion from Rec.601 → Rec.709 in AviSynth, which seems to confirm what the AI determined.
Here's the AI's vibe coded fork which corrects the bug:
https://github.com/BlohoJo/ColorMatrixCorrected
I'm not sure how, but it was able to patch the two binaries that Hybrid currently uses:
ColorMatrix64.dll
colormatrix.dll
I tested the above two binaries and they seem to be working correctly. They are the same file sizes as the ones that ship with Hybrid.
It was also able to compile the following two binares from its vibe-coded source:
ColorMatrix64.dll
colormatrix.dll
These are smaller sized binaries. I tested these as well, and they also appear to be working correctly.
Not sure if you want to use these as they are vibe coded, however, at least they are correct now.

(I was only able to test Rec.601 → Rec.709.)

