Cameras & SecurityTechnician

Baby and Pet Monitor with a Low-Latency Live Stream

Watch a room from any phone or browser on your home network with MediaMTX — private, no cloud.

LevelTechnician
Time1 h
Est. cost~$65
Steps5

MediaMTX is a lightweight streaming server that can read the Raspberry Pi camera directly and serve it over WebRTC with very low delay. Use the NoIR camera and an IR light for night view.

⚠ SAFETY
A camera in a child's room must never be reachable from the internet without strong authentication. Keep it on your local network or VPN.

Mission steps

  1. Install MediaMTX

    Download the ARM64 release from its GitHub page and unpack it on the Pi.

  2. Enable the camera source

    In mediamtx.yml, add a path with source: rpiCamera and set resolution and frame rate.

  3. Start it

    Run ./mediamtx and open http://<pi-ip>:8889/cam in a browser for the WebRTC stream.

  4. Run at boot

    Create a systemd service so the monitor comes back after a power cut.

  5. Keep it private

    Do not port-forward. Use Tailscale for remote viewing and set a username and password in the config.

Code

# mediamtx.yml (excerpt)
paths:
  cam:
    source: rpiCamera
    rpiCameraWidth: 1280
    rpiCameraHeight: 720
    rpiCameraFPS: 30

Tip: test every script on the bench before installing it in a moving machine.

Questions

Can it alert on crying?

Yes — a small audio-level script can send a notification when sound stays loud for a few seconds. It is a convenience, not a medical device.