Usage example for VideoPlayer.externalReferenceTime

Hi,

I am looking for more info on usage for externalReferenceTime. Specifically when and how should that value should be updated and how it is handled internally.

I am synching two videos, one local and one remote, using our own functions by speed adjustments or frame skipping based on the amount of drift between the two videos.

It could be that this variable is intended to help with that, but the docs are light. So any clarifications or help would be appreciated.

Cheers,

J

1 Like

1 Like

hey there, just found this entry. I also try to sync video and (in my case) audio, but I also noticed, that there are very few information about and nearly no docs. My case and how I use it (in Update) I describe here: Link

To keep it short: with setting the timeReference to ExternalTime and setting externalReferenceTime in the Update, we should sync the video to an external clock (time ref from audio / video / etc.) - but as far as I can see, it’s working badly.

Scrubbing inside an mp4 video is not ideal. My current approach is delayed starting of each Unity instance, so each ImageGenerator gets a time to start playing which is a bit in the future. And then forego time syncing altogether (which works for my use case with videos that are not too long).