No project description provided
Project description
ffmphisDP
This package takes care of reading a video stream one frame at a time from a local file or a url while converting it to a given framerate.
Features:
- Streaming all frames from a video url or a video file
- Jumping to another point of the stream at a given frame index or timestamp
- For a given video and a given framerate always returns the same frames
How to use it
from ffmphisdp.video_reader import ControlledFPSVideoCapture
stream = ControlledFPSVideoCapture("myvideo.mp4", fps=10)
while True:
ret, frame = stream.read()
if not ret:
break # End of the stream
<do something with the frame>
Important Note
Previously reading video was handled by the skcvideo package, it's important to understand that ffmphisdp introduces a breaking change from skcvideo.
The frames returned by ffmphisdp and those returned by skcvideo are not the exact same, care should be taken when using legacy data to read videos using the correct reader.
Here is an example, for a given video at 25fps converted to 10fps:
- skcvideo would return the original video frame indexes:
0,1,2,4,7,9,12,14,17
- ffmphisdp return the original video frame indexes:
1,3,6,8,11,13,16
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
File details
Details for the file ffmphisdp-2.2.0.tar.gz
.
File metadata
- Download URL: ffmphisdp-2.2.0.tar.gz
- Upload date:
- Size: 288.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.4.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73f73c6ef3b39bf653c35ef1e4c9d973c9da55da24991d4a7d595a03b5576a0c |
|
MD5 | 2a0253aabb5372c2121b62046b997b14 |
|
BLAKE2b-256 | ab233421cb3e1f4a6db631e1c530f005dc21a943ac7e4cb38232fbcbe8ce0cbb |
File details
Details for the file ffmphisdp-2.2.0-py3-none-any.whl
.
File metadata
- Download URL: ffmphisdp-2.2.0-py3-none-any.whl
- Upload date:
- Size: 8.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.4.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7e4b260372340697b82956bb07f8ca3c4216e28a71616d2cf75afa435726333c |
|
MD5 | b1e2901fadacda2a405deb0504fd3d6d |
|
BLAKE2b-256 | f1ffa16b9788d33c19d1a6c20e490bce2405d1fabeaad632e80ff3e8dc60ffdf |