29.97 interlaced out problem - Miranda - 23.04.2024
I keep getting an error:
Script OutputFPS (14.985) and expected fps (29.97) differ. Please create a debug file and let Selur know.
RE: 29.97 interlaced out problem - Selur - 23.04.2024
Looking at the script:
Script:
# Imports
import vapoursynth as vs
# getting Vapoursynth core
import sys
import os
core = vs.core
# Import scripts folder
scriptPath = 'C:/Program Files/Hybrid/64bit/vsscripts'
sys.path.insert(0, os.path.abspath(scriptPath))
# Loading Plugins
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/SharpenFilter/CAS/CAS.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/DenoiseFilter/HQDN3D/libhqdn3d.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/Support/libmvtools.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/LSMASHSource.dll")
# Import scripts
import G41Fun
import mvsfunc
import adjust
# source: 'M:\Tanya-IN\To Interlace Interpolate\Eye of Satan-NTSC-VHS-29.97-capture-SD-QTGMC_DeInt.mov'
# current color space: YUV422P10, bit depth: 10, resolution: 640x480, fps: 29.97, scanorder: progressive, yuv luminance scale: limited, matrix: 470bg, transfer: bt.709, primaries: bt.470 system m
# Loading M:\Tanya-IN\To Interlace Interpolate\Eye of Satan-NTSC-VHS-29.97-capture-SD-QTGMC_DeInt.mov using LWLibavSource
clip = core.lsmas.LWLibavSource(source="M:/Tanya-IN/To Interlace Interpolate/Eye of Satan-NTSC-VHS-29.97-capture-SD-QTGMC_DeInt.mov", format="YUV422P10", stream_index=0, cache=0, fpsnum=30000, fpsden=1001, prefer_hw=0)
frame = clip.get_frame(0)
# Setting detected color matrix (470bg).
clip = core.std.SetFrameProps(clip, _Matrix=5)
# Setting color transfer (709), if it is not set.
if '_Transfer' not in frame.props or not frame.props['_Transfer']:
clip = core.std.SetFrameProps(clip, _Transfer=1)
# Setting color primaries info (to 470), if it is not set.
if '_Primaries' not in frame.props or not frame.props['_Primaries']:
clip = core.std.SetFrameProps(clip, _Primaries=5)
# Setting color range to TV (limited) range.
clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=1)
# making sure frame rate is set to 29.97
clip = core.std.AssumeFPS(clip=clip, fpsnum=30000, fpsden=1001)
clip = core.std.SetFrameProp(clip=clip, prop="_FieldBased", intval=0) # progressive
# adjusting color space from YUV422P10 to RGB30 for vsLevels
clip = core.resize.Bicubic(clip=clip, format=vs.RGB30, matrix_in_s="470bg", range_s="limited")
# Color Adjustment using Levels on RGB30 (10 bit)
clip = core.std.Levels(clip=clip, min_in=64, max_in=940, min_out=64, max_out=940, gamma=0.95)
# adjusting color space from RGB30 to YUV444P10 for vsTweak
clip = core.resize.Bicubic(clip=clip, format=vs.YUV444P10, matrix_s="470bg", range_s="limited")
# Color Adjustment
clip = adjust.Tweak(clip=clip, hue=0.00, sat=1.00, cont=1.00, bright=-20, coring=True)
# adjusting color space from YUV444P10 to YUV444P8 for vsMLDegrain
clip = core.resize.Bicubic(clip=clip, format=vs.YUV444P8, range_s="limited", dither_type="error_diffusion")
# removing grain using MLDegrain
clip = G41Fun.MLDegrain(clip=clip, tr=1, rec=True, soft=[0,0,0])
# denoising using HQDN3D
clip = core.hqdn3d.Hqdn3d(clip=clip, lum_spac=0.00, chrom_spac=7.00, chrom_tmp=10.50)
# contrast sharpening using CAS
clip = core.cas.CAS(clip=clip)
# converting full-height progressive to interlaced for 'progressive to interlaced (1)'
clip = core.std.SeparateFields(clip=clip, tff=True)
clip = core.std.SelectEvery(clip=clip, cycle=4, offsets=[0, 3])
clip = core.std.DoubleWeave(clip=clip, tff=True) # resolution 640x480
clip = core.std.SelectEvery(clip=clip, cycle=2, offsets=0) # new fps: 14.985
clip = core.std.SetFrameProp(clip=clip, prop="_FieldBased", intval=2) # tff
# adjusting output color from: YUV444P8 to YUV422P10 for ProResModel
clip = core.resize.Bicubic(clip=clip, format=vs.YUV422P10, range_s="limited")
# set output frame rate to 14.985fps (top field first)
clip = core.std.AssumeFPS(clip=clip, fpsnum=15000, fpsden=1001)
# Output
clip.set_output()
you are feeding 29.97fps progressive content, but the output is 14.985fps.
That is correct (if you wanted 29.97fps interlaced output our should have doubled the frame rate), but the expected frame rate should be 14.985 fps and thus Hybrid should not complain.
=> will look at it so that Hybrid will not complain. (But I suspect you didn't want 14.985fps interlaced output,...)
Cu Selur
RE: 29.97 interlaced out problem - Selur - 23.04.2024
Can't reproduce the problem with my current dev version, send you a link for testing.
Cu Selur
RE: 29.97 interlaced out problem - Miranda - 23.04.2024
I need 29.97 interlaced output. Not sure why it is suggesting 14.985 fps? I guess I will need to interpolate 59.94?
RE: 29.97 interlaced out problem - Selur - 23.04.2024
Quote:I guess I will need to interpolate 59.94?
yes, it's simple.
If you have 30000/1001fps interlaced content, it contains 60000/1001 fields, which you would convert to 60000/1001 content using bob ideally.
If you want to go the other way around and turn progressive frames into fields you should use double the frame rate progressive content to get half that frame rate interlaced content.
So, if you feed Hybrid 30000/1001fps to Hybrid and tell it to make interlaced content out of that it will produce 15000/1001fps interlaced content.
Cu Selur
RE: 29.97 interlaced out problem - Miranda - 23.04.2024
If I set SVP/Interpolate to 59.94 I get:
Scipt OutputFPS (29.97 fps) and expected fps (59.9401) differ! Please create a debug file and let Selur know.
RE: 29.97 interlaced out problem - Selur - 23.04.2024
Did you test with the dev version?
RE: 29.97 interlaced out problem - Miranda - 23.04.2024
There is a problem with the link: The requested URL was not found on this server.
RE: 29.97 interlaced out problem - Selur - 23.04.2024
Tested the link and send it again,..
|