Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > VapourSynth

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 25th July 2024, 15:58   #1  |  Link
hello_hello
Registered User
 
Join Date: Mar 2011
Posts: 4,895
R68 color range issues (or I'm losing my mind)

I'm confused. I recall someone telling me the Vapoursynth color range values are the opposite of those used for Avisynth, so Limited=0 and Full=1. Is that correct?

Code:
clip = core.std.BlankClip(format=vs.YUV420P8).resize.Spline36(600,304)
clip = core.text.Text(clip, 'ColorRange ' + str(clip.get_frame(0).props.get("_ColorRange", None)))
clip.set_output()


Aside from not being sure if the value is correct, why does the resize function always write a color range to frame properties? It'd be fair enough after a conversion between YUV and RGB etc as assumptions are required, but when only resizing?

Although what seems to be happening is the value going in isn't the one coming out.

Code:
clip = core.std.BlankClip(format=vs.YUV420P8).resize.Spline36(600,304, range=1, range_in=1)
clip = core.text.Text(clip, 'ColorRange ' + str(clip.get_frame(0).props.get("_ColorRange", None)))
clip.set_output()


And either because there's something wrong with the color range assumption or I'm losing the plot, AddBorders appears to be adding full range borders when they should be limited. They're okay if I specify the border color via this function though (histogram showing the black level on the right side of the screenshots).

Code:
BClip = core.std.BlankClip(format=vs.YUV420P8)
Color = rgb.RGBColor(BClip, "green")
clip = core.std.BlankClip(BClip, format=vs.YUV420P8, color=Color).std.AddBorders(40,40,40,40)
clip = core.text.Text(clip, 'ColorRange ' + str(clip.get_frame(0).props.get("_ColorRange", None)))
clip = core.hist.Classic(clip)
clip.set_output()


Code:
BClip = core.std.BlankClip(format=vs.YUV420P8)
ColorA = rgb.RGBColor(BClip, "green")
ColorB = rgb.RGBColor(BClip, "black")
clip = core.std.BlankClip(BClip, color=ColorA, format=vs.YUV420P8).std.AddBorders(40,40,40,40, color=ColorB)
clip = core.hist.Classic(clip)
clip = core.text.Text(clip, 'ColorRange ' + str(clip.get_frame(0).props.get("_ColorRange", None)))
clip.set_output()

Last edited by hello_hello; 26th July 2024 at 00:52.
hello_hello is offline   Reply With Quote
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 05:55.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.