trakit
Guess additional information from track titles
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 trakituv
uv add trakitpoetry
poetry add trakitInstalling 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
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
knowitExtracts detailed metadata from media files…
permissive · top 15,000 on PyPI
guessitGuessIt extracts structured metadata from video…
copyleft · top 15,000 on PyPI
pysrtpysrt parses, edits, and writes SubRip (.srt)…
copyleft · top 15,000 on PyPI
srtParse, modify, and compose SRT subtitle files…
permissive · top 15,000 on PyPI
aeidonaeidon reads, writes, and manipulates…
copyleft · top 15,000 on PyPI
webvtt-pyReads, writes, and segments WebVTT caption…
permissive · top 5,000 on PyPI
pysubs2pysubs2 loads, edits, and saves subtitle files…
permissive · top 15,000 on PyPI
subliminalSubliminal downloads subtitles for video files…
permissive · top 15,000 on PyPI
youtube-transcript-apiFetches transcripts and subtitles from YouTube…
permissive · top 1,000 on PyPI
pymediainfopymediainfo extracts detailed metadata from…
permissive · top 5,000 on PyPI