Turn your daily selfies into an animation.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Florine W. Dekker 5c32eaf465
Apply minor corrections to README
2 months ago
.editorconfig Add initial code, which kind of works I guess 7 months ago
.gitignore Use proper temp dir for temp files 4 months ago
LICENSE Add initial code, which kind of works I guess 7 months ago
README.md Apply minor corrections to README 2 months ago
config_default.py Add option to toggle caching 4 months ago
main.py Add option to toggle caching 4 months ago
requirements.txt Add automatic date caption and fix sorting order 4 months ago

README.md

Facemation

Turn your daily selfies into a good-looking timelapse.

This script automatically scales, rotates, and crops all frames so that your eyes are aligned in each photo.

Requirements

How to use

  1. Put your images in the input/ folder. Files will be processed in alphabetical order.
  2. Open a shell in the directory containing main.py.
  3. (Required once) Create a venv:
    python3 -m venv venv/
    
  4. Activate the venv:
    .\venv\Scripts\activate  # Windows
    source venv/bin/activate  # Linux
    
  5. (Required once) Install dependencies:
    python3 -m pip install -r requirements.txt
    
  6. (Optional) Configure the script by editing config.py. Check config_default.py for more information.
  7. Run the script:
    python3 -m main
    
  8. Run FFmpeg on the output/final/ folder to combine the created frames into a video. For example:
    cd output/final/
    ffmpeg -f image2 -r 24 -i %d.jpg -vcodec libx264 -crf 24 out.mp4
    
    Tips:
    • You can add -vf "transpose=2" before out.mp4 to rotate. See also this StackOverflow answer.
    • You can add -vf "tpad=stop_mode=clone:stop_duration=3" before out.mp4 to freeze the last frame for 3 seconds.