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.
IndexProgramming Questions & HelpVideo Capture,  Movie Playback,  Vision Libraries › Display local and remote web cam inputs
Page Index Toggle Pages: 1
Display local and remote web cam inputs (Read 1120 times)
Display local and remote web cam inputs
May 2nd, 2006, 11:00am
 
Hi there,

I am just starting on Processing and I'd like to display the input from a local web cam (easy) alongside the input from a remote web cam (that's the tricky bit): something like MSN Messenger where you can see yourself and the remote person on the same screen.

I did find a posting that suggests loading an image from a Web server (the remote web cam has to somehow upload an image to the Web server as often as possible): http://processing.org/discourse/yabb_beta/YaBB.cgi?board=VideoCamera;action=display;num=1115177308

But I think this approach will only show a new image every 10 seconds or so. I'd like something that would refresh more often.

Any suggestions?
Re: Display local and remote web cam inputs
Reply #1 - May 2nd, 2006, 12:39pm
 
hi billy,

you might want to look into QTSS. the processing-video-lib is built around quicktime-for-java and therefore it should be able to open qt-streams (although i guess it never has been tested).

so .. the (theoretical) way to set this up would be to have both webcams post to the qtss and then read the video-feeds via processing from there.

i'm curious about your results ...

best,
F

( ah .. and it is available for other systems than os-x as well )
Re: Display local and remote web cam inputs
Reply #2 - May 3rd, 2006, 11:20am
 
Hi Fjen,

thanks for your response. That is an interesting idea, but that seems quite complicated for what I am trying to achieve (well, using streaming servers and untested features all seem a bit scary at this stage, really Smiley

A friend mentioned to me today that the Oculus Web cams can FTP Motion JPEGs up to a Web server. Now, that sounds like an easy option Smiley

But is there a way to display motion JPEGs in Processing?? Googling "motion jpeg site:processing.org" returns nothing. Any idea??

Otherwise, I'll start looking at QTSS.

Cheers,

Billy

Re: Display local and remote web cam inputs
Reply #3 - May 3rd, 2006, 12:08pm
 
are you referring to: http://www.intlweb.com/

the specs there say you can either upload sequential jpgs or one time-laps movie (which will be updated locally and the uploaded en block).

this might be an option, but it's not going to be much faster than what you can do with processing/php .. i have to look it up, but there was an discussion about  how to encode a jpeg inside processing and post that to php. will post it here ..

best,
F
Re: Display local and remote web cam inputs
Reply #4 - May 3rd, 2006, 1:17pm
 
ha! look what shiffman just blogged: upload

best,
F
Re: Display local and remote web cam inputs
Reply #5 - May 3rd, 2006, 3:02pm
 
I did just what shiffman did quite a while ago

http://processing.org/discourse/yabb_beta/YaBB.cgi?board=VideoCamera;action=display;num=1117194066;start=0#0
http://processing.org/discourse/yabb_beta/YaBB.cgi?board=Syntax;action=display;num=1138221586

The second is the best, i guess i had no idea what i was doing the first time Tongue

hope it might help

-seltar
Re: Display local and remote web cam inputs
Reply #6 - May 3rd, 2006, 6:25pm
 
seltar,
be careful with that php .. you never know where $img was set (GET / POST / ...) . rather use $_FILES['userfile']['name'] instead.

see: php.net - handling files uploads

best,
F
Re: Display local and remote web cam inputs
Reply #7 - May 4th, 2006, 12:29am
 
Here's a program of mine that does exactly that.
Requires MyGUI library

http://rafb.net/paste/results/F0J70222.html

It doesn't use an external server (except to bounce you your IP address)
Re: Display local and remote web cam inputs
Reply #8 - May 4th, 2006, 11:26am
 
Thanks to all for your suggestions. It is most helpful.

Joseph, your program seems to do exactly what I am looking for.

I am trying to run it, but it fails on line:

gui = new MyGUI(this);

with error:

java.lang.NullPointerException
at java.io.DataInputStream.readInt(Unknown Source)

(it doesn't even give me a line number!).

I've installed MyGUI version 8 from: http://www.mkv25.net/MyGUI/

Are you using the same version? Is there something obvious that I am missing (it's the first time I try to use MyGUI)?

Cheers,

Billy
Re: Display local and remote web cam inputs
Reply #9 - May 4th, 2006, 12:19pm
 
I'm using version 10:
http://www.mkv25.net/MyGUI/MyGUI_0010.zip

It runs on the current latest version of processing (0114) although it was originally coded on 0104.
Re: Display local and remote web cam inputs
Reply #10 - Jun 14th, 2006, 3:41pm
 
Quote:
Here's a program of mine that does exactly that.
Requires MyGUI library

http://rafb.net/paste/results/F0J70222.html

It doesn't use an external server (except to bounce you your IP address)



Hi Joseph The link is not working. Would you give another link or send the program my mail.

Thanks.
Page Index Toggle Pages: 1