My new project: Raspberry Pi Zero W + Pi Camera "security" cam

εὕρηκα! I found a way to get a live stream in Bullseye:

Run this on the Pi:
libcamera-vid -t 0 --inline --listen -o tcp://192.168.xxx.xxx:5555 -n

and open a network stream in VLC at:

tcp/h264://192.168.xxx.xxx:5555

Instant live video.

And it only took a month of trawling the internet. (That’s sarcasm.)

Now I’m ready for the onslaught of electoral campaign door-knockers later this year. :sunglasses:

5 Likes

Just in case it might help someone out there…

I had been wondering why my Pi Camera V2.1’s Sony 8-megapixel lens, which is supposedly set to a fixed infinity focus at the factory, was producing slightly blurry images of my target area.

I happened to read on some blog that the initial run of the V2.1 was not set to the same focal length, and that this little plastic ring, which is included in the box with the camera - but which comes with no guide or explanation whatsoever - is actually a focal adjustment tool:


(shown beside a common disk battery, for size comparison)

Underside, magnified through a loupe; note the notches in the inner ring, which align to the tiny tabs around the outside of the camera lens:

So I placed it over the lens, gave it a short, counterclockwise twist, and the image focus was greatly improved. (It’s trial and error, I’m afraid. Adjust, check image, adjust…)

4 Likes

(Good way to repurpose an old Android device, too.)

2 Likes

Just wanted to follow up on this…

The RPi0 is doing its job generally well. I usually have it set to collect motion-activated movies (although, again, it actually monitors changes in pixels, not motion per se) above a set minimum noise level. It typically produces a couple hundred 640x480 clips per day (not all of which I actually watch). I don’t bother with collecting simultaneous stills.

Occasionally I stream live video instead. (It’s not possible to do both live stream and motion-activated collection at once, as the camera can only be busy with one or the other.)

For info, though, the Pi Zero W sometimes gets bogged down and stalls, I guess from its processing limitations, and I think it probably overheats sometimes. (It seems to happen even more frequently if I set a larger image size or greater framerate.) In such cases, the ssh connection gets broken and the only way to restart the device is to cut the power and restart. (I run it “headless.”)

So I’m thinking of upgrading either to a Pi Zero 2 W, or a more capable Pi in general. Overall, I’m satisfied, though, and it has been a cool project.

3 Likes

And the reason I ended up with this particular version of the Zero is that it was part of a kit with camera and cable… and I didn’t completely research all the options, versions, etc.

1 Like