Skip to main content

A CLI tool for generating thumbnails from video files.

Project description

Thumbnail Generator CLI Tool

A command-line interface (CLI) tool for generating thumbnails from video files. The tool allows you to list files in a directory, generate thumbnails for video files, and specify custom frame extraction points.

Features

  • List Directory Contents: View detailed information about files and directories.
  • Generate Thumbnails: Automatically extract frames from video files at specified intervals.
  • Supported Formats: .mp4, .mov, .mkv.

Requirements

  • Python 3.x
  • OpenCV (cv2) library

Installation

First, make sure you have Python 3.x installed on your system. Then, install the required dependencies:

pip install opencv-python

Usage

The CLI tool provides several options:

1. Listing Directory Contents

You can list the contents of a directory using the --ls option:

python main.py --ls /path/to/directory

2. Generating Thumbnails for a Directory of Videos

To generate thumbnails for all supported video files in a directory:

python main.py --dir /path/to/videos --format .mp4 .mkv --dest /path/to/output --at 0.25 0.5 0.75
  • --dir: Directory containing video files.
  • --format: (Optional) Specify file formats to include. Default is .mp4.
  • --dest: (Optional) Output directory where thumbnails will be saved. Default is the current directory.
  • --at: (Optional) Frame capture points as a percentage of video duration (e.g., 0.25 for 25%).

3. Generating Thumbnails for a Single Video File

To generate thumbnails for a specific video file:

python main.py --file /path/to/video.mp4 --dest /path/to/output --at 0.1 0.5 0.9
  • --file: Path to the video file.
  • --dest: (Optional) Output directory where thumbnails will be saved. Default is the current directory.
  • --at: (Optional) Frame capture points as a percentage of video duration.

Example Commands

List directory contents:

python main.py --ls /path/to/directory

Generate thumbnails for all .mp4 files in a directory:

python main.py --dir /path/to/videos --format .mp4 --dest /path/to/output

Generate thumbnails for a single video file:

python main.py --file /path/to/video.mp4 --dest /path/to/output --at 0.1 0.5 0.9

Contributing

Contributions are welcome! Please feel free to submit a pull request or open an issue.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

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

thumbsup-0.4.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

thumbsup-0.4-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file thumbsup-0.4.tar.gz.

File metadata

  • Download URL: thumbsup-0.4.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for thumbsup-0.4.tar.gz
Algorithm Hash digest
SHA256 5bdb9a031f8db17c2ba0624fb7fdf0e1b372c099d3ff751168b19fc4f2c1ccc3
MD5 aa1dd5dc3f309c97a21ccb18dc478ba4
BLAKE2b-256 c1aa3b0a625d51523d1986a5623b64b80b6da0b46a71d2d4188b12312e54aea2

See more details on using hashes here.

File details

Details for the file thumbsup-0.4-py3-none-any.whl.

File metadata

  • Download URL: thumbsup-0.4-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for thumbsup-0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 70392600c42dd8e6196e587ee99fd503016ea770e4f469b3d9e5189052980e84
MD5 5eb3bd56e821460afaad31a95b917cfb
BLAKE2b-256 1f8762bcf957cb3ebfbc514ab46812158723a13d76fe042d4af67ec53d227fc4

See more details on using hashes here.

Supported by

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