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.

bad FPS with SelectEvery()
#1
Hello!

When I use the SelectEvery plugin, it drops the output FPS to something that looks wrong to me. Ex: going from 29.97 to 23.976 gives a resulting 5.994 fps.

Here's the script generated by Hybrid:

# Imports
import vapoursynth as vs
# getting Vapoursynth core
core = vs.core
# source: '/Users/admin/Desktop/in.mp4'
# current color space: YUV420P8, bit depth: 8, resolution: 656x480, fps: 29.97, color matrix: 470bg, yuv luminance scale: limited, scanorder: progressive
# Loading /Users/admin/Desktop/in.mp4 using LibavSMASHSource
clip = core.lsmas.LibavSMASHSource(source="/Users/admin/Desktop/in.mp4")
# Setting color matrix to 470bg.
clip = core.std.SetFrameProps(clip, _Matrix=5)
clip = clip if not core.text.FrameProps(clip,'_Transfer') else core.std.SetFrameProps(clip, _Transfer=5)
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 29.970
clip = core.std.AssumeFPS(clip=clip, fpsnum=30000, fpsden=1001)
# adjusting frame with SelectEvery
clip = core.std.SelectEvery(clip=clip, cycle=5, offsets=[0,1,2,3])
clip = core.std.AssumeFPS(clip=clip,fpsnum=2997, fpsden=500)# new fps: 5.994
# adjusting output color from: YUV420P8 to YUV422P10 for ProResModel
clip = core.resize.Bicubic(clip=clip, format=vs.YUV422P10, range_s="limited")
# Output
clip.set_output()

The problem seems to be with the line:
clip = core.std.AssumeFPS(clip=clip,fpsnum=2997, fpsden=500)# new fps: 5.994

If I change it to fpsnum=24000 and fpsden=1001, I get a good 23.976 fps output.

I'm on mac (latest version 2022.03.20.1).

Is this a bug or do I miss something?

Thanks!!
Reply
#2
iirc. that's a bug I fixed. Smile
Will send you a link to a dev version I compiled for mac a while ago which should contain the fix.

Cu Selur
----
Dev versions are in the 'experimental'-folder of my GoogleDrive, which is linked on the download page.
Reply
#3
Ahh,... I just saw the problem when I tried to reproduce the issue. Smile
I enter:
0 1 2 3
as offsets and get:
# making sure frame rate is set to 29.970
clip = core.std.AssumeFPS(clip=clip, fpsnum=30000, fpsden=1001)
# adjusting frame with SelectEvery
clip = core.std.SelectEvery(clip=clip, cycle=5, offsets=[0, 1, 2, 3])
clip = core.std.AssumeFPS(clip=clip,fpsnum=24000, fpsden=1001)# new fps: 23.976
but, you entered
0,1,2,3
which is interpreted as one number.
Quote:Offsets:
Offsets used by SelectEvery, allowed values are between 0 and 'cycle -1'.
The offsets should be separated by spaces.
source: the tool-tip. Smile

Cu Selur
----
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)