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.

Settings for AVCHD 2.0 Progressive compliant file, playback
#85
Found the problem:
# Imports
import os
import sys
import ctypes
# Loading Support Files
Dllref = ctypes.windll.LoadLibrary("C:/Program Files/Hybrid/64bit/vsfilters/Support/libfftw3f-3.dll")
import vapoursynth as vs
core = vs.get_core()
# Import scripts folder
scriptPath = 'C:/Program Files/Hybrid/64bit/vsscripts'
sys.path.append(os.path.abspath(scriptPath))
# Loading Plugins
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/GrainFilter/AddGrain/AddGrain.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/DenoiseFilter/NEO_FFT3DFilter/neo-fft3d.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/DenoiseFilter/DFTTest/DFTTest.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/Support/EEDI3.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/ResizeFilter/nnedi3/vsznedi3.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/Support/libmvtools.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/Support/temporalsoften.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/Support/scenechange.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/Support/fmtconv.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/SourceFilter/FFMS2/ffms2.dll")
# Import scripts
import havsfunc
# source: 'C:\Users\astraj\Desktop\VHS DV avi convert\16_1.00.avi'
# current color space: YUV422P8, bit depth: 8, resolution: 720x576, fps: 25, color matrix: 470bg, yuv luminance scale: limited, scanorder: top field first
# Loading source using FFMS2
clip = core.ffms2.Source(source="C:/Users/astraj/Desktop/VHS DV avi convert/16_1.00.avi",cachefile="C:/From Hybrid/2021-04-07@14_52_32_2110.ffindex",format=vs.YUV422P8,alpha=False)
# making sure input color matrix is set as 470bg
clip = core.resize.Point(clip, matrix_in_s="470bg",range_s="limited")
# making sure frame rate is set to 25
clip = core.std.AssumeFPS(clip=clip, fpsnum=25, fpsden=1)
# Setting color range to TV (limited) range.
clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=1)
# setting field order to what QTGMC should assume (top field first)
clip = core.std.SetFrameProp(clip=clip, prop="_FieldBased", intval=2)
# Deinterlacing using QTGMC
havsfunc.QTGMC(Input=clip, Preset="Faster", TFF=True) # new fps: 50
# make sure content is preceived as frame based
clip = core.std.SetFieldBased(clip, 0)
# ColorMatrix: adjusting color matrix from 470bg to 709
# adjusting luma range to 'limited' due to post clipping
clip = core.resize.Bicubic(clip=clip, matrix_in_s="470bg", matrix_s="709", range_in=0, range=0)
# cropping the video to 704x564
clip = core.std.CropRel(clip=clip, left=8, right=8, top=0, bottom=12)
clip = core.fmtc.resample(clip=clip, kernel="spline16", w=1440, h=1080, interlaced=False, interlacedd=False)
# letterboxing 1440x1080 to 1920x1080
clip = core.std.AddBorders(clip=clip, left=240, right=240, top=0, bottom=0)
# adjusting output color from: YUV422P16 to YUV420P8 for x264Model (i420@8)
clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P8, range_s="limited")
# set output frame rate to 50.000fps
clip = core.std.AssumeFPS(clip=clip, fpsnum=50, fpsden=1)
# Output
clip.set_output()
There's a bug in the Vapoursynth script creation.
havsfunc.QTGMC(Input=clip, Preset="Faster", TFF=True) # new fps: 50
(this results in QTGMC not taking into account)
should be:
clip = havsfunc.QTGMC(Input=clip, Preset="Faster", TFF=True) # new fps: 50
-> will fix today after work.

Cu Selur
Reply


Messages In This Thread
RE: Settings for AVCHD 2.0 Progressive compliant file, playback - by Selur - 08.04.2021, 05:54

Forum Jump:


Users browsing this thread: 2 Guest(s)