From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
10-01-2016 02:41 PM - edited 10-01-2016 02:46 PM
Hi Guys,
I have searched the forum and other parts of the internet for a solution for an annoying problem with the ActiveX version of Windows Media Player (WMP).
If you embed WMP in the front panel and give the control a certain size, e.g. 800x600 and play a video with different dimensions (e.g. 320x240) the control will resize automatically.
The only 'workaround' I found is to regularly (every 50 ms or so) use a property node to resize the WMP-control.
I have attached an example of the problem below.
Apparently I'm not alone as there are more people having the same issue and it's still present in LabVIEW 2016. A couple of threads in this forum:
http://forums.ni.com/t5/LabVIEW/windows-media-player-resizing-issue/m-p/3321498
http://forums.ni.com/t5/LabVIEW/Windows-Media-Player-size/td-p/1310251/page/2
And one from Stackoverflow: http://stackoverflow.com/questions/3731828/why-my-embedded-video-resizes-automatically
However, after all these years nobody has found a working solution yet. So my questions are:
- Is there a solution for the WMP resize problem in LabVIEW?
- Has anybody ever tried an alternative embedded video player (ActiveX or .NET) that supports streaming video?
I have tried to get Viscomsoft Movie Player (http://www.viscomsoft.com/products/movieplayer) to work, but I couldn't even find the ActiveX control in LabVIEW.
The X360 Multiple Video Player (http://www.x360soft.com/products/multivideoplayer/) has a virus according to my scanner?!
The VisioForge Media Player (https://www.visioforge.com/media-player-sdk.html) does work for video files that are stored locally, but I couldn't get streaming to work since the documentation is very minimalistic.
Thank you very much for your help.
Paul
10-02-2016 11:15 AM
@Perreijn wrote:Hi Guys,
I have searched the forum and other parts of the internet for a solution for an annoying problem with the ActiveX version of Windows Media Player (WMP).
If you embed WMP in the front panel and give the control a certain size, e.g. 800x600 and play a video with different dimensions (e.g. 320x240) the control will resize automatically.
The only 'workaround' I found is to regularly (every 50 ms or so) use a property node to resize the WMP-control.
I have attached an example of the problem below.
Apparently I'm not alone as there are more people having the same issue and it's still present in LabVIEW 2016. A couple of threads in this forum:
http://forums.ni.com/t5/LabVIEW/windows-media-player-resizing-issue/m-p/3321498
http://forums.ni.com/t5/LabVIEW/Windows-Media-Player-size/td-p/1310251/page/2And one from Stackoverflow: http://stackoverflow.com/questions/3731828/why-my-embedded-video-resizes-automatically
However, after all these years nobody has found a working solution yet. So my questions are:
- Is there a solution for the WMP resize problem in LabVIEW?
- Has anybody ever tried an alternative embedded video player (ActiveX or .NET) that supports streaming video?
I have tried to get Viscomsoft Movie Player (http://www.viscomsoft.com/products/movieplayer) to work, but I couldn't even find the ActiveX control in LabVIEW.
The X360 Multiple Video Player (http://www.x360soft.com/products/multivideoplayer/) has a virus according to my scanner?!
The VisioForge Media Player (https://www.visioforge.com/media-player-sdk.html) does work for video files that are stored locally, but I couldn't get streaming to work since the documentation is very minimalistic.
Thank you very much for your help.
Paul
I've read some very vague things about Windows Media Player and resizing in general. It would appear that issues with WMP and resizing (whether it is resizing by itself or not resizing when asked to) is an issue not confined to LabVIEW.
10-04-2016 04:33 AM
Hello Bill,
Thank you for your reply. I agree that Windows Media Player itself leaves a lot to be desired, has issues and therefore the resize problem also occurs in other programming languages.
However, in other languages you can apparently circumvent the problem by changing the classid of the embedded object. In the Stackoverflow thread somebody more or less solved the problem by changing classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" to classid="clsid:05589FA1-C356-11CE-BF01-00AA0055595A". This solution is similar to this example: https://msdn.microsoft.com/en-us/library/aa235212(v=vs.60).aspx.
Also, in C# you can set the uiMode to 'none' and heavily customize the player's behaviour. Doing this in LabVIEW won't work.
I might solve it by embedding the player in a temporary webpage and show that webpage in an embedded Internet Explorer window. But that is an ugly solution.
There has to be an easier way of playing videos in LabVIEW, maybe somebody has experience with a (3rd party) .NET media player?
Paul