adding datetime tag to pipeline
Pablo Rodríguez
oinos at web.de
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:
> https://github.com/gkralik/python-gst-tutorial/blob/master/basic-tutorial-1.py.
Many thanks for your help, Florian.
I found an sample in another program:
https://sourceforge.net/p/gentrans/code/ci/master/tree/tools/entrans.py#l2803.
> 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,
Pablo
More information about the gstreamer-devel
mailing list