Recently I tried to do a mini project: one RPI captures images using the camera module and sends the stream of images to another PRI (i.e. receiver PRI), and the receiver PRI continuously displays the images.

I used the python code provided in the "3.8 Capturing to a network stream" example in picamera docs (http://picamera.readthedocs.io/en/release-1.13/recipes1.html#capturing-to-a-network-streamam).

My problem is: I try to display images on the receiver RPI. So I add "image.show()" after "image = Image.open(image_stream)", but nothing happens. I am wondering how to correctly display the stream of images. Should I use threading?

Can somebody helps me?

1 Answer 1


It sounds like you are trying to display the image on the server side. There is a second script underneath the script you are talking about to run on the client side (what you are calling the receiver RPi).

to execute this example you should have 2 separate files (server.py and client.py). put the server.py file on the RPi with the camera and the client.py on the receiver RPi you want to see the image on (no camera). Start the server.py script on the camera (server) side first. you will need to make it executable first.

chmod +x server.py

once its running, start the client.py (also needs to be executable) script on the non-camera pi.

the image should come up. It is actually the camera.start_preview() line of the client.py that puts the image up.

  • Hi Inflexionist. Thanks for your answer. But, as I understand, the receiver RPI (which has no camera) should be the server, and the sender RPI (which has a camera) should be a client ( In the picamera docs, it says " ... a client ..sends a continual stream of images to the server."). So, what I want to do is to let the receiver PRI (with no camera) display the received stream of images, but not to let the sender (with camera) preview the captured images. I add "image.show()" after "image = Image.open(image_stream)" in server.py, but nothing happens, So, do you have any suggestions? Thanks.
    – user76674
    Commented Dec 14, 2017 at 1:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.