skillfed

trakit

Guess additional information from track titles

trakit v0.3.0 98.3K downloads/30d#13,096 on PyPI3
Permissive license MIT Active released

What it is and what it does

TrakIt is a lightweight track name parser designed to extract metadata from audio and subtitle track titles and filenames. It solves the problem of imprecise or incomplete metadata in video files—for example, distinguishing between Portuguese and Brazilian Portuguese subtitles, or British English from American English audio tracks, when container metadata only marks them as the base language.

The library identifies language codes (using babelfish for language support), detects accessibility flags (SDH for deaf/hard-of-hearing, closed captions), recognizes forced subtitles, and tags commentary or alternate-version tracks. It works as both a Python library and a CLI tool, accepting either track names or filenames as input and returning structured metadata. It requires Python 3.10 or later and has no system dependencies.

Use it for:

  • Enhance video metadata extraction by parsing track names to identify language variants and accessibility features when container metadata is incomplete.
  • Automatically tag subtitle files with language and SDH status before importing into a media library or processing pipeline.
  • Disambiguate multiple audio tracks in the same language by detecting regional variants (en-GB vs en-US) from track names.
  • Build a media management tool that needs to categorize and filter tracks by language, codec, and accessibility without re-encoding or deep inspection.
  • Parse filename conventions (e.g., `movie.en.sdh.srt`) to extract structured track information for batch processing.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Parses track names and filenames to extract language, codec, and accessibility metadata (SDH, closed captions, forced subtitles, commentary) for audio and subtitle streams.

Yes. TrakIt is actively maintained, has no known vulnerabilities, installs with low friction, and solves a specific but real problem in video metadata handling. It's permissively licensed and supports current Python versions. Install it if you work with video files that need track-level metadata enrichment or language variant detection.

Install

trakit on PyPI

pip

pip install trakit

uv

uv add trakit

poetry

poetry add trakit

Installing trakit

Before you install

Low friction: pure Python wheel with only two runtime dependencies (babelfish and rebulk). Actively maintained with a release 14 days ago and current Python 3.10–3.14 support.

License in practice

MIT license is permissive; you can use, modify, and distribute trakit freely with minimal restrictions.

Quickstart

pip install trakit

from trakit import trakit

result = trakit('Português (Brasil)')
print(result)  # {'language': 'pt-BR'}

result = trakit('British English (SDH) (PGS)')
print(result)  # {'language': 'en-GB', 'hearing_impaired': True}

Requires Python 3.10 or later.

Verify before relying

  • Whether the package handles all common subtitle and audio codec formats beyond the examples shown (SRT, PGS, AC3).
  • Performance characteristics when parsing large numbers of track names or filenames.
  • Whether language variant detection (e.g., pt-BR vs pt) works reliably across all regional variants or only documented ones.

Package facts

License MIT (permissive)
Python support supports the current Python release (<4.0,>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 2 — babelfish, rebulk
Maintenance actively maintained — 14 days since the last release
Last repo commit
First released
Downloads 98,269/month — #13,096 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: trakit-0.3.0-py3-none-any.whl

Keywords: video, mkv, audio, subtitles, srt, pgs, sdh, cc, sup, sub, metadata, movie, episode, tv, track, shows, series

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Multimedia :: VideoTopic :: Software Development :: Libraries :: Python Modules

Tags

parse track names languagesubtitle metadata extractionaudio track language detectionvideo track information parsermkv track metadataidentify language variantssdh closed caption detection
video-metadatasubtitle-parsinglanguage-detection

More Python Modules packages