HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
scottlamb
retina
Rust2022–2026
scottlamb / retina

retina

High-level RTSP multimedia streaming library, in Rust

2Distinct people
7Mentions
0Explicit recommenders
382GitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

High-level RTSP multimedia streaming library, in Rust

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:56:07 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year7 dated mentions

Observed mentions: 2022-10-20 00:33:31 UTC to 2026-05-29 16:08:34 UTC.

01232022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments20222023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20242025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2026-01-01 00:00:00 UTC to 2027-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments. Incomplete calendar period.2026*

* An incomplete calendar period is marked with an outlined bar. Its count is not directly comparable with a full period.

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC202
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC101
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC101
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC000
2026 (partial)2026-01-01 00:00:00 UTC2027-01-01 00:00:00 UTC303

What Hacker News says

7 sources
I can think of two reasons. The first is what they describe here: as an attack. It's like why would anyone ever overflow a buffer with shellcode. The second is that they are implementing a spec that requires appending a varint length-prefixed field to a buffer but don't really care about the space optimization, don't know the field's length when they start appending it, and don't want to put the field into a second, temporary buffer or slide it down into place. https://github.com/FFmpeg/FFmpeg/blob/468a743af1653a08f47081... vs say my own code which does the slide: https://github.com/scottlamb/retina/blob/6972ac4261ce7bf5b58...
In Bijou64: A variable-length integer encoding
I wouldn't say I'm done evaluating it, and as a spare-time project, my NVR's needs are pretty simple at present. But WebCodecs is just really straightforward. It's hard to find anything to complain about. If you have an IP camera sitting around, you can run a quick WebSocket+WebCodecs example I threw together: <https://github.com/scottlamb/retina> (try `cargo run --package client webcodecs ...`). For one of my cameras, it gives me <160ms glass-to-glass latency, [1] with most of that being the IP camera's encoder. Because WebCodecs doesn't supply a particular jitter buffer implementation, you can just not have one at all if you want to prioritize liveness, and that's what my example does. A welcome change from using MSE. Skipping the jitter buffer also made me realize with one of my cameras, I had a weird pattern where up to six frames wou
Read the rest
ld pile up in the decode queue until a key frame and then start over, which without a jitter buffer is hard to miss at 10 fps. It turns out that even though this camera's H.264 encoder never reorders frames, they hadn't bothered to say that in their VUI bitstream restrictions, so the decoder had to introduce additional latency just in case. I added some logic to "fix" the VUI and now its live stream is more responsive too. So the problem I had wasn't MSE's fault exactly, but MSE made it hard to understand because all the buffering was a black box. [1] https://pasteboard.co/Jfda3nqOQtyV.png
In On a Boat
If I'm understanding correctly moonlighter's proxy speaks Ubiquiti's protocol on both ends, "just" altering the video stream along the way. Which is pretty cool but not what you're looking for. I'd like to make a production-quality version of what you're looking for: acts as an RTSP server, adopts Ubiquiti cameras. As a single-binary thing that you could run anywhere, maybe even on the camera itself. (self-adoption? emancipation, as in "emancipated minor"?) But it'll take me a bit. My RTSP library right now is client-only, so it needs a bit of expansion to do this. Server support is in my TODO list along with several other changes. https://github.com/scottlamb/retina/issues/89
In Reverse-engineering the UniFi inform protocol
Certainly interesting project, but I do encourage people to do more thorough research before starting a new project and claiming they needed to fill a void. > However, I could not find one that I could trust due to privacy concerns. > Many of them upload the plaintext of videos to their servers and none is fully open-source as far as I know. There's Frigate [1] which is off-cloud, opensource and self-hosted and it does person detection using GPU or Google Coral. It relays camera streams over WebRTC using ssl and works well with Home Assistant [2], which is your self-hosted off-cloud smart home solution. Then there's moonfire-nvr [3] which is written in rust and less feature complete than frigate. And then there's sentryshot [4], another option written in rust. Interestingly, your project got more stars since you posted it on HN than sentr
Read the rest
yshot has in total, and they have had a product out since 2021 while yours only support a single camera model and has no object detection. I suppose this reflects how unknown these option are, which is kind of unexpected since googling "rust nvr" lists them all in the first page. 1: https://frigate.video/ 2: https://www.home-assistant.io/ 3: https://github.com/scottlamb/moonfire-nvr 4: https://github.com/SentryShot/sentryshot > The prototype currently has a lot of limitations: mainly that it has only been tested with one IP camera Since you use rust, you should maybe have a look at retina: https://github.com/scottlamb/retina Personally, I use frigate with Home Assistant linked to HomeKit, so I get snapshots & video from frigate straight into my iPhone lock screen as soon as it detects moving people or cars outside my house.
In Show HN: Open-source private home security camera system (end-to-end encryption)
Yeah, excellent description of why the number of syscalls is so high, and when you're tracing a multithreaded program there's the additional noise from the way it reports concurrent syscalls from the various threads. Besides filtering, I forgot to mention that I like seeing some kind of aggregation/summary. strace flags are useful; even better to write a little program with eBPF (on Linux) or DTrace (on macOS/BSD/Solaris). I like being able to do stuff like this: https://github.com/scottlamb/retina/issues/5#issue-933945792
In Spammy syscalls in strace dumps
> every wifi ONVIF camera I haven't tried a lot of wifi cameras, but I'm not surprised you're having trouble, particularly with multiple simultaneous streams talking directly to the camera. * Wired should be much more successful. To be clear, wired cameras still have crap firmware [1] but you should be able to get a stable stream. * If the camera must be wireless, try using an RTSP proxy server so that there's only one direct client. The proxy server can multiplex so you can have several things connecting to it, and ideally they go over the wired LAN. Even if they don't, the wifi hardware/software on anything that isn't a cheap camera is probably a lot more stable. Also, the RTSP implementation is probably a lot better at handling mixed network conditions. I've noticed several cameras' RTSP/TCP support (aka RTP over RTSP interleaved chann
Read the rest
els) will truncate RTSP data messages when the TCP send buffer fills, throwing off the framing. Nothing good happens after that. And UDP has its own problems (single lost packet => seconds of video questionable/useless, but still sent, and there's no real congestion handling unless they've done a miracle in application code with infrequent RTCP reports). Edit: also, some cameras have a particular bug [2] in which they will continue sending RTP-over-TCP data to a file descriptor after it's closed. The file descriptor is often reused while this is still happening, which causes all sorts of problems, not the least being sending sensitive data over an unauthenticated channel. [1] In particular, I have very low expectations for their security. Poor software quality, backdoors. Firewall them so nothing can connect to them other than your proxy server / NVR and so that they can't connect out either. [2] https://github.com/scottlamb/retina/issues/17
In Managing and using ONVIF IP cameras with Linux

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.