Split using chapter name as the output file name

I’m fairly new to working with the mkv format and the mkvtoolnix tool. My workflow is to rip blu-ray or dvd using makemkv. Then I use mkvtoolnix to update the chapter names using the chapter editor to create an xml file. Then, I mux the main title to get the chapter names into the main mkv. Now I run another mux in mkvtoolnix to split the main title by chapter so that I have a separate mkv file for each chapter. So far, I have been able to do this and it works fine. The output file name that I am using for this last step appends " - track" to the end of the main title, letting mkvtoolnix insert the three digit track number. What I would like to do for file name, is to use the actual track name that I set in an earlier step. For example, if the track name was “Conclusion”, I would like the file name to be “Main Title - Conclusion.mkv”. I have not been able to figure out how to do this. Is this possible in mkvtoolnix today? If not, do you know if this feature has already been suggested? Thanks! Appreciate the help and the tool!


MKVToolNix cannot really help you with naming your files after chapters. Sorry.

Thanks for getting back to me. When splitting an mkv by chapter, Are you saying that appending the chapter name instead of a sequential number for the output file can not be done without a software change or it just can not be done by mkvtoolnix period? thanks!

If you read the documentation for splitting, it states the following at the end of the description of the --split option:

Another possible pattern is ‘%c’ which will be replaced by the name of the first chapter in the file. Note that when ‘%c’ is present, the pattern ‘-%03d’ will not be added automatically.

This means that yes, it can automatically insert the name of the first chapter in the destination file name, but it’ll still append the three-digit file number. This is different from what you asked about, Main Title - Conclusion.mkv. Meaning the current way MKVToolNix works can get you almost there, but not quite.

PS: My earlier comment was misleading; I apologize. It can help you somewhat.

Thank you for the clarification. I did see the %c option but that’s not the behavior I am looking for. Let me try this again ;-). I have an input file with three chapters in it and I want to extract each of those chapters as a separate file. My input file is named “Main Title”. Currently the destination file name that I have specified is “Main Title - Track.mkv” so the three track names that it creates are “Main Title - Track-001.mkv”, “Main Title - Track-002.mkv” and “Main Title - Track-003.mkv’. The chapter names for the three chapters are “1st Song”, “2nd Song” and “3rd Song”. I would like the three tracks to be named “Main Title - 1st Song”, “Main Title - 2nd Song” and “Main Title - 3rd Song’.

So I would guess that there would need to be some placeholder in the destination file name like the %c that is there now except that it would replace the placeholder with the chapter name for each file. Hope that makes it a little more clear. I’ll take a look at the source code and see if I can figure out how to do this.

Main Title - %c.mkv will get you most of the way there, but not quite, as I said. That’s as far as you’ll get with MKVToolNix alone.