cv_videowriter
Wrapper around OpenCV VideoWriter with some extra features.
Features
- Raise an exception if the video file is not created due to wrong configuration parameters.
- Automatically select the video size based on the first written frame.
- Raise an exception if the passed frame has a different size than the video size.
- Add force resize option to resize the frame to a predefined size.
- It will run cvtColor if the frame color is not the same as the video color. Or it will raise an exception if the frame color is not convertible to the video color.
Installation 
pip install cv_videowriter
Usage
import cv2
import numpy as np
from cv_videowriter import VideoWriter
writer = VideoWriter('test.mp4', cv2.VideoWriter_fourcc(*'mp4v'), 30)
for i in range(10):
frame = np.random.randint(0, 255, (460, 640, 3), dtype=np.uint8)
writer.write(frame)
Parameters
filename: str - Path to the video file.fourcc: int - FourCC code of the codec used to compress the frames.fps: float (default: 30) - Frame rate of the created video.force_resize: tuple[int, int] (default: None) - Resize the frame to the specified size (height, width) before writing it to the video file.api_preference: int (default: cv2.CAP_ANY) - API backends for video capturing.
Metadata
Release files for cv-videowriter 0.1.0
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 | Actions |
|---|---|---|---|---|
| cv_videowriter-0.1.0.tar.gz | 3.3 kB | Without provenance | Details for cv_videowriter-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| cv_videowriter-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for cv_videowriter-0.1.0-py3-none-any.whl |
Total release size: 6.5 kB
Release files / cv_videowriter-0.1.0.tar.gz
| Download URL | cv_videowriter-0.1.0.tar.gz |
|---|---|
| Size | 3.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b1506a6c8eec4e21ecd32b8b5af601600fe3be10af2b2ccf8e7fb38a8bd1d709
|
|
BLAKE2b-256 checksum How to use checksums |
394a5694edb0d61aebe51a3eb7fbc346393ded7dec2a805f5699d81b5078c1f8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.10.8
|
Release files / cv_videowriter-0.1.0-py3-none-any.whl
| Download URL | cv_videowriter-0.1.0-py3-none-any.whl |
|---|---|
| Size | 3.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d0007e47afa2e0b0c4363621716a741e64fc4c369fde7725b3ad38808e4a315f
|
|
BLAKE2b-256 checksum How to use checksums |
150f8575e2f915986b6ac620f1f96409ba1fddc4a92a0effc8896d3e7665447f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.10.8
|
Security for cv-videowriter 0.1.0
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.