Video playback position

Started by cdub, May 17, 2022, 12:14:02 AM

Previous topic - Next topic

cdub

Using Active DJ Studio, is there a way to retrieve the current video position in frames?

Thank you!

Administrator

Hello,

at the moment the component doesn't have a method that can report the position in frames directly but you can obtain 3 different info that, through a simple proportion, could give the position in frames with a good level of approximation:
- The total video duration of the clip through the VideoPlayer.DurationGet method
- The total number of frames of the clip through the VideoPlayer.FramesNumberGet method
- The current playback position through the VideoPlayer.PositionGet method

The proportion to apply would be:

  TotalDurationInMs : TotalFrames = CurrentPosInMs : CurrentFrame

so the current frame could be calculated like this:

  CurrentFrame = (TotalFrames * CurrentPosInMs) / TotalDurationInMs

Hope this helps.

Kind regards

Severino Delaurenti
MultiMedia Soft