Skip to content

chapter-make-read.lua accepts chapter filenames with 2 or 3 letter language codes #16

@porg

Description

@porg

Imagine this file structure

video.mp4           # Video file
video.chp           # Chapter file, language neutral
video.mp4.chp       # Chapter file, language neutral, video suffix included
video.chi.chp       # Chinese chapter file, 3-letter code (ISO 639‑3), 
video.en.chp        # English chapter file, 2-letter code (ISO 639‑1)
video.spa.chp       # Spanish chapter file, 3-letter code (ISO 639‑3)
video FR.chp        # French chapter file, 2-letter code (ISO 639‑1) at the end of the file name without a dot

Detection

Utilization

  • If there is only one chapter file, then use it right away, no questions asked.
  • If there are chapter files available in different languages then
    • in v1 the script chooses according to the mpv Track Selection preferences:
      • Already offers --alang (audio) , --vlang (video), --slang (subtitles), so you could introduce --clang (chapters)
      • If no --clang is present it uses --slang: If you can read the subtitles in that language, you can also read the chapters in that language.
      • For some obscure reasons you may want the original language chapter names (e.g. for reference) but nevertheless watch in your preferred subtitle language.
    • in v2 the script may allows to switch languages interactively (like subtitles already can)
    • in v3 the script may allows to switch language interactively in tandem with the subtitle files if you have exactly the same set of chapter languages and subtitles languages in total (from the video file stream and/or loaded from sidecar files)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions