Add chapters from mediainfolog/text file to MKV conveniently & easily?

MKV playback, recompression, remuxing, codec packs, players, howtos, etc.
Post Reply
dreamer
Posts: 3
Joined: Fri Aug 12, 2022 10:10 pm

Add chapters from mediainfolog/text file to MKV conveniently & easily?

Post by dreamer »

Hi,

I*m new here. I found this forum by searching for a knowledgeable community for mkv muxing.
I*m from Germany, my native language isn*t english so I sometimes have some problems to understand the meaning of things in english. It would be great if you could use some simple language if you have an explanation. thanks.

The issue is that I have a movie in the MKV container without chapter markers and found matching ones from somewhere else from a medainfo log.

I would prefer to copy and paste the chapters into my MKV.

Creating it manually - chapter by chapter - in MKVToolnix and inserting the timestamps is super cumbersome and time consuming.

in MKVToolnix I found the option "Open supported chapter file format" and then there is "Simple chapter files in OGM format (*.txt)" to choose from.
Unfortunately I could not find anything about the OGM format on the internet.

Just pasting the chapters into a text file and importing in MKVToolnix gives an error message.

E.g.

Code: Select all

Menu
00:00:00.000 : en:Chapter 01
00:06:21.375 : en:Chapter 02
00:13:21.875 : en:Chapter 03
00:23:44.500 : en:Chapter 04
00:29:35.708 : en:Chapter 05
00:39:02.875 : en:Chapter 06
00:46:46.166 : en:Chapter 07
00:53:23.791 : en:Chapter 08
01:03:24.833 : en:Chapter 09
01:09:07.541 : en:Chapter 10
01:14:14.500 : en:Chapter 11
01:20:24.416 : en:Chapter 12
I have already made an extensive Internet search with English & German terms on the subject, unfortunately without useful or understandable results,.

Does anyone have a tip for an amateur? Thanks a lot. :D
d00zah
Posts: 1098
Joined: Mon Jun 06, 2016 8:23 pm

Re: Add chapters from mediainfolog/text file to MKV conveniently & easily?

Post by d00zah »

mkvtoolnix requires a specific format to import chapters... either .xml, or .txt (examples attached). Specify on the right-hand side of the 'Output' tab.

chaps.templ.xml
(4.72 KiB) Downloaded 16 times
Avatar.chapters.txt
(1.92 KiB) Downloaded 25 times

For older movies, chapter files can be downloaded here
dreamer
Posts: 3
Joined: Fri Aug 12, 2022 10:10 pm

Re: Add chapters from mediainfolog/text file to MKV conveniently & easily?

Post by dreamer »

Thanks for your helpful reply.
Now I know how the format should look like and I didn*t know that chapter archive website before.

I wish I had the skills to program a chapter format converter and do this in batch

I found a software called ChapterMaker but it seems to not be able to accomplish what I need.
d00zah
Posts: 1098
Joined: Mon Jun 06, 2016 8:23 pm

Re: Add chapters from mediainfolog/text file to MKV conveniently & easily?

Post by d00zah »

dreamer wrote:
Sat Aug 13, 2022 1:15 pm
Thanks for your helpful reply.
Now I know how the format should look like and I didn*t know that chapter archive website before.

I wish I had the skills to program a chapter format converter and do this in batch

I found a software called ChapterMaker but it seems to not be able to accomplish what I need.
By no means pretty, but this will convert the format you specify to something mkvtoolnix can use. Quick 'n' dirty. MAY refine later.

edit: made it slightly more flexible.

MakeChaps.zip
(2.39 KiB) Downloaded 6 times
Last edited by d00zah on Fri Aug 26, 2022 8:14 pm, edited 6 times in total.
dreamer
Posts: 3
Joined: Fri Aug 12, 2022 10:10 pm

Re: Add chapters from mediainfolog/text file to MKV conveniently & easily?

Post by dreamer »

Thanks a lot, d00zah.
Your batch script works great and makes my life so much easier.

I can*t be grateful enough that you took your time to create this for me.

It*s really amazing :)
d00zah
Posts: 1098
Joined: Mon Jun 06, 2016 8:23 pm

Re: Add chapters from mediainfolog/text file to MKV conveniently & easily?

Post by d00zah »

dreamer wrote:
Tue Aug 16, 2022 4:27 pm
Thanks a lot, d00zah.
Your batch script works great and makes my life so much easier.

I can*t be grateful enough that you took your time to create this for me.

It*s really amazing :)
You're most welcome, but if I'm being honest, it's something that's been on my 'to do' list for far too long. You provided motivation. Thank YOU. Should be a great time saver for we OCD-impaired. :wink:

Enjoy! :D

Special nod to my noisy neighbor, who kept me up the other night, giving me a chance to re-learn some things & clean it up. 1st pass was ooogly.
Post Reply