Posts: 459
Threads: 107
Joined: Jul 2020
PAL DV 25fps to 29.97 1080i, interpolated etc. Crashing, files not completing etc.
Posts: 10.560
Threads: 57
Joined: May 2017
Quote:FFmpeg output: [yuv4mpegpipe @ 000001b122bd13c0] Header too large.
Seems like a problem with the Vapoursynth script.
Looking at the Vapoursynth script:
# Imports
import vapoursynth as vs
# getting Vapoursynth core
import ctypes
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 Support Files
Dllref = ctypes.windll.LoadLibrary("C:/Program Files/Hybrid/64bit/vsfilters/Support/libfftw3f-3.dll")
# 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/DenoiseFilter/FFT3DFilter/fft3dfilter.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/FrameFilter/ReduceFlicker/ReduceFlicker.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/LSMASHSource.dll")
# Import scripts
import edi_rpow2
import interframe
import havsfunc
import validate
# Source: 'M:\Kenny-IN\NewNaughty-2024-JVC-TBC.mov'
# Current color space: YUV420P8, bit depth: 8, resolution: 720x576, frame rate: 25fps, scanorder: bottom field first, yuv luminance scale: limited, matrix: 470bg, transfer: bt.709, primaries: bt.601 pal
# Loading M:\Kenny-IN\NewNaughty-2024-JVC-TBC.mov using LWLibavSource
clip = core.lsmas.LWLibavSource(source="M:/Kenny-IN/NewNaughty-2024-JVC-TBC.mov", format="YUV420P8", stream_index=0, cache=0, fpsnum=25, prefer_hw=0)
frame = clip.get_frame(0)
# Setting detected color matrix (470bg).
clip = core.std.SetFrameProps(clip=clip, _Matrix=5)
# setting color transfer (709), if it is not set.
if validate.transferIsInvalid(clip):
clip = core.std.SetFrameProps(clip=clip, _Transfer=1)
# setting color primaries info (to 470), if it is not set.
if validate.primariesIsInvalid(clip):
clip = core.std.SetFrameProps(clip=clip, _Primaries=5)
# setting color range to TV (limited) range.
clip = core.std.SetFrameProps(clip=clip, _ColorRange=1)
# making sure frame rate is set to 25fps
clip = core.std.AssumeFPS(clip=clip, fpsnum=25, fpsden=1)
# making sure the detected scan type is set (detected: bottom field first)
clip = core.std.SetFrameProps(clip=clip, _FieldBased=1) # bff
# removing flickering using ReduceFlicker
clip = core.rdfl.ReduceFlicker(clip=clip, aggressive=1)
clip = core.std.CropRel(clip=clip, left=20, right=32, top=32, bottom=10)# cropping to 668x534
# converting interlaced to full-height progressive for filtering (vsfft3d) (using: QTGMC(preset="Fast"))
clip = havsfunc.QTGMC(Input=clip, Preset="Fast", Lossless=2, TFF=False) # new fps: 50
# Making sure content is preceived as frame based
clip = core.std.SetFrameProps(clip=clip, _FieldBased=0) # progressive
# denoising using FFT3DFilter
clip = core.fft3dfilter.FFT3DFilter(clip=clip)
# applying FineDeHalo to remove halos
clip = havsfunc.FineDehalo(clip)
# adjusting frame count with Interframe/SVP
clip = interframe.InterFrame(clip, Tuning="smooth", NewNum=60000, NewDen=1001, OverrideAlgo=21, 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)) - 668x536
# resizing using NNEDI3CL
# current: 668x536 target: 1442x1080 -> pow: 4
clip = edi_rpow2.nnedi3cl_rpow2(clip=clip, rfactor=4, nns=4) # 2672x2144
clip = core.std.CropRel(clip=clip, left=0, right=0, top=0, bottom=8) # removing borders (NNEDI3(CL)) - 2672x2136
# adjusting resizing
clip = core.fmtc.resample(clip=clip, w=1442, h=1080, kernel="lanczos", interlaced=False, interlacedd=False)# before YUV420P8 after YUV420P16
clip = core.resize.Bicubic(clip=clip, format=vs.YUV444P16, range_s="limited")
# letterboxing 1442x1080 to 1920x1080
clip = core.std.AddBorders(clip=clip, left=239, right=239, top=0, bottom=0)
# converting full-height 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.SetFrameProps(clip=clip, _FieldBased=1) # bff
# adjusting output color from: YUV444P16 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 (bottom field first)
clip = core.std.AssumeFPS(clip=clip, fpsnum=30000, fpsden=1001)
# output
clip.set_output()
I see nothing that directly seems wrong to me.
# letterboxing 1442x1080 to 1920x1080
clip = core.std.AddBorders(clip=clip, left=239, right=239, top=0, bottom=0)
Should work since only the width is adjusted (not the height) and Hybrid properly converted to YUV444P16 beforehand.
=> Does the Vapoursynth Preview work properly?
Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Posts: 459
Threads: 107
Joined: Jul 2020
The preview works fine, but then when I run the file it always crashes, Exit Status 0.
Posts: 10.560
Threads: 57
Joined: May 2017
Okay, since the preview works fine, the Vapoursynth script in general should not be the problem.
Here a few things to try, to get to the bottom of the problem: - Does it work if you don't add the letterbox?
- Does it work if you limit the thread count to 1 (Filtering->Vapoursynth->Misc->Script->Limit thread count)?
- Does it work if you enable the 'Neo' option of FFT3DFilter?
Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Posts: 459
Threads: 107
Joined: Jul 2020
None of those options make a difference, it still crashes.
Posts: 10.560
Threads: 57
Joined: May 2017
10.07.2024, 19:40
(This post was last modified: 10.07.2024, 19:40 by Selur.)
Does it work if you don't crop?
Okay, then try to disable filters until you see which filter is causing the problem.
Does this only happen with this source? (Does it work if you use a source you previously handled with Hybrid?)
Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Posts: 459
Threads: 107
Joined: Jul 2020
I will try another file tomorrow.
Posts: 459
Threads: 107
Joined: Jul 2020
I switched over to SMDegrain, and it asked me to re-crop, then it worked fine.
Perhaps the cropping needed for FFT3D is more sensitive to the crop/mod size?
Posts: 10.560
Threads: 57
Joined: May 2017
Hmmm,... then the Vapoursynth Preview also should not work and throw an error.
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
|