Matroska Tags Vs Segment Title

For questions and discussion that is NOT (I repeat NOT) specific to a certain Operating System.
ndjamena
Blank Cone
Blank Cone
Posts: 32
Joined: 21 Dec 2013 01:57

Matroska Tags Vs Segment Title

Postby ndjamena » 23 Apr 2014 06:13

I'd just like clarification on how VLC handles Tags and the Segment Title. It's OK, no one seems to know how to do it right, I'm pretty sure customising my Tags to one program will break it somewhere else.

http://matroska.org/technical/specs/tag ... argettypes

This is what I'm using, it seems quite clear on how tags are supposed to be organised, Level 50 = Episode, Level 60 = Season, Level 70 = Show (Collection), however in VLC at least adding a segment title seems to confuse things. It uses the segment title as the episode, then uses the level 50 (Episode) tag as the series. If I remove the segment title it switches to using the level 70 (Show) tag as the episode and the Level 50 (Episode) tag as the show. Is there some actual method to this or is it just assigning the first thing it finds as the Episode and the Last thing it finds as the Show (MediaInfo only shows the last thing it finds, so I keep the episode name last within the file itself).

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37519
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Matroska Tags Vs Segment Title

Postby Jean-Baptiste Kempf » 24 Apr 2014 14:41

Our code is very simplistic:

We use Title+50 as the Album name. Any other Title is the Title name.

The problem is that the specification is moronic, since chapters (aka file subdivisions) are on the same level as audio tracks (aka different files).

Patches to fix this are welcome.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

ndjamena
Blank Cone
Blank Cone
Posts: 32
Joined: 21 Dec 2013 01:57

Re: Matroska Tags Vs Segment Title

Postby ndjamena » 24 Apr 2014 22:40

So basically, in an MKA with multiple audio streams, or even one, a level 50 tag represents an 'ALBUM', whereas each audio stream or 'SONG' gets a level 30 tag. And what I'm seeing is MKA logic being applied to an MKV... That makes sense... Thankyou.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37519
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Matroska Tags Vs Segment Title

Postby Jean-Baptiste Kempf » 25 Apr 2014 10:43

Patches are welcome ;)
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

ndjamena
Blank Cone
Blank Cone
Posts: 32
Joined: 21 Dec 2013 01:57

Re: Matroska Tags Vs Segment Title

Postby ndjamena » 27 Apr 2014 05:02

Code: Select all

(MKVInfo) |+ Segment information at 4151 size 197 (MKVInfo) | + Timecode scale: 1000000 at 4157 size 7 (MKVInfo) | + Muxing application: libebml v1.3.0 + libmatroska v1.4.1 at 4164 size 38 (MKVInfo) | + Writing application: mkvmerge v6.9.1 ('Blue Panther') 64bit built on Apr 18 2014 18:23:38 at 4202 size 71 (MKVInfo) | + Duration: 1330.080s (00:22:10.080) at 4273 size 7 (MKVInfo) | + Date: Fri Apr 25 04:47:24 2014 UTC at 4280 size 11 (MKVInfo) | + Title: Beast Wars - 01x01 - Beast Wars (1) at 4291 size 38 (MKVInfo) | + Segment UID: 0x8f 0xdb 0x78 0xef 0x2f 0xba 0xb0 0x15 0xba 0x85 0x60 0xed 0xad 0x70 0xf0 0xea at 4329 size 19

Code: Select all

(MKVInfo) |+ Tags at 1002824128 size 742 (MKVInfo) | + Tag at 1002824134 size 88 (MKVInfo) | + Targets at 1002824137 size 20 (MKVInfo) | + TargetTypeValue: 70 at 1002824140 size 4 (MKVInfo) | + TargetType: COLLECTION at 1002824144 size 13 (MKVInfo) | + Simple at 1002824157 size 34 (MKVInfo) | + Name: TITLE at 1002824160 size 8 (MKVInfo) | + String: Beast Wars at 1002824168 size 13 (MKVInfo) | + TagLanguage: eng at 1002824181 size 6 (MKVInfo) | + DefaultLanguage: 1 at 1002824187 size 4 (MKVInfo) | + Simple at 1002824191 size 31 (MKVInfo) | + Name: TOTAL_PARTS at 1002824194 size 14 (MKVInfo) | + String: 3 at 1002824208 size 4 (MKVInfo) | + TagLanguage: eng at 1002824212 size 6 (MKVInfo) | + DefaultLanguage: 1 at 1002824218 size 4 (MKVInfo) | + Tag at 1002824222 size 83 (MKVInfo) | + Targets at 1002824225 size 16 (MKVInfo) | + TargetTypeValue: 60 at 1002824228 size 4 (MKVInfo) | + TargetType: SEASON at 1002824232 size 9 (MKVInfo) | + Simple at 1002824241 size 32 (MKVInfo) | + Name: PART_NUMBER at 1002824244 size 14 (MKVInfo) | + String: 01 at 1002824258 size 5 (MKVInfo) | + TagLanguage: eng at 1002824263 size 6 (MKVInfo) | + DefaultLanguage: 1 at 1002824269 size 4 (MKVInfo) | + Simple at 1002824273 size 32 (MKVInfo) | + Name: TOTAL_PARTS at 1002824276 size 14 (MKVInfo) | + String: 26 at 1002824290 size 5 (MKVInfo) | + TagLanguage: eng at 1002824295 size 6 (MKVInfo) | + DefaultLanguage: 1 at 1002824301 size 4 (MKVInfo) | + Tag at 1002824305 size 565 (MKVInfo) | + Targets at 1002824309 size 17 (MKVInfo) | + TargetTypeValue: 50 at 1002824312 size 4 (MKVInfo) | + TargetType: EPISODE at 1002824316 size 10 (MKVInfo) | + Simple at 1002824326 size 38 (MKVInfo) | + Name: TITLE at 1002824329 size 8 (MKVInfo) | + String: Beast Wars (1) at 1002824337 size 17 (MKVInfo) | + TagLanguage: eng at 1002824354 size 6 (MKVInfo) | + DefaultLanguage: 1 at 1002824360 size 4 (MKVInfo) | + Simple at 1002824364 size 32 (MKVInfo) | + Name: PART_NUMBER at 1002824367 size 14 (MKVInfo) | + String: 01 at 1002824381 size 5 (MKVInfo) | + TagLanguage: eng at 1002824386 size 6 (MKVInfo) | + DefaultLanguage: 1 at 1002824392 size 4 (MKVInfo) | + Simple at 1002824396 size 436 (MKVInfo) | + Name: DESCRIPTION at 1002824400 size 14 (MKVInfo) | + String: Two ships emerge from transwarp space, engaged in battle. Both Crash, leaving the heroic Maximals and evil Predacons stranded on a strange planet. Each side scans their surroundings and find the planet is rich with Energon, but at dangerous levels. For protection, they develop Beast Modes based on native lifeforms, and a struggle for control of the planet quickly ensues. The Beast Wars have begun! at 1002824414 size 408 (MKVInfo) | + TagLanguage: eng at 1002824822 size 6 (MKVInfo) | + DefaultLanguage: 1 at 1002824828 size 4 (MKVInfo) | + Simple at 1002824832 size 38 (MKVInfo) | + Name: CONTENT_TYPE at 1002824835 size 15 (MKVInfo) | + String: TV Show at 1002824850 size 10 (MKVInfo) | + TagLanguage: eng at 1002824860 size 6 (MKVInfo) | + DefaultLanguage: 1 at 1002824866 size 4
That's all I've got at this stage, it's preliminary and incomplete but it would be nice if I could find at least ONE program that can read matroska tags properly so I can tell if I've done it right :roll:

ndjamena
Blank Cone
Blank Cone
Posts: 32
Joined: 21 Dec 2013 01:57

Re: Matroska Tags Vs Segment Title

Postby ndjamena » 04 May 2014 09:17

I happened to go to the Mezzmo forum to ask about how they handled MKV Tags and they told me to give them the FFMPEG Information for a file.

It included this:

Code: Select all

Input #0, matroska,webm, from 'F:\Videos\Watch\Beast Wars\Season 01\Beast Wars - 01x02 - Beast Wars (2).mkv': Metadata: title : Beast Wars - 01x02 - Beast Wars (2) creation_time : 2014-04-27 14:33:52 COLLECTION/TITLE: Beast Wars COLLECTION/TITLE-eng: Beast Wars COLLECTION/TOTAL_PARTS: 3 COLLECTION/TOTAL_PARTS-eng: 3 SEASON/PART_NUMBER: 01 SEASON/PART_NUMBER-eng: 01 SEASON/TOTAL_PARTS: 26 SEASON/TOTAL_PARTS-eng: 26 EPISODE/TITLE : Beast Wars (2) EPISODE/TITLE-eng: Beast Wars (2) EPISODE/PART_NUMBER: 02 EPISODE/PART_NUMBER-eng: 02 EPISODE/DESCRIPTION: Dinobot, a disgruntled Predacon warrior, has challenged Optimus Primal for control of the Maximals. Seeing his chance, Megatron strikes, but this only serves to seal Dinobot's defection to the Maximals. The battle uncovers a huge crystal Energon deposit EPISODE/DESCRIPTION-eng: Dinobot, a disgruntled Predacon warrior, has challenged Optimus Primal for control of the Maximals. Seeing his chance, Megatron strikes, but this only serves to seal Dinobot's defection to the Maximals. The battle uncovers a huge crystal Energon deposit EPISODE/CONTENT_TYPE: TV Show EPISODE/CONTENT_TYPE-eng: TV Show Duration: 00:22:10.08, start: 0.000000, bitrate: 1957 kb/s
I think you've been looking at Matroska tags in the wrong way, it looks as though the levels are there simply to say that all tags belonging to one level also apply to the levels below it, and that the important identifiers are in fact the 'EPISODE', 'SEASON' and 'COLLECTION' markers rather than the levels themselves.

matsp888
New Cone
New Cone
Posts: 8
Joined: 05 May 2015 05:23

Re: Matroska Tags Vs Segment Title

Postby matsp888 » 05 May 2015 05:26

Our code is very simplistic:

We use Title+50 as the Album name. Any other Title is the Title name.

The problem is that the specification is moronic, since chapters (aka file subdivisions) are on the same level as audio tracks (aka different files).

Patches to fix this are welcome.
It's not moronic at all. Audio tracks don't necessarily have to be in different files, since one Matroska file can contain all the tracks of an album, using chapters to separate them.

matsp888
New Cone
New Cone
Posts: 8
Joined: 05 May 2015 05:23

Re: Matroska Tags Vs Segment Title

Postby matsp888 » 05 May 2015 05:46

That's all I've got at this stage, it's preliminary and incomplete but it would be nice if I could find at least ONE program that can read matroska tags properly so I can tell if I've done it right :roll:
That's the big problem with Matroska tags. Nobody seems to understand how to use them (except me ;)). I would like to take the opportunity to plug my little Matroska tag editor in Perl as well. It could be viewed as a simplification of the XML that MKVToolNix uses. https://sourceforge.net/projects/mktags/

matsp888
New Cone
New Cone
Posts: 8
Joined: 05 May 2015 05:23

Re: Matroska Tags Vs Segment Title

Postby matsp888 » 05 May 2015 06:20

Our code is very simplistic:

We use Title+50 as the Album name. Any other Title is the Title name.

The problem is that the specification is moronic, since chapters (aka file subdivisions) are on the same level as audio tracks (aka different files).

Patches to fix this are welcome.
It's not moronic at all. Audio tracks don't necessarily have to be in different files, since one Matroska file can contain all the tracks of an album, using chapters to separate them.
I do understand your difficulty with finding the right place to get the title though. If you're looking at target type values, it won't work very well, since for movies, target type value 30 has the target type (or name if you will) CHAPTER (among others), and for audio files it has the target type TRACK (among others). You'd better look at the target types (names) and get the title from the tag with the target type 'MOVIE' or 'EPISODE' for a movie, and 'TRACK' for an audio file.

matsp888
New Cone
New Cone
Posts: 8
Joined: 05 May 2015 05:23

Re: Matroska Tags Vs Segment Title

Postby matsp888 » 05 May 2015 06:23

Our code is very simplistic:

We use Title+50 as the Album name. Any other Title is the Title name.

The problem is that the specification is moronic, since chapters (aka file subdivisions) are on the same level as audio tracks (aka different files).

Patches to fix this are welcome.
It's not moronic at all. Audio tracks don't necessarily have to be in different files, since one Matroska file can contain all the tracks of an album, using chapters to separate them.
I do understand your difficulty with finding the right place to get the title though. If you're looking at target type values, it won't work very well, since for movies, target type value 30 has the target type (or name if you will) CHAPTER (among others), and for audio files it has the target type TRACK (among others). You'd better look at the target types (names) and get the title from the tag with the target type 'MOVIE' or 'EPISODE' for a movie, and 'TRACK' for an audio file.
What makes it worse is that the target type/name is not mandatory in the file, only the target type value is. But USUALLY target type value 50 stands for MOVIE or EPISODE if it's a movie, and target type value 30 stands for TRACK if it's an audio file.

matsp888
New Cone
New Cone
Posts: 8
Joined: 05 May 2015 05:23

Re: Matroska Tags Vs Segment Title

Postby matsp888 » 05 May 2015 06:52

Our code is very simplistic:

We use Title+50 as the Album name. Any other Title is the Title name.

The problem is that the specification is moronic, since chapters (aka file subdivisions) are on the same level as audio tracks (aka different files).

Patches to fix this are welcome.
It's not moronic at all. Audio tracks don't necessarily have to be in different files, since one Matroska file can contain all the tracks of an album, using chapters to separate them.
I do understand your difficulty with finding the right place to get the title though. If you're looking at target type values, it won't work very well, since for movies, target type value 30 has the target type (or name if you will) CHAPTER (among others), and for audio files it has the target type TRACK (among others). You'd better look at the target types (names) and get the title from the tag with the target type 'MOVIE' or 'EPISODE' for a movie, and 'TRACK' for an audio file.
What makes it worse is that the target type/name is not mandatory in the file, only the target type value is. But USUALLY target type value 50 stands for MOVIE or EPISODE if it's a movie, and target type value 30 stands for TRACK if it's an audio file.
Perhaps the best thing is to just look at the target type value, and if it's a movie, get the title from the tag with target type value 50, if it's an audio file, get the title from the tag with target type value 30.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37519
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Matroska Tags Vs Segment Title

Postby Jean-Baptiste Kempf » 05 May 2015 11:24

Our code is very simplistic:

We use Title+50 as the Album name. Any other Title is the Title name.

The problem is that the specification is moronic, since chapters (aka file subdivisions) are on the same level as audio tracks (aka different files).

Patches to fix this are welcome.
It's not moronic at all. Audio tracks don't necessarily have to be in different files, since one Matroska file can contain all the tracks of an album, using chapters to separate them.
Sorry, but that's not a good idea. It is the .cue file issue again.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37519
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Matroska Tags Vs Segment Title

Postby Jean-Baptiste Kempf » 05 May 2015 11:25

Our code is very simplistic:

We use Title+50 as the Album name. Any other Title is the Title name.

The problem is that the specification is moronic, since chapters (aka file subdivisions) are on the same level as audio tracks (aka different files).

Patches to fix this are welcome.
It's not moronic at all. Audio tracks don't necessarily have to be in different files, since one Matroska file can contain all the tracks of an album, using chapters to separate them.
I do understand your difficulty with finding the right place to get the title though. If you're looking at target type values, it won't work very well, since for movies, target type value 30 has the target type (or name if you will) CHAPTER (among others), and for audio files it has the target type TRACK (among others). You'd better look at the target types (names) and get the title from the tag with the target type 'MOVIE' or 'EPISODE' for a movie, and 'TRACK' for an audio file.
What makes it worse is that the target type/name is not mandatory in the file, only the target type value is. But USUALLY target type value 50 stands for MOVIE or EPISODE if it's a movie, and target type value 30 stands for TRACK if it's an audio file.
Then, it could be the chapter name, not the title.

Anyway, patches welcome :)
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

matsp888
New Cone
New Cone
Posts: 8
Joined: 05 May 2015 05:23

Re: Matroska Tags Vs Segment Title

Postby matsp888 » 05 May 2015 17:10

Our code is very simplistic:

We use Title+50 as the Album name. Any other Title is the Title name.

The problem is that the specification is moronic, since chapters (aka file subdivisions) are on the same level as audio tracks (aka different files).

Patches to fix this are welcome.
It's not moronic at all. Audio tracks don't necessarily have to be in different files, since one Matroska file can contain all the tracks of an album, using chapters to separate them.
Sorry, but that's not a good idea. It is the .cue file issue again.
Not a good idea? I'm just saying that it's possible for Matroska files to have all the audio tracks in one album in the same file. Whether it's a good or bad idea is another question ;) And I don't know if my comment was relevant in this discussion, since I'm not clear on what you're discussing anyway.

matsp888
New Cone
New Cone
Posts: 8
Joined: 05 May 2015 05:23

Re: Matroska Tags Vs Segment Title

Postby matsp888 » 05 May 2015 17:23

Anyway, patches welcome :)
Yes, I can see that ;) They won't come from me, I'm afraid. Anyway, it's sad that people don't bother getting into the mechanics of Matroska tags. It's more complex than other types of tags, but it's not overly hard to grasp, not in my book at least.

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37519
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Matroska Tags Vs Segment Title

Postby Jean-Baptiste Kempf » 05 May 2015 22:11

Anyway, patches welcome :)
Yes, I can see that ;) They won't come from me, I'm afraid. Anyway, it's sad that people don't bother getting into the mechanics of Matroska tags. It's more complex than other types of tags, but it's not overly hard to grasp, not in my book at least.
I'll ask someone to have a look.
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

matsp888
New Cone
New Cone
Posts: 8
Joined: 05 May 2015 05:23

Re: Matroska Tags Vs Segment Title

Postby matsp888 » 06 May 2015 01:51

Anyway, patches welcome :)
Yes, I can see that ;) They won't come from me, I'm afraid. Anyway, it's sad that people don't bother getting into the mechanics of Matroska tags. It's more complex than other types of tags, but it's not overly hard to grasp, not in my book at least.
I'll ask someone to have a look.
That's OK :)

ndjamena
Blank Cone
Blank Cone
Posts: 32
Joined: 21 Dec 2013 01:57

Re: Matroska Tags Vs Segment Title

Postby ndjamena » 05 Jun 2015 19:00

MUSIC VIDEO

For all your brilliance you've done nothing but repeat what I said a year ago.

https://trac.videolan.org/vlc/ticket/13773

The Specs look like they were written by the village idiot, Mosu doesn't know how Matroska Tags work, so the only person who can tell us what to do in any given situation, or even how to interpret what's been done already is Steve Lhomme himself.
It is mandatory in the specs. The chapters are not supposed to be in chronological order.
I've read the specs, it says nothing of the sort. VLC has already made the mistake of trying to guess what to do using their best judgement and they got it wrong, without clarification there's no guarantee your not influencing them to make the same mistake a second time.

Even if you do get VLC to interpret tags correctly, with the state the Specs are in tags can never be widely accepted, since the specs are the blue print everyone has to work from and the Matroska SPECIFICations don't live up to the name.

If Lhomme had spent his time rewriting the specs rather than messing around with the VLC source code something may have been achieved through my efforts. As things stand I just feel cheated. How many program aren't going to get written because the specs are the way they are? How many big developers are just going to take one look at the specs and think "screw this" and not bother? What did Lhomme really achieve by rewriting VLCs MKV chapters code? If he'd just written the specs down properly in the first place, he wouldn't have had to.

(and yes, I have deleted all the MKVs from my PC already, thank you for the suggestion, I wish I could sit still long enough to read a book.)

Jean-Baptiste Kempf
Site Administrator
Site Administrator
Posts: 37519
Joined: 22 Jul 2005 15:29
VLC version: 4.0.0-git
Operating System: Linux, Windows, Mac
Location: Cone, France
Contact:

Re: Matroska Tags Vs Segment Title

Postby Jean-Baptiste Kempf » 16 Jul 2015 17:16

You are a insulting aggressive person. Go away!
Jean-Baptiste Kempf
http://www.jbkempf.com/ - http://www.jbkempf.com/blog/category/Videolan
VLC media player developer, VideoLAN President and Sites administrator
If you want an answer to your question, just be specific and precise. Don't use Private Messages.

ndjamena
Blank Cone
Blank Cone
Posts: 32
Joined: 21 Dec 2013 01:57

Re: Matroska Tags Vs Segment Title

Postby ndjamena » 15 Nov 2015 09:09

OK, for one thing, you answered over a month after the fact.

For another, this was a continuation of a discussion over on videohelp.

This guy had no idea how tags worked, no one does, and yet he'd being lording around boasting about how brilliant he was since no one else understood the tagging system like he did.

A lot of the best Matroska features are irreparably damaged because someone didn't write the specs down properly. All players were supposed to skip any elements they didn't understand, but since it wasn't written in the specs so many players didn't do that that it's pretty much crippled any progress the container may have. Mosu is afraid to do ANYTHING, because every time he changes any little thing programs start crashing all over the place.

Finally, if you go back to the top of the thread, you're the one who called the specifications moronic long before I had any idea what was going on, and since the tagging system is all Lhommes doing it's hypocritical of you to tell me off for pointing out what a mess the specs are in.

I wasted months trying to figure out the Tagging system and if I didn't hound Mosu for info on how subchapters worked VLC wouldn't have a spec compliant chapter system in the next version.

I have no problem with you or VLC and I'm dealing with the fact that most of the Matroska specs are a wreck, but this guy is a nuisance, much like everyone fussing around the tagging system, including me.


Return to “General VLC media player Troubleshooting”

Who is online

Users browsing this forum: No registered users and 9 guests