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
webcam applet ? (Read 5074 times)
webcam applet ?
Mar 30th, 2009, 4:36pm
 
Hi

Is it possible to run a webcam applet ('m using shiffman's textmirror example http://www.learningprocessing.com/examples/chapter-17/example-17-4/  and i exported it, but the applet does not load..)

Im running this just on a local server, its not going onto the internet, but i would like to put it on a web page.





Many thanks
K

ps. this has been posted on the Programs board too, i realised after that this  board is more suitable...
hopefully thats okay..or i can delete the other thread.
Re: webcam applet ?
Reply #1 - Mar 31st, 2009, 4:45am
 
To access the webcam from a webpage, no matter if it's on a local network or not, you'll have to sign the applet: http://processing.org/hacks/hacks:signapplet
Re: webcam applet ?
Reply #2 - Apr 1st, 2009, 4:55pm
 
ugh i tried signing it but did not get anywhere with it.  I'm on a mac.

in terminal im typing this in one after the other

cd ~/Desktop/appletfolder/applet
type keytool -genkey -keystore pKeyStore -alias p5geek
type keytool -selfcert -keystore pKeyStore -alias p5geek
jarsigner -keystore pKeyStore appletfolder.jar p5geek
Upload your applet

I assume when it asks for keystore password i was just meant to type the 'jarsigner -keystore pKeyStore appletfolder.jar p5geek
' in ?

it usually gives me nothing or tells me the password has been tampered with..or something along those lines..

*confused*


thanks..
Re: webcam applet ?
Reply #3 - Nov 18th, 2009, 10:18am
 
I am getting this same error. I'm trying to sign three jar files: core.jar, webcam.jar, and video.jar. I can create a PKeyStore file using the hack but I can't sign the other jar files because of this password error.
Re: webcam applet ?
Reply #4 - Feb 17th, 2010, 4:17am
 
Hi,

I'm trying to get this to work too.
I'm working with a very simple example just to display the cam.

I guess i succesfully signed all my jars (since i'm using libraries, it can not compile into 1 single jar) because when i load the applet in my browser, i got some message about untrusted certificate, i accepted of course.
(i signed all jar files in the applet/ directory with the same key, is that ok ?)

Even i accept the untrusted certificate, the applet remains white and nothing happens... The cam (integrated iSight) don't even startup (greenlight).

I'm on MAC OSX 10.5
Any idea ? any working example ?
Re: webcam applet ?
Reply #5 - Feb 25th, 2010, 6:35pm
 
I'm getting the exact same error as hexenez: I finally manage to sign my applet, I run it online and accept the certificate, and then I still get a white screen with a red X in the corner.  Anyone know how I can fix this? Thanks very much for any help!
Re: webcam applet ?
Reply #6 - Apr 7th, 2010, 2:14am
 
The issue seems to be with the Mac's here and the newer versions of OSX. Cross referencing this problem with another thread, I'm also hitting this issue: Depending what browser you are in, you hit the different issues at different times: Firefox seems to jump straight to the " java.lang.NoClassDefFoundError: Could not initialize class quicktime.QTSession". Where Safari first gives the unsigned class issue first (signing jumps to this QTSession issue).

To solve the QTSession not found, the issue seems to be that the Java Preferences have to be set to use the 32bit version over the 64 bit version, which then leads us straight onto the real issues: Unsatisfied link errors.

Code:
java.lang.reflect.InvocationTargetException
at java.awt.EventQueue.invokeAndWait(EventQueue.java:1033)
at quicktime.QTSession.<clinit>(QTSession.java:94)
at processing.video.Capture.init(Capture.java:167)
at processing.video.Capture.<init>(Capture.java:154)
at processing.video.Capture.<init>(Capture.java:115)
at TestSketch.setup(TestSketch.java:58)
at processing.core.PApplet.handleDraw(PApplet.java:1571)
at processing.core.PApplet.run(PApplet.java:1496)
at java.lang.Thread.run(Thread.java:637)
Caused by: java.lang.UnsatisfiedLinkError: /System/Library/Java/Extensions/libQTJNative.jnilib:  no suitable image found.  Did find:  /System/Library/Java/Extensions/libQTJNative.jnilib: no matching architecture in universal wrapper
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1861)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1754)
at java.lang.Runtime.loadLibrary0(Runtime.java:823)
at java.lang.System.loadLibrary(System.java:1045)
at quicktime.QTSession$1.run(QTSession.java:96)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:199)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:633)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
Exception in thread "Animation Thread" java.lang.UnsatisfiedLinkError: quicktime.QTSession.Gestalt(I[I)S
at quicktime.QTSession.Gestalt(Native Method)
at quicktime.QTSession.gestalt(QTSession.java:935)
at quicktime.QTSession.open(QTSession.java:641)
at quicktime.QTSession.open(QTSession.java:608)
at processing.video.Capture.init(Capture.java:167)
at processing.video.Capture.<init>(Capture.java:154)
at processing.video.Capture.<init>(Capture.java:115)
at TestSketch.setup(TestSketch.java:58)
at processing.core.PApplet.handleDraw(PApplet.java:1571)
at processing.core.PApplet.run(PApplet.java:1496)
at java.lang.Thread.run(Thread.java:637)


Does anyone have any clear idea about how to solve this: To re-itterate,
  • webcam capture from just running the program works fine,
  • but the moment its in a browser on a mac (I tested safari and firefox), it falls over
    • I've signed correctly (and get the security popup that I hit ok to
    • I have to set it to 32 bit JVM.

Re: webcam applet ?
Reply #7 - Apr 11th, 2010, 12:39pm
 
i have exact same problem as noted in the message above. any further insights since this was posted?
Re: webcam applet ?
Reply #8 - Apr 19th, 2010, 3:40am
 
I'm trying to see if the JMyron libs work, but not knowing much about how JMyron works under the bonnet as such, I don't know how successful I will be.

[Edit] JMyron is built on top of the Quicktime it seems, and I quickly hit the same issues.
Re: webcam applet ?
Reply #9 - Jun 9th, 2010, 2:37pm
 
if anyone is interested i was able to sign the asciivideo demo and have it successfully run in Snow Leopard on Firefox 3.6.3. Unfortunately Safari and Chrome did not work. I received the same error that Syn received regarding a thread.

It's not impossible but not 100%.
Page Index Toggle Pages: 1