Steps
- Install peepshow
Install the CLI globally.
npm install -g peepshow - 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 - 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 - 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.