I'm trying to write an application which is able to extract (and process/convert) KLV metadata from a TS file or stream.
I found KLV support in private section of tsdemux, and I succeeded to extract them (in file for example) with this pipeline:
(gst-launch-1.0) filesrc location=mytsfile ! tsparse ! tsdemux ! meta/x-klv ! filesink location=klvextract.log
But, this only works with asynchronous TS file (no synchronization between AVC stream and KLV stream).
When I try with synchronous file from command line (gst-launch-1.0), i got this error:
./grammar.y(506): gst_parse_no_more_pads (): /GstPipeline:pipeline0/GstTSDemux:tsdemux0:
failed delayed linking some pad of GstTSDemux named tsdemux0 to some pad of GstFileSink named filesink0
ERROR: from element /GstPipeline:pipeline0/MpegTSParse2:mpegtsparse2-0: Internal data stream error.
When i try to do same in an application like this:
GstElement *pipeline, *filesrc, *ts_parser, *demuxer, *filter_caps_mtd, *filesink;
filesrc = gst_element_factory_make ("multifilesrc", "multifilesrc");
g_print ("Filesrc not created.\n");
g_object_set(G_OBJECT (filesrc), "location", argv, NULL);
ts_parser = gst_element_factory_make("tsparse", "ts_parser");
g_print("Unable to created tsparse.\n");