Skip to main content

slides-to-images

pipeline status coverage report Latest Release

A library that converts a PowerPoint deck into an animation-playback video plus per-slide static frames — for embedding in another codebase, not for running standalone. Two independent capabilities:

  • Timing analysis (build_recording_plan, compute_deck_timeline) — pure Python, parses the deck's OOXML <p:timing>/<p:transition> trees to compute per-slide/per-click pacing. No external dependencies. See TIMING.md for the full model.
  • Conversion (convert) — drives a real, disposable LibreOffice Impress instance (via the docker-libreoffice-impress container image) to actually play the deck, recording video throughout and taking a live screenshot the moment each click settles. See IMPRESS_PROTOCOL.md for how that's driven end to end.

Install

pip install slides-to-images

The PyPI distribution name and the importable package name differ: pip install slides-to-images, but import slides2images.

For local development from a source checkout instead: pip install -e . (or .[test]/.[dev] — see pyproject.toml).

convert() additionally needs a reachable Docker daemon, with the image pulled: docker pull registry.gitlab.com/riphixel/docker-libreoffice-impress:latest.

Usage

Timing analysis only (no Docker required)

from pathlib import Path
from slides2images import build_recording_plan

plan = build_recording_plan(Path("deck.pptx"), click_delay_ms=500)
for slide in plan:
    print(
        f"slide {slide['index']}: "
        f"{len(slide['click_gaps_ms'])} click(s), "
        f"holds {slide['post_click_hold_ms']}ms after the last one"
    )

compute_deck_timeline() returns the same data uncollapsed — every animation node's start/end/duration, trigger, and target shape — useful for debugging a deck's timing rather than just driving a recorder with it.

Full conversion to video + static frames

from pathlib import Path
from slides2images import convert

result = convert(Path("deck.pptx"), Path("out/"), width=1920, height=1080)

print(result.video_path)  # out/recording.mp4
for image_path in result.image_paths:  # out/images/frame-0-0.png, frame-0-1.png, frame-1-0.png, ...
    print(image_path)

convert() raises slides2images.RecordingError for anything that stops a conversion short — an unsupported file extension, a deck with zero slides, or a failure in the underlying Docker/LibreOffice pipeline.

run.py in the repo root is this same example as a working CLI:

python3 run.py deck.pptx   # writes deck/recording.mp4 + deck/images/*.png

Supported input files

SUPPORTED_EXTENSIONS (also enforced by convert()):

  • Office Open XML Presentations and Templates — .pptx, .ppsx, .ppmx, .potx, .pomx (both strict and transitional OpenXML).
  • Legacy Microsoft PowerPoint 97/2000/XP/2003 — .ppt, .pps, .ppm, .pot, .pom. Converted to .pptx internally before anything else runs (python-pptx, which the timing model uses, only reliably opens the modern OOXML zip structure).

RESOLUTIONS is a small convenience dict of common (width, height) pairs ("vga", "720p", "hd", "4k") if you'd rather not hardcode pixels.

See also

  • TIMING.md — how animation and transition timing is computed, including the corner cases found by validating against real PowerPoint-rendered reference videos.
  • IMPRESS_PROTOCOL.md — how convert() actually drives a live Impress instance end to end: UNO connection, auto-advance disabling, the per-slide control loop, container lifecycle.
  • features.md — end-user-visible feature list.
  • AGENTS.md — guidelines for working on this codebase.

Links

Metadata

Release files for slides-to-images 1.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for slides-to-images 1.1.2
File Size Uploaded Provenance
slides_to_images-1.1.2.tar.gz 11.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for slides-to-images 1.1.2
File Interpreter ABI Platform
slides_to_images-1.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 24.3 kB

Release files / slides_to_images-1.1.2.tar.gz

Download URL slides_to_images-1.1.2.tar.gz
Size 11.7 kB
Tags Source
SHA-256 checksum
How to use checksums
6a2f5b6decd4b1272c8309622e46040bbe89a4a35da1d80b141d80469723eff3
BLAKE2b-256 checksum
How to use checksums
e9dd5f012b7a837ec9630bfe7fa2d924afb4c7555883f2856b875721505a50af
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / slides_to_images-1.1.2-py3-none-any.whl

Download URL slides_to_images-1.1.2-py3-none-any.whl
Size 12.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6dd0c7970d7d7b5fb1b820952236b181815ed9a9a5b6018f0e8051e3e378b611
BLAKE2b-256 checksum
How to use checksums
5a0a34e70e83e0c2c7d2d878e81a5f161856fea1754628f656e656654fe6ed71
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Security for slides-to-images 1.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page