Getting started
gstreamer-klv-plugins make extensive use of the JSON concept (and syntax) for dealing with the nesting MISB standards hierarchy. JSON key represents a MISB Tag of a Local Set, whereas the value contains MISB decoded data.
{
"2": "2008-10-24T00:13:29.913Z",
"3": "MISSION01",
"13": 60.176822967,
"14": 128.426759042,
"15": 14190.72,
"16": 144.5713,
"65": 13,
"1": 53482
}
The "keys" in the above JSON correspond to MISB 0601.X specification.
This approach may greatly simplify the MISB metadata manipulation. We can create or edit metadata in any language (as text, or using JSON libraries) and then encode it into KLV buffer, or vice versa, receive the binary buffer and easily convert it to JSON for further processing. When a new standard revision becomes available, we just use new keys - the code remains the same...
Easy to Use...
For example, let's create a very simple GStreamer pipeline that takes a binary MISB 601 Local Set buffer (sample data from MISB ST 0601.16a), decodes it, and outputs it to stdout.
gst-launch-1.0 filesrc location=~/packet.bin ! klvdecode ! fakesink dump=TRUE
Or a pipeline that plays STANAG 4609 file and decodes its KLV metadata:
gst-launch-1.0 filesrc location=~/stanag.ts ! tsdemux name=demux demux. ! queue ! decodebin ! autovideosink demux. ! 'meta/x-klv' ! klvdecode ! queue ! fakesink dump=TRUE
Or a pipeline that encodes test video, adds some MISB metadata from a json file (every 33 ms) and creates a valid MSTANAG 4609 file:
gst-launch-1.0 videotestsrc ! 'video/x-raw,format=(string)I420,width=720,height=480,framerate=(fraction)30/1' ! \
x264enc bitrate=1500 ! 'video/x-h264, stream-format=(string)byte-stream, alignment=au' ! mpegtsmux alignment=7 name=mux ! \
filesink sync=false async=true location=~/test.ts \
multifilesrc do-timestamp=TRUE location=~/packet.json loop=true ! identity sleep-time=33000 ! \
klvencode ! queue ! 'meta/x-klv' ! mux.
Note, the above pipeline was tested with GStreamer 1.16. It may not work with other versions (because of the mpegtsmux issues)
The following plugins are available:
- klvdecode MISB KLV decoder plugin (meta/x-klv -> application/x-json)
- klvencode MISB KLV encoder plugin (application/x-json -> meta/x-klv)
Download plugins
The gstreamer-klv-plugins can be downloaded from the github page - gstreamer-klv-plugins-release
Getting help
To get help with gstreamer-klv-plugins, please contact us at support@impleotv.com.