GNOME Bugzilla – Bug 652578
encodebin should implement TagSetter interface
Last modified: 2018-11-03 11:18:59 UTC
As mentioned encodebin should implement the tagsetter interface. Edward replied in an email to gst-devel some time ago with the following: Ideally we should make encodebin implement the TagSetter interface (and proxy the various calls to the contained compatible elements). Edward
What's the status with that bug ? We would like to have that feature as well in pitivi.
I don't think anyone worked on it. I am currently doing it manually in transmageddon using this code: def OnEncodebinElementAdd(self, encodebin, element): factory=element.get_factory() if factory != None: # set multipass cache file on video encoder element if (self.multipass != 0) and (self.passcounter == int(0)): if Gst.ElementFactory.list_is_type(factory, 2814749767106562): # this is the factory code for Video encoders element.set_property("multipass-cache-file", self.cachefile) # Set Transmageddon as Application name using Tagsetter interface tagyes = factory.has_interface("GstTagSetter") if tagyes ==True: taglist=Gst.TagList.new_empty() taglist.add_value(Gst.TagMergeMode.APPEND, Gst.TAG_APPLICATION_NAME, "Transmageddon transcoder") element.merge_tags(taglist, Gst.TagMergeMode.REPLACE) if Gst.ElementFactory.list_is_type(factory, 1125899906842626): # Audio Encoders factory code taglist=Gst.TagList.new_empty() if self.audiodata[0]['languagecode'] != None: taglist.add_value(Gst.TagMergeMode.APPEND, Gst.TAG_LANGUAGE_CODE, self.audiodata[0]['language']) # FIXME: Currently only doing 1 stream longname=factory.get_metadata('long-name') taglist.add_value(Gst.TagMergeMode.APPEND, Gst.TAG_ENCODER, longname) element.merge_tags(taglist, Gst.TagMergeMode.REPLACE)
Christian, gst_bin_iterate_all_by_interface() might be easier to get the tagsetter elements.
The tagsetter iterface should be implemented on the EncodingProfile so the user can determine on what stream what tags belong to. The in encodebin we should just make sure that when an element is created for that profile, the tags are passes along.
That makes sense IMHO, although it's not clear that it has to be the tag setter interface itself, it could just be a _set_tags() API. Would require some taginject elements in encodebin then, or somesuch to make sure we can set stream-specific tags, or we find a way to do this using GstTagSetter.
The tag-setter api is really made for elements and not so much for bins. We could implement tag-setter in encodebin for now - thats good enough for many cases. Maybe we can extend the tag-setter iface so that elements can report which tags they handle and which they don't. Then the bin can try to set tags on the encoders first, then try the muxer (or something like that).
-- 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-base/issues/49.