mediapy
Read/write/show images and videos in an IPython notebook
Decision gist · record as of 2026-08-14
Yes, if you work in Jupyter or IPython notebooks and need to display or manipulate images and videos. The low install friction, active maintenance, permissive license, and tight integration with the notebook environment make it a straightforward choice. The only gotcha is the ffmpeg system dependency for video I/O, which is documented and typically a one-time setup.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Video I/O requires ffmpeg to be installed and present in the system PATH; on Unix this can be installed via apt install ffmpeg.
- Low friction install with four common runtime dependencies (ipython, matplotlib, numpy, Pillow).
- Actively maintained with a recent release 44 days ago.
License · maintenance · safety
permissive license (permissive) — Licensed under Apache Software License (permissive), allowing use in most commercial and open-source projects without significant restriction.
last release 2026-07-01 (44 days) · last repo commit 2026-07-23 · 449 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,143,601 downloads/mo, #4,302 on PyPI
Alternatives
Verify before relying
pip install mediapy
import mediapy as media
import numpy as np
image = media.read_image('https://github.com/hhoppe/data/raw/main/image.png')
media.show_image(image)
video = media.read_video('https://github.com/hhoppe/data/raw/main/video.mp4')
media.show_video(video)- Whether ffmpeg installation on Windows is straightforward or requires additional setup steps beyond the Unix apt install shown in the docs.
What it is and what it does
Mediapy is a library that integrates image and video I/O directly into IPython and Jupyter notebook environments. It wraps common operations—reading from URLs or files, displaying with optional sizing and titles, writing to disk—and returns media as numpy arrays so you can manipulate them with standard scientific Python tools. The library handles metadata like video framerate automatically and provides both high-level convenience functions (show_image, read_video) and lower-level streaming interfaces (VideoReader, VideoWriter) for frame-by-frame processing.
The package depends on matplotlib, numpy, and Pillow for image handling, plus ipython for notebook integration. Video I/O requires ffmpeg to be installed on your system PATH. It targets modern Python versions and is designed specifically for notebook workflows, making it most useful when you're already working interactively in Jupyter rather than in scripts.
Use it for
- Display images fetched from URLs or local files directly in a notebook cell with optional height and title parameters.
- Read video files and play them back in a notebook with correct framerate, or extract individual frames as numpy arrays.
- Process video frame-by-frame using VideoReader/VideoWriter to apply transformations and save the result.
- Show multiple images side-by-side in a notebook grid for visual comparison of results.
- Generate synthetic test images or videos programmatically and display them immediately for inspection.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you work in Jupyter or IPython notebooks and need to display or manipulate images and videos.
The low install friction, active maintenance, permissive license, and tight integration with the notebook environment make it a straightforward choice. The only gotcha is the ffmpeg system dependency for video I/O, which is documented and typically a one-time setup.
Install
mediapy on PyPI
Before you install
Low friction install with four common runtime dependencies (ipython, matplotlib, numpy, Pillow). Actively maintained with a recent release 44 days ago.
Video I/O requires ffmpeg to be installed and present in the system PATH; on Unix this can be installed via apt install ffmpeg.
License in practice
Licensed under Apache Software License (permissive), allowing use in most commercial and open-source projects without significant restriction.
Quickstart
pip install mediapy
import mediapy as media
import numpy as np
image = media.read_image('https://github.com/hhoppe/data/raw/main/image.png')
media.show_image(image)
video = media.read_video('https://github.com/hhoppe/data/raw/main/video.mp4')
media.show_video(video)
Verify before relying
- Whether ffmpeg installation on Windows is straightforward or requires additional setup steps beyond the Unix apt install shown in the docs.
Package facts
| License | permissive license permissive |
| Python support | Supports the current Python release >=3.8 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 4 packagesipythonmatplotlibnumpyPillow |
| Maintenance | Actively maintained 44 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,143,601 / month, #4,302 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Framework :: IPythonFramework :: JupyterLicense :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Topic :: Multimedia :: Graphics :: ViewersTopic :: Multimedia :: Video :: Display |
Evidence: mediapy-1.2.7-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “jupyter notebook image display”
- mediapyMediapy reads, writes, and displays images and videos directly in…
- matplotlib-inlineEnables matplotlib figures to display inline directly within Jupyter…
- ipytreeipytree provides a tree-structure widget for Jupyter notebooks and…
Give your agent the search over MCP, or paste the wish link into any chat.
More Video packages
yt-dlp downloads audio and video from thousands of sites via a command-line interface, supporting format selection, metadata modification, and post-processing.
Install it if you need to download video or audio from the web.
MoviePy is a Python library for video editing that reads, processes, and writes video and audio files by converting them to numpy arrays for frame-level manipulation and effect application.
Generate access tokens and call LiveKit server APIs (room management, egress, ingress, SIP, agent dispatch, connectors) from Python backends using async/await.
Install it if you are building a backend that needs to generate tokens, manage rooms, or integrate with LiveKit's services.
pytube downloads YouTube videos and playlists to local files via Python API or command-line interface, with support for multiple stream formats and quality levels.
A framework for building realtime multimodal and voice AI agents that connect to LiveKit rooms and handle audio/video interactions with language models.
ffmpy is a Python wrapper around FFmpeg that lets you build and execute FFmpeg command lines programmatically without writing shell commands directly.
See also imageio-ffmpeg · py3Dmol · PIMS · torchcodec · ipywidgets · ffmpeg · watermark · pyaaf2 · scikit-video