Video or Folder preview generator
Project description
Previewer
Command line tool to generate montages/sequences from video clips or folders containing images.
previewer is a collection of tools:
previewer montage
: to generate a single image with thumbnails (a montage) from a folder containing images or a videopreviewer gif
: to generate a Gif (or mp4/webp/webm) with thumbnails from a folder containing images or a videopreviewer video-thumbnailer
: to extract a given number of thumbnails from a video clippreviewer resize
: to change geometry (resize, crop, fit, fill) of images
Install
Install dependencies
$ sudo apt update
$ sudo apt install imagemagick ffmpeg
Install the latest release of previewer from PyPI
$ pip3 install previewer
$ previewer-montage --help
Or install previewer from the sources
$ pip3 install poetry
$ pip3 install git+https://github.com/essembeh/previewer
$ previewer --help
Montage
previewer montage
can create preview image from a folder containing images or a video.
You can customize the generated image:
- change the background color
- change geometry (width, height, crop, fit or fill) of the thumbnails
- show or hide the a title
- show or hide image filenames
- adjust the space between thumbnails
- add a border, a shadow to thumbnails
Example:
$ previewer montage --size 120x120 --crop --fill --background SlateGray1 "Rick Astley - Never Gonna Give You Up (Official Music Video).mp4"
🎬 Generate montage from video ./Rick Astley - Never Gonna Give You Up (Official Music Video).mp4 using 36 thumbnails
🍺 Montage generated ./Rick Astley - Never Gonna Give You Up (Official Music Video).jpg
Sequence
previewer gif
can generate sequences with images in a folder or extracted from a video.
You can customize the sequence:
- choose the format between gif, mp4, webp or webm
- adjust fps (frames per seconds), delay between 2 frames ...
- when extrating frames from a video, you can either use a fixed number of frames to extract or compute it given a given speed
- change geometry (width, height, crop, fit or fill) of the frames
Example:
$ previewer gif --size 320x240 --crop --fill -n 20 "Rick Astley - Never Gonna Give You Up (Official Music Video).mp4"
🎬 Generate gif from video ./Rick Astley - Never Gonna Give You Up (Official Music Video).mp4 using 20 thumbnails
🍺 Sequence generated ./Rick Astley - Never Gonna Give You Up (Official Music Video).gif
$ previewer gif --start 3 --end 4 --fps 10 --aba --size 320x240 --crop --fill "Rick Astley - Never Gonna Give You Up (Official Music Video).mp4"
🎬 Generate gif from video ./Rick Astley - Never Gonna Give You Up (Official Music Video).mp4 using 10 thumbnails
🍺 Sequence generated ./Rick Astley - Never Gonna Give You Up (Official Music Video).gif
Thumbnailer
previewer video-thumbnailer
can extract and resize/crop frames from a video
You can also:
- choose the frame count to extract
- select a start position and/or a end position in the video
- change geometry (width, height, crop, fit or fill) of the frames
Example:
$ previewer video-thumbnailer -n 20 "Rick Astley - Never Gonna Give You Up (Official Music Video).mp4"
Extract 20 thumbnails from ./Rick Astley - Never Gonna Give You Up (Official Music Video).mp4
Rick Astley - Never Gonna Give You Up (Official Music Video)/frame 01 (0:00:05).jpg (1920x1080) at position 0:00:05
Rick Astley - Never Gonna Give You Up (Official Music Video)/frame 02 (0:00:15).jpg (1920x1080) at position 0:00:15
Rick Astley - Never Gonna Give You Up (Official Music Video)/frame 03 (0:00:26).jpg (1920x1080) at position 0:00:26
Rick Astley - Never Gonna Give You Up (Official Music Video)/frame 04 (0:00:37).jpg (1920x1080) at position 0:00:37
Rick Astley - Never Gonna Give You Up (Official Music Video)/frame 05 (0:00:47).jpg (1920x1080) at position 0:00:47
Rick Astley - Never Gonna Give You Up (Official Music Video)/frame 06 (0:00:58).jpg (1920x1080) at position 0:00:58
Rick Astley - Never Gonna Give You Up (Official Music Video)/frame 07 (0:01:08).jpg (1920x1080) at position 0:01:08
Rick Astley - Never Gonna Give You Up (Official Music Video)/frame 08 (0:01:19).jpg (1920x1080) at position 0:01:19
Rick Astley - Never Gonna Give You Up (Official Music Video)/frame 09 (0:01:30).jpg (1920x1080) at position 0:01:30
Rick Astley - Never Gonna Give You Up (Official Music Video)/frame 10 (0:01:40).jpg (1920x1080) at position 0:01:40
Rick Astley - Never Gonna Give You Up (Official Music Video)/frame 11 (0:01:51).jpg (1920x1080) at position 0:01:51
Rick Astley - Never Gonna Give You Up (Official Music Video)/frame 12 (0:02:01).jpg (1920x1080) at position 0:02:01
Rick Astley - Never Gonna Give You Up (Official Music Video)/frame 13 (0:02:12).jpg (1920x1080) at position 0:02:12
Rick Astley - Never Gonna Give You Up (Official Music Video)/frame 14 (0:02:23).jpg (1920x1080) at position 0:02:23
Rick Astley - Never Gonna Give You Up (Official Music Video)/frame 15 (0:02:33).jpg (1920x1080) at position 0:02:33
Rick Astley - Never Gonna Give You Up (Official Music Video)/frame 16 (0:02:44).jpg (1920x1080) at position 0:02:44
Rick Astley - Never Gonna Give You Up (Official Music Video)/frame 17 (0:02:54).jpg (1920x1080) at position 0:02:54
Rick Astley - Never Gonna Give You Up (Official Music Video)/frame 18 (0:03:05).jpg (1920x1080) at position 0:03:05
Rick Astley - Never Gonna Give You Up (Official Music Video)/frame 19 (0:03:16).jpg (1920x1080) at position 0:03:16
Rick Astley - Never Gonna Give You Up (Official Music Video)/frame 20 (0:03:26).jpg (1920x1080) at position 0:03:26
🍺 20 thumbnails extracted in Rick Astley - Never Gonna Give You Up (Official Music Video)/
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
previewer-0.3.0.tar.gz
(17.6 kB
view hashes)
Built Distribution
previewer-0.3.0-py3-none-any.whl
(22.8 kB
view hashes)
Close
Hashes for previewer-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 32abba1e8f3603f7f65b07ec96e5afd54e3d7f8712ad3aad8a3ff300c109f918 |
|
MD5 | 3b38c3e5ff001ca5f7f3d95790e2ab41 |
|
BLAKE2b-256 | fd5980294312bbaaa766c0972335a97ec3d50538af1b512303a4b47c0d1e8e69 |