openrndr
openrndr copied to clipboard
[VideoFFMPEGPlayer] Add playhead to track the video's progress
A playhead would help track how far along the video is. The playhead should be in seconds.
I see that VideoPlayerFFMPEG has a newFrame event, but
vp.newFrame.listen {
println(it.timeStamp)
}
seems to print only 0.0.
There's a vp.statistics but it doesn't include the last frame time. It does provide videoFramesDecoded which may be of some help, although I don't know if the system is decoding many frames before playing them. If I print that value it repeats the same numbers either 2 or 3 times (expected for a 25fps video in a 60fps environment).
I see tha VideoPlayerFFMPEG.kt triggers FrameEvent always with a hardcoded 0.0 time stamp.