LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Windows Media Player only shows image once

Good Evening,

   I'm having a problem that I have seen talked about, but after a couple of hours on these boards, haven't found an answer to. I am running a test where the unit under test captures a few seconds of video in .avi format which is ftp'd to my test system. When the transfer occurs my program is supposed to display this video and the test operator is supposed to view it and indicate whether the video and sound were good or not. Well the first time the program is run everything works well. But on subsequent runs, unless the test system is rebooted, the Windows Media Player runs, the sound plays, but the screen is black. I am running WMP v10 here on my development machine, v11 on the target machine, the LabVIEW is 8.5.1. It is causing me real grief, the project is due to be finished and this is one of the remaining, drive me crazy, problems.

 

Thanks,

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



Download All
0 Kudos
Message 1 of 8
(3,558 Views)
On my system I couldn't play the video at all with WMP, which to me, points to a codec problem. I've always had problems with WMP playing AVI files. Personally, I think WMP is a piece of crap, but that's just my opinion. Perhaps an alternate player, such as VideoLAN may be more reliable? I know that I was able to play the video with that program.
0 Kudos
Message 2 of 8
(3,531 Views)

LV_Pro wrote:

Good Evening,

   I'm having a problem that I have seen talked about, but after a couple of hours on these boards, haven't found an answer to. I am running a test where the unit under test captures a few seconds of video in .avi format which is ftp'd to my test system. When the transfer occurs my program is supposed to display this video and the test operator is supposed to view it and indicate whether the video and sound were good or not. Well the first time the program is run everything works well. But on subsequent runs, unless the test system is rebooted, the Windows Media Player runs, the sound plays, but the screen is black. I am running WMP v10 here on my development machine, v11 on the target machine, the LabVIEW is 8.5.1. It is causing me real grief, the project is due to be finished and this is one of the remaining, drive me crazy, problems.

 

Thanks,


 

Mike told me yesterday about an issue with FTP working poorly and only recovers after a reboot. Are you sure the FTP opeartions are working correctly?

 

I'll see if I can get Mike to reply.

 

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 3 of 8
(3,525 Views)

Hey Little Put;

 

The problem doesn't seem to ba an FTP issue as the image you attached played fine (once I downloaded and installed the DivX plugin). Beyond that, I was able to duplicate your issue. Are you sure you are using the thing correctly? Another issue I noticed uis that when loaded the control seems to remember the last video played and replays it.

 

Mike...

 

PS: Hope Big Put is doing well. Tell him Mike Jr got the branch assignment he was hoping for -- GO ARMOR!


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 4 of 8
(3,512 Views)

Follow up:

 

Noticed that the video starts playing as soon as you write the URL property. Make the "Check Video" event write the path to the video to the URL property and then go into a loop that polls the state of the playState Property until it equals 1. When it does, write a null string to the URL property. Take out all the control operations like play and stop.

 

Mike...


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 5 of 8
(3,505 Views)

Hi All, from a hotel in Erie, PA

     Well Mike, I've tried your technique, but, alas, no go. Second run of the video results in sound, but no video. Ironically, if I just put the Set URL in a vi with the appropriate path stuff and ActiveX control it plays every time. Is something lost within the event structure? Argh!!!

 

     Col. Monroe is well, still teaching the computer skills class to the elder folks (of course, at 86 there aren't too many that are older!), will let him know 'bout your son.

 

Ben, 

   The ftp part seems to be ok, I'm using WinSCP from a sysexec call to automate the login, password, etc. I have to use it more than once as I initially send the UUT's test program and a support file to it, then later copy the video file back. I have had an issue on my end where I am unable to delete the previous file on my end, not sure what is up with that. When that happens my program isn't able to copy the file properly, but that isn't this problem. This one is trying to play the same avi file more than once from within this vi. Annoying!

 

Putnam

Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



0 Kudos
Message 6 of 8
(3,466 Views)

Can you post a screen shot of the code that isn't working?

 

Mike...

 

BTW: I did my testing 8.6


Certified Professional Instructor
Certified LabVIEW Architect
LabVIEW Champion

"... after all, He's not a tame lion..."

For help with grief and grieving.
0 Kudos
Message 7 of 8
(3,447 Views)

Now I know how the young programmer I'm working with feels, he is 10 1/2 hrs later, timezone wise, so anything I find he can't respond to until the next day, and it is Friday afternoon for him.

Well I tried to utilize the "fact" that I seem to have found, which is that a simple Windows Media Player call, no event structures, etc. seem(ed) to run every time. It seemed to run every time even when adding the status checking loop suggested by Mike, so I decided to put it into a sub-vi that is called by my program and placed into a sub-panel, so that I don't loose its needed functionality. Why would it appear to run reliably in a simple sub-vi, but not when in one with any structure? I pass the reference via a shift register, but run it twice and the second time no vidoe, just sound. Well, I think it still runs, although a late run before leaving the plant may/may not have been successful, the problem being that it takes several minutes to get to that part of the program, even if I take everything out of my test script other than the UUT startup part, so not sure. Ironically, trying to run just the relevant code on my laptop isn't always successful.  Smiley Sad 

     But, assuming that I do get it running (or that it is already), I have yet another question regarding running vi's in sub-panels in code that has been "compiled" into a .exe. If it is in the .exe , how do I resolve the vi's path, or does it have to reside externally to the .exe and get called?

 

I've attached the code for both (v8.5.1), as well as a sample video file. Won't be able to see any responses until this evening, not connectivity onsite at the customer's, also have a 5 hour drive home today. Using Windows Media Player 10 here , 11 at customer's

Message Edited by LV_Pro on 11-14-2008 07:32 AM
Putnam
Certified LabVIEW Developer

Senior Test Engineer North Shore Technology, Inc.
Currently using LV 2012-LabVIEW 2018, RT8.5


LabVIEW Champion



Download All
0 Kudos
Message 8 of 8
(3,412 Views)