thumbframes_dl
Download thumbnail frames from a video's progress bar.
When you watch a video on the web, you've probably noticed these thumbnail sized preview frames that are shown when you hover the cursor over the video player's progress bar.
© Blender Foundation | cloud.blender.org/spring
When you download the actual images, you'll see that they're actually concatenated in grids containing n*m frames like this:
© Blender Foundation | cloud.blender.org/spring
I refer to this individual frames as thumbframes because I couldn't find a better, less confusing name. YouTube calls them storyboards, but that's technically a different thing.
How to use
Install the library:
pip install thumbframes-dl
A simple example:
# Download a video's thumbframes images and save them in the filesystem
# Spring | Blender Animation Studio | CC BY 4.0
from thumbframes_dl import YouTubeFrames
# create YouTubeFrames object containing the methods to get the thumbframes
video = YouTubeFrames('https://www.youtube.com/watch?v=WhWc3b3KhnY')
# iterate all images with thumbframes (there may be more than one)
for i, frames_image in enumerate(video.get_thumbframes()):
file_content = frames_image.get_image()
with open(f"{video.video_id}_{i}.{frames_image.mime_type}", "wb") as f:
f.write(file_content) # save each image
For a couple more examples showing the potential usefulness of thumbframes see the demos.
For a more detailed description of the API see the API documentation.
Copyright
All the code in thumbframes_dl is released into the public domain by its authors. See LICENSE.
All the text in thumbframes_dl's documentation is likewise released into the public domain under the same license.
The images used in the documentation are attributed to their copyright owners and shared under their respective Creative Commons licenses.
Metadata
Release files for thumbframes-dl 0.15.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| thumbframes_dl-0.15.0.tar.gz | 11.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| thumbframes_dl-0.15.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 23.3 kB
Release files / thumbframes_dl-0.15.0.tar.gz
| Download URL | thumbframes_dl-0.15.0.tar.gz |
|---|---|
| Size | 11.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fada579a2f7b63e2c324fa9ecaab04a84bb4713b1e71410e080cbe3a60a58c20
|
|
BLAKE2b-256 checksum How to use checksums |
fe5413c130ddf5101abeb070225bd2c8f35790531a4a83e4275da770fb21d382
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.2
|
Release files / thumbframes_dl-0.15.0-py3-none-any.whl
| Download URL | thumbframes_dl-0.15.0-py3-none-any.whl |
|---|---|
| Size | 12.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a3df11bd2bcb640b8deaec6b06ee2633e0fe76560824fabb1922d53625bbb5a2
|
|
BLAKE2b-256 checksum How to use checksums |
89ed6fc93df2754fb835d61671bdf6b08fa7349bb0bedc0b71bc9e359ebe1516
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.11.2
|