Question is: what's the task? You want to encode video on the fly?
Most codecs with compression (or even all) require complete video stream for analysis and encoding. Any video stream sent without any compression (RGB) will be to much too handle with low bandwidth. That's why any pseudo real-time digital sources send picture in some format like mpeg-2 or other and provide 20 fps (and only pretty good hardware gives 25-30 fps).
For your task the best way is to receive encoded media stream (web camera, some video file) sent over with some restrictions and preliminary checks made, and then schedule its conversion to some other standard format.
This way you have a binary stream stored first-hand and then processed normally.