Read frames from OpenCV like humans
Project description
cv-frames is a lightweight utility that simplifies working with video files frame-by-frame using OpenCV. It includes both a Python API and a command-line interface (CLI) for interacting with video frames in an intuitive way.
Installation
Install via pip:
pip install cv-frames
Command Line Usage
After installation, you can use the CLI:
cv-frames show path/to/video.mp4
Navigate through frames with any key. Press q to quit.
Python Usage
Example: Read and show frames programmatically
from pathlib import Path
from cvframes import iterate
for i, (_, frame) in enumerate(iterate(Path("video.mp4"))):
print(f"Frame {i} shape:", frame.shape)
Example: Split side-by-side video into left/right frames
from cvframes import iterate_sbs
# Write the processed frames to disc
for capture, (left, right) in iterate_sbs("sbs_video.mp4", oname="processed.mp4"):
processed = do_something(left)
capture.write(processed)
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 cv_frames-0.0.3.tar.gz.
File metadata
- Download URL: cv_frames-0.0.3.tar.gz
- Upload date:
- Size: 8.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d30639836400c5671d6732f5a2633cd29e1e90254dec1e7afc4f7a87c95a36b8
|
|
| MD5 |
b8a4a1403b275877cd8b7581caec0044
|
|
| BLAKE2b-256 |
7bdafef957fec1fd711e761171391111d3b4de58465c68b90e18bd0c016139bd
|
Provenance
The following attestation bundles were made for cv_frames-0.0.3.tar.gz:
Publisher:
publish.yml on kqf/cv-frames
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cv_frames-0.0.3.tar.gz -
Subject digest:
d30639836400c5671d6732f5a2633cd29e1e90254dec1e7afc4f7a87c95a36b8 - Sigstore transparency entry: 258967359
- Sigstore integration time:
-
Permalink:
kqf/cv-frames@94c8682cfc08c4eef03b053e940576dc4215b596 -
Branch / Tag:
refs/tags/v0.0.3 - Owner: https://github.com/kqf
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@94c8682cfc08c4eef03b053e940576dc4215b596 -
Trigger Event:
release
-
Statement type:
File details
Details for the file cv_frames-0.0.3-py3-none-any.whl.
File metadata
- Download URL: cv_frames-0.0.3-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8adbfaa100cbd0112dcd060e72a0bcd8261853fb879e99f50ba7f3de1399087f
|
|
| MD5 |
3ee8a86e7e3959f51383d8ca09421077
|
|
| BLAKE2b-256 |
9bdae5d790fb9b4193481082584f0366dde695fd17037d9d8466f43f9f2d7df0
|
Provenance
The following attestation bundles were made for cv_frames-0.0.3-py3-none-any.whl:
Publisher:
publish.yml on kqf/cv-frames
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cv_frames-0.0.3-py3-none-any.whl -
Subject digest:
8adbfaa100cbd0112dcd060e72a0bcd8261853fb879e99f50ba7f3de1399087f - Sigstore transparency entry: 258967374
- Sigstore integration time:
-
Permalink:
kqf/cv-frames@94c8682cfc08c4eef03b053e940576dc4215b596 -
Branch / Tag:
refs/tags/v0.0.3 - Owner: https://github.com/kqf
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@94c8682cfc08c4eef03b053e940576dc4215b596 -
Trigger Event:
release
-
Statement type: