24.07.2020, 03:45
Except, the output video file is at "PC" range instead of "TV" range. Shoudn't the x264 output range change to "TV" if "Range Conversion" -> "full to limited (pc -> tv)" is specified on the "Color" tab for Vapoursynth?
![[Image: PNIOy86.png]](https://i.imgur.com/PNIOy86.png)
The Vapoursynth preview stays looking correct when toggling "Range Conversion" -> "full to limited (pc -> tv)" on and off.
So shouldn't this produce a "TV" range mp4 file?
![[Image: t4MV2uR.png]](https://i.imgur.com/t4MV2uR.png)
I guess I'm not understanding why it works differently in AviSynth.
The only way to get a "TV" range mp4 file (as in AviSynth), is to import at TV range and enable the "Levels" filter in Vapoursynth:
Anyways, at least we know it's not a bug!
By the way, what program did you use to take the "levels" screenshots?
![[Image: PNIOy86.png]](https://i.imgur.com/PNIOy86.png)
# Imports
import vapoursynth as vs
core = vs.get_core()
# Loading E:\USER\fin\Joga\Bjork - Joga_%1d.00x_1312x960_Gaia-HQ_png\000000.png using vsImageReader
clip = core.imwri.Read("E:/USER/fin/Joga/Bjork - Joga_%1d.00x_1312x960_Gaia-HQ_png/000000.png", firstnum=2)
clip = core.std.Trim(clip=clip, length=100)
# 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)
clip = core.resize.Point(clip, range_in_s="full", range_s="limited")
# 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()
The Vapoursynth preview stays looking correct when toggling "Range Conversion" -> "full to limited (pc -> tv)" on and off.
So shouldn't this produce a "TV" range mp4 file?
![[Image: t4MV2uR.png]](https://i.imgur.com/t4MV2uR.png)
I guess I'm not understanding why it works differently in AviSynth.
The only way to get a "TV" range mp4 file (as in AviSynth), is to import at TV range and enable the "Levels" filter in Vapoursynth:
# Color Adjustment
clip = core.std.Levels(clip=clip, min_in=0, max_in=255, min_out=16, max_out=235)
Anyways, at least we know it's not a bug!

By the way, what program did you use to take the "levels" screenshots?
