A single freeze frame would create a 40ms delay not half a second (500ms).
Loading the input file in Hybrid, overwriting the scantype to tff, using QTGMC-Bob I see a small issue with frame 42.
Loading the output file in Hybrid, disabling the overwriting of the scantype to tff I too see a small issue with frame 42.
(Happens with both LWLibAVSource and FFMPEGSource2. And can be somewhat compensated using 'StabilizeIT'.)
In case you have a 64bit vfw decoder for the HuffYUV in your system, you can enable 'Filtering->Vapoursynth->Misc->Source->Prefer AviSource for .avi input' which will tell Hybrid to use AviSource if it finds a 64bit vfw decoder for the content. This was you can test whether it's an issue with the decoder.
I did a quick encode using:
Code:
# Imports
import vapoursynth as vs
import os
import ctypes
# Loading Support Files
Dllref = ctypes.windll.LoadLibrary("i:/Hybrid/64bit/vsfilters/Support/libfftw3-3.dll")
Dllref = ctypes.windll.LoadLibrary("i:/Hybrid/64bit/vsfilters/Support/libfftw3f-3.dll")
import sys
# getting Vapoursynth core
core = vs.core
# Import scripts folder
scriptPath = 'i:/Hybrid/64bit/vsscripts'
sys.path.insert(0, os.path.abspath(scriptPath))
# Loading Plugins
core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/DebandFilter/Flash3kDeband/flash3kyuu_deband.dll")
core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/SharpenFilter/AWarpSharp2/libawarpsharp2.dll")
core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/Support/TCanny.dll")
core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/Support/vcm.dll")
core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/Support/libtemporalmedian.dll")
core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/GrainFilter/RemoveGrain/RemoveGrainVS.dll")
core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/GrainFilter/AddGrain/AddGrain.dll")
core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/DenoiseFilter/FFT3DFilter/fft3dfilter.dll")
core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/DenoiseFilter/DFTTest/DFTTest.dll")
core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/Support/EEDI3m_opencl.dll")
core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/ResizeFilter/nnedi3/NNEDI3CL.dll")
core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/Support/libmvtools.dll")
core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/Support/scenechange.dll")
core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/Support/fmtconv.dll")
core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/MiscFilter/MiscFilters/MiscFilters.dll")
core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/DeinterlaceFilter/Bwdif/Bwdif.dll")
core.std.LoadPlugin(path="i:/Hybrid/64bit/vsfilters/SourceFilter/LSmashSource/vslsmashsource.dll")
# Import scripts
import mvsfunc
import muvsfunc
import G41Fun
import fromDoom9
import SpotLess
import autowhite
import havsfunc
# source: 'C:\Users\Selur\Desktop\sync\Sample.avi'
# current color space: YUV422P8, bit depth: 8, resolution: 720x576, fps: 25, color matrix: 470bg, yuv luminance scale: limited, scanorder: top field first
# Loading C:\Users\Selur\Desktop\sync\Sample.avi using LWLibavSource
clip = core.lsmas.LWLibavSource(source="C:/Users/Selur/Desktop/sync/Sample.avi", format="YUV422P8", stream_index=0, cache=0, prefer_hw=0)
# Setting detected color matrix (470bg).
clip = core.std.SetFrameProps(clip, _Matrix=5)
# Setting color transfer info, when it is not set
clip = clip if not core.text.FrameProps(clip,'_Transfer') else core.std.SetFrameProps(clip, _Transfer=5)
# Setting color primaries info, when it is not set
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=2)
# setting field order to what QTGMC should assume (top field first)
clip = core.std.SetFrameProp(clip=clip, prop="_FieldBased", intval=2)
# Deinterlacing using QTGMC
clip = havsfunc.QTGMC(Input=clip, Preset="Fast", TFF=True, opencl=True) # new fps: 50
# make sure content is preceived as frame based
clip = core.std.SetFieldBased(clip, 0)
# adjusting color space from YUV422P8 to RGB24 for vsAutoWhite
clip = core.resize.Bicubic(clip=clip, format=vs.RGB24, matrix_in_s="470bg", range_s="limited")
# Color Adjustment
clip = autowhite.AutoWhite(clip=clip)
# adjusting color space from RGB24 to YUV444P8 for vsSpotLess
clip = core.resize.Bicubic(clip=clip, format=vs.YUV444P8, matrix_s="470bg", range_s="limited")
clip = SpotLess.SpotLess(clip=clip, radT=1)
# stabilizing using StabilizeIT
clip = fromDoom9.StabilizeIT(clip=clip,thSCD2=140)
# cropping the video to 694x556
clip = core.std.CropRel(clip=clip, left=10, right=16, top=12, bottom=8)
# denoising using FFT3DFilter
clip = core.fft3dfilter.FFT3DFilter(clip=clip, sigma=8.00, planes=[1,2])
# denoising using mClean
clip = G41Fun.mClean(clip=clip)
# Resizing using 10 - bicubic spline
clip = core.fmtc.resample(clip=clip, kernel="spline16", w=704, h=568, interlaced=False, interlacedd=False) # resolution 704x568
# adjusting output color from: YUV444P16 to YUV422P10 for x264Model
clip = core.resize.Bicubic(clip=clip, dither_type="error_diffusion", format=vs.YUV422P10, range_s="limited")
# set output frame rate to 50fps
clip = core.std.AssumeFPS(clip=clip, fpsnum=50, fpsden=1)
# Output
clip.set_output()
and attached the result. (using QTGMC, AutoWhite, SpotLess, StabilizeIT, FFT3DFilter, mClean)
It still sounds a bit like it might be a playback issue.
AVC 4:2:2 is often not supported by Hardware decoders.
-> I also attached a YUV420 version, does the YUV420 version work better for you?
Do you see the duplicate frame if you open your reencode in Hybrid and check the Vapoursynth preview? (if yes, which frame?)
Cu Selur
Ps.: Your system isn't overclocked, is it?