knowit
Know better your media files
What it is and what it does
KnowIt is a Python library and CLI tool that reads media files and extracts their technical metadata—codec, bitrate, resolution, audio channels, language, duration, and more. It wraps multiple backend providers (MediaInfo, FFmpeg, MKVToolNix, Enzyme) so you can choose which tool to use for introspection, and outputs results as structured JSON or YAML.
You use it when you need to programmatically inspect video or audio files in your application, or from the command line to quickly understand what's inside an MKV, MP4, or other container. It depends on babelfish, enzyme, pymediainfo, pyyaml, and trakit to handle language codes, codec detection, and format parsing. The library is actively maintained, supports Python 3.10 through 3.14, and has no known security vulnerabilities.
Use it for:
- Batch-process a media library to catalog codec, resolution, and audio track details for archival or validation
- Validate that uploaded video files meet encoding requirements before accepting them in a web application
- Extract language and codec metadata from MKV files to populate a media management database
- Inspect audio properties (channels, bitrate, sampling rate) to verify lossless vs. lossy compression
- Automate quality checks in a transcoding pipeline by reading source file specs before re-encoding
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Extracts detailed metadata from media files (video, audio, container format, codecs, bitrates, resolution, language) via CLI or Python API using pluggable backends like MediaInfo, FFmpeg, or MKVToolNix.
Yes. The package is actively maintained, has no security issues, imposes no licensing restrictions, and solves a concrete problem—reading media metadata—with low install friction and multiple backend options. Install it if you need to programmatically inspect video or audio files.
Install
knowit on PyPI
pip
pip install knowituv
uv add knowitpoetry
poetry add knowitInstalling knowit
Before you install
Low friction install with five runtime dependencies. Actively maintained with a release 5 days ago and recent commits; suitable for production use.
License in practice
MIT license is permissive and imposes no restrictions on use, modification, or distribution in proprietary or open-source projects.
Quickstart
pip install knowit
from knowit import KnowIt
knowit = KnowIt()
result = knowit.know('/path/to/video.mkv')
print(result)
Requires at least one external provider (MediaInfo, FFmpeg, or MKVToolNix) installed on the system for full format support; MKV is supported without external tools.
Verify before relying
- Whether the package's output structure and field names remain stable across minor versions
- Performance characteristics when processing large media files or batch operations
- Completeness of metadata extraction for less common codecs or container formats
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (<4.0,>=3.10) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 5 — babelfish, enzyme, pymediainfo, pyyaml, trakit |
| Maintenance | actively maintained — 5 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 153,736/month — #10,871 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: knowit-0.6.1-py3-none-any.whl
Keywords: video, mkv, mp4, mediainfo, metadata, movie, episode, tv, 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
guessitGuessIt extracts structured metadata from video…
copyleft · top 15,000 on PyPI
pymediainfopymediainfo extracts detailed metadata from…
permissive · top 5,000 on PyPI
trakitParses track names and filenames to extract…
permissive · top 15,000 on PyPI
audiofileReads and writes audio files across formats…
permissive · top 15,000 on PyPI
scikit-videoscikit-video reads, writes, and analyzes video…
permissive · top 5,000 on PyPI
subliminalSubliminal downloads subtitles for video files…
permissive · top 15,000 on PyPI
imageio-ffmpegProvides a simple Python wrapper around ffmpeg…
permissive · top 5,000 on PyPI
ffmpyffmpy is a Python wrapper around FFmpeg that…
permissive · top 5,000 on PyPI
mediatypeParses and creates MIME types (media types)…
permissive · top 15,000 on PyPI
vininfoExtracts and verifies information from Vehicle…
permissive · top 15,000 on PyPI