Skip to content

Docker image for extracting subtitle tracks, attachments, chapters and tags using MKVextract.

License

Notifications You must be signed in to change notification settings

ToshY/mkvextract-subs

Repository files navigation

🛠️ MKVextract Subs

Current bundle version Docker Hub Code style Code style Security check

📝 Quickstart

This tool will extract subtitle tracks, attachments, chapters and tags for your MKV files.

🧰 Requirements

🎬 Usage

  1. Pull the image.
docker pull t0shy/mkvextract-subs:latest
  1. Run it.

Default behaviour is to extract the info for all MKV files found (recursively) in the mounted directory.

docker run -it --rm \
  -u $(id -u):$(id -g) \
  -v ${PWD}/rick-astley:/input \
  t0shy/mkvextract-subs:latest

Note: please make sure to mount to the /input directory on the container.

If you only want to extract info for a single file, or files in a subdirectory, you can pass that as an argument (-i) to the container.

  • Subdirectory rick-astley/latest-hits
docker run -it --rm \
  -u $(id -u):$(id -g) \
  -v ${PWD}/rick-astley:/input \
  t0shy/mkvextract-subs:latest \
  -i "latest-hits"
  • File rick-astley/never-gonna-give-you-up.mkv
docker run -it --rm \
  -u $(id -u):$(id -g) \
  -v ${PWD}/rick-astley:/input \
  t0shy/mkvextract-subs:latest \
  -i "never-gonna-give-you-up.mkv"
  1. Check the result.

The extracted info will always be put into a newly created directory based on the filename of the input file.

|-- never-gonna-give-you-up.mkv
|-- never-gonna-give-you-up
    |-- attachments
        |-- Arial.ttf
        |-- ...
        |-- COMIC.TTF  
    |-- chapters.xml
    |-- tags.xml
    |-- track4_eng.ass
    |-- ...
    |-- track8_jpn.ass

In the above example, our file never-gonna-give-you-up.mkv, will yield a directory named never-gonna-give-you-up. This directory will contain a chapters file chapters.xml, a tags file tags.xml, subtitles (which are named in the format track{id}_{iso639-3}.{extension}) and a subdirectory attachments containing the fonts.

🛠️ Contribute

Prerequisites

Pre-commit

Setting up pre-commit code style & quality checks for local development.

pre-commit install

Checks

task contribute

Note: you can use task tools:black:fix to resolve codestyle issues.

❕ License

This repository comes with a MIT license.