GNOME Bugzilla – Bug 692471
Issues with Ogg tag setting
Last modified: 2018-11-03 11:23:17 UTC
Created attachment 234329 [details] Small test application I have attached a simple test application. I basically tries to set 3 tags in an Ogg file. The first is TAG_APPLICATION_NAME, the second is TAG_LANGUAGE_CODE, and finally the last one is TAG_ENCODER. None of the 3 are successfully set in the output file, however the encoders seems to set their own value for TAG_ENCODER. There are some Tag specification here for Ogg-Vorbis - http://www.xiph.org/vorbis/doc/v-comment.html Doesn't mention something like TAG_APPLICATION_NAME or TAG_LANGUAGE_CODE, but I think we could add it ourselves.
> if Gst.ElementFactory.list_is_type(factory, 1125899906842626): # Audio Encoders factory code This won't work, fwiw.
> The first is TAG_APPLICATION_NAME, the second is TAG_LANGUAGE_CODE, and finally > the last one is TAG_ENCODER. An application should not set TAG_ENCODER. > None of the 3 are successfully set in the output file, Worksforme: gst-launch-1.0 -q audiotestsrc num-buffers=10 ! taginject tags='language-code=fr,application-name=Transmageddon,encoder=lame' ! vorbisenc ! fakesink dump=true | head -n 11 (not so much with theoraenc, but arguably that doesn't make much sense anyway) > however the encoders seems to set their own value for TAG_ENCODER. Which is the correct thing to do. > There are some Tag specification here for Ogg-Vorbis - > http://www.xiph.org/vorbis/doc/v-comment.html > Doesn't mention something like TAG_APPLICATION_NAME or TAG_LANGUAGE_CODE, but I > think we could add it ourselves. Those two are already mapped, so I don't know what the problem is.
> > if Gst.ElementFactory.list_is_type(factory, 1125899906842626): # Audio Encoders factory code > > This won't work, fwiw. Actually, I might be wrong here. I thought you were checking for a GType, but this is GST_ELEMENT_FACTORY_TYPE_AUDIO_ENCODER, so should work fine after all, assuming the value from the docs is correct (which may or may not be the case).
Well I took the value from the code not the docs, and it seems to work as I get the expected print debug statements on my console like expected. As for the tag setting. Looking at your gst-launch example, you use the taginject element, while I use the element.merge_tags call, could that be the reason the tagsetting works 100% for you and not for me?
Created attachment 259078 [details] Updated tagset script I see that element.merge_tags also work and updating the tags for me. In case if some one is still interested, I am updating the tested py script. There are some warnings which I did not bother to remove as I was only interested in checking if tags are getting updated in the saved file.
-- 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/79.