GNOME Bugzilla – Bug 791533
Improve support for KLV metadata in tsdemuxer and tsmuxer
Last modified: 2018-11-03 14:16:48 UTC
Created attachment 365454 [details] [review] Mpeg2 transport stream descriptor for KLV Add additions to tsdemuxer and tsmuxer that handle synchronous and asynchronous metadata streams per MISB-0604
Created attachment 365455 [details] [review] Add asynchronous and asynchronous KLV improvements to Mpeg transport stream muxer
Created attachment 365456 [details] [review] Modify Mpeg2 transport stream muxer caps to bring it in alignment with demuxe
Created attachment 365457 [details] [review] Add asynchronous and asynchronous KLV improvements to Mpeg transport stream demuxer
Created attachment 365459 [details] Test video with asynchronous klv metadata
Created attachment 365460 [details] Test video with synchronous klv metadata
Test commandline gst-launch-1.0 filesrc location=/tmp/klv_metadata_test_async.ts ! tsdemux name=demux ! queue ! h264parse ! mpegtsmux alignment=7 name=mux ! filesink location=/tmp/test.ts demux. ! 'meta/x-klv' ! queue ! mux.
Nice, that's been on my list to finish up for ages!
I also have a klv meta implementation I've been meaning to merge, will see how yours compares :)
Technical changes are referenced in this document: http://www.gwg.nga.mil/misb/docs/standards/ST1402.2.pdf
Comment on attachment 365456 [details] [review] Modify Mpeg2 transport stream muxer caps to bring it in alignment with demuxe What's the rationale for this change? I think we want to keep the requirement for parsed and framed input?
I had caps negotiation problems between the demuxer and muxer if these parsed/framed booleans were set. I could ultimately determine what condition needed to be met for these values to be set true, but without the change I couldn't do a demux -> mux of these types. Is there anything I could look at to understand when/why these should be set?
You will need a parser (mpegaudioparse, aacparse, etc.) between demuxer and muxer. We should probably split this part of the discussion off into a separate bug if needed, or move it onto the mailing list.
I also just realized that the MISB document I reference in my code comment for patch 0001-Add-MPEG2-TS-descriptor-support-for-KLV-metadata.patch is incorrect. I references document MISB 0604 but it should be MISB ST1402. Sorry!
I created an enhancement to add typefinder support for meta/x-klv to bug.freeedesktop.org in late October. I have gotten any feedback on it at all. Do you suggest I recreate that here instead?
No, please post a follow-up comment there, and/or add it to "See also"
I also found that this change needed to be in place to prevent the pipeline from block on sparse data - bug 759807.
Just for comparison, I have added my KLV meta patches to bug #791918. It's slightly different than what you're doing here though, so I don't think you need to worry about that at the moment, we just have to work through your patches and see how it should be done instead. Your KLVMeta thing is something a bit different, and I suspect it should be done differently.
It looks like our use cases are different. The metadata you are adding consists of binary KLV. In my case the buffer is KLV and the metadata is a header for each buffer as described in MISB Standard 0604, section 6.2 for synchronous muxing of KLV in an Mpeg2 transport stream. I didn't think about it initially but I see now, at the very least, that my meta structure and function names are too generic for this specific use case. Do you see potentially combining these use cases into a single KLV file? It also looks like I may have put my implementation in the wrong place. I added mine to codecparsers and yours is under tag.
Yes, different use cases indeed. We can and will support both scenarios though, so there's no problem with that. At first glance your klv meta looked like it might be specific to the mpeg-ts mapping, in which case it should probably be done differently. I need to read up on the specs again first to make a more useful suggestion here though.
Yes, it is specific to ts mapping. The MISB 0604 standard describes synchronous KLV muxing but the access unit header specific details are actually contained in MISP 1402.2, section 9.4.1. These header values are what my meta is for.
We maintain a change that is different, but also parses synchronous metadata. Can I help with this change. I would love not to maintain this on our end.
These patches don't work on 1.14.0. I am getting undefined symbols for gst_buffer_add_klv_meta on tsdemux plugin and another one for tsmux.
Created attachment 371446 [details] [review] klvmeta export decorator patch Turns out there are some required export decorators needed to work with 1.14.0/master. There are some other minor changes required to get the already attached patches working as well, which I can upload if anyone wants it.
-- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/issues/642.