In a perfect world, time would only move forward monotonically — that is, consistently forward, second after second, minute after minute. But in live video streaming, this isn’t always the case. A “discontinuity” is an event where the flow of timestamps in a media stream does something unexpected — it either jumps forward by a large amount or, more problematically, goes backwards. Luckily, Norsk handles discontinuities in live streams so that your streams stay in sync.
[For an in-depth look at the challenges of dealing with time in live streaming workflows, see the white paper “The Hidden Complexities of Time in Live Streaming.”]
Discontinuities can be caused by upstream encoder issues, signal dropouts, or switching between sources at the origin. Sometimes these are signaled; often, they are not. A robust media processing engine must therefore assume they can happen at any time and be prepared to handle them gracefully.
The golden rule when processing media is that time cannot go backward downstream. Once a system has emitted a packet with a specific timestamp, emitting a later packet with an earlier timestamp can cause buffers to underflow, players to crash, or viewers to see corrupted content.
Norsk Manages Discontinuities
When Norsk detects a discontinuity in an inbound stream, its primary goal is to fix the anomaly without violating this rule. This often involves a careful re-basing of the stream’s timeline. The process is more complex than the initial ingest because the system must ensure that the new, corrected timestamps are always greater than the last timestamp that was sent onward for processing.
When a discontinuity is detected, Norsk records a “context change” and calculates the offset needed to make timestamps monotonic, then rebases the timeline so that the next timestamp is always greater than the last emitted timestamp. The key thing is that downstream components, such as compositors, transcoders, or outputs, never see the original discontinuity. They receive a clean, corrected timeline as if nothing went wrong upstream.
In extreme cases of “garbage in,” like when one audio track in a transport stream loops its timestamps at a different point from the video, Norsk will identify the unreasonable timestamps and may pause that specific track to allow the rest of the stream to continue uninterrupted. This graceful degradation can be the difference between a partially successful stream and a total failure. By managing discontinuities effectively, Norsk maintains the integrity of the media pipeline, ensuring a stable and predictable output even when the input is anything but.
Get in touch or set up a demo to learn more about how Norsk makes sure your streams are in sync.