Webcam - send the image questions

Hey, I found that panda 3d had a way to get images from my laptop webcam, I got the sample code to work, but I’m not sure 100% on how to send the image. I want to send them like a normal chat program does it but i’m not sure how they do it. Do they stream the data to the other side or do they send a full image over to the other side? My goal is to get the 640 X 480 at fps 30 my cam can send.

in video-chat applications the video-stream (as the name suggestes) is a stream of data. usualy using a video codec suited for streaming.
you can send the raw data, but a quick calculations makes
3bytes per color640480*30fps … thats roughly 30MB/second you’d already need a gigabit network to stream that. sending full jpeg images would already be lots better but still ind the region around hm. maybe 1MB , so still only for quite fast internet.

so without using an efficient streamed video codec you can forget that idea. while panda is able to read videostream (like the one from your webcam) i dont know about panda’s capability to send streams out, or rather to encode the video into a suited format.
it might be possible you need additional libraries to do that.

you should check out some already existing open-source applications doing video-streaming at such rates. like ekiga or so. you might get some inspiration there

What sorta format does the stream read? I mean… is the stream a AVI where you could just send the data in packets between the server and client or does that depends on the webcam it self?

i dont know exactly. usualy those things are best left to the library in question. like ffmpeg. I’m pretty sure panda has to change the color-format before it can display webcam images therefore it’s very likely that full-frames are passed around at some point. but i dont have any specific knowledge about the streams before that.