NI Home > Community > NI Discussion Forums
Reply
Member
Lord Chaos
Posts: 11
0 Kudos

Play video file on Frontpanel at a position

Hello,
 
I would like to play video in LabView 8.0, but this has to meet two conditions: First, the video has to be shown in the active X container on the frontpanel, means no extra open window for the player. The Second thing is, that it must be able to go to time position in the file and then start playing. Itried it with the Mediaplayer, but i wasn't able to fulfill the two conditions (See my post  here : http://forums.ni.com/ni/board/message?board.id=170&message.id=299242&requireLogin=False, ) so I start thinking about an alternative to Media Player and start working with Apple Quick Time and Video Lan Client Player, but I didn't got anything to start., although I was able to select the Libary in active X. 
Does anyone has an idea, how to make a video visible with quick time or vlc or even has another idea?
 
Thanks in advance!
 
Lord Chaos
Member
sebastien.durand
Posts: 15
0 Kudos

Re : Play video file on Frontpanel at a position

Hello,

I'm not sure but it may solve your problem. There's an example called AVI Read Write with data example in LabVIEW help (Toolkits -> VISION->Function->AVI Read Write with data example ) that allows tou to display an AVI file in a IMAQ Image and in which you can set the image number of the avi file you want to display. But for this I think you need VISION toolkit.

Hope this helps ...

 

Regards,

 

Sébastien DURAND

Member
Lord Chaos
Posts: 11
0 Kudos

Re: Play video file on Frontpanel at a position

Hello Sebastian,

thanks for your answer, it helps me yes and no. On the computer i am currentlx working, there is vision installed, but i would like to run the Vi in future on a computer without Vision, but for the moment that is exactly what i need. I modified it a little to get an offset for the starting point.

Again, thanks for the hint!

 

Lord Chaos

 

 

Active Participant
TWGomez
Posts: 253

Re: Play video file on Frontpanel at a position

I got media player to start at a certain position while being imbedded in an activex container....
________________________________________________________

Use the rating system, otherwise its useless; and please don't forget to tip your waiters!
using LV 2010 SP 1, Windows 7
________________________________________________________
Member
Lord Chaos
Posts: 11
0 Kudos

Re: Play video file on Frontpanel at a position

Thanks a lot, EXACTLY what I need, Thanks!
Member
Lord Chaos
Posts: 11
0 Kudos

Re: Play video file on Frontpanel at a position

Hello TWGomez,
I tried a little bit around, and i have got still a question: Is it possible to set the window size of the media player? If the media player starts, it is about 3/4 of the Front Panel, it would be nice to have it only as large as the activeX container is. It trid it with diabeling "autosizing" but it didin't help.  I looked at the microsoft msdn page and found that there are several properties like "Auto Size", but i can't find them in the MP properties in Lab VIew.  Do you have any idea how to get this property?
 
Thanks
 
Lord Chaos
Active Participant
TWGomez
Posts: 253
0 Kudos

Re: Play video file on Frontpanel at a position

[ Edited ]
You should just be able to resize the ActiveX control manually when its not running...Do you want/need the abitlity to resize it programmatically??
 
EDIT:
If you want/need to resize the activex container then right click on the terminal->create property node->bounds->all elements       and you can resize it that way, no need to resize actual media...


Message Edited by TWGomez on 04-30-2008 06:11 AM
________________________________________________________

Use the rating system, otherwise its useless; and please don't forget to tip your waiters!
using LV 2010 SP 1, Windows 7
________________________________________________________
Member
Lord Chaos
Posts: 11
0 Kudos

Re: Play video file on Frontpanel at a position

I think the problem is, that the media player plays the video in that size, in which the video is captured. I am using a video with the size 800x600. I don't want to to change the size during the program, because of the enlarged media player overlaps controls, I want to have it in the Container size...
 
Could you do me the favour and post a picture of the blockdiagram including the Bound property node? When I tried it, i was only abel to read out the elements and not to set them.
 
Thanks
 
Lord Chaos
Active Participant
TWGomez
Posts: 253
0 Kudos

Re: Play video file on Frontpanel at a position

Yeah, its fairly easy...

1. Right click on the green terminal on the block diagram

2. Select Create->Property Node->Container Bounds->All elements

3. Wire a Bounds constant (or control if you want to be able to adjust it) into that property node.

 

I suggest adjusting the bounds at the end of the process.

 

________________________________________________________

Use the rating system, otherwise its useless; and please don't forget to tip your waiters!
using LV 2010 SP 1, Windows 7
________________________________________________________
Member
Lord Chaos
Posts: 11
0 Kudos

Re: Play video file on Frontpanel at a position

Thanks for your reply

Ok, the problem that i was not able to set the hight and width, was that i used the "normal" bounds property.

But unfotunatelly that didn't solve my problem. I have attached two picutures, in the non running mode, you see the frontpanel with the active X container in whcih size i want to pay the movie, but when i run the VI, the video size enlarge up to 600x400 which is the size of movie...

Any more ideas?

 

Thanks Lord Chaos