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.

[BUG] Prores Encode just ends arbitrarily
#1
Hybrid_dev_2024.08.14-203158.exe 

Problem description:
When encoding prores, it arbitrarily finishes at any given point in the video, and the job is "100% finished". but of course, the output is cut short.

It has a very high chance of happening if i do anything in the background (like browsing, playing a video, whatever).
Please, read the 'Infos needed to fix&reproduce bugs,..'-sticky before you post about a problem.


Attached Files
.rar   screenshots.rar (Size: 732,4 KB / Downloads: 24)
Reply
#2
Encoding call:
"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"
looks fine.

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()
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
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
#3
1. preview is not cut short (with all the things activated i had in the original post). all frames are there.
   
btw: ofc i tried running the same job several times. it always quits at some different point.

2. i tried to run an encode with nothing added (no vs filter, no subs), error:
        [attachment=2669]
it confirms again a 100% finishing, but the resulting mkv file has no playable content (opens but doesn't do anything)

3. i just tried to run an encode with just smoothlevel filter, nothing else, same result... shortly after i started browsing websites, it just quit.
it ~looks~ like it's not hybrid related but prores related. is it possible that prores encoding is not stable if i have pbo2 optimisation running on the cpu cores?
[attachment=2672]

i will try another run with no cpu optimisations and report on it.
update: current encode is running stable at 38.97% with me doing all sorts of stuff in the background. it really looks like a cpu+prores issue.
Reply
#4
Does it work if you use another encoder?

HybridDebugOutput2.rar
Problem is that Hybrid tries to load the source with mencoder, then pipe to ffmpeg and then encode with ffmpeg and somewhere breaks the color format on the way.

Quote: is it possible that prores encoding is not stable if i have pbo2 optimisation running on the cpu cores?
Sure, anything is possible. Smile
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
#5
HybridDebugOutput2.rar problem (when no Synth is used), should be fixed now too.
(updated dev version)

Quote: btw: ofc i tried running the same job several times. it always quits at some different point.
this points to some ram/cpu/gpu heat or over-/underclocking issue

Any over- or underclocking can cause issues during encoding.
After building a new pc, I spend ~1week encoding different stuff, just to be sure there are no issues (especially if I overclock the system) and the cooling is adequate.
=> In general, I would recommend disabling any over- and underclocking when encoding.

Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
#6
it all went downhill.
installed ryzenmaster a new, tried some pbo2 curve optimisation and hybrid encoding kept on bluescreening during the prores encode until i reset my bios settings.
now i have to climb the ladder again until i got a stable system.
Reply
#7
Can't you simply use the default clocking?
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
#8
i reset everything, including the ram profile.
but now, instead of 5.6fps,  the same encode ran (successfully) with 4.3 ... all cores 100% on 4.38Ghz instead of somewhere at 4.59..
i'm not satisfied running my system like this.
Reply
#9
Ah, okay, but it is stable without the overclocking. Tongue
=> happy hunting for stable ram&cpu clocking Smile
----
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)