napari-video
Napari plugin for working with videos.
Relies on pyvideoreader as a backend which itself uses opencv for reading videos.
Installation
pip install napari[all] napari_video
Usage
From a terminal:
napari video.avi
Or from within python:
import napari
from napari_video.napari_video import VideoReaderNP
path='video.mp4'
vr = VideoReaderNP(path)
with napari.gui_qt():
viewer = napari.view_image(vr, name=path)
Internals
napari_video.napari_video.VideoReaderNP exposes a video with a numpy-like interface, using opencv as a backend.
For instance, open a video:
vr = VideoReaderNP('video.avi')
print(vr)
video.avi with 60932 frames of size (920, 912, 3) at 100.00 fps
Then
vr[100]will return the 100th frame as a numpy array with shape(902, 912, 3).vr[100:200:10]will return 10 frames evenly spaced between frame number 100 and 200 (shape(10, 902, 912, 3)).- Note that by default, single-frame and slice indexing return 3D and 4D arrays, respectively. To consistently return 4D arrays, open the video with
remove_leading_singleton=False.vr[100]will then return a(1, 902, 912, 3)array. - We can also request specific ROIs and channels. For instance,
vr[100:200:10,100:400,800:850,1]will return an array with shape(10, 300, 50, 1).
Metadata
Release files for napari_video 0.2.13
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 | |
|---|---|---|---|---|
| napari_video-0.2.13.tar.gz | 5.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| napari_video-0.2.13-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.2 kB
Release files / napari_video-0.2.13.tar.gz
| Download URL | napari_video-0.2.13.tar.gz |
|---|---|
| Size | 5.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0a81ea583d8562d5ed2226b323a77f7953a98aa1b2276213788352c18c16b29c
|
|
BLAKE2b-256 checksum How to use checksums |
2b089b21abdfb6bfee7d2efcf5525bf75e5f8a66c15179aa22e2bac6c0e6e312
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.32.5
|
Release files / napari_video-0.2.13-py3-none-any.whl
| Download URL | napari_video-0.2.13-py3-none-any.whl |
|---|---|
| Size | 4.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ded8ffc1a5557ace61ae03b9695fdf1a7f2a055f09f844825eff921e57fcfc33
|
|
BLAKE2b-256 checksum How to use checksums |
1dfd6de9f181a51467d9b68fb2bb7eab2bcaaeec305665496227b3595418f96c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-requests/2.32.5
|
Security for napari_video 0.2.13
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.