LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

playing video in Labview 7.1

I cant get labview 7.1 to display/play video files using directX and WMP version 11. It seems that labview had some problems with WMP version 9 and 10 but is there any update to labview 7.1 to get WMP version 11 to work? To downgrade to WMP version 8 is not an feasible option. Is there any other way to get video to work in a VI?

 

0 Kudos
Message 1 of 13
(4,110 Views)

Hi Tudor,

 

I hope your well.

 

There is another post on the forum with alot of advice - so maybe look there.

 

Basically, microsoft changed the way WMP works, and LV was designed to work with the SDK version of WMP.

 

But, it should be possible - by using different/learning the new functions.

 

But, if its just the playing an AVI type function rather than embedding windows media player than there is an example in example finder>> Read AVI example.

 

Regards,

Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉
0 Kudos
Message 2 of 13
(4,095 Views)

I cant get that example to work, the 'old' wmp show the video just fine but not the 'new' one.

 

Where is that example 'Read AVI'? I cant find it on labview 7.1.1.
0 Kudos
Message 3 of 13
(4,067 Views)

Hi

 

I hope your well.

 

Here it is.

 

Let me know,

 

Regards,

Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉
Message 4 of 13
(4,062 Views)
It seems it want the IMAQ package and Im missing that, is IMAQ a part of the standard 7.1 labview package? If so I should have it on a cd.
0 Kudos
Message 5 of 13
(4,059 Views)
I have seen that people using mplayer to display video in labview, anyone got a example VI using mplayer? Is the video embed in the frontpanel when using mplayer?
0 Kudos
Message 6 of 13
(4,051 Views)

Hi Tudor.

 

Here is a forum with an example which doesn't use the toolkit. 

 

However, if this isn't what you wanted. Could we start afresh and state your issue and your setup (LV version etc).

 

As a point, you certainly don't need IMAQ to open AVI files. You could just open the reference and then add similar functionality to your front panel to start and stop etc like media player does. Guess if you really need/want to embed mediaplayer on your front planel.

 

Regards,

Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉
Message 7 of 13
(4,038 Views)

I used wmp and got some problems, I get a weird error code when I'm trying to set the property 'autoSize' of the wmp (old version) activeX object. The error code number is: -2146827901. If I tries to set the volyme I got a error code to, that error code is: -2147352567

 

Im posting the VI here, can anyone spot the error?

0 Kudos
Message 8 of 13
(4,018 Views)

Hi Tudor.

 

When I ran this code on my computer (with a newer version wmp) I didn't get an error. And all your controls worked.

 

What AVI file are you trying to play?

 

If the  error is being formed in the property node - maybe the file name or reference is incorrect. 

 

Have u tried just getting the AVI file to play without all the controls and resizing first off?

 

Regards,

Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉
Message 9 of 13
(4,004 Views)

I got it to work, I just removed and added the wmp controls again, weird 🙂

 

Maybe someone can help me with these 2 questions:

 

1) How do I add Icons to my buttons?

2) Is it possible to add a marker/icon to a Slide control? For example, I want to add a "bookmark" functions so I can easy see were this value of interest is on the slider. So if I find an interesting part of the movie starts at 5.2min into the movie and I want to quickly go back to that position by sliding my progressbar to that bookmark/marker on the progressbar. Can I get the position of the sliderknob in pixels in anyway? If so I could just draw my bookmark icon on that x-position. Any ideas? I attached a quick mockup

 

Best wishes, Tudor

0 Kudos
Message 10 of 13
(3,992 Views)