GNOME Bugzilla – Bug 692431
Setting tags doesn't seem to work very well
Last modified: 2013-01-24 13:45:20 UTC
I have the following code in Transmageddon for trying to set some tags. I have noticed that the TAG_APPLICATION_NAME tag gets set in Quicktime container, but the TAG_LANGUAGE_CODE doesn't seem to be set in any format I tried (Vorbis, WebM and Quicktime). 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 print("got audio encoder") taglistBANG=Gst.TagList.new_empty() taglistBANG.add_value(Gst.TagMergeMode.APPEND, Gst.TAG_LANGUAGE_CODE, self.audiodata[0]['language']) # FIXME: Currently only doing 1 stream print(self.audiodata[0]['language']) longname=factory.get_metadata('long-name') print(longname) taglistBANG.add_value(Gst.TagMergeMode.APPEND, Gst.TAG_ENCODER, longname) element.merge_tags(taglistBANG, Gst.TagMergeMode.REPLACE)
Ok, I am closing this and will intead post a tracker bug with invidial bug reports per container format basis, including simple comand line python application.