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.4.1.tar.gz
.
File metadata
- Download URL: ffmphisdp-2.4.1.tar.gz
- Upload date:
- Size: 290.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.4.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8fea2f551d9fa646e046a45eb140d17b8f3b613a2a2aa20bb20389c93ac47eee |
|
MD5 | 818d5c64499ad6562410c2a93139b6b4 |
|
BLAKE2b-256 | 296b5f47eb23b317e1aa4bed602cdc8b359f2b6489c0e60c58c1c64b41ea3b7c |
File details
Details for the file ffmphisdp-2.4.1-py3-none-any.whl
.
File metadata
- Download URL: ffmphisdp-2.4.1-py3-none-any.whl
- Upload date:
- Size: 8.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.4.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0d6b8527303bc7cb755146e0b710cce860fa7028beece4b368a037606a82787a |
|
MD5 | 4c1d4a05b512acf8e1b297d95f24170a |
|
BLAKE2b-256 | 8d0ca54487010d991b85900c644bf24099eee070f13a2c90075ce94567388b69 |