Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GlShaderProgram for keep fps with SpeedChangeEffect (speed < 1) #1872

Open
AlmecDoux opened this issue Nov 9, 2024 · 2 comments
Open

GlShaderProgram for keep fps with SpeedChangeEffect (speed < 1) #1872

AlmecDoux opened this issue Nov 9, 2024 · 2 comments
Assignees

Comments

@AlmecDoux
Copy link

Is there any example for implementing GlShaderProgram for Transformer to add extra frames to increase fps. There is FrameDropEffect, but it is used to drop fps. The goal is to use SpeedChangeEffect to slow down the video, but keep the fps value of the original video

@droid-girl
Copy link
Contributor

We do not have any examples to demo it.
@claincly do you have any guidance for implementation?

@claincly
Copy link
Contributor

but keep the fps value of the original video

It seems to me you want to add frames to make it slow motion while keep the duration, this increases the original FPS no?

How do you plan to interpolate frames though? Assuming you want to just interpolate two frames to create a new one in between, you could,

  • Use a texture pool in queueInputFrame() to store input frames
  • Have a shader that interpolate the frames. I think it needs to take multiple frames in and produce one frame.
  • For existing frames, pass them down using the actual frame presentation time
  • For interpolated frames, pass them down using the interpolated frames

You could take a look at DefaultFrameDroppingShaderProgram on how to deal with input frames, caching and timestamps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants