Decode KLV (Key Length Value) in Deepstream pipeline?

I have seen a few people struggling to demux (and interpret) KLV metadata using GStreamer.

Is there a known method for reading KLV metadata from video in Deepstream?

KLV is the MISB standard for encoded metadata in H264 streams.

Here is a hosted sample H264 video with KLV metadata:


We don’t have any implementation about KLV metadata. Please share more information about this.
1 What is the gstreamer elements for KLV metadta?
2 Please share a sample pipeline of generating KLV metadata in h264 stream, and a pipeline of extracting the metadta from the h264 stream.

We need more detail to understand this function and then check if we can customize deepstream-app to have the function. Let’s see if we can work out a solution.

Hey Dane,

Let me know if this is what you are looking for … having the KLV feature in the deepstream pipeline would be GREAT!

Here is a single command I use to run to broadcast a video that contains klv data:

		gst-launch-1.0 filesrc location=sample_with_klv.ts ! tee name=t ! queue ! video/x-h264,stream-format=byte-stream,alignment=nal ! udpsink host= port=50007 auto-multicast=true t. ! queue ! tsdemux ! fakesink sync=true

And this is how I receive it (emphasis on the data-re part!):

		/usr/bin/ffmpeg -nostats -loglevel quiet -i udp:// -map data-re -codec copy -f data -

Or receive this with gstreamer:

gst-launch-1.0 udpsrc caps='application/x-rtp, media=(string)application, clock-rate=(int)90000, encoding-name=(string)SMPTE336M' ! rtpklvdepay ! fakesink dump=true

1 Like

We don’t have motivation of using KLV in DeepStrram SDK. Would suggest you use existing implementation nvdsmeta which collects the result of deep learning inference. Please check the sample: