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 CUE sheet and tags (Read 16268 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Matroska CUE sheet and tags

In the purpose of making single file audio CD backup, I would like mkvmerge (with mmg) to use the artist/title/track#/genre/date informations from the .cue file used as "chapter file" to set the tags of each chapter... Unfortunately, AFAIK mkvmerge doesn't get the chapter tags from the cue sheet... why ?

For the moment I have to "fix" the .mka file with Foobar2000 and "Get tags from freedb". May I hope a more simple solution soon?
The second issue is that I would like to do it in linux... so for the moment I can't (Foobar2000 doesn't exist for Linux and mkvmerge can't do it alone).
May be a cue2xml script exists?

Bye the way, under linux to get the .cue we have to use cdrdao to get a .toc  and use a toc2cue script. But the .cue generated this way doen't contain any artist/title/.... tag.
Could it be possible to directly use the .toc file with mkvmerge to generate the chapter point and the chapter tags? This way we could easily make a script to directly Rip an audio CD to a flac/mka file. 

Matroska CUE sheet and tags

Reply #1
Matroska uses it's own XML-based chapter markup format.

You can convert .cue files into Matroska's own chapter format with MMG: in MMG, select "Chapter Editor" -> Load (select your .cue file).

Now the "Chapter Editor" tab has some contents which you can modify if necessary. Select the "Chapter Editor" menu again and this time select "Save". This generates a .xml chapter file. Now go to the "Global" tab, and load up the .xml file in "Chapter file:".

Now the Matroska file has chapters.

Matroska CUE sheet and tags

Reply #2
Ok, but it doesn't add all the tags as Foobar2000 does.

Matroska CUE sheet and tags

Reply #3
Quote
In the purpose of making single file audio CD backup, I would like mkvmerge (with mmg) to use the artist/title/track#/genre/date informations from the .cue file used as "chapter file" to set the tags of each chapter... Unfortunately, AFAIK mkvmerge doesn't get the chapter tags from the cue sheet... why ?

Please send me one of those toc files with all the tags you want to have converted automatically and I'll see what I can do.

Matroska CUE sheet and tags

Reply #4
This is the .cue file I want to use to set chapters and chapter tags :

Code: [Select]
REM DATE 2000
REM GENRE Rock
REM DISCID 94097f0d
PERFORMER "Air"
TITLE "The Virgin Suicides"
FILE "Air - The Virgin Suicides.flac" WAVE
 TRACK 01 AUDIO
   TITLE "Playground Love"
   PERFORMER "Air"
   ISRC FR7159900001
   INDEX 01 00:00:00
 TRACK 02 AUDIO
   TITLE "Clouds Up"
   PERFORMER "Air"
   ISRC FR7159900002
   INDEX 00 03:31:03
   INDEX 01 03:32:13
 TRACK 03 AUDIO
   TITLE "Bathroom Girl"
   PERFORMER "Air"
   ISRC FR7159900003
   INDEX 00 05:00:25
   INDEX 01 05:02:25
 TRACK 04 AUDIO
   TITLE "Cemetary Party"
   PERFORMER "Air"
   ISRC FR7159900004
   INDEX 00 07:26:23
   INDEX 01 07:28:20
 TRACK 05 AUDIO
   TITLE "Dark Messages"
   PERFORMER "Air"
   ISRC FR7159900005
   INDEX 00 10:02:65
   INDEX 01 10:04:65
 TRACK 06 AUDIO
   TITLE "The Word 'Hurricane'"
   PERFORMER "Air"
   ISRC FR7159900006
   INDEX 01 12:32:70
 TRACK 07 AUDIO
   TITLE "Dirty Trip"
   PERFORMER "Air"
   ISRC FR7159900007
   INDEX 00 15:04:15
   INDEX 01 15:06:15
 TRACK 08 AUDIO
   TITLE "Highschool Lover"
   PERFORMER "Air"
   ISRC FR7159900008
   INDEX 00 21:16:73
   INDEX 01 21:18:70
 TRACK 09 AUDIO
   TITLE "Afternoon Sister"
   PERFORMER "Air"
   ISRC FR7159900009
   INDEX 00 24:00:25
   INDEX 01 24:01:03
 TRACK 10 AUDIO
   TITLE "Ghost Song"
   PERFORMER "Air"
   ISRC FR7159900010
   INDEX 00 26:23:48
   INDEX 01 26:25:48
 TRACK 11 AUDIO
   TITLE "Empty House"
   PERFORMER "Air"
   ISRC FR7159900011
   INDEX 00 28:39:58
   INDEX 01 28:41:58
 TRACK 12 AUDIO
   TITLE "Dead Bodies"
   PERFORMER "Air"
   ISRC FR7159900012
   INDEX 00 31:37:68
   INDEX 01 31:39:68
 TRACK 13 AUDIO
   TITLE "Suicide Underground"
   PERFORMER "Air"
   ISRC FR7159900013
   INDEX 00 34:36:00
   INDEX 01 34:38:73


I've made a .mka file of this CD and I've tagged it with foobar (so I have all the tags correctly set for each chapter. Here is an xml export of the tags from the .mka file :

Code: [Select]
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<Tags>
   <Tag>
       <Targets>
           <TrackUID>3864711272</TrackUID>
           <ChapterUID>2142824002</ChapterUID>
       </Targets>
       <Simple>
           <Name>TITLE</Name>
           <Value>Playground Love</Value>
       </Simple>
       <Simple>
           <Name>TRACKNUMBER</Name>
           <Value>1</Value>
       </Simple>
       <Simple>
           <Name>ARTIST</Name>
           <Value>Air</Value>
       </Simple>
       <Simple>
           <Name>ALBUM</Name>
           <Value>The Virgin Suicides</Value>
       </Simple>
       <Simple>
           <Name>DATE</Name>
           <Value>2000</Value>
       </Simple>
       <Simple>
           <Name>GENRE</Name>
           <Value>Rock</Value>
       </Simple>
       <Simple>
           <Name>DISCID</Name>
           <Value>94097f0d</Value>
       </Simple>
   </Tag>
   <Tag>
       <Targets>
           <TrackUID>3864711272</TrackUID>
           <ChapterUID>2337690966</ChapterUID>
       </Targets>
       <Simple>
           <Name>TITLE</Name>
           <Value>Clouds Up</Value>
       </Simple>
       <Simple>
           <Name>TRACKNUMBER</Name>
           <Value>2</Value>
       </Simple>
       <Simple>
           <Name>ARTIST</Name>
           <Value>Air</Value>
       </Simple>
       <Simple>
           <Name>ALBUM</Name>
           <Value>The Virgin Suicides</Value>
       </Simple>
       <Simple>
           <Name>DATE</Name>
           <Value>2000</Value>
       </Simple>
       <Simple>
           <Name>GENRE</Name>
           <Value>Rock</Value>
       </Simple>
       <Simple>
           <Name>DISCID</Name>
           <Value>94097f0d</Value>
       </Simple>
   </Tag>
   <Tag>
       <Targets>
           <TrackUID>3864711272</TrackUID>
           <ChapterUID>3139726888</ChapterUID>
       </Targets>
       <Simple>
           <Name>TITLE</Name>
           <Value>Bathroom Girl</Value>
       </Simple>
       <Simple>
           <Name>TRACKNUMBER</Name>
           <Value>3</Value>
       </Simple>
       <Simple>
           <Name>ARTIST</Name>
           <Value>Air</Value>
       </Simple>
       <Simple>
           <Name>ALBUM</Name>
           <Value>The Virgin Suicides</Value>
       </Simple>
       <Simple>
           <Name>DATE</Name>
           <Value>2000</Value>
       </Simple>
       <Simple>
           <Name>GENRE</Name>
           <Value>Rock</Value>
       </Simple>
       <Simple>
           <Name>DISCID</Name>
           <Value>94097f0d</Value>
       </Simple>
   </Tag>
   <Tag>
       <Targets>
           <TrackUID>3864711272</TrackUID>
           <ChapterUID>3350652986</ChapterUID>
       </Targets>
       <Simple>
           <Name>TITLE</Name>
           <Value>Cemetary Party</Value>
       </Simple>
       <Simple>
           <Name>TRACKNUMBER</Name>
           <Value>4</Value>
       </Simple>
       <Simple>
           <Name>ARTIST</Name>
           <Value>Air</Value>
       </Simple>
       <Simple>
           <Name>ALBUM</Name>
           <Value>The Virgin Suicides</Value>
       </Simple>
       <Simple>
           <Name>DATE</Name>
           <Value>2000</Value>
       </Simple>
       <Simple>
           <Name>GENRE</Name>
           <Value>Rock</Value>
       </Simple>
       <Simple>
           <Name>DISCID</Name>
           <Value>94097f0d</Value>
       </Simple>
   </Tag>
   <Tag>
       <Targets>
           <TrackUID>3864711272</TrackUID>
           <ChapterUID>3468987494</ChapterUID>
       </Targets>
       <Simple>
           <Name>TITLE</Name>
           <Value>Dark Messages</Value>
       </Simple>
       <Simple>
           <Name>TRACKNUMBER</Name>
           <Value>5</Value>
       </Simple>
       <Simple>
           <Name>ARTIST</Name>
           <Value>Air</Value>
       </Simple>
       <Simple>
           <Name>ALBUM</Name>
           <Value>The Virgin Suicides</Value>
       </Simple>
       <Simple>
           <Name>DATE</Name>
           <Value>2000</Value>
       </Simple>
       <Simple>
           <Name>GENRE</Name>
           <Value>Rock</Value>
       </Simple>
       <Simple>
           <Name>DISCID</Name>
           <Value>94097f0d</Value>
       </Simple>
   </Tag>
   <Tag>
       <Targets>
           <TrackUID>3864711272</TrackUID>
           <ChapterUID>3230705850</ChapterUID>
       </Targets>
       <Simple>
           <Name>TITLE</Name>
           <Value>The Word &apos;Hurricane&apos;</Value>
       </Simple>
       <Simple>
           <Name>TRACKNUMBER</Name>
           <Value>6</Value>
       </Simple>
       <Simple>
           <Name>ARTIST</Name>
           <Value>Air</Value>
       </Simple>
       <Simple>
           <Name>ALBUM</Name>
           <Value>The Virgin Suicides</Value>
       </Simple>
       <Simple>
           <Name>DATE</Name>
           <Value>2000</Value>
       </Simple>
       <Simple>
           <Name>GENRE</Name>
           <Value>Rock</Value>
       </Simple>
       <Simple>
           <Name>DISCID</Name>
           <Value>94097f0d</Value>
       </Simple>
   </Tag>
   <Tag>
       <Targets>
           <TrackUID>3864711272</TrackUID>
           <ChapterUID>1517710658</ChapterUID>
       </Targets>
       <Simple>
           <Name>TITLE</Name>
           <Value>Dirty Trip</Value>
       </Simple>
       <Simple>
           <Name>TRACKNUMBER</Name>
           <Value>7</Value>
       </Simple>
       <Simple>
           <Name>ARTIST</Name>
           <Value>Air</Value>
       </Simple>
       <Simple>
           <Name>ALBUM</Name>
           <Value>The Virgin Suicides</Value>
       </Simple>
       <Simple>
           <Name>DATE</Name>
           <Value>2000</Value>
       </Simple>
       <Simple>
           <Name>GENRE</Name>
           <Value>Rock</Value>
       </Simple>
       <Simple>
           <Name>DISCID</Name>
           <Value>94097f0d</Value>
       </Simple>
   </Tag>
   <Tag>
       <Targets>
           <TrackUID>3864711272</TrackUID>
           <ChapterUID>670353758</ChapterUID>
       </Targets>
       <Simple>
           <Name>TITLE</Name>
           <Value>Highschool Lover</Value>
       </Simple>
       <Simple>
           <Name>TRACKNUMBER</Name>
           <Value>8</Value>
       </Simple>
       <Simple>
           <Name>ARTIST</Name>
           <Value>Air</Value>
       </Simple>
       <Simple>
           <Name>ALBUM</Name>
           <Value>The Virgin Suicides</Value>
       </Simple>
       <Simple>
           <Name>DATE</Name>
           <Value>2000</Value>
       </Simple>
       <Simple>
           <Name>GENRE</Name>
           <Value>Rock</Value>
       </Simple>
       <Simple>
           <Name>DISCID</Name>
           <Value>94097f0d</Value>
       </Simple>
   </Tag>
   <Tag>
       <Targets>
           <TrackUID>3864711272</TrackUID>
           <ChapterUID>1308401068</ChapterUID>
       </Targets>
       <Simple>
           <Name>TITLE</Name>
           <Value>Afternoon Sister</Value>
       </Simple>
       <Simple>
           <Name>TRACKNUMBER</Name>
           <Value>9</Value>
       </Simple>
       <Simple>
           <Name>ARTIST</Name>
           <Value>Air</Value>
       </Simple>
       <Simple>
           <Name>ALBUM</Name>
           <Value>The Virgin Suicides</Value>
       </Simple>
       <Simple>
           <Name>DATE</Name>
           <Value>2000</Value>
       </Simple>
       <Simple>
           <Name>GENRE</Name>
           <Value>Rock</Value>
       </Simple>
       <Simple>
           <Name>DISCID</Name>
           <Value>94097f0d</Value>
       </Simple>
   </Tag>
   <Tag>
       <Targets>
           <TrackUID>3864711272</TrackUID>
           <ChapterUID>2195994372</ChapterUID>
       </Targets>
       <Simple>
           <Name>TITLE</Name>
           <Value>Ghost Song</Value>
       </Simple>
       <Simple>
           <Name>TRACKNUMBER</Name>
           <Value>10</Value>
       </Simple>
       <Simple>
           <Name>ARTIST</Name>
           <Value>Air</Value>
       </Simple>
       <Simple>
           <Name>ALBUM</Name>
           <Value>The Virgin Suicides</Value>
       </Simple>
       <Simple>
           <Name>DATE</Name>
           <Value>2000</Value>
       </Simple>
       <Simple>
           <Name>GENRE</Name>
           <Value>Rock</Value>
       </Simple>
       <Simple>
           <Name>DISCID</Name>
           <Value>94097f0d</Value>
       </Simple>
   </Tag>
   <Tag>
       <Targets>
           <TrackUID>3864711272</TrackUID>
           <ChapterUID>666774454</ChapterUID>
       </Targets>
       <Simple>
           <Name>TITLE</Name>
           <Value>Empty House</Value>
       </Simple>
       <Simple>
           <Name>TRACKNUMBER</Name>
           <Value>11</Value>
       </Simple>
       <Simple>
           <Name>ARTIST</Name>
           <Value>Air</Value>
       </Simple>
       <Simple>
           <Name>ALBUM</Name>
           <Value>The Virgin Suicides</Value>
       </Simple>
       <Simple>
           <Name>DATE</Name>
           <Value>2000</Value>
       </Simple>
       <Simple>
           <Name>GENRE</Name>
           <Value>Rock</Value>
       </Simple>
       <Simple>
           <Name>DISCID</Name>
           <Value>94097f0d</Value>
       </Simple>
   </Tag>
   <Tag>
       <Targets>
           <TrackUID>3864711272</TrackUID>
           <ChapterUID>2657549448</ChapterUID>
       </Targets>
       <Simple>
           <Name>TITLE</Name>
           <Value>Dead Bodies</Value>
       </Simple>
       <Simple>
           <Name>TRACKNUMBER</Name>
           <Value>12</Value>
       </Simple>
       <Simple>
           <Name>ARTIST</Name>
           <Value>Air</Value>
       </Simple>
       <Simple>
           <Name>ALBUM</Name>
           <Value>The Virgin Suicides</Value>
       </Simple>
       <Simple>
           <Name>DATE</Name>
           <Value>2000</Value>
       </Simple>
       <Simple>
           <Name>GENRE</Name>
           <Value>Rock</Value>
       </Simple>
       <Simple>
           <Name>DISCID</Name>
           <Value>94097f0d</Value>
       </Simple>
   </Tag>
   <Tag>
       <Targets>
           <TrackUID>3864711272</TrackUID>
           <ChapterUID>1377724282</ChapterUID>
       </Targets>
       <Simple>
           <Name>TITLE</Name>
           <Value>Suicide Underground</Value>
       </Simple>
       <Simple>
           <Name>TRACKNUMBER</Name>
           <Value>13</Value>
       </Simple>
       <Simple>
           <Name>ARTIST</Name>
           <Value>Air</Value>
       </Simple>
       <Simple>
           <Name>ALBUM</Name>
           <Value>The Virgin Suicides</Value>
       </Simple>
       <Simple>
           <Name>DATE</Name>
           <Value>2000</Value>
       </Simple>
       <Simple>
           <Name>GENRE</Name>
           <Value>Rock</Value>
       </Simple>
       <Simple>
           <Name>DISCID</Name>
           <Value>94097f0d</Value>
       </Simple>
   </Tag>
</Tags>


And I would like this kind of xml to be directly generated from the .cue file in mmg. 

Matroska CUE sheet and tags

Reply #5
The ISRC code could also be saved in tags (one for each chapter).
The different indexes should correspond to sub-chapters in a chapter (nested ChapterAtoms). Then you would have the exact copy of the data you have in the CUE file

Matroska CUE sheet and tags

Reply #6
yep, I agree with you, ISRC code could also be saved in tags... but Foobar2000 doesn't do it 

about indexes/chatpers isn't that the good shema :

audio CD tracks -> matroska chapters
audio CD indexes (kind of subtracks found on some classic music CD to separate movements) -> matroska sub-chapters (ChapterAtoms)

Matroska CUE sheet and tags

Reply #7
Yes, that's the idea. Although Mosu will be adding a default mode without sub-chapters (less confusing for the average user).

Matroska CUE sheet and tags

Reply #8
So, could you "fix" mkvmerge (and mmg chapters editor) so that it gets all the tags from the .cue file and sets them for each chapter in the .mka (or .xml) file?
That would be very usefool and I could remove the Foobar2000 step in my Audio CD to .mka methode 

Matroska CUE sheet and tags

Reply #9
Quote
So, could you "fix" mkvmerge (and mmg chapters editor) so that it gets all the tags from the .cue file and sets them for each chapter in the .mka (or .xml) file?
That would be very usefool and I could remove the Foobar2000 step in my Audio CD to .mka methode 

Like I've said, I'll see what I can do. It's mainly a question of spare time.

Btw 1: You can just use a cue sheet as a 'chapter' file on mmg's 'global' tab. No need to load it into mmg's chapter editor and save a XML file from it.
Btw 2: mmg's chapter editor will simply ignore those embedded tags.

Matroska CUE sheet and tags

Reply #10
Quote
Like I've said, I'll see what I can do. It's mainly a question of spare time.


Thank you! That will help a lot! 

Quote
Btw 1: You can just use a cue sheet as a 'chapter' file on mmg's 'global' tab. No need to load it into mmg's chapter editor and save a XML file from it.


I knew it, I use to do like this. I never use the chapter editor. That's why I would like the tags to be directly got from the .cue file. 

Quote
Btw 2: mmg's chapter editor will simply ignore those embedded tags.


I know... I just tought that mmg's chapter editor could also be a tag editor. 


Matroska CUE sheet and tags

Reply #12
Mosu -

That was fast!  It seems to work great but it skipped the first track on the two albums I tried it with.  Thanks!

*Edit* -- Actually, it's not skipping track 1 but adding 1 to each track number .. so each track is listed one higher than it is .. track 1 tagged as track 2 .. track 2 tagged as track 3 .. etc.

Matroska CUE sheet and tags

Reply #13
WOW !!! Thank you so much Mosu, you've been very fast! 
I've noticed the same track number tag issue ...  for each mka chapter, the TRACKNUMBER tag is wrong (it's n+1 instead of n).
exept that it's perfect! very nice work 

Matroska CUE sheet and tags

Reply #14
After some more tests, here is what need to be fixed :

- The "ALBUM" tag is not correctly set. The first TITLE in the .cue file must be used to set the "ALBUM" tag, others TITLE (the ones in the tracks parts) must be used to set the track "TITLE" only. In the same way, if the first PERFORMER differs from the others (and in this case only), it should be used to set the "ALBUM ARTIST" tag.

- ISRC tag is not set in the .mka file

- It would be nice if we could use a COMMENT tag (REM COMMENT "my comment" in the .cue file)

et voilà ! 

Matroska CUE sheet and tags

Reply #15
Quote
Bye the way, under linux to get the .cue we have to use cdrdao to get a .toc  and use a toc2cue script. But the .cue generated this way doen't contain any artist/title/.... tag.

To convert toc to cue I use cueconvert from http://cuetools.sourceforge.net
Ladies and Gentlemen... we are floating in space.

 

Matroska CUE sheet and tags

Reply #16
Yes, cuetools could be a good solution for Linux. But AFAIK toc2cue doesn't keep the title/performer/isrc/etc... informations

Matroska CUE sheet and tags

Reply #17
Quote
Yes, cuetools could be a good solution for Linux. But AFAIK toc2cue doesn't keep the title/performer/isrc/etc... informations

toc2cue is not part of the cuetools package. As I said I use cueconvert which does support the extra CD-TEXT information. 
Ladies and Gentlemen... we are floating in space.

Matroska CUE sheet and tags

Reply #18
Great news! I didn't know this 
So we have a solution for Linux; we have just to wait the fixed mkvmerge and everything will be perfect. 

Matroska CUE sheet and tags

Reply #19
Mosu, any good news ?

Matroska CUE sheet and tags

Reply #20
Quote
I've noticed the same track number tag issue ... for each mka chapter, the TRACKNUMBER tag is wrong (it's n+1 instead of n).


Easily fixed.

Quote
After some more tests, here is what need to be fixed :

- The "ALBUM" tag is not correctly set. The first TITLE in the .cue file must be used to set the "ALBUM" tag, others TITLE (the ones in the tracks parts) must be used to set the track "TITLE" only. In the same way, if the first PERFORMER differs from the others (and in this case only), it should be used to set the "ALBUM ARTIST" tag.

- ISRC tag is not set in the .mka file

- It would be nice if we could use a COMMENT tag (REM COMMENT "my comment" in the .cue file)

et voilà ! 
[{POST_SNAPBACK}][/a]


All those have been dealt with, too. Hopefully correctly

Here's the new build: [a href="http://www.bunkus.org/videotools/mkvtoolnix/win32/pre/mkvtoolnix-0.9.2-build20040710-1.rar]http://www.bunkus.org/videotools/mkvtoolni...d20040710-1.rar[/url] (upload should be finished in two minutes, so don't worry if you get a 404)

Matroska CUE sheet and tags

Reply #21
Thanks Mosu, it works well! 
Now our life wild be more simple. 

Matroska CUE sheet and tags

Reply #22
Great to hear ! Its really nice to see so much progress around MKA lately, especially because of the many supported lossless codecs meanwhile. Support for Wavpack will be next to come now, and who knows, maybe matroska can become the standard container for lossless CD archiving, because of its advanced features for tagging, attachements and the ability to store a complete album in a single file, but with all the comfort people expect today  .....

Matroska CUE sheet and tags

Reply #23
Another good news: My new mka command line maker for mka is ready for download and testing. It's now called mka encoder and has more options!

go here for more informations.

mosu, do you think it could be part of mkvtoolnix ?

Matroska CUE sheet and tags

Reply #24
Quote
... In the same way, if the first PERFORMER differs from the others (and in this case only), it should be used to set the "ALBUM ARTIST" tag.
[a href="index.php?act=findpost&pid=223952"][{POST_SNAPBACK}][/a]

As far as I can tell, MKVmerge 0.9.4 still isn't doing this. Not sure if Mosu wanted it to be handled by the decoder though (like, if there's an ARTIST tag that targets all chapters, then it would be turned into an "ALBUM ARTIST" tag in the player).

BTW, I like the current way MKVmerge makes a tag for the album, then tags for individual tracks. If the tag-writer for the decoder were smart enough, when you change the "ALBUM ARTIST", it would change the global tag and automagically change for all the tracks on that album. Ooh! The power! I like it! 

Keep up the good work, Mosu! We love you!
"We demand rigidly defined areas of doubt and uncertainty!" - Vroomfondel, H2G2