-
Notifications
You must be signed in to change notification settings - Fork 139
Standards and specifications
Moonfire NVR implements or uses various standards. They can be hard to track down. Here are a few links.
-
.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.
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.
- H.264
- ISO/IEC 14496-10:2014 is available as a zip file on ISO's publicly available standards page page. Parts of this help understand server/src/h264.rs.
- ISO/IEC 14496-15 describes how H.264 is encoded into
.mp4
files. I can't find a free, legal copy of the published standard. However, this working draft is likely nearly identical to one. There's a summary of the most important parts and some other relevant links on this blog post.
- H.265: free download from T-REC-H.265 on ITU's website. Not yet implemented; see #33.
TODO
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.
TODO: link to most relevant RTSP/RTP/SSDP RFCs.