
Security News
TypeScript is Porting Its Compiler to Go for 10x Faster Builds
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
Video thumbnail generator for modern web video players such as Plyr, Videojs, Flowplayer, Fluid Player, etc.
This tool stands out for its unparalleled optimization for lightning-fast thumbnail generation. By utilizing minimal resources, you can generate more in less time. And with a user-friendly CLI and a convenient Python API, this tool is the ultimate solution for efficient and streamlined thumbnail creation.
Modern web video players use the WebVTT formatted files to preview thumbnails at a pointed time. WebVTT is a format for displaying timed text tracks (such as subtitles or captions). Open-source video players such as Plyr, Video.js, Flowplayer, Fluid Player, and more, use this format for showing the thumbnails. And, with the use of external plugins, Video.js even has the capability to handle JSON formatted thumbnail metadata. This is where our tool comes in, offering the ability to generate the perfect thumbnails to match your needs.
The CLI is a convenient way to generate thumbnails for a video file. And it accepts files or directories as arguments.
For the complete list of options, run thumbnails --help
.
thumbnails --base /media/ --output /var/www/movie.com/media/thumbnails/ --interval 5 ~Videos/movies
The Python API provides a flexible way to integrate video thumbnail generation into your existing applications. Both the CLI and the Python API share the same set of options.
from thumbnails import Generator
inputs = (
"~Downloads/movie.mp4",
"~Videos/movies/1.avi",
"~Videos/movies/2.ogv",
)
generator = Generator(inputs)
generator.base = "/media/"
generator.skip = True # skip existing thumbnails
generator.output = "/var/www/movie.com/media/thumbnails/"
generator.interval = 5
generator.generate()
Run the following command in the package's root directory to install it in editable mode.
python3 -m pip install -e .
This command will install the package in your local environment and allow you to make changes to the code and see the updates immediately. It will also install all the required dependencies.
Everyone is welcome to contribute to this project. Please read and follow the contribution guidelines before you start. Contributions can be considered:
Before you open a PR, please run the unit tests in the local environment to ensure everything is working. You need to install tox and run the tests for configured environments.
python3 -m pip install tox && tox
If you want to run tests only for the current environment with your local Python interpreter, you can use the following commands.
python3 -m pip install -r tests/requirements.txt
python3 -m pytest
Copyright (C) 2023 Artyom Vancyan. Apache 2.0
FAQs
Video thumbnail generator for modern web video players such as Plyr, Videojs, Flowplayer, Fluid Player, etc.
We found that thumbnails demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.