ni.com is currently experiencing unexpected issues.

Some services may be unavailable at this time.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Playing AVI movies in LabView

I need to play an AVI movie in Labview (5.1). I downloaded demo example code from NI's web site (long URL follows):

http://zone.ni.com/devzone/devzoneweb.nsf/opendoc?openagent&8DDD34657C3D01298625683A000B24A2&cat=9C6DF90777E5A78206256874000FA14E

This VI calls Microsoft Movieplayer as an ActiveX control and plays the movie.

It works, but I have a strange problem. It will play small movies (1-2 MB), but when I play a longer movie, the movie starts playing, plays for a few seconds, then resets itself to the beginning.

Could this be a memory problem in LabView? I have 512 MB of RAM on the machine, so certainly I have enough memory to be able to play the movie. Additionally, when I play the movie directly through Windo
ws Media Player, it plays just fine.

Any suggestions are much appreciated.

Thanks.
0 Kudos
Message 1 of 4
(3,670 Views)
Hi JNR,

the example from NI uses the Active Movie AxtiveX object. Try to use the
Windows Media Player object instead. I have alsready written a program which
has none problems with greater files, like you described.

Henrik


JNR schrieb in im Newsbeitrag:
50650000000800000053210000-991728092000@quiq.com...
> I need to play an AVI movie in Labview (5.1). I downloaded demo
> example code from NI's web site (long URL follows):
>
>
http://zone.ni.com/devzone/devzoneweb.nsf/opendoc?openagent&8DDD34657C3D0129
8625683A000B24A2&cat=9C6DF90777E5A78206256874000FA14E
>
> This VI calls Microsoft Movieplayer as an ActiveX control and plays
> the movie.
>
> It works, but I have a strange problem. It will play small movies (1-2
> MB), but when I play a longer movi
e, the movie starts playing, plays
> for a few seconds, then resets itself to the beginning.
>
> Could this be a memory problem in LabView? I have 512 MB of RAM on the
> machine, so certainly I have enough memory to be able to play the
> movie. Additionally, when I play the movie directly through Windows
> Media Player, it plays just fine.
>
> Any suggestions are much appreciated.
>
> Thanks.
0 Kudos
Message 2 of 4
(3,670 Views)
Hi

Thanks for bringing up the problem with the original movie.vi at the URL I provided. I forgot to mention in my original posting that I did come across the problem you described and contacted NI over it several months ago. They told me that there was an error in that example, and emailed me a corrected version using the Windows Media Player object, as you have suggested in your response. They said they would post the corrected version to their web site, and I assumed they had already done that, hence my question was regarding the corrected version. I did not realize that their demo example still uses the old non-working version of movie.vi - sorry for the confusion.

Anyway, the problem still remains. I have a working movie.vi from NI that uses the Media Player
object. It works fine for small movies (short duration movies, less than a minute). However, when I try to play a longer movie (8-10 minutes), it plays the first few seconds of the movie, then rewinds and resets itself to the beginning. This does not happen when I play the same movie directly in Media Player, not going through LabView. I am at a loss to understand why this is so. Is there some kind of length error checking that LabView does that Media Player does not do?

Thanks.
0 Kudos
Message 3 of 4
(3,670 Views)
Hello,

I was able to play a long AVI file (20 minutes) without issue. Are you using the latest version of Windows Media Player? You can download version 7.1 from their website. Also, are you running the latest version of Internet Explorer? Many times Microsoft will include system updates in their IE installer. The easiest way to make sure you have the latest installation of these packages, as well as other critical system updates, is to visit windowsupdate.microsoft.com ... you can click on the "Product Updates" link and install all the suggested system updates there.

If you are running Media Player 7.1, perhaps something went wrong during the installation. You can try re-installing it to make sure that isn't the problem.

Also, you're not using an evaluation o
r student copy of LabVIEW, are you? I know there are some limitations on the functionality of those versions...I am not sure if ActiveX is one of the limited features.

I hope one of these suggestions helps you solve the problem. Oh, and one more thing...you mentioned you are running LabVIEW 5.1...it probably wouldn't hurt to download and install the 5.1.1 update.

Have a pleasant day,
Darren Nattinger
Applications Engineer
National Instruments
0 Kudos
Message 4 of 4
(3,670 Views)