Chapter files for non-DVD use

jaydear

Member
VRD's chapter mark utility is biased towards DVD creation, which is fine, but chapter markers are also useful in other video files that support them, such as mkvs. I play most of my videos in VLC or MPC-HCx64 and both of them support chapters.

If you make an mp4 in VRD it can embed your chapter marks in the file. There is also the facility to automatically create a chapter file for use outside VRD, but I have had no success in using any combination of Line format substitutions in VRD's Chapter Marks/Output Format to make a file that MKVToolnix can use.

Using gMKVExtractGUI to work backwards from a finished mkv file containing chapter marks originally from a VRD mp4 :cool:, I have found a couple of formats that MKVToolnix is happy with - namely "ogm.txt" and "xml". Below are a couple of examples, both from the same mkv file, but output differently as an "example.ogm.txt" file and an "example.xml" file. Either file was able to be used in MKVToolnix to add identical chapter marks to a couple of "example.mkv" files which played without issues in VLC and MPC-HCx64 and had next/previous chapter capability as well as showing the chapter 'ticks' on the timeline.

As far as I can determine, there is currently no way to make VRD produce either of these chapter files. Personally, I'd be happy with the ogm.txt format because of the simplicity, but I would definitely want VRD to add the CHAPTER0xNAME=Chapterxx lines automatically and auto-number the chapters.

Note that the first entry always starts at the beginning frame of the video, i.e.
CHAPTER01=00:00:00.000
CHAPTER01NAME=Chapter 1

So Dan, can you add this automatic "filename.ogm.txt" filetype to "Chapter marks" please? I don't think there is any advantage in the overly complex xml format for this particular 'automatic chapters' purpose :)

example.ogm.txt
===============
CHAPTER01=00:00:00.000
CHAPTER01NAME=Chapter 1
CHAPTER02=00:00:03.000
CHAPTER02NAME=Chapter 2
CHAPTER03=00:00:19.400
CHAPTER03NAME=Chapter 3
CHAPTER04=00:04:18.560
CHAPTER04NAME=Chapter 4
CHAPTER05=00:08:46.360
CHAPTER05NAME=Chapter 5
CHAPTER06=00:13:10.000
CHAPTER06NAME=Chapter 6
CHAPTER07=00:15:26.480
CHAPTER07NAME=Chapter 7
CHAPTER08=00:15:43.960
CHAPTER08NAME=Chapter 8

example.xml
===========
<?xml version="1.0"?>
<!-- <!DOCTYPE Chapters SYSTEM "matroskachapters.dtd"> -->
<Chapters>
<EditionEntry>
<EditionFlagHidden>0</EditionFlagHidden>
<EditionFlagDefault>0</EditionFlagDefault>
<EditionUID>4840554209673547311</EditionUID>
<ChapterAtom>
<ChapterUID>14425458702340931451</ChapterUID>
<ChapterTimeStart>00:00:00.000000000</ChapterTimeStart>
<ChapterFlagHidden>0</ChapterFlagHidden>
<ChapterFlagEnabled>1</ChapterFlagEnabled>
<ChapterDisplay>
<ChapterString>Chapter 1</ChapterString>
<ChapterLanguage>eng</ChapterLanguage>
<ChapLanguageIETF>en</ChapLanguageIETF>
</ChapterDisplay>
</ChapterAtom>
<ChapterAtom>
<ChapterUID>10654198540317232653</ChapterUID>
<ChapterTimeStart>00:00:03.000000000</ChapterTimeStart>
<ChapterFlagHidden>0</ChapterFlagHidden>
<ChapterFlagEnabled>1</ChapterFlagEnabled>
<ChapterDisplay>
<ChapterString>Chapter 2</ChapterString>
<ChapterLanguage>eng</ChapterLanguage>
<ChapLanguageIETF>en</ChapLanguageIETF>
</ChapterDisplay>
</ChapterAtom>
<ChapterAtom>
<ChapterUID>4562168542150446776</ChapterUID>
<ChapterTimeStart>00:00:19.400000000</ChapterTimeStart>
<ChapterFlagHidden>0</ChapterFlagHidden>
<ChapterFlagEnabled>1</ChapterFlagEnabled>
<ChapterDisplay>
<ChapterString>Chapter 3</ChapterString>
<ChapterLanguage>eng</ChapterLanguage>
<ChapLanguageIETF>en</ChapLanguageIETF>
</ChapterDisplay>
</ChapterAtom>
<ChapterAtom>
<ChapterUID>6325319741911829664</ChapterUID>
<ChapterTimeStart>00:04:18.560000000</ChapterTimeStart>
<ChapterFlagHidden>0</ChapterFlagHidden>
<ChapterFlagEnabled>1</ChapterFlagEnabled>
<ChapterDisplay>
<ChapterString>Chapter 4</ChapterString>
<ChapterLanguage>eng</ChapterLanguage>
<ChapLanguageIETF>en</ChapLanguageIETF>
</ChapterDisplay>
</ChapterAtom>
<ChapterAtom>
<ChapterUID>12288148120154919504</ChapterUID>
<ChapterTimeStart>00:08:46.360000000</ChapterTimeStart>
<ChapterFlagHidden>0</ChapterFlagHidden>
<ChapterFlagEnabled>1</ChapterFlagEnabled>
<ChapterDisplay>
<ChapterString>Chapter 5</ChapterString>
<ChapterLanguage>eng</ChapterLanguage>
<ChapLanguageIETF>en</ChapLanguageIETF>
</ChapterDisplay>
</ChapterAtom>
<ChapterAtom>
<ChapterUID>9669671464783204242</ChapterUID>
<ChapterTimeStart>00:13:10.000000000</ChapterTimeStart>
<ChapterFlagHidden>0</ChapterFlagHidden>
<ChapterFlagEnabled>1</ChapterFlagEnabled>
<ChapterDisplay>
<ChapterString>Chapter 6</ChapterString>
<ChapterLanguage>eng</ChapterLanguage>
<ChapLanguageIETF>en</ChapLanguageIETF>
</ChapterDisplay>
</ChapterAtom>
<ChapterAtom>
<ChapterUID>4841008426999490225</ChapterUID>
<ChapterTimeStart>00:15:26.480000000</ChapterTimeStart>
<ChapterFlagHidden>0</ChapterFlagHidden>
<ChapterFlagEnabled>1</ChapterFlagEnabled>
<ChapterDisplay>
<ChapterString>Chapter 7</ChapterString>
<ChapterLanguage>eng</ChapterLanguage>
<ChapLanguageIETF>en</ChapLanguageIETF>
</ChapterDisplay>
</ChapterAtom>
<ChapterAtom>
<ChapterUID>10746700643256071609</ChapterUID>
<ChapterTimeStart>00:15:43.960000000</ChapterTimeStart>
<ChapterFlagHidden>0</ChapterFlagHidden>
<ChapterFlagEnabled>1</ChapterFlagEnabled>
<ChapterDisplay>
<ChapterString>Chapter 8</ChapterString>
<ChapterLanguage>eng</ChapterLanguage>
<ChapLanguageIETF>en</ChapLanguageIETF>
</ChapterDisplay>
</ChapterAtom>
</EditionEntry>
</Chapters>
 

musicvid

Member
example.ogm.txt
===============
CHAPTER01=00:00:00.000
CHAPTER01NAME=Chapter 1
CHAPTER02=00:00:03.000
CHAPTER02NAME=Chapter 2
There is a much simpler form of chapter file that MKVToolnix "should" be able to use. It can be quite easily created from the *Chapters.txt file that VideoRedo Creates. It looks like this:
00:00:00:00 Chapter 1
00:00:32:15 Chapter 2
00:00:42:04 Chapter 3
00:00:52:22 Chapter 4
00:01:07:26 Chapter 5
00:01:19:29 Chapter 6
01:22:13:10 Chapter 7
01:22:19:09 Chapter 8
01:22:25:15 Chapter 9
01:22:31:14 Chapter 10
01:22:58:19 Chapter 11
01:24:59:04 Chapter 12
01:26:03:28 Chapter 13
 

jaydear

Member
Yes, I've tried that format, but MKVToolnix simply rejects it. The second line of each entry in a 'name.ogm.txt' file is necessary and the number in "Chapter n" can be edited in a plain text app if you want actual chapter names. I don't know what the character limit is. All I need is the chapter marks to be able to jump quickly back and forth in VLC or other media players that support them.
 

musicvid

Member
See if you can download the freeware Drax from Videohelp. It will take one chapter format, convert it to the other, and mux into an *.m4v that you have renamed from *.mp4.
Note that a Chapter point must always occur at 00:00:00:00 -- there is a setting in VRD that accomplishes this
From there, I don't know what MKVToolnix will do with it, but I'm wondering why you need to wrap your files as MKV?
This is all just speculation, you understand, I may have some time to actually play with it in April.
Drax.jpg
Back to your original topic, I agree it would be nice to have that chapter format available for specific purposes.
 
Last edited:

jaydear

Member
I tried Drax. It's very old, ugly, fiddly and time-consuming if you are doing several files. It's just an extra app to achieve what could easily be done automatically within VRD with a rather minor mod. I'm using the mkv wrapper because I need chapters and selectable subtitles (not burnt in). I know VRD can make mkvs but they don't offer built-in subs and chapters support. MKVToolnix is logical, easy to drive and lightning fast.
 

musicvid

Member
I didn't say it was wonderful; it has save me a number of times over two decades of commercial production when nothing else did the trick.
Best of luck with your inquiry, and sorry my workaround was not pleasing for you.
 

jaydear

Member
I do value your input. I still have Drax on my machine, and as you say, it might be useful when nothing else works. I even found and downloaded a bunch of info about it including some videos. In the search for video file helpers, I have found Mp3tag can do some amazing tricks with mp4s and mp4s in mkvs that I haven't been able to do with anything else, including MKVToolnix!
 

Danr

Administrator
Staff member
Try this line format for the chapter marks. It should make the .ogm format as requested.

CHAPTER%2C=%T0\nCHAPTER%2CNAME=Chapter%C
 

jaydear

Member
Hey Danr - Many thanks... Almost There!
BUG: The first two chapters always have the same Chapter number and MKVToolnix rejects it :confused:

CHAPTER01=00:00:00.000
CHAPTER01NAME=Chapter 1
CHAPTER01=00:03:29.000
CHAPTER01NAME=Chapter 1
CHAPTER02=00:14:29.240
CHAPTER02NAME=Chapter 2
CHAPTER03=00:23:09.090
CHAPTER03NAME=Chapter 3
CHAPTER04=00:38:32.080
CHAPTER04NAME=Chapter 4
CHAPTER05=00:45:33.080
CHAPTER05NAME=Chapter 5

Is there any written guide to the variables, operators, protocols, etc. for the chapter programming language?
 

Dan203

Senior Developer
Staff member
Hey Danr - Many thanks... Almost There!
BUG: The first two chapters always have the same Chapter number and MKVToolnix rejects it :confused:

CHAPTER01=00:00:00.000
CHAPTER01NAME=Chapter 1
CHAPTER01=00:03:29.000
CHAPTER01NAME=Chapter 1
CHAPTER02=00:14:29.240
CHAPTER02NAME=Chapter 2
CHAPTER03=00:23:09.090
CHAPTER03NAME=Chapter 3
CHAPTER04=00:38:32.080
CHAPTER04NAME=Chapter 4
CHAPTER05=00:45:33.080
CHAPTER05NAME=Chapter 5

Is there any written guide to the variables, operators, protocols, etc. for the chapter programming language?
That seems like a bug. Did you actually have a chapter marker at 00:00:00.000? Or was that one added automatically?
 
Top Bottom