Video Frameserver for Numpy
Project description
Vidsrc is a Python library to read frames from video files as numpy arrays via the DirectShow IMediaDet interface.
- Author:
- License:
BSD 3-Clause
- Version:
2024.1.6
Quickstart
Install the vidsrc package and all dependencies from the Python Package Index:
python -m pip install -U vidsrc
See Examples for using the programming interface.
Source code and support are available on GitHub.
Requirements
This revision was tested with the following requirements and dependencies (other versions may work):
Revisions
2024.1.6
Support Python 3.12.
Remove support for Python 3.8 and numpy 1.22 (NEP 29).
2022.9.28
Update metadata.
2021.6.6
Remove support for Python 3.6 (NEP 29).
Fix compile error on PyPy3.
2020.1.1
Remove support for Python 2.7 and 3.5.
Notes
The DirectShow IMediaDet interface is deprecated and may be removed from future releases of Windows (https://docs.microsoft.com/en-us/windows/desktop/directshow/imediadet).
To fix compile error C2146: syntax error: missing ';' before identifier 'PVOID64', change typedef void * POINTER_64 PVOID64; to typedef void * __ptr64 PVOID64; in winnt.h.
Examples
>>> from vidsrc import VideoSource >>> video = VideoSource('test.avi', grayscale=False) >>> len(video) # number of frames in video 48 >>> video.duration # length in s 1.6016 >>> video.framerate # frames per second 29.970089850329373 >>> video.shape # frames, height, width, color channels (48, 64, 64, 3) >>> frame = video[0] # access first frame >>> frame = video[-1] # access last frame >>> for frame in video: ... pass # do_something_with(frame)
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 Distributions
Hashes for vidsrc-2024.1.6-pp310-pypy310_pp73-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | be064111eede14040789608a216c360bbaa5406c16ada86616b39631e1c6acc9 |
|
MD5 | 77dfd08d7bca7799733c1efb2d9faa21 |
|
BLAKE2b-256 | b8ddee2e0d2c905a699f00000bb5963e2873d458ef02aec36e5003a3146b4430 |
Hashes for vidsrc-2024.1.6-cp312-cp312-win_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 153ddfbd5ffd55250ba174e6373ed7630cd2b5d8a20abd0f700f6d6fa0285d6e |
|
MD5 | b293fbfff7781b55a31993b5c7f80e6e |
|
BLAKE2b-256 | 02380be9b57bfb7e8101eb28a17898048141ea137f420b97e74449124966c6b8 |
Hashes for vidsrc-2024.1.6-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 60ed30a147ac2c93e20f18ee4b17d6f5b166134c96cd07817432910dece33b8e |
|
MD5 | 031ab0bc3808352a67f6905f7f3290b4 |
|
BLAKE2b-256 | 532eec297a8ab7ce95090ad31f213a49667bb9f6cc6c6b8b3f57cf54cbed06be |
Hashes for vidsrc-2024.1.6-cp312-cp312-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7071f8e82fdcdb5ed20e9db0fd7dae73e19a3f85cb7b9859c53b82965ed7c4d1 |
|
MD5 | b751229aef925b9cc932e9140d91ef69 |
|
BLAKE2b-256 | ec34d99479ad31e5ceda925e40313df511707e25218a4838242f17aa05ca0dd6 |
Hashes for vidsrc-2024.1.6-cp311-cp311-win_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc4a8839ab8ead2fd6175b7429556c2274a14c1f814dbb6965e0c8a56d47ca0e |
|
MD5 | 72bc7499adc97fd71e5b7e2418fc7ecc |
|
BLAKE2b-256 | cf10d044947e82163cb81103f9323a0ab6c35fa810c69b1d104cb1aa588f7662 |
Hashes for vidsrc-2024.1.6-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7e3579b33d472b5dc7895ddbce27d5715feaba90983aef30b9f4289cd3b395a1 |
|
MD5 | 91a1348092b133acfa11efe2ec2de9f5 |
|
BLAKE2b-256 | bdc0821ba3b057a50612a2abcb41f5ef5ab0b0e8e7c6beefaa0f5bdbcdb3574c |
Hashes for vidsrc-2024.1.6-cp311-cp311-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e73f6e34a7b9fecb427629b05d7b53fb6b3a0ed90a8d1b111bda67391e8db84 |
|
MD5 | cfb3a6be71d9dae7e200bbd8fffa4e7e |
|
BLAKE2b-256 | b82360ae118a925241f6ea770783a3ad9a1e08c4ba1e6a9c71dc56a0285d4f7f |
Hashes for vidsrc-2024.1.6-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 16d3475c42f0bb6af17476ba54b8f39f7b56955e6b248f8d906968c789617e20 |
|
MD5 | 7f5f259432d9d4040cace4556c9422e0 |
|
BLAKE2b-256 | 80ae7a5e0a3c2a53808b7c291bad3963872d53bde7925939746464f53e8a253a |
Hashes for vidsrc-2024.1.6-cp310-cp310-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3dbb810454e5ef183dad7396b6cd44408af41ccbcbb86c4d1339393543caccc2 |
|
MD5 | bb0b711eec70ee905efd0fa7265c1e6f |
|
BLAKE2b-256 | 35405884f83354b9358e5422faa3e4dcb4fe44e4a3b63918ebb35661aba494a7 |
Hashes for vidsrc-2024.1.6-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5eb626859d89c3f4d8420d2377e20cfd4497c88733ce86810907965d036a6c9 |
|
MD5 | 8729b6a4e3c078843618dbf6dee51834 |
|
BLAKE2b-256 | c40490086ece195027d27ac425259fbebc1fc11af81c979db59593c84c033428 |
Hashes for vidsrc-2024.1.6-cp39-cp39-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d3b07d243b7fd33e4b05fae833038aec29e085eb7af15d0c754bcb825b13a842 |
|
MD5 | d6cf565c13b0fd75d2443c86608b3ff5 |
|
BLAKE2b-256 | f63c3e2190a9343a85444409860c3a3f73bb7a7a579f235d138d699a3e90dac0 |