Video glue for image folders.
Reason this release was yanked:
Poorly tested: SIGBREAK is not available on Linux
Project description
Catframes
It concatenates frames.
With this software, you can
- create a timelapse video
- turn an animation rendered in a PNG sequence into a video
- compress your selfies
- compress a sequence of frames from CCTV
The script takes folders with images and outputs MP4 or WebM.
It has GUI: catmanager
What exactly does it do
- It takes the folders in the order you specify them.
- It sorts images by name in natural order in each folder separately.
- It checks the resolution of each image and counts their numbers.
- It heuristically chooses the video resolution from the collected data.
- It resizes each image (on the fly) to fit into that resolution, preserving the aspect ratio and aligning the images in the center.
- It overlays various text information on the frames, if you specified this in the arguments.
- It concatenates the frames, having a fairly high resistance to emergencies.
Installation
Do this as root for system-wide installation:
python3 -m pip install catframes
You can also copy catframes.py to /usr/local/bin manually.
But then you will also need to install Pillow.
Dependencies that are not installable from PYPI:
- FFmpeg
- Monospaced fonts
Alpine: apk add ffmpeg font-dejavu
Debian/Ubuntu: apt-get install ffmpeg fonts-dejavu
Centos/RHEL: yum install ffmpeg dejavu-sans-mono-fonts
Windows: FFmpeg builds; Courier New included.
Usage
If you are launching the program for the first time,
use --limit option to try different options on short video samples.
catframes --limit=3 sourceFolder sample.mp4
The command to run it with default settings looks like this:
catframes folderA folderB folderC result.webm
For automatic launches (through a CRON job, etc.), it's better to add --force and --sure options:
catframes -sf folderA folderB folderC result.webm
Default settings
Frame rate: 30 frames per second.
You may change it with -r parameter.
Acceptable values are from 1 to 60.
All source frames will be included, so this parameter
determines speed of your video record.
Compression quality: medium.
You may change it with -q parameter.
Acceptable values are poor, medium, high.
Margin (background) color: black.
You may change it with --margin-color.
It takes values in formats #rrggbb and #rgb (hexadecimal digits; #abc means #aabbcc).
Text overlays
There is a 3 by 3 grid. You can place labels in all cells except the central one.
Please, use --left, --right, --top, --left-top, etc.
One of the cells may be reserved for important warnings.
It is set by WARN value (in any case). By default, this is the top cell.
You can use any constant text in the labels, including line feeds (\n).
You can also use a limited set of functions in curly brackets that output
information about the source image or about the system.
To prevent special characters from being interpreted, you should use single quotes in Unix Shell, however, you must use double quotes in the Windows command line.
Example (Bash):
catframes \
-r=5 --limit=10 \
--left-top='Frame {frame:video}' \
--left-bottom='{dir}/{fn}\n\nModified: {mtime}' \
--right-bottom='Compressed {vtime:%Y-%m-%d %H:%M}' \
folder video.webm
Read more about these functions in the docs.
See also
Documentation (in Russian, outdated)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file catframes-2024.8.1.tar.gz.
File metadata
- Download URL: catframes-2024.8.1.tar.gz
- Upload date:
- Size: 66.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5f54edaad21ec540b83613b9898f32425cdbf7c5d46cf981db80597effc723e7
|
|
| MD5 |
d0a5ecf09a8d80fb830a1ade4f52e353
|
|
| BLAKE2b-256 |
6fb1f1e01764985f89aee8e29538a3700a816eddc296b1ffffea8f4cffdbe852
|
File details
Details for the file catframes-2024.8.1-py3-none-any.whl.
File metadata
- Download URL: catframes-2024.8.1-py3-none-any.whl
- Upload date:
- Size: 65.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3d7b585cf72e32b0923b3878497d4d2737c23aa0011e33f42da7794de50625cc
|
|
| MD5 |
4448cdf5d223da75c7445541850ad332
|
|
| BLAKE2b-256 |
95ecfbc5193a31cf0600ad550d2b1e09146bbb7bb8586930029bcdcc2642f2f4
|