scottlamb / moonfire-nvr

Moonfire NVR, a security camera network video recorder
Other
1.2k stars 138 forks source link

note dropped RTP packets in database #198

Open scottlamb opened 2 years ago

scottlamb commented 2 years ago

As discussed on the mailing list with @jlpoolen: next time we rework the database schema, let's add in support for tracking dropped RTP packets.

This could get really nuanced. The RTP stream tells us (via gaps in the sequence numbers) how many packets we've missed (modulus 2^16). In the case of H.264 video (audio is a little different):

But I think I'd like to keep it simple by knowing we dropped N packets in a recording, or maybe between frames A and B, and maybe have some ability to further extend the index without a full schema change.

In my setup, dropped packets are rare but happen. If you pick a particular recording, most likely it's complete, and it'd be nice if we could look at the index, know there are no dropped packets, and thus that recording is fully trustworthy.