jojje / VfrToCfr-the-other-one

AviSynth plugin that converts variable frame rate clips to constant frame rate
8 stars 1 forks source link

Avisynth vs Vapoursynth, different handling of too many timecodes,... #2

Open Selur opened 5 years ago

Selur commented 5 years ago

using with Vapoursynth (64bit):

# Imports
import vapoursynth as vs
core = vs.get_core()
# Loading Plugins
core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/Support/VFRToCFRVapoursynth.dll")
core.std.LoadPlugin(path="I:/Hybrid/64bit/vsfilters/SourceFilter/DGDecNV/DGDecodeNV.dll")
clip = core.dgdecodenv.DGSource("E:/Temp/mkv_8c6781bcb4ebff5ac6de34f1ef29892a_853323747.dgi")
clip = core.vfrtocfr.VFRToCFR(clip=clip,timecodes="E:/Temp/synthTempTimeCodes.tc", fpsnum=24000, fpsden=1001)
# making sure input color matrix is set as 470bg
clip = core.resize.Point(clip, matrix_in_s="470bg",range_s="limited")
# making sure frame rate is set to 24000/1001
clip = core.std.AssumeFPS(clip, fpsnum=24000, fpsden=1001)
# Setting color range to TV (limited) range.
clip = core.std.SetFrameProp(clip=clip, prop="_ColorRange", intval=1)
clip = core.vivtc.VFM(clip=clip, order=0, blockx=16, blocky=16)
# Output
clip.set_output()

and with Avisynth (32bit):

LoadPlugin("I:\Hybrid\32bit\AVISYN~1\DGDecodeNV.dll")
LoadPlugin("I:\Hybrid\32bit\AVISYN~1\vfrtocfr.dll")
SetFilterMTMode("DEFAULT_MT_MODE", MT_MULTI_INSTANCE)
#  input color sampling YV12
#  input luminance scale tv
DGSource(dgi="E:\Temp\mkv_8c6781bcb4ebff5ac6de34f1ef29892a_853323747.dgi",fieldop=2)
vfrtocfr(timecodes="E:\Temp\synthTempTimeCodes.tc", fpsnum=24000, fpsden=1001)
# current resolution: 720x480
# filtering
ConvertToRGB32(matrix="Rec601")
PreFetch(16)
return last

the Vapoursynth script works and the Avisynth script aborts with:

[VfrToCfr] Error, timecodes file and source clip do not contain the same number of frames!

the sadly this error message is justified, since the frame count and the time code count does differ. (extracted the time codes with mkvextract)

Both

Would be nice if the Avisynth like the Vapoursynth build could simply ignore that there are too many time codes? (may be by default or add an additional option for it)

Selur commented 5 years ago

Okay, forget that,... I used another filter in Vapoursynth,...

Selur commented 5 years ago

would still be nice if the filter could ignore the unneeded time codes ;)