GNOME Bugzilla – Bug 727044
Unable to set language tags
Last modified: 2014-04-03 11:45:52 UTC
I am trying to set the language tag for Ogg or Quicktime files, but it doesn't seem to work. I do know the tagsetting code works because the 'Transmageddon transcoder' tag does get set in Quicktime. But language or language-code seems completely unaffected by my attempts. 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") if self.audiodata[0]['languagecode'] != None: taglist.add_value(Gst.TagMergeMode.APPEND, Gst.TAG_LANGUAGE_CODE, self.audiodata[0]['languagecode']) # FIXME: Currently only doing 1 stream taglist.add_value(Gst.TagMergeMode.APPEND, Gst.TAG_LANGUAGE_NAME, self.audiodata[0]['language']) print(taglist.to_string()) element.merge_tags(taglist, Gst.TagMergeMode.REPLACE)
Created attachment 273080 [details] Simple test application Wrote simply test application triggering bug. If you run gst-discover -v on the resulting file you will see this: Additional info: None Stream ID: 1b835bad395b122c70244e73201cdad93f907b4e2954d354717571b1a9e93965/11f16d8c Language: <unknown> Channels: 2 Sample rate: 44100 Depth: 32 Bitrate: 112000 Max bitrate: 0 Tags: taglist, container-format=(string)Ogg, encoder=(string)"Xiph.Org\ libVorbis\ I\ 20140122\ \(Turpak\303\244r\303\244jiin\)", encoder-version=(uint)0, audio-codec=(string)Vorbis, nominal-bitrate=(uint)112000, bitrate=(uint)112000; So there are 2 interesting bits there. First is that Language is set to Unknown, despite me setting it to 'Afrikaans' in my code. The second is that there is a tag called 'taglist', which I find suspect.
use Gst.TagSetter.merge_tags (self.audioencoder, taglistbob, Gst.TagMergeMode.REPLACE) There is a merge_tags method on both the tagsetter and the audioencoder base class so you need to make sure to call the right one.
Closing this as notabug, although one could say that there is a bug in the sense that our APIs and their behaviours are a somewhat confusing here.