Dynamo Figures
A Python package for creating composite images from videos. This tool extracts frames from a video and merges them using various composition modes to create stunning visual effects.
Installation
Install from Git
# Install directly from GitHub
pip install git+ssh://git@github.com/dynamicmobility/dynamo-figures.git
Install from Local Directory
# From within the project directory
git clone git@github.com:dynamicmobility/dynamo-figures.git
cd dynamo-figures
pip install -e .
Usage
Command-Line Interface
After installation, you can use the dynamo-composite-image command:
1. VAR Mode (Recommended)
Uses pixels that are furthest from the mean of the image, creating dynamic composite effects.
dynamo-composite-image --video_path ./example/video.mp4 --start_t 0.0 --end_t 99.0 --skip_frame 2 --mode VAR --alpha 0.4 --output ./example/composite.png
2. MIN Mode
Keeps the darkest pixels from all frames.
dynamo-composite-image --video_path ./example/video.mp4 --start_t 0.0 --end_t 99.0 --skip_frame 2 --mode MIN --output ./example/composite.png
3. MAX Mode
Keeps the lightest pixels from all frames.
dynamo-composite-image --video_path ./example/video.mp4 --start_t 0.0 --end_t 99.0 --skip_frame 2 --mode MAX --output ./example/composite.png
Python API
You can also use the package programmatically in your Python scripts:
from dynamo_figures import CompositeImage, CompositeMode
import cv2
# Create a composite image with VAR mode
merger = CompositeImage(
mode=CompositeMode.MAX_VARIATION,
video_path="./example/video.mp4",
start_t=0.0,
end_t=99.0,
skip_frame=2,
alpha=0.4,
disable_pbar=False # Set to True to disable the progress bar
)
# Generate the composite
result = merger.merge_images()
# Save the result
cv2.imwrite("output.jpg", result)
Alternative Command-Line Methods
If you haven't installed the package, you can still run it:
# Run as a Python module
python -m dynamo_figures.composite_image --video_path ./example_video.mp4 --mode VAR
# Or run directly
python src/dynamo_figures/composite_image.py --video_path ./example_video.mp4 --mode VAR
Parameters
--video_path(required): Path to the input video file--start_t: Start time in seconds (default: 0)--end_t: End time in seconds (default: 999999)--skip_frame: Number of frames to skip when extracting frames. Use1to process every frame (default: 1)--mode: Composition mode, three options available:VAR(Recommended): Uses pixels furthest from the mean, creating dynamic variation effectsMAX: Keeps the lightest pixels across all framesMIN: Keeps the darkest pixels across all frames
--alpha: Alpha blending factor for intermediate frames, range 0.0-1.0 (default: 0.5)--disable_pbar: Disable the progress bar when merging images (flag, no value needed)--output: Custom output file path (default: saves as<video_name>.jpgin the same directory as the input video)
Dependencies
- Python >= 3.8
- opencv-python >= 4.0.0
- numpy >= 1.20.0
- tqdm >= 4.0.0
License
All Rights Reserved 2023
Credits
Original Author: renyunfan (renyf@connect.hku.hk)
Metadata
Release files for dynamo-figures 0.3.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| dynamo_figures-0.3.5.tar.gz | 240.0 kB | With provenance | Details for dynamo_figures-0.3.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dynamo_figures-0.3.5-py3-none-any.whl | Python 3 | none | any | Details for dynamo_figures-0.3.5-py3-none-any.whl |
Total release size: 482.3 kB
Release files / dynamo_figures-0.3.5.tar.gz
| Download URL | dynamo_figures-0.3.5.tar.gz |
|---|---|
| Size | 240.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4ae6d547b6e9c568a0fd4a1361cd15388346b262509c83d7dac60581bea5d52e
|
|
BLAKE2b-256 checksum How to use checksums |
529e13f1dc108a3043e275bb646db49f95ccbe780a0769e75742c010ca8160fd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 5, 2026.
Transparency logRelease files / dynamo_figures-0.3.5-py3-none-any.whl
| Download URL | dynamo_figures-0.3.5-py3-none-any.whl |
|---|---|
| Size | 242.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
728e1beaff43977144742c2f996ccb5befb8d9462cbf019bb5df7677c87f5aa9
|
|
BLAKE2b-256 checksum How to use checksums |
f1942ea759e08525c2e05df88fa20d35fdc06a7f5d83e7b168390eefa2c60ed5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 5, 2026.
Transparency logSecurity for dynamo-figures 0.3.5
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for dynamo_figures-0.3.5.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 5, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.