17.07.2020, 23:36
I know you're away but I found some issues with image streams and lossless encoding and if I don't post while this is fresh in my head I'm going to lose it.
Not sure if this is a bug or expected behavior.
I have an image stream of PNG files that were processed from a source that has a Luma Range of Limited/TV.
I import with the following settings:
In AviSynth preview, these behave as expected and look the same as the source.
But in Vapoursynth preview, they are different than the source (source is on the left):
If I add the following VapourSynth filter:
That seems to fix it and it now looks correct (source is on the left):
Is that expected behavior, or a bug? What's weird, is that even though that filter is changing the levels from 0 to 16, 100% black pixels remain black. Running the Levels filter in AviSynth lightens 100% black pixels.
Here's a zip of the image stream:
https://www67.zippyshare.com/v/a3vg0LOZ/file.html
Not sure if this is a bug or expected behavior.
I have an image stream of PNG files that were processed from a source that has a Luma Range of Limited/TV.
I import with the following settings:
In AviSynth preview, these behave as expected and look the same as the source.
But in Vapoursynth preview, they are different than the source (source is on the left):
Code:
# Imports
import vapoursynth as vs
core = vs.get_core()
# Loading E:\USER\fin\Joga\ImgStrmVStest\%06d.png using vsImageReader
clip = core.imwri.Read("E:/USER/fin/Joga/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 TV (limited) range.
clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=1)
# adjusting output color from: RGB24 to YUV420P8 for x264Model (i420)
clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P8, matrix_s="709", range_s="limited")
# Output
clip.set_output()
If I add the following VapourSynth filter:
That seems to fix it and it now looks correct (source is on the left):
Code:
# Imports
import vapoursynth as vs
core = vs.get_core()
# Loading E:\USER\fin\Joga\ImgStrmVStest\%06d.png using vsImageReader
clip = core.imwri.Read("E:/USER/fin/Joga/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 TV (limited) range.
clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=1)
# Color Adjustment
clip = core.std.Levels(clip=clip, min_in=0, max_in=255, min_out=16, max_out=235)
# adjusting output color from: RGB24 to YUV420P8 for x264Model (i420)
clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P8, matrix_s="709", range_s="limited")
# Output
clip.set_output()
Is that expected behavior, or a bug? What's weird, is that even though that filter is changing the levels from 0 to 16, 100% black pixels remain black. Running the Levels filter in AviSynth lightens 100% black pixels.
Here's a zip of the image stream:
https://www67.zippyshare.com/v/a3vg0LOZ/file.html