1 (edited by CrendKing 10-06-2021 06:43:50)

Topic: SVP + AVSF VapourSynth Filter has frame duration problem

Hi. I'm the guy from AVSF. Thanks for adding the support of the VapourSynth filter. I was trying this new feature.

I found that once the SVP injection happens, the video plays in extremely fast pace. Even pausing the player doesn't stop the frames.

Debugging into my code, I found that after the injection, the _DurationNum and _DurationDen properties of the output frames are 0 and 1 respectively, which explains the strange behavior. If I change the code to test frameDurationNum > 0 && frameDurationDen > 0, the average script frame duration is used and I can confirm it works.

What's strange is, if I copy the relevant generated script code to my initial script and disable SVP manager, the properties are adjusted correctly.

I know the 0/1 thing is how VapourSynth represents variable fps video clip, but it's not necessarily the same for the reserved frame properties, right? Otherwise these properties are not very useful.

So can you guys reproduce the issue?

Re: SVP + AVSF VapourSynth Filter has frame duration problem

it's even more interesting - the same video works good w/o frame transformations, and immediately switches to "150 fps" after applying cropping
two scripts are different in one line only - "std.CropRel(...)"

Re: SVP + AVSF VapourSynth Filter has frame duration problem

Anyways, I'll switch to the "greater than 0" check. If you managed to fix this in the future, it should need no more fix to work.

Re: SVP + AVSF VapourSynth Filter has frame duration problem

not sure the problem is in SVP's plugin...

5 (edited by CrendKing 10-06-2021 12:28:13)

Re: SVP + AVSF VapourSynth Filter has frame duration problem

Just tried to completely turn off FRC in SVP manager, no cropping, no black bar detection, no alter size, no lighting, no OSD msg, still has the bad frame duration. Only happens after the injection.

Anything the frame got passed through has chance to alter the _DurationXXX RFP, not necessarily the svp ones. Maybe you could binary search the components to find the root cause?

Re: SVP + AVSF VapourSynth Filter has frame duration problem

I believe VpsFilterSource is missing these properties at some point

replace "VpsFilterSource" with "VpsFilterSource.text.FrameProps()" in script\generate.js and you'll see

7 (edited by CrendKing 11-06-2021 00:54:05)

Re: SVP + AVSF VapourSynth Filter has frame duration problem

OK. Looks like after SVP injection, the frame request pattern is changed to be slightly faster due to FRC. My getFrameAsync() callback doesn't wait long enough for these properties to become available before returning the source frames. The fix will be in the next version.