{"id":14977723,"url":"https://github.com/janclemenslab/napari-video","last_synced_at":"2025-10-28T05:30:57.386Z","repository":{"id":45324829,"uuid":"321417187","full_name":"janclemenslab/napari-video","owner":"janclemenslab","description":"Napari plugin for working with video files.","archived":false,"fork":false,"pushed_at":"2024-10-13T07:38:54.000Z","size":28,"stargazers_count":13,"open_issues_count":1,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-01T12:11:12.518Z","etag":null,"topics":["napari-plugin","opencv","video"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/janclemenslab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-12-14T17:05:41.000Z","updated_at":"2024-10-23T10:28:52.000Z","dependencies_parsed_at":"2022-09-17T04:00:26.526Z","dependency_job_id":null,"html_url":"https://github.com/janclemenslab/napari-video","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janclemenslab%2Fnapari-video","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janclemenslab%2Fnapari-video/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janclemenslab%2Fnapari-video/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janclemenslab%2Fnapari-video/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/janclemenslab","download_url":"https://codeload.github.com/janclemenslab/napari-video/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238603665,"owners_count":19499488,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["napari-plugin","opencv","video"],"created_at":"2024-09-24T13:56:12.143Z","updated_at":"2025-10-28T05:30:57.004Z","avatar_url":"https://github.com/janclemenslab.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# napari-video\n[![napari hub](https://img.shields.io/endpoint?url=https://api.napari-hub.org/shields/napari_video)](https://napari-hub.org/plugins/napari_video)\n\nNapari plugin for working with videos.\n\nRelies on [pyvideoreader](https://pypi.org/project/pyvideoreader/) as a backend which itself uses [opencv](https://opencv.org) for reading videos.\n\n## Installation\n```shell\npip install napari[all] napari_video\n```\n\n## Usage\nFrom a terminal:\n```shell\nnapari video.avi\n```\n\nOr from within python:\n```shell\nimport napari\nfrom napari_video.napari_video import VideoReaderNP\n\npath='video.mp4'\nvr = VideoReaderNP(path)\nwith napari.gui_qt():\n    viewer = napari.view_image(vr, name=path)\n```\n\n## Internals\n`napari_video.napari_video.VideoReaderNP` exposes a video with a numpy-like interface, using opencv as a backend.\n\nFor instance, open a video:\n```python\nvr = VideoReaderNP('video.avi')\nprint(vr)\n```\n```\nvideo.avi with 60932 frames of size (920, 912, 3) at 100.00 fps\n```\nThen\n\n- `vr[100]` will return the 100th frame as a numpy array with shape `(902, 912, 3)`.\n- `vr[100:200:10]` will return 10 frames evenly spaced between frame number 100 and 200 (shape `(10, 902, 912, 3)`).\n- 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.\n- 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)`.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjanclemenslab%2Fnapari-video","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjanclemenslab%2Fnapari-video","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjanclemenslab%2Fnapari-video/lists"}