Video streaming between two installations

Hi halfdanj,

I’m working on video chat application. I tried using your logic in my code, but it does’t work for resolutions over 160 x 120. I’m using TCP instead of UDP to ensure delivery of packets. I’m trying to achieve a resolution of 640x480 splitting it into packets of 4800 bytes. But whenever I try achieving 640x480, it doesn’t work…about less than one fifth of the receiver’s frame gets filled, and that too has a lot disturbance. Even at 320x240, it does not fill the frame clearly. I did some math to make some logic of why it wouldn’t work at 640x480. I’m sending at 20fps. 640x480x3 = 921000 bytes for one frame and hence 921000x20 = 18million bytes for 20 fps…that’s 18 million bytes per second…how is it possible to send so much data through the network…and before that how can a normal computer process so much information very fast…I would like to receive some advice from you as to how I should go about with this since it has worked for you… Thank you very much.

Hi. It’s very long time ago I did that experiment. But the math is not correct, I JPEG compressed the frames, so in that way the size is a lot smaller.
But I created later on an addon called ofxStreamer that uses h264 encoding. It’s far from perfect, but you could have a look at that.

Thanks for the reply halfdanj. Could you guide me on how to go about with JPEG compressing the frames? Is there any library/addon/encoding/algorithms that I need to use in order to achieve the JPEG compressing?

No sorry, can’t remember. I think i used a Mac OS system library to do it. But i guess it cant be that hard to find a library to jpeg compress/decompress.

Hi @rocknrolldk,

I am trying to use your “ofvideostream” code, and I was able to use them with OF 0.8.4, although I am experiencing the same “jumbled up” images as related by others in this thread. I am streaming images from a Raspberry Pi to an Apple machine. Any chance you got this “jumbled up” images problem solved?