How to Inject and Synchronize Custom Metadata for Ad Insertion, GPS Tracking, and More
In a modern streaming architecture, video metadata powers actionable intelligence. Preserving video metadata is critical for maintaining the integrity of a stream. However, the true power for developers lies in the ability to inject new, frame-accurate data points directly into a live feed. This metadata injection can also empower intelligent video workflows.
By leveraging time-based metadata, a video stream transitions from a passive viewing experience into a high-value operational tool. Whether for monetization or tracking drone telemetry, the ability to synchronize custom data with video frames is what makes a media workflow truly intelligent.
Core Use Cases for Real-Time Metadata Injection
Injecting custom metadata allows developers to solve complex problems by tethering data directly to the Presentation Timestamp (PTS) of a video frame.
For Dynamic Ad Insertion, injecting SCTE-35 markers or custom triggers into the stream signals precise ad opportunities. Inject GPS coordinates as timed metadata for geospatial and telemetry overlays, especially useful for drone or vehicle feeds. This data can power a live-updating map on a dashboard, ensuring the location data stays perfectly synced with the visual feed. Wowza has successfully drawn a map directly onto a video using this GPS data, for example.
Overall, in surveillance and intelligent monitoring scenarios, developers can inject object detection data (such as bounding boxes and object identification) directly into the stream. Integrating metadata with the player and browser enhances the overall experience. For example, this metadata can trigger downstream events to notify authenticated security personnel of specific events as they occur.
Implementing Metadata Injection with Wowza Streaming Engine
The most flexible way to handle these requirements is through custom modules within Wowza Streaming Engine (WSE). In this example, the WSE Java API creates an HTTP provider. Call this API to inject JSON data directly into a live stream as WSE receives it. For HLS or DASH, WSE then converts that into an ID3 tag, or into ID3 data in an eMSG box for CMAF. Or, send metadata in an RTMP feed as AMF Data from an encoder, and then convert that to ID3.
There are two primary ways to present injected data to the end-user:
- In-Stream Metadata
Deliver the ID3 data tags along with the video for client-side interpretation. Data is sent alongside the audio and video. The player listens for events to trigger visual alerts or other actions, like graphical overlays. Ideal for interactive dashboards. - Graphical Overlays
Composite data visually directly onto the video frames. Render custom metadata or use a headless browser to render HTML pages and composite the output directly onto the video. Almost anything can be rendered and overlaid onto the video in real-time as the source updates. Great for scoreboards and lower thirds.
Managing Throughput and Data Density
While injecting metadata adds immense value, developers must be mindful of the data pipe. Metadata contributes to the overall density of a stream, and while it is lightweight compared to 4K video, its processing footprint is not zero. Usually, metadata is presented in a text-based format, such as XML, JSON, or string, and not a binary or graphical format. Avoid overwhelming the channel with unnecessarily large payloads.
Ensure that metadata relies on the stream clock rather than a system clock. This prevents timing drift. Also, it ensures that an ad trigger or a sensor reading occurs exactly on the intended frame, regardless of any potential playback buffering.
Building Actionable Video Metadata Infrastructure
With metadata, video is actionable. By combining Wowza Streaming Engine’s flexibility with a disciplined metadata strategy, a standard video stream or file can become a decision-making engine.
Ready to get started? https://www.wowza.com/free-trial