LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to play a DVD from DVD-ROM using labview (play,pause,stop).

This question has been posted before, but the link to the example is outdated... How can I play, pause, and stop a DVD from a DVD drive using Windows Media Player in LabView.
Thanks.
0 Kudos
Message 1 of 13
(5,063 Views)
I'm not sure exactly how to specify the dvd-rom as the source, but this is partially what you are looking for. Play around with the properties and methods and you can get the DVD to work.
0 Kudos
Message 2 of 13
(5,058 Views)
There are some known problems with the later versions of WMP in LabVIEW 7.1. Specifically, the video may not display properly inside an ActiveX control. You should not, however, have a problem launching media player as an external application.

Here's a good reference for the methods and properties for DVD:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmplay10/mmp_sdk/dvdobject.asp

Good luck!
Charlie S.

Visit ni.com/gettingstarted for step-by-step help in setting up your system
Message 3 of 13
(5,038 Views)
Thanks Charlie.  I was kind of wondering why I heard sound but no video.  I just assumed I hadn't turned on some property yet.  This might be good to know in case I need it in the future.
0 Kudos
Message 4 of 13
(5,031 Views)
Is there any kind of a workaround using the LV 7.1 ActiveX control for Windows Media Player 10?  Alternatively, how would you control an external launch of WMP from within LV?

Scott
0 Kudos
Message 5 of 13
(4,980 Views)

I don't know if there is an another AX interface, but you can open a file in another application using the System Exec VI (Communication palette).

A more sophisticated approach can be found in LabVIEW\vi.lib\platform\Browser.llb\Open a Document on Disk.vi .


___________________
Try to take over the world!
0 Kudos
Message 6 of 13
(4,966 Views)

Please note that sometimes you only hear sound and don't see any video because the correct codec isn't installed?

If it works from within Mediaplayer (not using LabVIEW) then you're sure all the necessary codecs are installed.

0 Kudos
Message 7 of 13
(4,960 Views)
Actually, with regards to controlling an external launch of WMP from within LV, I meant controlling functions such as play, pause, etc. of WMP from within LV.

WMP10 works just fine on its own, but when controlled using ActiveX from within LV 7.1 the sound plays but no video for DVDs.  This is a drag since I'd like to use LV for this application.  WMP 9 works but won't work for my application because of some performance issues it has.

Scott
0 Kudos
Message 8 of 13
(4,950 Views)
Further clarification - I don't know about WMP9, testing was with wmv files.  Also WMP10 works fine with video from wmv files.

Scott
0 Kudos
Message 9 of 13
(4,927 Views)

Hi Scott,

I've solved a problem very similar to this using a rather sneaky workaround. Basically, the problem comes down to LabVIEW not being able to display ANY video from WMP in an ActiveX control. So, I embedded WMP in a webpage instead and then put the webpage (html) in an ActiveX control on the LabVIEW front panel. One drawback to this is that you cannot programmatically control the player directly from LabVIEW (though you can still click the controls that are part of the player embedded in the webpage). To get around this, I put some invisible html buttons tied to java script in the html code, that LabVIEW could then programmatically "click", giving the illusion that LabVIEW is controlling WMP directlly. I attached the zip below so that you can try it out, since it's way to complicated to describe in detail here.

This example uses only the regular WMP function (ie, no DVD), but you should be able to expand its functionality based on the information on MSDN: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wmplay10/mmp_sdk/dvdobject.asp

Hope that helps!

Charlie S.

Visit ni.com/gettingstarted for step-by-step help in setting up your system
0 Kudos
Message 10 of 13
(4,923 Views)