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.

[HELP] Strange input PAR
#1
Hybrid is reporting an input PAR of 31266:28579

I'm trying to upscale from 720 x 576 to 1440 x 1080, and I've tried setting output to square pixels, but the resulting video is badly squeezed.

Any suggestions?
Reply
#2
No debug output -> no clue whats happening.
31266:28579=1.09402008468
My guess is that the source par got detected wrong, and it should either be 12/11 or 1150/1053, see: https://forum.selur.net/thread-597.html.
So I would suggest overwriting the Input PAR to either of those and see which is correct.
But those differences should not cause bad aspect ratio derivations.
-> would need a small sample of the source which has this effect to reproduce and recommend some proper value.
(16/15 would be another typical 4:3 PAR for PAL content.)

Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
#3
Debug below. I have tried changing the input PAR but I can't seem to get it right. Strangely the Hybrid preview looks perfect, but the resulting output file is squeezed.

link: sample clip

2023.01.06 - 11:48:34_Windows 10 Version 2009 (64bit)_2022.12.19.1 - level 9: generateScript - dual: 0, crop: 0, preview: 0, script: 1, job: 0
2023.01.06 - 11:48:34_Windows 10 Version 2009 (64bit)_2022.12.19.1 - level 9: There's no timecode in mov_a1fd7ab704c5b4b99cdf8dbb398f402f_853323747
2023.01.06 - 11:48:34_Windows 10 Version 2009 (64bit)_2022.12.19.1 - level 9: target bit depth from filtering model: 10
2023.01.06 - 11:48:34_Windows 10 Version 2009 (64bit)_2022.12.19.1 - level 9: getColorSampling for 4:2:2  yuv422p10le at 10bit
2023.01.06 - 11:48:34_Windows 10 Version 2009 (64bit)_2022.12.19.1 - level 9:  -> input&current colorSampling: YUV422P10
2023.01.06 - 11:48:34_Windows 10 Version 2009 (64bit)_2022.12.19.1 - level 9: Luminance scale: tv -> yuvPCScale: false
2023.01.06 - 11:48:34_Windows 10 Version 2009 (64bit)_2022.12.19.1 - level 9: There's no Codec in mov_a1fd7ab704c5b4b99cdf8dbb398f402f_853323747
2023.01.06 - 11:48:34_Windows 10 Version 2009 (64bit)_2022.12.19.1 - level 9: getColorSampling for i422 i422 at 10bit
2023.01.06 - 11:48:34_Windows 10 Version 2009 (64bit)_2022.12.19.1 - level 9:  -> input&current colorSampling: YUV422P10
2023.01.06 - 11:48:34_Windows 10 Version 2009 (64bit)_2022.12.19.1 - level 9: target color: YUV422P10
2023.01.06 - 11:48:34_Windows 10 Version 2009 (64bit)_2022.12.19.1 - level 9: There's no typ in mov_a1fd7ab704c5b4b99cdf8dbb398f402f_853323747
2023.01.06 - 11:48:34_Windows 10 Version 2009 (64bit)_2022.12.19.1 - level 9:  vc1: false
2023.01.06 - 11:48:34_Windows 10 Version 2009 (64bit)_2022.12.19.1 - level 9: Disabling DGDevNV incompatible format: prores
2023.01.06 - 11:48:34_Windows 10 Version 2009 (64bit)_2022.12.19.1 - level 9: dgDecNVCompatible: false
2023.01.06 - 11:48:34_Windows 10 Version 2009 (64bit)_2022.12.19.1 - level 9: vsDGDecNVAvailable: true
2023.01.06 - 11:48:34_Windows 10 Version 2009 (64bit)_2022.12.19.1 - level 9: vsUseDGDecNV: false
2023.01.06 - 11:48:34_Windows 10 Version 2009 (64bit)_2022.12.19.1 - level 9: Disabling DGDec incompatible input container!
2023.01.06 - 11:48:34_Windows 10 Version 2009 (64bit)_2022.12.19.1 - level 9: Vapoursynth tryLSMASHSource for: S:\Twemlow Project\Eve Island-no-credits-compressor-Apple ProRes 422.mov
2023.01.06 - 11:48:34_Windows 10 Version 2009 (64bit)_2022.12.19.1 - level 9:   vsPreferLSMASH: true
2023.01.06 - 11:48:34_Windows 10 Version 2009 (64bit)_2022.12.19.1 - level 9:   mp4Compatible: true
2023.01.06 - 11:48:34_Windows 10 Version 2009 (64bit)_2022.12.19.1 - level 9:   forcing CFR output: true
2023.01.06 - 11:48:34_Windows 10 Version 2009 (64bit)_2022.12.19.1 - level 9: -> using LibAvSource
2023.01.06 - 11:48:34_Windows 10 Version 2009 (64bit)_2022.12.19.1 - level 9:   getStartAndEnd(cutStartTime: 0, cutEndTime: 4991.64, selectionStartTime: 0, selectionEndTime: 4991.64, ...)
2023.01.06 - 11:48:34_Windows 10 Version 2009 (64bit)_2022.12.19.1 - level 9:   startTime: 0.00000000
2023.01.06 - 11:48:34_Windows 10 Version 2009 (64bit)_2022.12.19.1 - level 9:   endTime: 4991.64000000
2023.01.06 - 11:48:34_Windows 10 Version 2009 (64bit)_2022.12.19.1 - level 9:   -> startTime: 0, endTime: 4991.64
2023.01.06 - 11:48:34_Windows 10 Version 2009 (64bit)_2022.12.19.1 - level 9:   matchesChapter: true
2023.01.06 - 11:48:34_Windows 10 Version 2009 (64bit)_2022.12.19.1 - level 9: no Vapoursynth deinterlacer,..
2023.01.06 - 11:48:34_Windows 10 Version 2009 (64bit)_2022.12.19.1 - level 9: Interframe::call(59.9401,50)
2023.01.06 - 11:48:34_Windows 10 Version 2009 (64bit)_2022.12.19.1 - level 9: Vapoursynth script view: # Imports
import vapoursynth as vs
import os
import ctypes
# Loading Support Files
Dllref = ctypes.windll.LoadLibrary("C:/Program Files/Hybrid/64bit/vsfilters/Support/libfftw3f-3.dll")
import sys
# getting Vapoursynth core
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/ResizeFilter/nnedi3/NNEDI3CL.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/FrameFilter/Interframe/svpflow2_vs64.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/FrameFilter/Interframe/svpflow1_vs64.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/DenoiseFilter/CTMF/CTMF.dll")
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/DeblockFilter/Deblock/Deblock.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/MiscFilter/MiscFilters/MiscFilters.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/Support/EEDI3m.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/GrainFilter/RemoveGrain/RemoveGrainVS.dll")
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/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/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/LSmashSource/vslsmashsource.dll")
# Import scripts
import edi_rpow2
import interframe
import G41Fun
import mvsfunc
import lostfunc
import havsfunc
import adjust
# source: 'S:\Twemlow Project\Eve Island-no-credits-compressor-Apple ProRes 422.mov'
# current color space: YUV422P10, bit depth: 10, resolution: 720x576, fps: 25, color matrix: 170m, yuv luminance scale: limited, scanorder: bottom field first
# Loading S:\Twemlow Project\Eve Island-no-credits-compressor-Apple ProRes 422.mov using LWLibavSource
clip = core.lsmas.LWLibavSource(source="S:/Twemlow Project/Eve Island-no-credits-compressor-Apple ProRes 422.mov", format="YUV422P10", stream_index=1, cache=0, fpsnum=25, prefer_hw=0)
# Setting color matrix to 170m.
clip = core.std.SetFrameProps(clip, _Matrix=6)
clip = clip if not core.text.FrameProps(clip,'_Transfer') else core.std.SetFrameProps(clip, _Transfer=6)
clip = clip if not core.text.FrameProps(clip,'_Primaries') else 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 25
clip = core.std.AssumeFPS(clip=clip, fpsnum=25, fpsden=1)
clip = core.std.SetFrameProp(clip=clip, prop="_FieldBased", intval=1)
# Color Adjustment
clip = adjust.Tweak(clip=clip, hue=0.00, sat=0.80, cont=1.00, coring=True)
# converting interlaced to half-height progressive for filtering (vsDeSpot) (QTGMC(preset="Fast"))
clip = havsfunc.QTGMC(Input=clip, Preset="Fast", Lossless=2, TFF=False) # new fps: 50
clip = core.std.SetFrameProp(clip=clip, prop="_FieldBased", intval=0)
# adjusting color space from YUV422P10 to YUV444P16 for vsDeSpot
clip = core.resize.Bicubic(clip=clip, format=vs.YUV444P16, range_s="limited")
for i in range(5):
  clip = lostfunc.DeSpot(o=clip)
# applying delocking using Deblock
clip = core.deblock.Deblock(clip=clip)
# cropping the video to 676x554
clip = core.std.CropRel(clip=clip, left=26, right=18, top=4, bottom=18)
# adjusting color space from YUV444P16 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, chrom_spac=7.00, chrom_tmp=10.50)
# contrast sharpening using CAS
clip = core.cas.CAS(clip=clip, sharpness=0.600)
# deringing using HQDeringmod
clip = havsfunc.HQDeringmod(clip, nrmode=2, darkthr=3.0)
# adjusting color space from YUV444P8 to YUV420P8 for vsInterframe
clip = core.resize.Bicubic(clip=clip, format=vs.YUV420P8, range_s="limited")
# adjusting frame count with Interframe/SVP
clip = interframe.InterFrame(clip, Tuning="smooth", NewNum=60000, NewDen=1001, GPU=True, OverrideAlgo=1, overwriteSmooth="{rate:{num:60000,den:1001,abs:true},algo:2,mask:{area:100},scene:{mode:0}}") # new fps: 59.9401
clip = core.std.AddBorders(clip=clip, left=0, right=0, top=0, bottom=2) # add borders to archive mod 4 (NNEDI3(CL)) - 676x556
# resizing using NNEDI3CL
# current: 676x556 target: 1440x1080 -> pow: 4
clip = edi_rpow2.nnedi3cl_rpow2(clip=clip, rfactor=4) # 2704x2224
clip = core.std.CropRel(clip=clip, left=0, right=0, top=0, bottom=8) # removing borders (NNEDI3(CL)) -  2704x2216
# adjusting resizing
clip = core.fmtc.resample(clip=clip, w=1440, h=1080, kernel="lanczos", interlaced=False, interlacedd=False)
# adding Grain using AddGrain
clip = core.grain.Add(clip=clip, uvar=0.50)
# letterboxing 1440x1080 to 1920x1080
clip = core.std.AddBorders(clip=clip, left=240, right=240, top=0, bottom=0)
# converting progressive to interlaced for 'progressive to interlaced (1)'
clip = core.std.SeparateFields(clip=clip, tff=False)
clip = core.std.SelectEvery(clip=clip, cycle=4, offsets=[0, 3])
clip = core.std.DoubleWeave(clip=clip, tff=False) # resolution 1920x1080
clip = core.std.SelectEvery(clip=clip, cycle=2, offsets=0) # new fps: 29.97
clip = core.std.SetFrameProp(clip=clip, prop="_FieldBased", intval=1)
# adjusting output color from: YUV420P16 to YUV422P10 for ProResModel
clip = core.resize.Bicubic(clip=clip, format=vs.YUV422P10, range_s="limited", dither_type="error_diffusion")
# set output frame rate to 29.97fps
clip = core.std.AssumeFPS(clip=clip, fpsnum=30000, fpsden=1001)
# Output
clip.set_output()
2023.01.06 - 11:48:34_Windows 10 Version 2009 (64bit)_2022.12.19.1 - level 9: not updating vsPreview,..
Reply
#4
What do you not get right?
You can't specify the input PAR?
You can't find the right PAR?
No clue what I should look at ?

=> best share a small sample of the source which also has this strange par.
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
#5
Sample link above.
Reply
#6
Okay, input is flagged as 1.094 PAR, which isn't any of the standard PAR values.
Problem is Hybrid doesn't use this for the input PAR.
=> I'll look into it.
Setting Input PAR to 1094x1000 should work.
(ffmpeg reports: SAR 31266:28579, so that probably works too)

Found the issue, Hybirds PAR width&height value were limited to 8000 each and thus 31266:28579 is an invalid PAR. Smile

Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
#7
Will try - do I also need to force the input PAR type, or can I leave unchanged?
Reply
#8
Leave the input par type.
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
#9
Hybrid only has 4 digit options, so I can't set SAR 31266:28579

Will try setting Input PAR to 1094x1000
Reply
#10
Will send you a link to a new dev version which should fix that in a few minutes.
(btw.you should overwrite the scan order to tff)

Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)