Page 1 of 1

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

Posted: Fri Aug 12, 2022 10:18 pm
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

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

Posted: Sat Aug 13, 2022 1:43 am
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 924 times
Avatar.chapters.txt
(1.92 KiB) Downloaded 1381 times

For older movies, chapter files can be downloaded here

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

Posted: Sat Aug 13, 2022 1:15 pm
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.

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

Posted: Sat Aug 13, 2022 8:31 pm
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.

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

Posted: Tue Aug 16, 2022 4:27 pm
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 :)

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

Posted: Wed Aug 17, 2022 12:56 am
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.

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

Posted: Sat Dec 03, 2022 11:41 am
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..."

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

Posted: Sat Dec 03, 2022 5:46 pm
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 570 times

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

Posted: Sat Dec 03, 2022 7:20 pm
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.

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

Posted: Sat Dec 03, 2022 8:41 pm
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?)

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

Posted: Sat Dec 03, 2022 9:47 pm
by uVSthem
Everything seems fine now with after making that change. Do you still want me to upload the chapters?

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

Posted: Sun Dec 04, 2022 12:39 am
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!

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

Posted: Sun Dec 04, 2022 12:59 am
by uVSthem
NP. Thanks again for your support and the batch itself.

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

Posted: Tue Feb 28, 2023 2:41 pm
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

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

Posted: Tue Feb 28, 2023 3:07 pm
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.