androidx / media

Jetpack Media3 support libraries for media use cases, including ExoPlayer, an extensible media player for Android
https://developer.android.com/media/media3
Apache License 2.0
1.73k stars 415 forks source link

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

Open AlmecDoux opened 2 weeks ago

AlmecDoux commented 2 weeks ago

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 commented 1 week ago

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

claincly commented 1 week ago

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,

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