slides-to-images
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. SeeTIMING.mdfor the full model. - Conversion (
convert) — drives a real, disposable LibreOffice Impress instance (via thedocker-libreoffice-impresscontainer image) to actually play the deck, recording video throughout and taking a live screenshot the moment each click settles. SeeIMPRESS_PROTOCOL.mdfor 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.pptxinternally 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— howconvert()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
- PyPI: https://pypi.org/project/slides-to-images/
- Source, issues: https://gitlab.com/riphixel/slides-to-images
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file slides_to_images-1.1.0.tar.gz.
File metadata
- Download URL: slides_to_images-1.1.0.tar.gz
- Upload date:
- Size: 11.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
41b9aeddccad478534d66b29a869b1af11e405560770b7da159ba21c5791a39b
|
|
| MD5 |
5c2882c0f24e0cc328f3c78782d82e65
|
|
| BLAKE2b-256 |
fad94c789236bf13f79cd8a9b0f66cc536d17653ba66547b2f50e8fcd329c0f2
|
File details
Details for the file slides_to_images-1.1.0-py3-none-any.whl.
File metadata
- Download URL: slides_to_images-1.1.0-py3-none-any.whl
- Upload date:
- Size: 12.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3ae63a3cf6c8155444e726b95e827a0f6870a5f86e9c0a28ae87ad7d1e901543
|
|
| MD5 |
e5e8a6bc8c1ccc621068725ac34c404b
|
|
| BLAKE2b-256 |
f78fa5816a1117606ff8f643b097f529ee6f851ca89aa42fd74fba54a6d65bcc
|