peepshow/ how-to/ live-stream-to-llm

Reel #H-05 IP camera / HLS / DASH / RTSP → frames an LLM can read

peepshow how-to / live-stream-to-llm

Sample a live stream into LLM-ready frames with peepshow

peepshow auto-detects HLS playlists, DASH manifests, and RTSP / RTSPS URLs and passes them straight to ffmpeg — no temporary download, no buffering pipeline. Pair --duration with --max and you have a snapshot of any live feed in seconds: IP cameras, OBS broadcasts, low-latency CDN streams, security DVRs.

Steps

  1. Install peepshow

    Install the CLI globally.

    npm install -g peepshow
  2. Point at an HLS playlist

    peepshow auto-detects the .m3u8 and reads it via ffmpeg.

    peepshow https://stream.example.com/live/index.m3u8 --duration 60 --max 20
  3. Or an IP camera over RTSP

    RTSP defaults to TCP transport (most reliable). Pass --rtsp-transport udp for low-latency.

    peepshow rtsp://admin:secret@192.168.1.10/live --duration 30
  4. Feed the frames to your LLM

    Pipe the JSON manifest into your model of choice.

    peepshow rtsp://camera.local/feed --emit json | claude-cli -p 'What is happening?'

Why it works

Live stream URLs need a totally different flow from finite downloads — they never finish. peepshow's --duration flag caps the read window so the run actually terminates. ffmpeg handles HLS, DASH, RTSP, and RTSPS natively; peepshow just gets out of the way and lets it read the URL straight via -i. Combine with sinks (S3, SQLite, Webhook) and you have a continuous monitoring pipeline.

When it helps

  • IP camera review without copying footage off the device.
  • Live broadcasts (OBS, Twitch via yt-dlp restream, low-latency CDNs).
  • Security DVR RTSP feeds streamed straight into an LLM analysis loop.
  • DASH-only streaming endpoints where downloading the manifest doesn't help.

Pitfalls

  • Forgotten --duration on an infinite stream will run until you Ctrl+C.
  • RTSP over UDP can drop frames on busy Wi-Fi — TCP (the default) is safer.
  • Authenticated streams: embed credentials in the URL (rtsp://user:pass@host) or wrap with a token-injecting proxy.
  • Some HLS playlists return manifests behind redirects — Cloudflare-protected streams may need the same browser UA the CLI already sets.

Works with these LLMs

Pairs with these sinks