Pidog camera problem (freezes)

I just finished assembling the pidog robot, and everything is ok, but the camera does not work properly. When I try to stream it, it just sends the first image and then freezes.

What I have done:

  1. I assembled the Pidog with a Raspberry Pi 4 Model B with 4 GB RAM, and with the recent os version: Linux 13, “Trixie”, Debian full version 13.1
  2. I install vilib version “0.3.18”, as appear in /vilib/vilib/version.py.
  3. I notice that it does not work properly when trying to run /pidog/examples/7_face_track.py, it just responds to sound but not to faces.
  4. I test the camera using rpicam-hello, rpicam-still, and rpicam-vid, from the terminal, and the results are fine. I can obtain a video on screen, an image, and a video file, respectively.
  5. Then I test with /vilib/examples/display.py and no error shows in the terminal, just as is included in quotes below,

“”"
agepidog@agepidog:~/vilib/examples $ python3 display.py
vilib 0.3.18 launching …
picamera2 0.3.31
Imgshow start …

Web display on:
http://<ip_address>:9000/mjpg

Starting web streaming …

press Ctrl+C to exit

  • Serving Flask app ‘vilib.vilib’
  • Debug mode: off
    “”“”

And when I try to access http://<ip_address>:9000/mjpg in a web browser as is indicated, I can see a still image, not a stream, and it looks like it is the first image taken when the server was up.(Obviously for <ip_address>, I use my real local IP)

Please help, and thanks in advance

The issue might be caused by a conflict between the system desktop and the video source. After you run the example code, the video window appears for an instant and then automatically closes, and when you try to access the video stream via a browser, the feed appears frozen.

Please modify the code in the display.py file and run the display.py example again to see if the issue is resolved.

Change
Vilib.display(local=True, web=True)
to:
Vilib.display(local=False, web=True)
Save the changes, close the code file, and then run the script again.

Thanks for the quick response, it’s working fine now. I can stream on any device on the same network. I made the same adjustment in the example 7_face_track.py and now it’s OK. Thanks again.