adding datetime tag to pipeline

Pablo Rodríguez oinos at
Sat Apr 16 11:28:33 UTC 2022

On 4/16/22 09:42, Florian Echtler via gstreamer-devel wrote:
> Hello Pablo,
> Here's an example to get you started:

Many thanks for your help, Florian.

I found an sample in another program:

> You can exchange the parameter to parse_launch with your own pipeline
> description, and then call
> ti = pipeline.get_by_name("taginject0")
> to get a reference to the taginject node, and then call
> ti.set_property("tags", ...)
> to set the tags property (although I'm not 100% sure how, to be honest).

An adapted version of the relevant code from the reference above:

  tagsetter = self.pipeline.get_by_interface(Gst.TagSetter)
  taglist = Gst.TagList.new_empty()
  for tag_key, tag_value in tags_dict.items():
      taglist.add_value(Gst.TagMergeMode.REPLACE, tag_key, key_value)
  if tagsetter:
      tagsetter.merge_tags(taglist, Gst.TagMergeMode.PREPEND)

I wonder whether this will work.

Many thanks for your help again,


More information about the gstreamer-devel mailing list