MultiMedia Soft forum

MultiMedia Soft products => Audio playback and audio management components => Topic started by: cdub on May 17, 2022, 12:14:02 AM

Title: Video playback position
Post by: cdub on May 17, 2022, 12:14:02 AM
Using Active DJ Studio, is there a way to retrieve the current video position in frames?

Thank you!
Title: Re: Video playback position
Post by: Administrator on May 17, 2022, 01:00:29 AM
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