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.0.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.0-py3-none-any.whl (291.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: timelapse_gif-0.2.0.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.0.tar.gz
Algorithm Hash digest
SHA256 6d07b12c1baa18504d7ab2268124b401067ecf7a92585887bad6fca13c740d61
MD5 fcfabce7c545fa5621b662034e9478f3
BLAKE2b-256 5f0a484cd2d7bc8d371ac4e4ee61c927430a5f6f2f32ae85646cbb02036cbd8a

See more details on using hashes here.

Provenance

The following attestation bundles were made for timelapse_gif-0.2.0.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.0-py3-none-any.whl.

File metadata

  • Download URL: timelapse_gif-0.2.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 36a1f1a13b498dc04e4dbf324a8d91e584f29a98667cd2f29d746d9af7afb922
MD5 010100d0ad6dfdc6a7b798c30ea9e75b
BLAKE2b-256 59a2ff9271a834e0c512e068008c401936dad1f274b628a171ebef18c757055c

See more details on using hashes here.

Provenance

The following attestation bundles were made for timelapse_gif-0.2.0-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