LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to read mp4 video

Hello

 

I am start working with Labview 8.20 to do a project which have to contain some videos. I already have searched in this forum some information/code examples how to play mp4 videos (or other well-know formats like avi, mpeg...), but I didn't find nothing that I think it would help me.

Could someone give me some help or example codes that I can use?

 

Thanks 

Daniela

0 Kudos
Message 1 of 13
(10,311 Views)

Use the Windows Media Player ActiveX plugin to display media on your front panel.

It can be found in the functions palette under ".NET & ActiveX > Windows Media Player".

 

Thoric (CLA, CLED, CTD and LabVIEW Champion)


0 Kudos
Message 2 of 13
(10,298 Views)

Thanks for the tip!

But sincerely I already have found that plugin on Front Panel... 

What I would like to know more is how to play it, what are the fundamental tools to play it on front panel...

As I said above, after some searches I learned that it is necessary to connect a Invoke Node or others to the Media Player plugin, and I already did it but no results... I think it's necessary more connections mainly to the video I want to play, and I'm not achieving these functions!

 

Thanks again

Daniela

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

Please perform a search. This has been asked before, and examples have been posted. If you have a specific problem after looking at the examples, then post back.

 

http://forums.ni.com/t5/forums/searchpage/tab/message?filter=location&location=Board%3A170&q=play+vi...

0 Kudos
Message 4 of 13
(10,283 Views)

Hi!

I've been awhile without working with LabView, but I've seen the link provided and found then a page that I thought it was what I was looking for. ..
However, I copied this code (which can be seen in annex) and place a sample video, but not getting results. Could be by incompatible versions of LabView? I'm using version 8.20.
I apologize if my question is basic, but as I had said, I started working with these types of programs recently and so I don't know much about it!
Thanks
Daniela
0 Kudos
Message 5 of 13
(10,244 Views)

If you are using the ActiveX container (which is what you need to use for the Windows Media Player control), then you should not use the Automation Open function, as this is automatic with the use of the container. 

 

What do you mean by "not getting results"? Does the video load? If you click on the play button does it play?

0 Kudos
Message 6 of 13
(10,237 Views)

As well as I put the program running and I click on the play button the video doesn't play.

So if I open the video normally in Windows Media Player and it plays, in LabView it should play too, right? 

0 Kudos
Message 7 of 13
(10,230 Views)

It should. If you have the actual file on disk. The code you have is a copy of the code from this Community Example. You did not change the name of the file that is being played. That example is looking for an MPEG file called "hst_1.mpg" that's in the same folder as the VI. I doubt very much that when Grant wrote the example he was able to look over 3 years into the future and determine that you would also have an MPEG file called "hst_1.mpg" in the same folder as your VI.

0 Kudos
Message 8 of 13
(10,221 Views)
0 Kudos
Message 9 of 13
(10,212 Views)

Yes, I have that mpeg file in the same folder as the VI because the Grant's example provides a ZIP file which contains the video "hst_1.mpg" so I saved it on my computer only for testing...But I have already changed to another video saved on my disk and it doesn't play on the same.

 

0 Kudos
Message 10 of 13
(10,200 Views)