A lightweight napari plugin for recording workflow demonstration videos with live annotations and step markers.
Project description
napari-demo-assistant
napari-demo-assistant records short napari workflow videos with live visual cues, including arrows, numbered step circles, and optional labels.
It is designed for scientific-software demos, user support, GitHub issue feedback, tutorials, and plugin workflows such as napari-sam3-assistant.
Current release: 1.1.0.
The plugin focuses on demo recording, not screenshot capture. Most operating systems already provide screenshot tools. The missing workflow is a simple napari-native way to record what happened and show users where to click.
Key features
- Record the full napari window or only the viewer canvas.
- Export MP4 video with H.264 compression.
- Add arrows, text stamps, and numbered step circles while recording.
- Use high-contrast annotation color palettes.
- Attach optional narrative labels to annotations.
- Use a compact, icon-driven dock widget designed for napari.
- See drawing state, annotation visibility, napari control state, frame count, and elapsed time at a glance.
- Right-click or press
Escto exit drawing mode. - Keep annotations visible after leaving drawing mode.
- Undo/redo annotations with buttons or
Ctrl+Z/Ctrl+Y. - Save timeline step markers beside the video as
.steps.json. - Optionally log clicked napari/plugin controls as an action trail beside the video.
- Remember the last output path and annotation color palette.
Why this plugin exists
For interactive napari workflows, a short video is often clearer than written instructions. This is especially true for prompting, mask previews, label cleanup, layer switching, and plugin-specific controls.
Written documentation still matters, but UI changes make screenshots and step-by-step text expensive to maintain. A quick recording of the current napari workflow is often the fastest way to help users follow the correct steps.
napari-demo-assistant helps developers, imaging scientists, and support users record clear napari workflow videos with lightweight visual guidance. It is also useful for troubleshooting because users can show exactly what they clicked, what happened, and where an error appeared.
Commercial tools such as Snagit are useful, but they may not be available on Linux, remote workstations, or scientific Python environments. This plugin provides a focused napari-native alternative.
Typical use cases
- Record short napari workflow tutorials for teaching, onboarding, or plugin documentation.
- Demonstrate plugin steps, button clicks, layer selection, and mask-cleanup actions.
- Create video replies for GitHub issues, user support, or collaborator feedback.
- Let users record bugs, unexpected behavior, or error messages so developers can see exactly what happened.
Installation
From PyPI
pip install napari-demo-assistant
Development install
From the repository root:
pip install -e .
Then start napari:
napari
Open the plugin from:
Plugins > Demo Assistant
Basic workflow
- Choose the recording target:
Full napari windowViewer canvas only
- Choose the output
.mp4path. - Click
Start Recording. - Add annotations when needed:
ArrowTextStep Circle
- Right-click or press
Escto exit drawing mode. - Click
Stopto finish recording.
The Add Step Marker workflow is for the recorded video timeline, not for drawing on the viewer. When used during recording, it updates the current step text for the video overlay and saves the step time/frame beside the video as .steps.json.
Annotation behavior
Live annotations can cover the full napari window, including plugin controls. This allows arrows and step markers to point to either the viewer or the user interface.
Drawing mode is intentionally easy to exit:
- Right-click exits drawing mode.
Escexits drawing mode.Exitexits drawing mode.- Existing annotations stay visible.
- Napari mouse control is restored after drawing mode is off.
Cleardeletes current annotation marks while keeping the overlay ready.Remove Overlayunloads the overlay itself and restores napari control.
Output notes
The plugin records MP4 video using imageio-ffmpeg, mss, OpenCV, and H.264 compression.
CRF quality controls compression:
- Lower CRF looks better but creates larger files.
- Higher CRF creates smaller files with more compression.
- Example:
23is higher quality,28is the compact default, and32is smaller.
A practical default for demos is usually CRF 28 at 12 FPS.
When action logging is enabled, a .actions.json file is saved beside the video. This file records meaningful UI controls clicked during recording, such as buttons, checkboxes, combo boxes, and spin boxes. It is intended as a brief written trail for tutorials, troubleshooting, and GitHub issue feedback. Actions are still logged while recording is paused, using the current time and frame.
Limitations
- Intended for napari workflow recording, not general desktop screen capture.
- Audio recording is not included.
- Screenshot capture is not a major feature because most operating systems already provide it.
- Very large windows, high FPS, or low CRF values can produce large video files.
License
This project is released under the MIT License.
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
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 napari_demo_assistant-1.1.0.tar.gz.
File metadata
- Download URL: napari_demo_assistant-1.1.0.tar.gz
- Upload date:
- Size: 22.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
91aa37240068bbfc1e8c74e9dff6d87dd35b2417bcfb93c85ffde3e8bea2e1cc
|
|
| MD5 |
aca57e80e79187e707124d59b345fc5a
|
|
| BLAKE2b-256 |
53f437f9ee3ab05ead2c2c293e52c449bcf18289f9c3e6564369a9f1bbae5584
|
File details
Details for the file napari_demo_assistant-1.1.0-py3-none-any.whl.
File metadata
- Download URL: napari_demo_assistant-1.1.0-py3-none-any.whl
- Upload date:
- Size: 21.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c35f08e7d2bc882b59d600fc5331af8943dc2efc747863d22da9557a86a8a983
|
|
| MD5 |
b8e0e1c1735c92792ed747786985ebf3
|
|
| BLAKE2b-256 |
a7d918a9c05e19452513fbaf30efdbdd3161871b729e2ce7c17825922b0b7cf3
|