Skip to main content

Generate timelapse GIFs from image sequences

Project description

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.1.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.1.0-py3-none-any.whl (290.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: timelapse_gif-0.1.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.1.0.tar.gz
Algorithm Hash digest
SHA256 0aca4850a83bd5194f1fbcd06a70151882ce48e3cfb03b4a3a727d497d293b0e
MD5 63f75687bb7820c1bd70968a4391b428
BLAKE2b-256 aab046518152705fbd501ba0f776a0b3810c403b093518a9bb543252a0a6fbf0

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: timelapse_gif-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 290.9 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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a453b3f1c0d3736820aed3308fde0ec54081a28519e6ee7028d38efc14916ac8
MD5 1bce84f8b73d2e51568e7fb216809012
BLAKE2b-256 e789be5f98c3b6a91c85c4d4f8bacdb02f602a2eec65e90353d8c71d167a7424

See more details on using hashes here.

Provenance

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