skillfed

knowit

Know better your media files

knowit v0.6.1 153.7K downloads/30d#10,871 on PyPI38
Permissive license MIT Active released

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 knowit

uv

uv add knowit

poetry

poetry add knowit

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: 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

video metadata extractionmedia file informationcodec and bitrate detectionmkv mp4 audio video analysisffmpeg mediainfo wrapperextract video propertiesmedia file introspection
media-metadatacli-toolvideo-analysis

More Python Modules packages

Further reading