SenderReportInfo schema

The canonical location of this page is https://strawlab.org/o8B.

This page describes the format of data saved as Supplemental Enhancement Information (SEI) to contain absolute timing information inline within videos recorded from RTP/RTCP cameras. Such cameras send an RTCP SenderReport every few seconds. This report contains two useful timestamps: ntp, the NTP timestamp, which is the absolute wall-clock time of the camera, and rtp the RTP timestamp, which corresponds to the same moment with a different rate (nominally 90 kHz) and with an unknown starting point. When these are received, an additional timestamp recv is recorded which contains the NTP timestamp of the receiving computer.

The data are saved as pure ASCII in JSON format. This avoids the need to insert emulation prevention bytes. The schema is determined by the derive functionality from the rust serde crate using the following definition:

/// Timing information received occasionally via RTCP sender reports
#[derive(Debug, Clone, Serialize, Deserialize)]
struct SenderReportInfo {
    /// Receive timestamp as NTP (Network Time Protocol) timestamp
    recv: u64,
    /// NTP (Network Time Protocol) timestamp as reported by the sender
    ntp: u64,
    /// RTP (Real Time Protocol) timestamp as reported by the sender
    rtp: u32,
}

The JSON-encoded values are stored together with UUID strawlab.org/o8B as a SEI User Data Unregistered payload.

Data in this format is saved in H264 streams by retina-record as described here.