Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Matroska Tags (Read 1536 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Matroska Tags

I hope this is the right forum.

I'm currently working on creating mka audios that contain an AAC stream, an Opus stream, and a SRT stream. Purpose is for people who are hearing impaired but still benefit from audio, they just need captions to help them make out some of the words. The AAC and Opus streams are same content, it's just AAC decoders are not included out of box on some operating systems (those usually have Opus at this point)

Anyway - figuring out Matroska tags took a little effort but I can finally generate an xml python that when added to the MKA makes sense when I view it in VLC - I have one Tag TargetTypeValue of 70 that has metadata about the collection and one tag with a TargetTypeValue of 30 that is specific to the track itself.

But I want to also add replay gain data, and my understanding is that proper replay gain may vary from lossy format to lossy format, so I can't just add the replay gain data to the Tag node with TargetTypeValue 30.

I'm guessing I have two add to more Tag nodes, one specific to the AAC and one specific to the Opus. That would also let me store the encoder information. But I have trouble with the Matroska tag documentation, it is very confusing.

How do I create a Tag node that adds metadata specific to the AAC stream (always first added) and another one specific to the Opus stream (always second added)?

Thank you for suggestions.

Re: Matroska Tags

Reply #1
I figured it out - I can generate separate metadata xml files with just the specific tags for the streams and then use mkvmerge to add them via

mkvmerge -o final.mka --tags 0:aac.xml --tags 1:opus.xml tmp.mka

of course assuming the aac is stream 0 and the opus is stream 1 which they always are in my usage.

Re: Matroska Tags

Reply #2
Oh and it seems mkvtoolnix is the only application that actually reads the tags correctly, seems media applications don't understand how to parse them correctly into how they display tags, so I guess the benefit is just academic for now.