Parallel Video IO
The Parallel Video IO (PVIO) package is motivated by the following problems that I kept having:
- I could never remember the
ffmpegandffprobcommands for simple tasks, so I have to Google them every time. - Precise random seek in videos (for scientific use) is not so trivial.
- I just want some simple dataloader that works for ML training and inference.
After finding myself writing the same thing over and over again for different projects, I wrote this package with the following features:
- Read frames from videos (random access or sequential) using imageio/FFmpeg.
- Write sequences of NumPy frames to H.264 MP4 files with sensible defaults.
- PyTorch-compatible
VideoCollectionDatasetandVideoCollectionDataLoaderthat stream frames from many videos in parallel across worker processes.SimpleVideoCollectionLoaderprovides a convenience API that combines dataset and dataloader creation in one call.
- A small
pviocommand-line tool (an ffmpeg-lite helper):pvio encodecombines a directory or list of image files into an H.264 MP4 (with--mode,--quality, and--presetflags), andpvio infoprints a video's frame count, frame size, and FPS.
GPU acceleration is automatic. On a machine with a CUDA GPU, decoding uses
the GPU (TorchCodec/NVDEC, with frame-accurate seeking preserved) and writing
uses the GPU encoder (FFmpeg/NVENC at a visually-lossless setting); both fall
back to the CPU when no GPU is available. SimpleVideoCollectionLoader runs in
the main process when decoding on the GPU (CUDA cannot be used in forked
workers). Pass device="cpu" (loader/EncodedVideo) or mode="cpu"
(write_frames_to_video) to opt out.
Linux only. macOS and Windows are not currently supported.
Installation, code examples, and documentation
Development
Clone and install with the dev dependencies:
git clone git@github.com:sibocw/parallel-video-io.git
cd parallel-video-io
uv sync --extra dev
Run the test suite:
pytest tests
Build and preview the documentation site locally:
uv run mkdocs serve
Metadata
Release files for parallel-video-io 0.1.9
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 | |
|---|---|---|---|---|
| parallel_video_io-0.1.9.tar.gz | 187.7 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| parallel_video_io-0.1.9-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 219.5 kB
Release files / parallel_video_io-0.1.9.tar.gz
| Download URL | parallel_video_io-0.1.9.tar.gz |
|---|---|
| Size | 187.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d5498949fd078e82d066bc4c9cdbba3576580d2b1800245190e96fbffd6b1049
|
|
BLAKE2b-256 checksum How to use checksums |
6de8bb248ad09c3178a7566c278554fbe8023cae730b5d1a03a9291ecce820d4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 29, 2026.
Transparency logRelease files / parallel_video_io-0.1.9-py3-none-any.whl
| Download URL | parallel_video_io-0.1.9-py3-none-any.whl |
|---|---|
| Size | 31.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c4461308a59ff46fd199aeadb9e3eb37684606e19cf2f42fec5e619541c5e34e
|
|
BLAKE2b-256 checksum How to use checksums |
b373ebad2df866906a43cd735c54ce40a54a8b063eef834dcedb384c36e30f5f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 29, 2026.
Transparency logSecurity for parallel-video-io 0.1.9
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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for parallel_video_io-0.1.9.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 29, 2026.
Transparency logA 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.