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
-----------------------
1. It takes the folders in the order you specify them.
2. It sorts images by name in natural order in each folder separately.
3. It checks the resolution of each image and counts their numbers.
4. It heuristically chooses the video resolution from the collected data.
5. It resizes each image (on the fly) to fit into that resolution, preserving the aspect ratio and aligning the images in the center.
6. It overlays various text information on the frames, if you specified this in the arguments.
7. 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
```
Or you may install it only for your user:
```
sudo apt install pipx
pipx install catframes
pipx ensurepath
```
You may also copy `catframes.py` to `/usr/local/bin` manually.
But then you will also need to install [Pillow](https://pypi.org/project/Pillow/#files).
Dependencies that are not installable from PYPI:
1. FFmpeg
2. 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](https://ffmpeg.org/download.html); 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](https://itustinov.ru/cona/latest/docs/html/catframes.html)** (in Russian, outdated)
Raw data
{
"_id": null,
"home_page": null,
"name": "catframes",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": null,
"keywords": "concat, images, video, webm, mp4, slideshow, timelapse, stop motion",
"author": null,
"author_email": "Georgy Ustinov <inbox@itustinov.ru>, Bogdan Syrovatsky <bogdansir1807@gmail.com>, Evgeny Ockatiev <evgeny.ockatiev@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/42/96/2811bb3377f6059fe4e257dcdbbc0f327fac0c6328b8a757bb4cc0a5a8bc/catframes-2024.8.3.tar.gz",
"platform": null,
"description": "Catframes\n=========\n\nIt concatenates frames.\n\nWith this software, you can\n\n* create a\u00a0timelapse video\n* turn an\u00a0animation rendered in\u00a0a\u00a0PNG\u00a0sequence into\u00a0a\u00a0video\n* compress your selfies\n* compress a\u00a0sequence of\u00a0frames from CCTV\n\nThe script takes folders with images and outputs MP4 or WebM.\n\nIt has GUI: `catmanager`\n\n\nWhat exactly does it do\n-----------------------\n\n1. It takes the folders in the order you specify them.\n2. It sorts images by name in natural order in each folder separately.\n3. It checks the resolution of each image and counts their numbers.\n4. It heuristically chooses the video resolution from the collected data.\n5. It resizes each image (on the fly) to fit into that resolution, preserving the aspect ratio and aligning the images in the center.\n6. It overlays various text information on the frames, if you specified this in the arguments.\n7. It concatenates the frames, having a fairly high resistance to emergencies.\n\n\nInstallation\n------------\n\nDo this as root for system-wide installation:\n\n```\npython3 -m pip install catframes\n```\n\nOr you may install it only for your user:\n\n```\nsudo apt install pipx\npipx install catframes\npipx ensurepath\n```\n\nYou may also copy `catframes.py` to `/usr/local/bin` manually.\nBut then you will also need to install [Pillow](https://pypi.org/project/Pillow/#files).\n\nDependencies that are not installable from PYPI:\n\n1. FFmpeg\n2. Monospaced fonts\n\nAlpine: `apk add ffmpeg font-dejavu`\n\nDebian/Ubuntu: `apt-get install ffmpeg fonts-dejavu`\n\nCentos/RHEL: `yum install ffmpeg dejavu-sans-mono-fonts`\n\nWindows: [FFmpeg builds](https://ffmpeg.org/download.html); Courier New included.\n\n\nUsage\n-----\n\nIf you are launching the program for the first time,\nuse `--limit` option to try different options on short video samples.\n\n catframes --limit=3 sourceFolder sample.mp4\n\nThe command to run it with default settings looks like this:\n\n catframes folderA folderB folderC result.webm\n\nFor automatic launches (through a\u00a0CRON job, etc.), it's better to add `--force` and `--sure` options:\n\n catframes -sf folderA folderB folderC result.webm\n\n\nDefault settings\n----------------\n\n**Frame rate:** 30 frames per second.\n\nYou may change it with `-r` parameter.\nAcceptable values are from\u00a01\u00a0to\u00a060.\nAll source frames will be included, so this parameter\ndetermines speed of your video record.\n\n**Compression quality:** medium.\n\nYou may change it with `-q` parameter.\nAcceptable values are `poor`, `medium`, `high`.\n\n**Margin (background) color:** black.\n\nYou may change it with `--margin-color`.\nIt takes values in formats `#rrggbb` and `#rgb` (hexadecimal digits; `#abc` means `#aabbcc`).\n\n\nText overlays\n-------------\n\nThere is a\u00a03\u00a0by\u00a03 grid. You can place labels in all cells except the central one.\n\nPlease, use `--left`, `--right`, `--top`, `--left-top`, etc.\n\nOne of the cells may be reserved for important warnings.\nIt is set by `WARN` value (in any case). By default, this is the top cell.\n\nYou can use any constant text in the labels, including line feeds (`\\n`).\nYou can also use a limited set of functions in curly brackets that output\ninformation about the source image or about the system.\n\nTo prevent special characters from being interpreted, you should use\n*single quotes in Unix Shell*, however,\nyou must use double quotes in the Windows command line.\n\nExample (Bash):\n\n```\ncatframes \\\n -r=5 --limit=10 \\\n --left-top='Frame {frame:video}' \\\n --left-bottom='{dir}/{fn}\\n\\nModified: {mtime}' \\\n --right-bottom='Compressed {vtime:%Y-%m-%d %H:%M}' \\\n folder video.webm\n```\n\nRead more about these functions in the docs.\n\n\nSee also\n--------\n\n**[Documentation](https://itustinov.ru/cona/latest/docs/html/catframes.html)** (in Russian, outdated)\n",
"bugtrack_url": null,
"license": "\u00a9 \u0413\u0435\u043e\u0440\u0433\u0438\u0439 \u0423\u0441\u0442\u0438\u043d\u043e\u0432, 2022\u20132024 \u00a9 \u0411\u043e\u0433\u0434\u0430\u043d \u0421\u044b\u0440\u043e\u0432\u0430\u0442\u0441\u043a\u0438\u0439, 2024 \u00a9 \u0415\u0432\u0433\u0435\u043d\u0438\u0439 \u041e\u043a\u0430\u0442\u044c\u0435\u0432, 2024 This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this software. Permission is granted to anyone to use this software for any purpose, including commercial applications, and to alter it and redistribute it freely, subject to the following restrictions: 1. The origin of this software must not be misrepresented; you must not claim that you wrote the original software. If you use this software in a product, an acknowledgment in the product documentation would be appreciated but is not required. 2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software. 3. This notice may not be removed or altered from any source distribution. ",
"summary": "Concatenate frames.",
"version": "2024.8.3",
"project_urls": {
"Changelog": "https://github.com/georgy7/catframes/blob/main/CHANGELOG.md",
"Homepage": "https://itustinov.ru/",
"Source code": "https://github.com/georgy7/catframes"
},
"split_keywords": [
"concat",
" images",
" video",
" webm",
" mp4",
" slideshow",
" timelapse",
" stop motion"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "b7c402a27f387e43d12d6700a964de21ee1930dd82614a971fa83bd0790ecd70",
"md5": "0eb7ebf6bf2d2af688c995fe14cacd3b",
"sha256": "d510930ccaff41f48f8a44afab90c545ac54c7d7ee7ff3ba407ef18f8c60af36"
},
"downloads": -1,
"filename": "catframes-2024.8.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "0eb7ebf6bf2d2af688c995fe14cacd3b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 69031,
"upload_time": "2024-10-31T08:15:43",
"upload_time_iso_8601": "2024-10-31T08:15:43.137372Z",
"url": "https://files.pythonhosted.org/packages/b7/c4/02a27f387e43d12d6700a964de21ee1930dd82614a971fa83bd0790ecd70/catframes-2024.8.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "42962811bb3377f6059fe4e257dcdbbc0f327fac0c6328b8a757bb4cc0a5a8bc",
"md5": "77b1a7888900d6726f02cd45db023da2",
"sha256": "cd08963e7ee8bb8835b7b7ce2ef9fa6064eeef531c4007a7a238ca5960659c15"
},
"downloads": -1,
"filename": "catframes-2024.8.3.tar.gz",
"has_sig": false,
"md5_digest": "77b1a7888900d6726f02cd45db023da2",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 69699,
"upload_time": "2024-10-31T08:15:47",
"upload_time_iso_8601": "2024-10-31T08:15:47.949484Z",
"url": "https://files.pythonhosted.org/packages/42/96/2811bb3377f6059fe4e257dcdbbc0f327fac0c6328b8a757bb4cc0a5a8bc/catframes-2024.8.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-31 08:15:47",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "georgy7",
"github_project": "catframes",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "catframes"
}