Hi! I have recently started experimenting with using MKV containers rather than MP4. On one of my first attempts, I have encountered an issue with embedded chapters. Specifically, the other chapter that seems to be recognized is the last one. I have observed this on the web client, the iOS client, and the Apple TV client. If I open the .MKV file in VLC, it recognizes and uses all the chapters in the file.
I’ve tried removing the file from the server, scanning the library, then putting the file back, and scanning again, with no change.
I see some older threads about similar issues, but they are much older, or are related seemingly more to whether chapters are supported at all or not.
I’m just wondering how to resolve this issue? Or if there is another way to inject chapters into a video.
OttoKerner - Thanks for your response. I have done some more research since I posted…
Plex read the chapter marks correctly from the original .mkv file that came out of MakeMKV.
It also read them correctly from the .mkv file that came out of HandBrake for transcoding.
It fails to read them correctly after I used MetaX to update the NAMES of the chapters.
I used mkvextract to extract the chapter atom from the file both pre- and post-MetaX. There is only one significant seeming difference I can see, which is the ChapterUID element values in the post-MetaX are very large numbers, but at small numbers in the pre-MetaX file.
I then replaced the ChapterString elements from in the pre-MetaX file and replaced them with their counterparts in the post-MetaX file. I then used mkvpropedit to inject the new chapters into the post-MetaX .MKV file. Plex then read the chapters correctly.
Is there somehow I can attach the XML for the Chapters element to this thread for you (or others) to look at?
I can only recommend you to use MKVtoolnix for all things MKV instead of MetaX.
I have no issues with files coming out of there.
It brings also command line tools for all features, if you need that.
Right - that’s where the mkvextract and mkvpropedit came from, I believe. I only used MetaX because it provides an easy way to edit the names. I’ll build something to do this myself using the other tools.
I would recommend against using MetaX. I caught it writing chapters incorrectly for MP4 files and it took a few iterations back and forth with the developer before they corrected it. Some of the details have been posted here: Local media asset issues. The tools based on mkvtoolnix do this job very well. I personally use the command-line but there are GUI based tools using the same backend libs that work well too.