Skip to content

applesdom/composite

main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

composite.py

Small GUI for generating composite images

BRINE width=540.7

Installation

Written for Python 3.6.9. Use pip to install required packages:

pip3 install opencv-python  
pip3 install numpy

Getting Started

Composite images are formed by down-scaling each frame of a target video into a single pixel. Feed this script a video file (.mp4, .mkv, or .webm) and use the GUI to tune the shape of the output image. Or feed the script an existing composite to perform reshaping. Full-scale composites which use the entire video frame can also be generated.

Usage: python3 composite.py [options] <input_file>  
Options:  
    -h                Print this message, then exit  
    -o <output_file>  Composites will be written to this path (default: out.png)  
    -f                Full-scale composites will be generated  
    -w <width>        Composites will default to this width, in frames  
    -a                Automatically generate a composite, no gui  
    -r <start>:<end>  Only use pixels in this index range (including start)
Controls:  
    A, D              Decrease/increase composite width  
    W, S              Increase/decrease step size  
    Q                 Print current width and step size  
    Enter             Export composite to output file (set by -o)`

Examples

python3 composite.py N_BRILL.mp4                  # Open GUI with "N_BRILL.mp4" as input
python3 composite.py com.png -o new.png           # Open GUI with "com.png" as input, write reshaped images to "new.png"
python3 composite.py LOCK.mkv -a -f -w 197.36     # Automatically generate a full-scale composite for "LOCK.mkv" using
                                                  # width=197.36 (GUI will not be shown)
python3 composite.py og.mp4 -r 1247:1397          # Open GUI with "og.mp4" as input, only use frames 1247 to 1397

About

Small GUI for generating composite images

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages