After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 727044 - Unable to set language tags
Unable to set language tags
Status: RESOLVED NOTABUG
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-03-25 19:50 UTC by Christian Fredrik Kalager Schaller
Modified: 2014-04-03 11:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Simple test application (6.01 KB, text/x-python)
2014-03-27 12:32 UTC, Christian Fredrik Kalager Schaller
Details

Description Christian Fredrik Kalager Schaller 2014-03-25 19:50:48 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)
Comment 1 Christian Fredrik Kalager Schaller 2014-03-27 12:32:20 UTC
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.
Comment 2 Wim Taymans 2014-04-01 10:13:20 UTC
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.
Comment 3 Christian Fredrik Kalager Schaller 2014-04-03 11:45:52 UTC
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.