LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Continuous screen capture in avi format

Hi,

 

I need to continuously capture a test screen using Labview.

 

The vi used is attached alongwith.

 

However,my test is a webpage.So this is what I do.

 

1.Run the VI

2.Select AVI File name

3.Press "start recording"

4.Now open the webpage and attempt the test

 

What I want is the test performance being recorded and saved as an avi file.However,the moment webpage is opened,vi shows an error stating:"Error -1074396160 occurred at IMAQ ClipboardToImage".

 

How can I correct this?

 

0 Kudos
Message 1 of 6
(3,898 Views)

You forgot to attach your VI! 🙂


LabVIEW Champion, CLA, CLED, CTD
(blog)
0 Kudos
Message 2 of 6
(3,853 Views)
0 Kudos
Message 3 of 6
(3,834 Views)

Did you ever solve this problem? I am seeing the exact same issue now.

0 Kudos
Message 4 of 6
(2,670 Views)

I am not quite sure what the OP was after. If you want to do a screen capture and save the screen capture to a movie file I can think of two options:

 

- I remember seeing that LabVIEW have hooks into the windows screen print functionality. You could do a screen print every 100ms for example and write that as a frame in an avi file.

 

- Alternatively, an my prefered option, would be to use ffMPEG.(You can download executables for Windows here)

You can call this ffmpeg using the command line, so to call it from your LabVIEW Software you can use the System Exec function. 

 

You would need a command along the lines of "ffmpeg.exe -f gdigrab -i desktop -framerate 30 out.avi"

0 Kudos
Message 5 of 6
(2,657 Views)

Thanks. My goal was not actually to do screen capture to a movie, but continuous screen capture to be able to get a live histogram of an image captured in another non-LabVIEW application. I ran into the same error code mentioned by the OP when using the IMAQ ClipboardToImage vi. The error code has the unhelpful explanation "System Error" but it looks like it is probably related to trying to execute when the contents of the clipboard are missing or maybe in flux. I found that if I included a wait state between the PrintScreen and the ClipboardToImage steps, I could reduce or eliminate this issue. In the end, however, to get it working reliably I had to make the wait long enough that it made the frame rate too slow, so I reverted to a snapshot approach rather than a live histogram.

0 Kudos
Message 6 of 6
(2,648 Views)