RenderHeads/UnityPlugin-AVProMovieCapture

[Question] Getting duration of video?

artoonie opened this issue · 2 comments

AVPro Movie Capture Version

5.2.0

Which platform is your question for?

iOS, Android

Your question

How can I get the true duration of the video? Not the number of encoded frames * fps, but, the timestamp of the last frame minus the first frame?

I currently calculate this based on Start and Stop time, but that can be off by a few frames. I'm hoping for something that's almost exactly equal to AVProVideo's MediaPlayer.Info.GetDuration() without using AVProVideo for this.

Hi @artoonie,

I'm afraid there isn't a way to do that. It looks like it would be quite tricky to do as there are a few variables to consider. Its something that we can look at implementing in the future, but its unlikely to be any time soon.

With AVPro Video, duration is just part of the information that you get when opening the video file.

Gotcha, will use AVProVideo and lazily update the metadata if we detect it's off.
Thanks for the quick response! Would appreciate this eventually getting in to AVPro Movie Capture to avoid the memory hit of opening a large video file, but I understand it's low priority.