We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
Page Index Toggle Pages: 1
Video capture problem (Read 1503 times)
Video capture problem
Nov 7th, 2008, 7:10pm
 
Hello all!

I'm new into Processing and I'm having some problems acquiring video from my webcam.

I'm using windows Vista 32 bits and my webcam is a Chicony USB 2.0. I already installed quick time (version later than 7) and I'm able to use the examples to play videos (loop and pixelate examples) but I can't use the ones for video capture.

I get one error message, saying: "No capture could be found, or the VDIG is not installed correctly"

quicktime.std.StdQTException[QTJava:7.5.5g],-9405=couldntGetRequiredComponent,QT.vers:7558000
at quicktime.std.StdQTException.checkError(StdQTException.java:38)
at quicktime.std.sg.SGChannel.allocate(SGChannel.java:63)
at quicktime.std.sg.SGChannel.<init>(SGChannel.java:56)
at quicktime.std.sg.VisualChannel.<init>(VisualChannel.java:41)
at quicktime.std.sg.SGVideoChannel.<init>(SGVideoChannel.java:47)
at processing.video.Capture.init(Capture.java:186)
at processing.video.Capture.<init>(Capture.java:154)
at processing.video.Capture.<init>(Capture.java:115)
at Mirror.setup(Mirror.java:45)
at processing.core.PApplet.handleDraw(PApplet.java:1372)
at processing.core.PApplet.run(PApplet.java:1300)
at java.lang.Thread.run(Unknown Source)
Error repainting line range {0,19}:
java.lang.ArrayIndexOutOfBoundsException: -1
at processing.app.syntax.KeywordMap.getSegmentMapKey(KeywordMap.java:118)
at processing.app.syntax.KeywordMap.lookup(KeywordMap.java:60)
at processing.app.syntax.CTokenMarker.doKeyword(CTokenMarker.java:263)
at processing.app.syntax.CTokenMarker.markTokensImpl(CTokenMarker.java:107)
at processing.app.syntax.TokenMarker.markTokens(TokenMarker.java:52)
at processing.app.syntax.TextAreaPainter.paintSyntaxLine(TextAreaPainter.java:613)
at processing.app.syntax.TextAreaPainter.paintLine(TextAreaPainter.java:585)
at processing.app.syntax.TextAreaPainter.paint(TextAreaPainter.java:397)
at javax.swing.JComponent.paintToOffscreen(Unknown Source)
at javax.swing.BufferStrategyPaintManager.paint(Unknown Source)
at javax.swing.RepaintManager.paint(Unknown Source)
at javax.swing.JComponent._paintImmediately(Unknown Source)
at javax.swing.JComponent.paintImmediately(Unknown Source)
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.paintDirtyRegions(Unknown Source)
at javax.swing.RepaintManager.seqPaintDirtyRegions(Unknown Source)
at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(Unknown Source)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
Exception in thread "Animation Thread" java.lang.RuntimeException: No capture could be found, or the VDIG is not installed correctly.
at processing.core.PApplet.die(PApplet.java:2158)
at processing.core.PApplet.die(PApplet.java:2167)
at processing.video.Capture.init(Capture.java:241)
at processing.video.Capture.<init>(Capture.java:154)
at processing.video.Capture.<init>(Capture.java:115)
at Mirror.setup(Mirror.java:45)
at processing.core.PApplet.handleDraw(PApplet.java:1372)
at processing.core.PApplet.run(PApplet.java:1300)
at java.lang.Thread.run(Unknown Source)

I already tried to access the VDIG website (vdig.com) and install it but the site is down...

Any help on this?

Thanks in advance!

Best regards,
Filipe
Re: Video capture problem
Reply #1 - Nov 7th, 2008, 8:22pm
 
try this:

http://www.shiffman.net/vdig/

version 101 is what you want.

F
Re: Video capture problem
Reply #2 - Nov 8th, 2008, 11:33am
 
Hello again!

Thank you for your advice. I've installed version 101 and 105 but the video I capture is not correctly displayed.

It seems deinterlaced and I cannot change the video format from SECAM to NTSC or PAL. Below my camera (Chicony USB 2.0 WDM) listing it also says composite ("composto" in portuguese)...

You have a screenshot of all this here:
http://www.fe.up.pt/~dee08007/bad_video.jpg

If I run the example for capture video (ginven in the website), as follows:

import processing.video.*;
Capture myCapture;

void setup()
{
 size(100, 100);

 myCapture = new Capture(this, width, height, 30);

 // The name of the capture device is dependent those
 // plugged into the computer. To get a list of the
 // choices, uncomment the following line
 // println(Capture.list());
 // And to specify the camera, replace "Camera Name"
 // in the next line with one from Capture.list()
 // myCapture = new Capture(this, width, height, "Camera Name", 30);
}

void captureEvent(Capture myCapture) {
 myCapture.read();
}

void draw() {
 image(myCapture, 0, 0);
}

(Using the previous code)... I'm able to see a capture good pictures, but exhibiting a very small field of view (100x100). If I increase further the capture window, to 300x300, for instance, the video I capture is again deinterlaced... :(

Any hints?

Thanks in advance!
Re: Video capture problem
Reply #3 - Nov 8th, 2008, 8:21pm
 
Hello again!

I finally can capture video from my webcam.

I achieved it using JMyron libraries.

If someone else have this problem, I hope that this can help you.

But does anyone have an idea why I was having the initial problem?

Best regards!
Page Index Toggle Pages: 1