DEV Community

Cover image for I open-sourced a GStreamer plugin suite for KLV metadata workflows
Mou
Mou

Posted on • Originally published at linkedin.com

I open-sourced a GStreamer plugin suite for KLV metadata workflows

I open-sourced a GStreamer plugin suite for KLV metadata workflows

I recently open-sourced a GStreamer plugin suite for practical KLV metadata workflows in MPEG-TS pipelines:

Repository:

https://github.com/mkassimi98/gstklvplugin

Below is a screenshot of the plugin suite in action:

The project is aimed at real metadata transport workflows where KLV is not handled as an isolated payload, but as part of a complete pipeline involving generation, decoding, synchronization with video, and MPEG-TS signaling.

What the project includes

The current plugin suite provides four main elements:

  • klvmetaenc: converts JSON into meta/x-klv
  • klvmetadec: converts meta/x-klv back into JSON
  • klvframeinject: injects KLV metadata in sync with H.264 / H.265 video frames
  • tspmtrewrite: rewrites MPEG-TS PMT tables for KLVA metadata signaling

Technical scope

The implementation is oriented to workflows related to:

  • SMPTE ST 336 KLV
  • MISB ST 0601.8 UAS Datalink Local Set
  • STANAG 4609 style transport pipelines
  • MPEG-TS metadata signaling aligned with MISB ST 1402 workflows

Why I built it

In many practical systems, metadata handling does not stop at parsing or serializing a payload. It also needs to be transported correctly, synchronized with video, and integrated in a way that is usable in real pipelines.

The goal of this project was to provide a modular GStreamer-oriented solution that covers that full path, from metadata generation and decoding to frame-synchronous injection and transport-stream signaling.

Tooling and repository contents

The repository includes more than just the plugin implementation. It also provides:

  • Meson as the recommended build system
  • CMake support as an alternative build path
  • Python and C++ examples
  • local roundtrip examples
  • UDP and SRT workflow examples
  • automated tests
  • Docker support
  • installation and packaging documentation
  • design notes and implementation details

Current elements

The currently available elements are:

  • klvmetaenc
  • klvmetadec
  • klvframeinject
  • tspmtrewrite

Typical use cases

This plugin suite can be useful in scenarios such as:

  • video pipelines carrying synchronized metadata
  • MPEG-TS workflows requiring embedded KLV
  • ISR/UAS style metadata transport
  • experimentation with GStreamer metadata integration
  • interoperability testing with downstream systems and external analyzers

Open-source repository

You can find the project here:

https://github.com/mkassimi98/gstklvplugin

I also shared a short overview on LinkedIn:

https://www.linkedin.com/posts/mouhsine-kassimi-farhaoui-983738163_opensource-gstreamer-klv-activity-7441931945174978560-mxpJ

Feedback welcome

Feedback is very welcome, especially regarding:

  • element and API design
  • caps and negotiation choices
  • MPEG-TS metadata signaling approach
  • interoperability expectations
  • general improvements for robustness and maintainability

If you are working on GStreamer, KLV, MPEG-TS, or metadata transport workflows, I would be glad to hear your thoughts.

Top comments (0)