02-26-2019 08:49 AM
I am new to Labview and I am trying to figure out how to control a video. I have been searching around trying to find some sort of information on this or a tutorial using the controls. I found a couple examples on how to open a video which is ok. I also found a property node IWMPSettings that has a rate option. I cant find any information one how to use these controls. what I am trying to do is sink a video of a vehicle driving and would like to speed the video up as the load profile increases. if someone could point me in the direction of some good information on how to set up these controls I would appreciate it as this website and Google have been zero help.
02-27-2019 08:08 PM
Hi Shigginswi,
what I am trying to do is sink a video of a vehicle driving and would like to speed the video up as the load profile increases.
Could you elaborate on what you mean by this? It sounds like you are wanting to dynamically control the rate of the WMP. You can simply write to the rate property of the settings reference with the rate you desire while your VI is running.
Best,
David F.
Applications Engineering
National Instruments
02-28-2019 02:16 AM - edited 02-28-2019 02:29 AM
@shigginswi wrote:
[...] what I am trying to do is sink a video of a vehicle driving and would like to speed the video up as the load profile increases.[...]
This sounds more like a progress bar. Have you considered that (as it is much easier to implement)?
Please note that your question is more "what does Media Player provide as functionality over API" rather than "what is LabVIEW capable of doing"...
EDIT: I played around a bit and using Windows Media Player 12.0 i managed to change the playback speed during playback of the video.
Please note that the video plays in parallel to your vi execution and isn't by any means synchronized. In my test, i used therefore a simple wait before i modified the playback rate. Note that "rate" as a "setting" property is set to 1. This value instructs WMP to play the video with the frame rate given by the video. Increasing that value to 2 doubles the playback speed. However, most videos will most likely display glitches if you are meddling with the rate.