16.08.2024, 16:56
Encoding call:
looks fine.
Hybrid expects the output to have 60046 frames, but the encoding stops after just 3661 frames.
Looking at the Vapoursynth script:
That the logo is added twice looks wrong.
But that should not reduce the length of the clip that much.
=> I'll try to reproduce the problem.
Please use the Vapoursynth Preview and check what the frame count shown there is and let me know.
In case it is short, does it show the full length of the clip if you do not apply any filters? (that I can't reproduce here, since it may be a problem with the source and the source filter)
Cu Selur
"C:\Program Files\Hybrid\64bit\Vapoursynth\vspipe.exe" "S:\temp\encodingTempSynthSkript_2024-08-16@15_55_57_5310_0.vpy" - -c y4m | "C:\Program Files\Hybrid\64bit\ffmpeg.exe" -y -noautorotate -nostdin -hwaccel auto -threads 1 -f yuv4mpegpipe -i - -an -sn -color_primaries bt709 -color_trc bt709 -colorspace bt709 -color_range tv -pix_fmt yuv422p10le -strict -1 -vsync 0 -vcodec prores_ks -profile:v 0 -vtag apco -metadata encoding_tool="Hybrid 2024.08.14.1" -aspect 3840:2160 -f mov "S:\temp\test_1_2024-08-16@15_55_57_5310_03.mov"
Hybrid expects the output to have 60046 frames, but the encoding stops after just 3661 frames.
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/Support/libimwri.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/DenoiseFilter/DFTTest/DFTTest.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/Support/libdescale.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/Support/fmtconv.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/DenoiseFilter/BilateralGPU/BilateralGPU.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/Support/libvs_placebo.dll")
core.std.LoadPlugin(path="C:/Program Files/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/LSMASHSource.dll")
# Import scripts
import edi_rpow2
import fvsfunc
import muvsfunc
import fade
import havsfunc
import validate
# Source: 'S:\youtube_upload\Franz Kafka's A Country Doctor (Inaka Isha) v2_apo8_iris2.mov'
# Current color space: YUV422P10, bit depth: 10, resolution: 3840x2160, frame rate: 48fps, scanorder: progressive, yuv luminance scale: limited, matrix: 709, transfer: bt.709, primaries: bt.709
# Loading S:\youtube_upload\Franz Kafka's A Country Doctor (Inaka Isha) v2_apo8_iris2.mov using LibavSMASHSource
clip = core.lsmas.LibavSMASHSource(source="S:/youtube_upload/Franz Kafka's A Country Doctor (Inaka Isha) v2_apo8_iris2.mov")
frame = clip.get_frame(0)
# setting color matrix to 709.
clip = core.std.SetFrameProps(clip, _Matrix=vs.MATRIX_BT709)
# setting color transfer (vs.TRANSFER_BT709), if it is not set.
if validate.transferIsInvalid(clip):
clip = core.std.SetFrameProps(clip=clip, _Transfer=vs.TRANSFER_BT709)
# setting color primaries info (to vs.PRIMARIES_BT2020), if it is not set.
if validate.primariesIsInvalid(clip):
clip = core.std.SetFrameProps(clip=clip, _Primaries=vs.PRIMARIES_BT2020)
# setting color range to TV (limited) range.
clip = core.std.SetFrameProps(clip=clip, _ColorRange=vs.RANGE_LIMITED)
# making sure frame rate is set to 48fps
clip = core.std.AssumeFPS(clip=clip, fpsnum=48, fpsden=1)
# making sure the detected scan type is set (detected: progressive)
clip = core.std.SetFrameProps(clip=clip, _FieldBased=vs.FIELD_PROGRESSIVE) # progressive
# adjusting color space from YUV422P10 to YUV444P16 for vsGLSLSaturation
clip = core.resize.Bicubic(clip=clip, format=vs.YUV444P16, range_s="limited")
with open("C:/Program Files/Hybrid/64bit/vsfilters/GLSL/parameterized/bSat.hook.glsl") as glslf:
glsl = glslf.read()
glsl = glsl.replace('#define SatFactor 2.43', '#define SatFactor 1.3')
clip = core.placebo.Shader(clip=clip, shader_s=glsl, width=clip.width, height=clip.height)
# adjusting color using SmoothLevels
clip = havsfunc.SmoothLevels(input=clip, input_low=1024, input_high=62720, output_low=0, output_high=65280, gamma=1.00, chroma=50, limiter=3, Lmode=0, protect=-1, Ecurve=0, Smode=-2, Mfactor=2, RGmode=12, useDB=False)
# adding fade-in
clip = fade.fadein(clip, 25)
# adding fade-out
clip = fade.fadeout(clip, 25)
# debanding using GradFun3
clip = fvsfunc.GradFun3(src=clip, thr=0.35, radius=12, elast=3.00, mode=3, ampo=1.00, ampn=0.00, pat=32, dyn=False, staticnoise=True, smode=5, debug=False, planes=[0,1,2])
# adding logo using vsAddLogoImage
# adjusting color space due to uneven logo resolution '933x73'
# adjusting color space from YUV444P16 to YUV444P10 for vsAddLogo
clip = core.resize.Bicubic(clip=clip, format=vs.YUV444P10, range_s="limited", dither_type="error_diffusion")
# adding 'S:\youtube_upload\logo.png' using Overlay
logo = core.imwri.Read(filename="S:/youtube_upload/logo.png", alpha=True)
alpha = core.std.PropToClip(logo)
logo = core.resize.Bicubic(clip=logo, format=clip.format.id, matrix_s="709", range_s="limited")
alpha = core.fmtc.bitdepth(clip=alpha, bits=clip.format.bits_per_sample, fulld=True)
beforeLogo = core.std.Trim(clip,last=499)
selection = core.std.Trim(clip,first=500,last=710)
afterLogo = core.std.Trim(clip,first=711)
selection = havsfunc.Overlay(base=selection, overlay=logo, mask=alpha, x=1505, y=1680)
clip = beforeLogo + selection + afterLogo
# adding logo using vsAddLogoImage
# adding 'S:\youtube_upload\logo.png' using Overlay
logo = core.imwri.Read(filename="S:/youtube_upload/logo.png", alpha=True)
alpha = core.std.PropToClip(logo)
logo = core.resize.Bicubic(clip=logo, format=clip.format.id, matrix_s="709", range_s="limited")
alpha = core.fmtc.bitdepth(clip=alpha, bits=clip.format.bits_per_sample, fulld=True)
beforeLogo = core.std.Trim(clip,last=499)
selection = core.std.Trim(clip,first=500,last=710)
afterLogo = core.std.Trim(clip,first=711)
selection = havsfunc.Overlay(base=selection, overlay=logo, mask=alpha, x=1505, y=1680)
clip = beforeLogo + selection + afterLogo
# adjusting output color from: YUV444P10 to YUV422P10 for ProResModel
clip = core.resize.Bicubic(clip=clip, format=vs.YUV422P10, range_s="limited")
# set output frame rate to 48fps (progressive)
clip = core.std.AssumeFPS(clip=clip, fpsnum=48, fpsden=1)
# output
clip.set_output()
But that should not reduce the length of the clip that much.
=> I'll try to reproduce the problem.
Please use the Vapoursynth Preview and check what the frame count shown there is and let me know.
In case it is short, does it show the full length of the clip if you do not apply any filters? (that I can't reproduce here, since it may be a problem with the source and the source filter)
Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.