Code Monkey home page Code Monkey logo

varnax / pyvideothumbnailer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from hhtznr/pyvideothumbnailer

0.0 0.0 0.0 162 KB

Pyhton Video Thumbnailer. Command line tool for creating video preview thumbnails. It can be used to create preview images of individual video files, videos located in a directory and optionally its subdirectories. It is based on PyAV, MediaInfo and PIL/Pillow.

License: BSD 3-Clause "New" or "Revised" License

Python 100.00%

pyvideothumbnailer's Introduction

pyvideothumbnailer

Pyhton Video Thumbnailer is a command line tool for creating video preview thumbnails. It can be used to create preview images of individual video files, videos located in a directory and optionally its subdirectories. It is based on PyAV, MediaInfo and PIL/Pillow.

Installation

Pyhton Video Thumbnailer has the following dependencies:

The python packages can be installed using the Python Package Installer:

pip3 install av pymediainfo Pillow

All code of Python Video Thumbnailer is contained in the file pyvideothumbnailer. It can be placed in /usr/local/bin or another directory on the system PATH variable and be made executable. Alternatively, it can be invoked by supplying its path as argument to the Python interpreter python3.

The optional configuration file .pyvideothumbnailer.conf needs to be placed in the user's home directory.

As of Ubuntu 22.04 LTS (Jammy Jellyfish), Ubuntu users can alternatively install the DEB package provided in the release section or install from this Ubuntu PPA.

Usage

Python Video Thumbnailer has meaningful defaults. So you can just start creating your first preview thumbnails image of an individual video file by invoking:

pyvideothumbnailer [VIDEO FILE]

or to create thumbnails of all video files located in the current working directory:

pyvideothumbnailer

or to create thumbnails of all video files located in a directory:

pyvideothumbnailer [DIRECTORY CONTAINING VIDEOS]

or in case that you want to create previews of videos in subdirectories as well:

pyvideothumbnailer --recursive [DIRECTORY CONTAINING VIDEOS]

Examples

Here are two examples how it works creating preview thumbmnails of Big Buck Bunny.

Using defaults:

pyvideothumbnailer bbb_sunflower_1080p_60fps_normal.mp4

bbb_sunflower_1080p_60fps_normal_defaults mp4

White header font on black background, DejaVuSans TrueType font instead of the built-in font, adding a comment at the bottom of the header, custom preview thumbnails image width and 5 x 4 preview thumbnails:

pyvideothumbnailer --background-color black --header-font-color white --header-font DejaVuSans.ttf --timestamp-font DejaVuSans.ttf --comment-text "Created with pyvideothumbnailer" --width 1024 --columns 5 --rows 4 bbb_sunflower_1080p_60fps_normal.mp4

bbb_sunflower_1080p_60fps_normal mp4_example5

Documentation

Visit the wiki page for more comprehensive information on installation and usage.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.