Skip to main content

Creates a grid of thumbnails for a media file.

Project description

media-thumbnailer

media-thumbnailer is a CLI tool that produces a grid of thumbnails for a media file in a similar manner to a contact print.

Demo of a thumbnail grid image

Prerequisites

media-thumbnailer requires FFmpeg and FFprobe to be installed and available on your system so that it can handle a wide array of multimedia content. It's available via standard package managers on Linux (e.g. apt or pacman) or macOS (e.g. brew), and on Windows it is available via Chocolatey and winget. If the above options do not work, or you need support for a different platform, you can check for available FFmpeg builds on their website.

Installation

To install from PyPI:

pip install -U media-thumbnailer

To install for development and testing purposes, either install directly via git:

pip install -U "media-thumbnailer @ git+https://github.com/gotloaf/media-thumbnailer@main"

Or, clone the repository and install in editable mode:

git clone https://github.com/gotloaf/media-thumbnailer.git
cd media-thumbnailer
pip install -U -e .

Usage

You can use the utility like so:

media_thumbnailer video.mp4 --output grid.png

There are more arguments available:

--output

Location of the file to output to, as PNG. You can pass - to have the image sent to stdout instead.

--include-info/--exclude-info

Whether to include the media summary text at the top or not. Defaults to including it.

--include-head/--exclude-head

Whether to include the first frame of the video in the grid. Defaults to including it.

--include-tail/--exclude-tail

Whether to include the last frame of the video in the grid. Defaults to excluding it.

--column-count

How many columns to include in the grid. The number of thumbnails is calculated automatically based on the row and column count.

--row-count

How many rows to include in the grid. The number of thumbnails is calculated automatically based on the row and column count.

--padding

Padding in pixels around the video frames and summary text.

--font-size

Font size in pixels to use for the summary and timestamp text.

Acknowledgements

To guarantee consistent font rendering, media-thumbnailer includes a copy of Iosevka Extended Extrabold, which is licensed under the OFL (SIL Open Font License).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

media_thumbnailer-1.0.1.tar.gz (229.0 kB view details)

Uploaded Source

Built Distribution

media_thumbnailer-1.0.1-py3-none-any.whl (229.4 kB view details)

Uploaded Python 3

File details

Details for the file media_thumbnailer-1.0.1.tar.gz.

File metadata

  • Download URL: media_thumbnailer-1.0.1.tar.gz
  • Upload date:
  • Size: 229.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for media_thumbnailer-1.0.1.tar.gz
Algorithm Hash digest
SHA256 eb7f8eb1d727292bf259f0d6c8a6135e77887419f7a1b7f1ad3a8f38624c6ef5
MD5 1179aaf8d921528bba15bf4986c5b4c6
BLAKE2b-256 6c448cb3c2adb35ccab258c1d0184b3dff9e5ae6fd24ab7ea5c09075dee5c723

See more details on using hashes here.

Provenance

The following attestation bundles were made for media_thumbnailer-1.0.1.tar.gz:

Publisher: python-publish.yml on gotloaf/media-thumbnailer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file media_thumbnailer-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for media_thumbnailer-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b972b76d91df6b9a8e12c91a43945d824f02d10bef3974a8df03578bfc6d145e
MD5 5515cd2ea3b3759374da1cd01e5bdcba
BLAKE2b-256 f26ec0ac28ed113eca4592ed846aa8641ba1448e941ca05fcb56df36dc526c56

See more details on using hashes here.

Provenance

The following attestation bundles were made for media_thumbnailer-1.0.1-py3-none-any.whl:

Publisher: python-publish.yml on gotloaf/media-thumbnailer

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page