Live data from Hacker News

Piipcam – 1080P IP Camera on a Raspberry Pi Zero W

github.com

41–50 of 86 posts

Re: Piipcam – 1080P IP Camera on a Raspberry Pi Zero W

#41

It amazes me, really, that for as popular as this use case seems to be there isn't a simple, well-packaged way to stream a camera off a pi. I've been trying to get this working lately and nothing works "well". Motion is popular, but is limited to mjpeg rather than h.264. uv4l is closed source and not up to date with current OS versions. None of the various cvlc incantations to do better actually seem to work on my pi…

Gstreamer? I've used it in the past, both professionally and personally, to generate rtsp/rtp and it worked great.

I second this, using gst-launch, you can run a gstreamer pipeline in one line in the terminal that generates a hardware h264-encoded stream that you can tune to any bitrate. Something like this:

  gst-launch-1.0 rtpbin name=rtpbin rpicamsrc preview=0 bitrate=4000000 do-timestamp=1 ! 'video/x-h264, width=1920, height=1080, framerate=30/1,profile=high' ! h264parse ! rtph264pay config-interval=1 pt=96 ! rtpbin.send_rtp_sink_0 rtpbin.send_rtp_src_0 ! udpsink host=YOUR_IP port=YOUR_PORT rtpbin.send_rtcp_src_0 sync=false async=false
Gstreamer should include rpicamsrc directly nowadays for your convenience.

Re: Piipcam – 1080P IP Camera on a Raspberry Pi Zero W

#42
post #2

It's a neat project, but doesn't having to connect my computer to the zero's wifi-hotspot mean I can't actually use my own network since I would not be routing my connection through a zero. That would then make this kind of device kind of useless unless I have a dedicated device to watch the stream from? Or am I missing something?

That step should only be to test and configure the camera. While you're connected you login and configure your own wifi on it.

Preferably that web tool should do it for you.

Either way, a lot of consumer products have that one step.

Re: Piipcam – 1080P IP Camera on a Raspberry Pi Zero W

#43

It amazes me, really, that for as popular as this use case seems to be there isn't a simple, well-packaged way to stream a camera off a pi. I've been trying to get this working lately and nothing works "well". Motion is popular, but is limited to mjpeg rather than h.264. uv4l is closed source and not up to date with current OS versions. None of the various cvlc incantations to do better actually seem to work on my pi…

I ended up running

  raspivid -l -o tcp://0.0.0.0:3333 --mode 2 -b 3000000 -t 0 --drc off --flush
looped in a screen session on the rpi (running raspbian), and

  mpv --profile=low-latency tcp://192.168.1.100:3333/
on the client whenever I wanted to see the camera. It wasn't polished, but it got the job done. It died probably due to SD card flakiness, and then I had to move the camera anyway. Next incarnation will be nfsroot.

Re: Piipcam – 1080P IP Camera on a Raspberry Pi Zero W

#44
post #35

It amazes me, really, that for as popular as this use case seems to be there isn't a simple, well-packaged way to stream a camera off a pi. I've been trying to get this working lately and nothing works "well". Motion is popular, but is limited to mjpeg rather than h.264. uv4l is closed source and not up to date with current OS versions. None of the various cvlc incantations to do better actually seem to work on my pi…

Is it that there is no way to “just” run a small custom built daemon script on a Linux box, not just in terms of camera apps but in general? Like I have this 10 line bash script, that I want it to run for a few years, with no maintenance, that don’t get corrupted from power loss, or lock up from memory leaks, that auto restarts when necessary, but not bring down network either. And it requires 10+ years of experience…

If I had to do that, I'd go for a read-only rootfs (which IIRC the latest raspbian/raspi-config version supports to set up for you) combined with a systemd unit file that takes care of auto restarts.

The only thing I don't know how to deal with is a memory leak but as long as it's an easy simple script and no Java app, there should not be anything running that could leak memory.

Re: Piipcam – 1080P IP Camera on a Raspberry Pi Zero W

#45

It amazes me, really, that for as popular as this use case seems to be there isn't a simple, well-packaged way to stream a camera off a pi. I've been trying to get this working lately and nothing works "well". Motion is popular, but is limited to mjpeg rather than h.264. uv4l is closed source and not up to date with current OS versions. None of the various cvlc incantations to do better actually seem to work on my pi…

> limited to mjpeg rather than h.264

In fact I had a hope it can stream h.265 to save bandwidth. I've heard it was supposed to have hardware h.265 encoding.

Re: Piipcam – 1080P IP Camera on a Raspberry Pi Zero W

#46
post #30

720p or 1080p wireless/wired/PoE IPCamera with FCC-certification has been on the market for a few years, at the price range of 30ish dollars, you can buy IPCamera modules for about $10 from vendors(mainly in China) and reprogram with your firmware as well. RPI-based camera is great to learn stuff, but to make a product-like devices, there are too many to choose on the market already, cheap and easy and most likely mo…

> Isn't ip-camera a solved problem?

Not if you care about:

- image quality, most of these 10$ camera modules have "sensors" that only work halfway decent with good lighting and are little more than static noise at night

- general build quality, expect issues with the power supply or at temperature extremes

- security, there's no OpenWRT or equivalent for these, so even if you make your own firmware you're still responsible to keep it up to date yourself

- no "advanced" features such as a back-up battery, durable (!) on board storage and a wireless fallback in case there is an attacker who simply cuts the cables

Re: Piipcam – 1080P IP Camera on a Raspberry Pi Zero W

#47

It amazes me, really, that for as popular as this use case seems to be there isn't a simple, well-packaged way to stream a camera off a pi. I've been trying to get this working lately and nothing works "well". Motion is popular, but is limited to mjpeg rather than h.264. uv4l is closed source and not up to date with current OS versions. None of the various cvlc incantations to do better actually seem to work on my pi…

RPi Cam is very good: https://elinux.org/RPi-Cam-Web-Interface

But it only works with the pi webcam, not with usb cameras

Re: Piipcam – 1080P IP Camera on a Raspberry Pi Zero W

#49

It amazes me, really, that for as popular as this use case seems to be there isn't a simple, well-packaged way to stream a camera off a pi. I've been trying to get this working lately and nothing works "well". Motion is popular, but is limited to mjpeg rather than h.264. uv4l is closed source and not up to date with current OS versions. None of the various cvlc incantations to do better actually seem to work on my pi…

It's not that "well-packaged" but last time I tried it, JSMpeg worked nicely when streaming from an RPi3. It has very low latency (~70ms), reasonable quality/bitrate (MPEG1, rather than MJPEG) and is viewable in any browser.

https://github.com/phoboslab/jsmpeg#example-setup-for-stream...

Re: Piipcam – 1080P IP Camera on a Raspberry Pi Zero W

#50

It amazes me, really, that for as popular as this use case seems to be there isn't a simple, well-packaged way to stream a camera off a pi. I've been trying to get this working lately and nothing works "well". Motion is popular, but is limited to mjpeg rather than h.264. uv4l is closed source and not up to date with current OS versions. None of the various cvlc incantations to do better actually seem to work on my pi…

> limited to mjpeg rather than h.264 In fact I had a hope it can stream h.265 to save bandwidth. I've heard it was supposed to have hardware h.265 encoding.

The hardware supports h.265 decode but not encode.
Post reply on HN