Xarray accessor and zarr codec for storing and accessing time and/or space stacked video
Project description
Xarray backend and zarr codec for working with video data.
This project is in an early stage of development. Please be patient with any bugs. Any contributuons are welcome.
MIT license
Documentation: https://xarray-video.readthedocs.io.
Features
Xarray backend to read video into an xarray dataset
Xarray accessor for time and/or space stacked video DataArrays
Zarr video codec for efficient compression of video in zarr chunks. Up to 100x improvement over blosc for video data.
Xarray accessor for video Datasets for writing to zarr using the video codec
Simple plotting and play previews to view video
Uses
Attach coordinates (for example time or location) to the video frames dimension
Load video into DaraArrays for easy subsetting
Easily convert video and frames to other formats such as netcdf or geotiff
Store video in an efficient chunked format within zarr
Create massive lazy access video archives with zarr
Store multiple videos (for example stereo camera) in the same archive with a consistent time and/or spatial reference.
Limitations
The library uses [PyAV](https://pyav.org) to read and write to/from video files. It will be limited to the same set of formats and codecs as your PyAV installation.
Although video file access and zarr archive access is lazy, once video data is loaded it is in uncompressed uint8 darrays. Trying to do dataset.load on large video files will exhaust your RAM very quickly.
The play preview is only intended as a diagnostic tool. It buffers the entire video as an array before display so cannot handle larger arrays. The play preview is also unlikely to play in realtime for larger videos.
Credits
This package was developed by Oceanum Numerical, with input from our development partners and contributors.
History
0.0.1 (2022-12-02)
First release on PyPI.
Project details
Release history Release notifications | RSS feed
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
Hashes for xarray_video-0.2.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15151b299c058657ed7bb43a48a34e04fbe154fe9cdd95a1c1ae9945a1cf5b12 |
|
MD5 | 90b21f78f5f1d71d674e240afb67118a |
|
BLAKE2b-256 | 668f5827cb2e176928bae4027020344f76b9b9953a200b630adbe1e817b11231 |