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.

[BUG] Vapoursynth: Image Stream Luma TV Range not working correctly (??)
#12
Problem is your input isn't TV scale but PC scale.
So you need to use 'pc' scale when in the Imagesequence dialog and the colors stay the same while converting between RGB and YUV.

So the script used by Hybrid:
# Imports
import vapoursynth as vs
core = vs.get_core()
# loading source: C:/Users/Selur/Desktop/ImgStrmVStest/000000.png
# color sampling RGB24@24, matrix:709, scantyp: progressive
# luminance scale PC
# resolution: 1312x960
# frame rate: 1 fps
# Loading C:\Users\Selur\Desktop\ImgStrmVStest\%06d.png using vsImageReader
clip = core.imwri.Read("C:/Users/Selur/Desktop/ImgStrmVStest/%06d.png", firstnum=0)
clip = core.std.Trim(clip=clip, length=51)
# Input color space is assumed to be RGB24.
# making sure frame rate is set to 25
clip = core.std.AssumeFPS(clip, fpsnum=25, fpsden=1)
# Setting color range to PC (full) range.
clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=0)
# adjusting output color from: RGB24 to YUV420P8 for x264Model (i420)
clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P8, matrix_s="709", range_s="full")
# Output
clip.set_output()
for the conversion should be correct.

I attached the source frame and the snapshow from the vsPreview.
I also attached the Levels graphs of the source and the vsPreview png created with Paint.Net.

The whole mess you encountered happens when you use the wrong luma range. Wink
Hybrid assumes your value to be correct and what happens is that the source then gets clamped (not scaled) to 15-235 which causes the contrast to be 'off'.

Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply


Messages In This Thread
RE: Vapoursynth: Image Stream Luma TV Range not working correctly (??) - by Selur - 23.07.2020, 16:55

Forum Jump:


Users browsing this thread: 2 Guest(s)