Video playback process is kept alive if started from within Synchronizer

hi all,

I am using the videoplayer inside the experimental Synchronizer to read the videos resolution. this video player process seems to be kept alive, even after the synchronizer is deactivated. you can hear every video-audio track playing once, so I guess the whole video playback process is still somewhere active.

do I have to manually dispose of this videoplayer somehow?

Hm, a bit tricky. The video player wasn’t really build for this scenario. Internally it assumes that you want to play the video back and therefor much of the actual work happens asynchronously.
You’d need to wait until one of its outputs tell you that it has data, and only then you could read the size of the resulting video frame. And yes, you’d now need to tell it to quit / dispose the whole player since you’re no longer interested in playback at all.

Sure, there might be ways to hack around it, asking it over a period of time, but wondering if there is maybe a library out there which simply reads the metadata of the video file and returns it?

There are a bunch of MediaInfo wrappers available for .NET:

I wrapped one of those as quick test years ago but cannot find it anymore. This should help you getting all metadata you can think of from any multimedia file.

1 Like

thank you guys for clarifying! I am aware that my current approach is a temporary workaround, and I will switch to reading metadata in the future.