LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Windows Media Player - no video, only audio when called second time

I am using Windows Media Player version 12 - trying to use activex to play mpeg files.  Everything works great when I call player and play first movie, but when I try and play another only audio plays.  Video screen is black, status bar works ok as audio plays.  I am using Labview 8.5.1.  Any suggestions?

0 Kudos
Message 1 of 14
(5,463 Views)

If possible share your VI to understand the Issue.

 

I think the problem is in proper close, Whenever your first video end and you want to open new one close all reference and open again.

Thanks and Regards
Himanshu Goyal | LabVIEW Engineer- Power System Automation
Values that steer us ahead: Passion | Innovation | Ambition | Diligence | Teamwork
It Only gets BETTER!!!
0 Kudos
Message 2 of 14
(5,459 Views)

 

I believe you are correct with not closing properly - tried a few variations of below but same result.  any suggestions would be appreciated.

 

 

movie player.jpg

0 Kudos
Message 3 of 14
(5,440 Views)

You need to put in a close function to correlate with the green wire related to the original open of the IWMPPlayer4 object.  Make sure that happens after closing the IWMPControls object.  (Always close in reverse order of how they were opened.)

 

Be sure to wire up the error wires through the functions.  And the error wire can help be sure that all the functions execute in the correct order.

0 Kudos
Message 4 of 14
(5,436 Views)

thought it was issue with closing, but can't seem to find right combination.  no errors when running or opening/closing.  latest vi below.

 

mediaplayer.jpg

0 Kudos
Message 5 of 14
(5,422 Views)

That looks good to me.

 

It must be something else causing the problem then.

0 Kudos
Message 6 of 14
(5,420 Views)

Hi pjs8323,

 

I tried to replicate your issue using your same code and I was not able to.  I agree with Ravens Fan that the problem seems to be something else.  

 

Some questions:

1.  When you say that you try to play another, are you referring to a different video or the same one?  If it is a different one, then does the same happen with the same video?

2.  Could this be a codec related issue?  What happens when you play the first movie in media player independent of LabVIEW and then try playing the second?

 

Regards,

 

Bogdan Buricea

Bogdan Buricea
Applications Engineer
National Instruments
0 Kudos
Message 7 of 14
(5,405 Views)

1. I am referring to a different video.  I have another vi that user can select the video - it passes the path to the movie player vi.  the first movie selected plays ok, but when I go back to selection vi and pick another movie it only plays the audio. I know its not the movie itself because I can play all the movies ok as long as they are first selected.

 

2.  As long as I stop the movie player vi and restart it will always play movies ok - it's only when I go back to selection vi and then back to movie player that I have an issue.

 

FYI, I am using Windows 7 and Labview 8.5.1, there was some suggestion that that may be an issue? 

0 Kudos
Message 8 of 14
(5,399 Views)

Hi pjs8323,

 

Is it possible to zip your code and post it? I'd like to take a look at your calling vi and try to run it on my machine.  

 

My searching has not revealed any known issues with Windows 7 and LabVIEW 8.5.1. 

 

I suspect that it's either a weird media player codec issue or an issue with your calling VI, but i'm not sure.

 

Regards,

Bogdan Buricea

Bogdan Buricea
Applications Engineer
National Instruments
0 Kudos
Message 9 of 14
(5,392 Views)

Bogdan,

 

attached are two vi's - test movie player is used to select a movie (I am using MPEG), then calls the movie player.  Thanks for the help.

Download All
0 Kudos
Message 10 of 14
(5,373 Views)