libgdx / gdx-video

A libGDX cross platform video rendering extension
Apache License 2.0
145 stars 50 forks source link

Rewind / forward is supported? #70

Open roiniti opened 3 years ago

roiniti commented 3 years ago

It is possible to rewind / forward a video, if not this will be a future feature or it's even possible tto be inplemented?

SimonIT commented 3 years ago

Going to a specific timestamp would be straight forward for android seekTo and gwt setCurrentTime, but I have no clue for desktop

dasisdormax commented 11 months ago

iOS shouldn't be a problem either.

On desktop / with FFmpeg, we would need to make it ourselves. We could call av_seek_frame(formatContext, videoStreamIndex, timestamp, AVSEEK_FLAG_BACKWARD); to get to the last keyframe before the selected timestamp, then decode forward and discard frames until we're there. That second part would be the more difficult thing to get working right.