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.

Picture Crop Side by Side
#17
Using those settings I get:
# Imports
import vapoursynth as vs
# getting Vapoursynth core
import ctypes
import sys
import os
core = vs.core
# Import scripts folder
scriptPath = 'F:/Hybrid/64bit/vsscripts'
sys.path.insert(0, os.path.abspath(scriptPath))
# Loading Support Files
Dllref = ctypes.windll.LoadLibrary("F:/Hybrid/64bit/vsfilters/Support/libfftw3f-3.dll")
# Loading Plugins
core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/GrainFilter/RemoveGrain/RemoveGrainVS.dll")
core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/GrainFilter/AddGrain/AddGrain.dll")
core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/DenoiseFilter/DFTTest/DFTTest.dll")
core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/DenoiseFilter/NEO_FFT3DFilter/neo-fft3d.dll")
core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/Support/EEDI3m_opencl.dll")
core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/ResizeFilter/nnedi3/NNEDI3CL.dll")
core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/Support/libmvtools.dll")
core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/Support/scenechange.dll")
core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/Support/fmtconv.dll")
core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/MiscFilter/MiscFilters/MiscFilters.dll")
core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/DeinterlaceFilter/Bwdif/Bwdif.dll")
core.std.LoadPlugin(path="F:/Hybrid/64bit/vsfilters/SourceFilter/DGDecNV/DGDecodeNV.dll")
# Import scripts
import havsfunc
# source: 'G:\TestClips&Co\files\MPEG-4 H.264\00029_avc_1080p-ac3-2.mts'
# current color space: YUV420P8, bit depth: 8, resolution: 1920x1080, fps: 29.97, color matrix: 709, yuv luminance scale: limited, scanorder: top field first
# Loading G:\TestClips&Co\files\MPEG-4 H.264\00029_avc_1080p-ac3-2.mts using DGSource
clip = core.dgdecodenv.DGSource("J:/tmp/mts_c2e3ea38779670e12a8380059b94dc0a_853323747.dgi",fieldop=0)# 29.97 fps, scanorder: top field first
# Setting detected color matrix (709).
clip = core.std.SetFrameProps(clip, _Matrix=1)
# Setting color transfer info (709), when it is not set
clip = clip if not core.text.FrameProps(clip,'_Transfer') else core.std.SetFrameProps(clip, _Transfer=1)
# Setting color primaries info (), when it is not set
clip = clip if not core.text.FrameProps(clip,'_Primaries') else core.std.SetFrameProps(clip, _Primaries=1)
# 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=2) # tff
original = clip
# Deinterlacing using QTGMC
clip = havsfunc.QTGMC(Input=clip, Preset="Faster", TFF=True, opencl=True) # new fps: 59.94
# Making sure content is preceived as frame based
clip = core.std.SetFrameProp(clip=clip, prop="_FieldBased", intval=0) # progressive
# Deinterlacing using QTGMC
original = havsfunc.QTGMC(Input=original, Preset="Faster", TFF=True, opencl=True) # new fps: 59.94
# Making sure content is preceived as frame based
original = core.std.SetFrameProp(clip=original, prop="_FieldBased", intval=0) # progressive
clip = core.std.CropRel(clip=clip, left=30, right=30, top=30, bottom=30)# cropping to 1860x1020
original = core.std.CropRel(clip=original, left=30, right=30, top=30, bottom=30)# cropping to 1860x1020
# letterboxing 1860x1020 to 1920x1080
clip = core.std.AddBorders(clip=clip, left=30, right=30, top=30, bottom=30)
# letterboxing 1860x1020 to 1920x1080
original = core.std.AddBorders(clip=original, left=30, right=30, top=30, bottom=30)
# adjusting output color from: YUV420P8 to YUV420P10 for x265Model
original = core.resize.Bicubic(clip=original, format=vs.YUV420P10, range_s="limited")
# adjusting output color from: YUV420P8 to YUV420P10 for x265Model
clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P10, range_s="limited")
original = core.text.Text(clip=original,text="Original",scale=2,alignment=7)
clip = core.text.Text(clip=clip,text="Filtered",scale=2,alignment=7)
stacked = core.std.StackHorizontal([original,clip])
# set output frame rate to 59.94fps (progressive)
stacked = core.std.AssumeFPS(clip=stacked, fpsnum=60000, fpsden=1001)
# Output
stacked.set_output()
[Image: grafik.png]
Which is what I expected.

Source gets cropped to 1860x1020, resize does nothing since it's limited by "Limit Resize to crop resolution" and can only downscale, letterbox adds the borders back.

Cu Selur
Reply


Messages In This Thread
Picture Crop Side by Side - by ToiletDuck - 07.12.2023, 05:38
RE: Picture Crop Side by Side - by Selur - 07.12.2023, 06:18
RE: Picture Crop Side by Side - by Bartoloni - 07.12.2023, 12:29
RE: Picture Crop Side by Side - by Selur - 07.12.2023, 13:36
RE: Picture Crop Side by Side - by ToiletDuck - 07.12.2023, 16:38
RE: Picture Crop Side by Side - by Selur - 07.12.2023, 16:51
RE: Picture Crop Side by Side - by ToiletDuck - 07.12.2023, 16:53
RE: Picture Crop Side by Side - by Selur - 07.12.2023, 17:02
RE: Picture Crop Side by Side - by Selur - 07.12.2023, 17:20
RE: Picture Crop Side by Side - by ToiletDuck - 07.12.2023, 19:10
RE: Picture Crop Side by Side - by Selur - 07.12.2023, 19:12
RE: Picture Crop Side by Side - by ToiletDuck - 07.12.2023, 19:19
RE: Picture Crop Side by Side - by Selur - 07.12.2023, 19:24
RE: Picture Crop Side by Side - by ToiletDuck - 07.12.2023, 19:31
RE: Picture Crop Side by Side - by Selur - 07.12.2023, 19:39
RE: Picture Crop Side by Side - by ToiletDuck - 07.12.2023, 19:41
RE: Picture Crop Side by Side - by Selur - 07.12.2023, 20:32
RE: Picture Crop Side by Side - by ToiletDuck - 08.12.2023, 02:06
RE: Picture Crop Side by Side - by Selur - 08.12.2023, 04:26
RE: Picture Crop Side by Side - by ToiletDuck - 08.12.2023, 15:31
RE: Picture Crop Side by Side - by Selur - 09.12.2023, 10:38
RE: Picture Crop Side by Side - by ToiletDuck - 09.12.2023, 14:22
RE: Picture Crop Side by Side - by Selur - 10.12.2023, 09:34
RE: Picture Crop Side by Side - by ToiletDuck - 10.12.2023, 17:56
RE: Picture Crop Side by Side - by Selur - 10.12.2023, 18:11
RE: Picture Crop Side by Side - by ToiletDuck - 10.12.2023, 18:45
RE: Picture Crop Side by Side - by Selur - 10.12.2023, 19:06
RE: Picture Crop Side by Side - by ToiletDuck - 10.12.2023, 19:10
RE: Picture Crop Side by Side - by Selur - 10.12.2023, 19:15
RE: Picture Crop Side by Side - by ToiletDuck - 10.12.2023, 19:20

Forum Jump:


Users browsing this thread: 4 Guest(s)