Skip to content

Standards and specifications

Scott Lamb edited this page May 2, 2024 · 19 revisions

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

General notes on standards organizations

  • ISO/IEC controls many of the relevant standards. Unfortunately you often need to jump through hoops to get copies of their standards.
    • It's unreasonable for an individual to pay for ISO/IEC standards. Not only are they often CHF 198 apiece, but to do anything you need a long list of interrelated ones. We're talking new car money here.
    • Older revisions of ISO/IEC standards are more likely to be available for free than current revisions and almost as good. ISO/IEC rarely breaks compatibility; more often revisions make minor clarifications and add new parts that are less widely implemented.
    • ISO/IEC sometimes removes standards from their publicly available standards page, but archive.org remembers.
    • Sometimes there's an equivalent standard from another organization that is free. For example, ITU T.REC H.264 is word-for-word identical to ISO/IEC 14496-10. Even within the list of ISO/IEC standards, sometimes there are near-equivalent standards. I believe some of ISO/IEC 14496-* is based on ISO/IEC 13818-*.
    • Sometimes you can find committee drafts of ISO/IEC standards which I'm told are effectively the same as the published standard, and possibly are redistributable (verify this first). Please edit this page if you have a reliable way of finding them.
    • Your local library may be able to help you get free access. Eg John Poole wrote that while his local library doesn't have access, they found for him the closest library which does.
  • Many ITU standards are freely available, at least older versions.

Multimedia container formats

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.

Streaming protocols