jerry icon indicating copy to clipboard operation
jerry copied to clipboard

MPV Chapters for Intro / Outro Segments

Open JustArion opened this issue 6 months ago • 0 comments

Hiya, Request / Suggestion here to incorporate a chapters file (via the --chapters-file mpv argument) for Anime intros / outros if they exist.

aniwatch's json_data already contains the data for intro and outro segments. Chapters could be:

0:00 - Start
x:yz - Intro Start
a:bc - Intro End
d:fg - Outro Start
h:ij - Outro End
k:lm - End

The data in from the link above contains the following properties within the json response:

    "intro": {
        "start": 0,
        "end": 0
    },
    "outro": {
        "start": 1324,
        "end": 1415
    },

If intro.start == intro.end its likely that the segment is missing / not yet submitted and can be omitted.

The format of an mpv chapter file is described here, and an example is used here (python)

Limitations:

  • Non-aniwatch links / providers that don't include intros won't have chapter sections.

JustArion avatar Mar 01 '24 23:03 JustArion