Log in

View Full Version : Tivtc


Overdrive80
27th November 2019, 00:35
Hi,

Any mode for creating code below on vapoursynth:

core.avs.TDecimate(video, mode=7,rate=23.976,dupThresh= 1.3, display=False,maxndl=4)

In documentation, I didnt see rate or maxndl parameters.
vivtc.VDecimate(clip clip[, int cycle=5, bint chroma=1, float dupthresh=1.1, float scthresh=15, int blockx=32, int blocky=32, clip clip2, string ovr="", bint dryrun=0])

Thanks.

EDIT: Reason is VS report 'vapoursynth.Error: TDecimate: YV12 and YUY2 colorspaces only!'

kriNon
27th November 2019, 02:55
Are you working with a script that is YUV 4:2:0 and 8 bit?
If not then that is your issue.

It is possible to trick it into working with 16 bit samples though if that's what you're looking at.

Step 1:
Have an 8bit version of your clip. Use this as clip1 in TDecimate

Step 2:
Use core.fmtc.nativetostack16(clip) as your clip2 in TDecimate

Step 3:
Get the output.

Step 4:
use core.fmtc.stack16tonative(clip_decimated) on your output to get the 16 bit clip.


I had written a script that does this, but it was kinda quick and dirty.
Feel free to use it as a reference if it helps you though.
https://hastebin.com/akinowucur.py

Overdrive80
27th November 2019, 13:34
The problem is not that I can't make Tdecimate work, but rather there was a way to reproduce those options in VDecimate.

I use below code and run fine but my question was other:

from vapoursynth import core
import vapoursynth as vs
core.avs.LoadPlugin(path='C:/Program Files (x86)/AviSynth+/plugins64/TIVTC.dll')
core.get_plugins()

#core.std.LoadPlugin(path='C:/Users/YO/AppData/Roaming/VapourSynth/plugins64/LSMASHSource.dll')
#video = core.ffms2.Source(source='E:/LOSSLESS/LOSSLESS.mov')

video = core.lsmas.LWLibavSource('E:/LOSSLESS/LOSSLESS.mov')
#video = core.vivtc.VDecimate(video, cycle=5, chroma=True, dupthresh=1.1)
video = core.std.Trim(video, 0, 2591)

video = core.fmtc.matrix (clip=video, mat="601", col_fam=vs.YUV, bits = 16)
video = core.fmtc.resample (clip=video, css="420")
video = core.fmtc.bitdepth (clip=video, bits=8)
video = core.avs.TDecimate(video, mode=7,rate=23.976,dupThresh= 1.1, display=False,maxndl=4)

video.set_output()

Myrsloik
27th November 2019, 14:40
There's no way to perform the more exotic decimation forms in vdecimate. What's the input framerate?

Overdrive80
27th November 2019, 15:20
Input framerate is 30p fps from Web provider.

Myrsloik
27th November 2019, 20:47
Input framerate is 30p fps from Web provider.

Then the big question is why you need exactly 23.976fps output. Sounds like it'd more likely be 24fps in the first place or you have something with weird duplicates inserted.

Overdrive80
28th November 2019, 19:43
Yes, movie is known at 23.796 fps and has duplicate frames that I want remove.

But that was not the question, only I need know like emulate on vdecimate the called at Tdecimate with parameters described earlier . If it can not, then I will continue using tdecimate regardless of the advantages of vapoursynth.

Thanks.