Jellyfin Forum
mkv video chapter editing - Printable Version

+- Jellyfin Forum (https://forum.jellyfin.org)
+-- Forum: Off Topic (https://forum.jellyfin.org/f-off-topic)
+--- Forum: Media (https://forum.jellyfin.org/f-media)
+--- Thread: mkv video chapter editing (/t-mkv-video-chapter-editing)



mkv video chapter editing - He-who-is-tired - 2024-03-29

If you rip a video and want to use something like mkvtoolnix-gui to remove old chapters and put in new ones, and you're adding new chapters rather than just renaming old ones, you should make sure you have distinct 'ChapterUID' tags.  I was adding a few extra chapters to a concert film rip I'd done, and just copied/pasted one of the ChapterAtoms a few times and then changed TimeStart, TimeEnd, and ChapterString.

Turns out Jellyfin is likely properly honoring the ChapterUID values, since the ones I had pasted all collapsed into a single long chapter, rather than showing up separately in the UI.  To confuse things a little further, programs like VLC showed all chapters I expected, and so I initially thought it was a JF thing, but it was not. 

The solution was to simply make sure the ChapterUID were all unique; I suspect I could've eliminated them altogether, but it seemed better to have more identifying data than less.

(example):

<?xml version="1.0"?>
<!-- <!DOCTYPE Chapters SYSTEM "matroskachapters.dtd"> -->
<Chapters>
  <EditionEntry>
    <EditionFlagHidden>0</EditionFlagHidden>
    <EditionFlagDefault>1</EditionFlagDefault>
    <EditionUID>17840219969364685340</EditionUID>
    <ChapterAtom>
      <ChapterUID>10843146008692285875</ChapterUID>
      <ChapterTimeStart>00:00:00.083416666</ChapterTimeStart>
      <ChapterFlagHidden>0</ChapterFlagHidden>
      <ChapterFlagEnabled>1</ChapterFlagEnabled>
      <ChapterTimeEnd>00:08:52.000000000</ChapterTimeEnd>
      <ChapterDisplay>
        <ChapterString>01 Artist 1 - Song1</ChapterString>
        <ChapterLanguage>eng</ChapterLanguage>
      </ChapterDisplay>
    </ChapterAtom>
    <ChapterAtom>
      <ChapterUID>9633884967479578286</ChapterUID>
      <ChapterTimeStart>00:08:52.000000000</ChapterTimeStart>
      <ChapterFlagHidden>0</ChapterFlagHidden>
      <ChapterFlagEnabled>1</ChapterFlagEnabled>
      <ChapterTimeEnd>00:13:24.000000000</ChapterTimeEnd>
      <ChapterDisplay>
        <ChapterString>02 Interviews - crowd </ChapterString>
        <ChapterLanguage>eng</ChapterLanguage>
      </ChapterDisplay>
    </ChapterAtom>
...etc...