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: 1586
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 930 times
Avatar.chapters.txt
(1.92 KiB) Downloaded 1392 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: 1586
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: Link in last submission.
Last edited by d00zah on Sat Dec 03, 2022 5:48 pm, edited 10 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: 1586
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.
uVSthem
Posts: 5
Joined: Sat Dec 03, 2022 11:32 am

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

Post by uVSthem »

I love this batch file. Thank you. One question about it. Is the batch files suppose to spit the chapter names? Everything I import into it changes the names to generic "Chapter 1, Chapter 2, etc..."
d00zah
Posts: 1586
Joined: Mon Jun 06, 2016 8:23 pm

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

Post by d00zah »

uVSthem wrote:
Sat Dec 03, 2022 11:41 am
I love this batch file. Thank you. One question about it. Is the batch files suppose to spit the chapter names? Everything I import into it changes the names to generic "Chapter 1, Chapter 2, etc..."
Depending on when you downloaded it, have you read the included "README.txt"? The tool has evolved over time & while the initial version ignored actual text-based chapter titles. subsequent versions included output 'mode' selection to preserve the names, although I stuck w/ the initial "default " behavior unless the user edits the .bat.

Since there continues to be interest, I've included the final, "super deluxe" version. 'README.txt' Includes all the particulars. Deleting the other archive.

I have beaten this horse FAR beyond dead...

MakeChaps.zip
(4.92 KiB) Downloaded 575 times
uVSthem
Posts: 5
Joined: Sat Dec 03, 2022 11:32 am

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

Post by uVSthem »

Thanks for the reply. I read the readme file and saw I was still not getting the original chapter names so I got confused. I thought it was supposed to just change everything to chapter numbers.

The new batch file you uploaded isn't working for me at all. The same MyFile.txt that works in the pervious version of MakeChaps doesn't work in it. No MyFile.chapters is generated.
d00zah
Posts: 1586
Joined: Mon Jun 06, 2016 8:23 pm

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

Post by d00zah »

uVSthem wrote:
Sat Dec 03, 2022 7:20 pm
The new batch file you uploaded isn't working for me at all. The same MyFile.txt that works in the pervious version of MakeChaps doesn't work in it. No MyFile.chapters is generated.
You need to edit the .bat (change "SET Mode=0" to 1,or 2) to get what you want.
Can you pls copy/paste the contents of MyFile so I can test? (or upload a .zip?)
uVSthem
Posts: 5
Joined: Sat Dec 03, 2022 11:32 am

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

Post by uVSthem »

Everything seems fine now with after making that change. Do you still want me to upload the chapters?
d00zah
Posts: 1586
Joined: Mon Jun 06, 2016 8:23 pm

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

Post by d00zah »

uVSthem wrote:
Sat Dec 03, 2022 9:47 pm
Everything seems fine now with after making that change. Do you still want me to upload the chapters?
No need. My "testers" kept sending me examples that didn't work, so I was curious what new quirk I hadn't handled. Enjoy!
Last edited by d00zah on Sun Dec 04, 2022 1:05 am, edited 1 time in total.
uVSthem
Posts: 5
Joined: Sat Dec 03, 2022 11:32 am

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

Post by uVSthem »

NP. Thanks again for your support and the batch itself.
Ferrett1983
Posts: 38
Joined: Wed Nov 18, 2020 11:29 am

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

Post by Ferrett1983 »

May I ask how this works? Nearly every set of chapters created by makemkv are out of sync and the chapters created by eac3to are perfect so I'd like to basically use the eac3to chapter file instead of the makemkv chapter file
d00zah
Posts: 1586
Joined: Mon Jun 06, 2016 8:23 pm

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

Post by d00zah »

Ferrett1983 wrote:
Tue Feb 28, 2023 2:41 pm
May I ask how this works? Nearly every set of chapters created by makemkv are out of sync and the chapters created by eac3to are perfect so I'd like to basically use the eac3to chapter file instead of the makemkv chapter file
The 1st post requests a means to process plaintext chapter mark info found "on the web" into a format that can be imported by mkvtoolnix. Geared more towards adding missing chapter marks. Since most tools I'm familiar w/ export chapter data in a useable format, I'm uncertain how said text is derived. This is unlikely to be the solution you're looking for.
Post Reply