livephoto-to-photo
Live Photo to Photo — free browser tool for extracting still JPEGs from Apple Live Photos (the reference UI for this library).
Offline Python library for extracting still JPEG images from Apple Live Photo components.
Package: livephoto-to-photo on PyPI (0.1.0).
Install
pip install livephoto-to-photo
For video component support (MOV/MP4/M4V), install the optional extra and the system ffmpeg binary:
pip install livephoto-to-photo[video]
System dependencies
| Input | Python package | System requirement |
|---|---|---|
| HEIC / HEIF still | pillow-heif, Pillow (installed by default) |
libheif — usually bundled in the pillow-heif wheel; if decoding fails, install libheif for your OS |
.livp container |
stdlib zipfile + HEIC stack above |
Same as HEIC when the still inside is HEIC |
| MOV / MP4 / M4V video | ffmpeg-python ([video] extra) |
ffmpeg binary on PATH |
Install ffmpeg:
- macOS:
brew install ffmpeg - Ubuntu/Debian:
sudo apt install ffmpeg - Windows / others: https://ffmpeg.org/download.html
If a required dependency is missing, the library raises a clear ImportError or RuntimeError explaining what to install.
Quick start
from livephoto_to_photo import extract_still_jpeg
# Extract from any Live Photo component
extract_still_jpeg("IMG_0001.HEIC", "output.jpg")
extract_still_jpeg("IMG_0001.MOV", "output.jpg")
extract_still_jpeg("livephoto.livp", "output.jpg")
# Or get as bytes
jpeg_data = extract_still_jpeg("IMG_0001.HEIC")
Supported formats
- HEIC/HEIF still images (the key photo from a Live Photo)
- MOV/MP4/M4V video components (extracts the first frame; requires ffmpeg)
- .livp container files (ZIP archives containing a still + video)
Output is always JPEG (default quality 92).
API
Main function
| Function | Description |
|---|---|
extract_still_jpeg(source, output=None, quality=92) |
Detect input type and extract a still JPEG |
from livephoto_to_photo import extract_still_jpeg
extract_still_jpeg("IMG_0001.HEIC", "output.jpg", quality=95)
jpeg_data = extract_still_jpeg("IMG_0001.HEIC")
Type-specific functions
| Function | Description |
|---|---|
extract_photo_from_heic(source, output=None, quality=92) |
HEIC/HEIF → JPEG |
extract_photo_from_video(source, output=None, quality=92) |
First video frame → JPEG (needs ffmpeg) |
extract_photo_from_livp(source, output=None, quality=92) |
.livp still → JPEG |
Class API
| Method | Description |
|---|---|
LivePhotoExtractor(source, quality=92) |
Create an extractor |
.extract() |
Return JPEG bytes (cached) |
.save(output) |
Write JPEG to a path or file-like object |
.to_bytes() |
Alias for .extract() |
from livephoto_to_photo import LivePhotoExtractor
extractor = LivePhotoExtractor("IMG_0001.HEIC", quality=95)
extractor.save("output.jpg")
Helpers
| Function | Description |
|---|---|
is_heic_file(file) |
True for .heic / .heif (or HEIC bytes) |
is_video_file(file) |
True for .mov / .mp4 / .m4v |
is_livp_file(file) |
True for .livp (or ZIP bytes) |
is_live_photo_input(file) |
True for any supported Live Photo input |
CLI
livephoto-to-photo INPUT OUTPUT [--quality N]
livephoto-to-photo IMG_0001.HEIC output.jpg
livephoto-to-photo IMG_0001.MOV output.jpg --quality 95
livephoto-to-photo livephoto.livp output.jpg
Error handling
from livephoto_to_photo import extract_still_jpeg
try:
extract_still_jpeg("file.mov", "output.jpg")
except ImportError as e:
# Missing Python package (e.g. ffmpeg-python or pillow-heif)
print(e)
except RuntimeError as e:
# Missing system tool (e.g. ffmpeg binary / libheif init failure)
print(e)
except ValueError as e:
# Unsupported type or invalid quality
print(e)
except OSError as e:
# Read / decode / write failure
print(e)
Tests
pip install -e ".[dev]"
pytest
# or with coverage
pytest --cov=livephoto_to_photo
Fixtures under tests/fixtures/ include a sample HEIC, MP4, and .livp containers.
Development
pip install -e ".[dev]"
pytest
black src/ tests/
ruff check src/ tests/
License
MIT. See LICENSE.
Metadata
Release files for livephoto-to-photo 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| livephoto_to_photo-0.1.0.tar.gz | 12.9 kB | Without provenance | Details for livephoto_to_photo-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| livephoto_to_photo-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for livephoto_to_photo-0.1.0-py3-none-any.whl |
Total release size: 22.5 kB
Release files / livephoto_to_photo-0.1.0.tar.gz
| Download URL | livephoto_to_photo-0.1.0.tar.gz |
|---|---|
| Size | 12.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ee973e12433ce5bd4cbd3a1678cb5acdeb946c3396913bad2855d9b3169028c2
|
|
BLAKE2b-256 checksum How to use checksums |
852544dce6baecfe545dd88f5d1830c2290621ef33da4c15c575fd572ea6c08f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / livephoto_to_photo-0.1.0-py3-none-any.whl
| Download URL | livephoto_to_photo-0.1.0-py3-none-any.whl |
|---|---|
| Size | 9.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c6e105764f77111e568d32f9231465a2fbc273d32f38c64f914c9f7d302cb71d
|
|
BLAKE2b-256 checksum How to use checksums |
45ac416b4c182861ef09f390b4ac173f8bdd600665d0f77b7360fccbf9cf3312
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.10 {"installer":{"name":"uv","version":"0.13.10","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for livephoto-to-photo 0.1.0
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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.