Skip to main content

Generate timelapse GIFs from image sequences

Project description

timelapse-gif

timelapse-gif

CI PyPI License: MIT Python 3.13+

A CLI tool that generates timelapse GIF images from image sequences.

Features

  • rename — Rename photo files to YYYY-MM-DD.jpg format based on EXIF date taken
  • generate — Generate a timelapse GIF from images in a directory (with date overlay)

Installation

From PyPI (after publishing)

pip install timelapse-gif

Directly from the repository

pip install git+https://github.com/shogo452/timelapse-gif.git

For development (clone and use the repository)

git clone https://github.com/shogo452/timelapse-gif.git
cd timelapse-gif
uv sync

Requirements

  • Python 3.13+

Usage

Note: For development setup, prefix commands with uv run. If installed from PyPI, you can run timelapse-gif directly.

Show help

timelapse-gif --help
timelapse-gif rename --help
timelapse-gif generate --help

Rename photos

Renames files to YYYY-MM-DD.jpg based on EXIF date taken. Falls back to the file modification date if EXIF data is not available.

# Preview (does not actually rename)
timelapse-gif rename ./photos --dry-run
[dry-run] IMG_0781.jpg -> 2026-02-10.jpg
[dry-run] IMG_0782.jpg -> 2026-02-11.jpg
[dry-run] IMG_0783.jpg -> 2026-02-12.jpg
# Execute (apply renaming)
timelapse-gif rename ./photos

# With prefix (e.g., day_2026-02-17.jpg)
timelapse-gif rename ./photos --prefix day

If multiple files share the same date, a suffix is added like YYYY-MM-DD_1.jpg.

rename options

Option Description
--dry-run Preview only (does not actually rename)
--prefix TEXT Add a prefix to the file name

Generate timelapse GIF

Combines images in a directory in ascending filename order to generate a GIF animation. It is recommended to rename files to date order using the rename command first.

# Basic (default: width 640px, 500ms/frame, date overlay enabled)
timelapse-gif generate ./photos
Generated timelapse.gif (30 frames, 500ms/frame)
# Specify output path, size, and speed
timelapse-gif generate ./photos \
  -o output.gif \
  --width 800 \
  --duration 300

# Filter by date range, without date overlay
timelapse-gif generate ./photos \
  --start 2026-02-10 \
  --end 2026-02-17 \
  --no-date-overlay

# Change font size, loop 3 times
timelapse-gif generate ./photos \
  --font-size 32 \
  --loop 3

generate options

Option Default Description
-o, --output timelapse.gif Output file path
--width 640 Output width (px). Height is calculated automatically from the aspect ratio
-d, --duration 500 Display duration per frame (ms)
--date-overlay / --no-date-overlay Enabled Toggle date overlay display
--font-size 24 Font size for date overlay
--loop 0 Number of loops (0 = infinite loop)
--start None Start date filter (YYYY-MM-DD)
--end None End date filter (YYYY-MM-DD)

Configuration file

You can define default values for CLI options by placing a timelapse-gif.toml file in the current directory. CLI arguments take precedence when specified. The file is ignored if it does not exist.

[rename]
prefix = "day"

[generate]
output = "timelapse.gif"
width = 800
duration = 300
date-overlay = true
font-size = 32
loop = 0

You can also specify a different path using the --config option.

timelapse-gif --config my-config.toml generate ./photos

Typical workflow

# 1. Gather photos into a single directory
ls ./photos/
# IMG_0781.jpg  IMG_0782.jpg  IMG_0783.jpg ...

# 2. Rename by EXIF date (preview first)
timelapse-gif rename ./photos --dry-run --prefix day

# 3. Execute if everything looks good
timelapse-gif rename ./photos --prefix day
ls ./photos/
# day_2026-02-10.jpg  day_2026-02-11.jpg  day_2026-02-12.jpg ...

# 4. Generate timelapse GIF
timelapse-gif generate ./photos -o timelapse.gif --width 800 --duration 300

Supported image formats

JPEG, PNG, TIFF, WebP, GIF

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

timelapse_gif-0.2.1.tar.gz (1.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

timelapse_gif-0.2.1-py3-none-any.whl (291.0 kB view details)

Uploaded Python 3

File details

Details for the file timelapse_gif-0.2.1.tar.gz.

File metadata

  • Download URL: timelapse_gif-0.2.1.tar.gz
  • Upload date:
  • Size: 1.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for timelapse_gif-0.2.1.tar.gz
Algorithm Hash digest
SHA256 fa67f7f32384b0fc9af34dc84883a0a3bf9e17de230c3b4bfd5d8bda76f519b4
MD5 cd8e5c146eb3f7506a4008c99ed5dec0
BLAKE2b-256 9067c42e274cb85d787dfcb38423cb018309c3083c08c00b167a9504de670811

See more details on using hashes here.

Provenance

The following attestation bundles were made for timelapse_gif-0.2.1.tar.gz:

Publisher: publish.yml on shogo452/timelapse-gif

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file timelapse_gif-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: timelapse_gif-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 291.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for timelapse_gif-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b815c75bfe109976ded6e451e6a193618ed77734be37959a6231fbe1c9bcf77f
MD5 82292b7ff7cc93a9c82fc96382cec477
BLAKE2b-256 811e1543b974e0117fb9b65b04391caf6435ac7e8e475cb3b04d04bb45e10570

See more details on using hashes here.

Provenance

The following attestation bundles were made for timelapse_gif-0.2.1-py3-none-any.whl:

Publisher: publish.yml on shogo452/timelapse-gif

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page