Skip to content

Standards and specifications

Scott Lamb edited this page May 12, 2021 · 19 revisions

Moonfire NVR implements or uses various standards. They can be hard to track down. Here are a few links.

Multimedia container formats

  • .mp4: ISO/IEC 14496-12:2015 is available as a zip file that was once linked from ISO's publicly available standards page. (See this archive.org copy of that page.) server/src/mp4.rs likely won't make any sense without at least skimming this standard.

Video codecs

Moonfire NVR mostly avoids knowing too much about video codecs. It doesn't encode video. Decoding uses ffmpeg's libavcodec and is only necessary for (in-development) on-NVR video analytics. However, it needs some understanding of these standards to properly place the encoded video frames into the container format and to describe features of the video such as its dimensions.

Audio codecs

TODO

ONVIF camera standards

ONVIF is the main standards body for IP security cameras. The full text of their standards and supporting WSDL/XSD files are linked from their Network Interface Specifications page.

These specifications have information that would be helpful in implementing many features:

  • camera discovery, as in finding all cameras on a network segment.
  • automatically learning cameras' RTSP stream URIs.
  • consuming on-camera video analytics and audio analytics. (The vnd.onvif.metadata RTSP stream appears to be the most well-supported way to do this.)
  • configuring the cameras from the Moonfire NVR UI, including video/audio configuration and analytics.

RTSP streaming standards

TODO: link to most relevant RTSP/RTP/SSDP RFCs.

Clone this wiki locally