Skip to main content

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:

Christoph Gohlke

License:

BSD-3-Clause

Version:

2026.1.18

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):

  • CPython 3.11.9, 3.12.10, 3.13.11, 3.14.2 64-bit

  • NumPy 2.4.1

  • Microsoft Visual Studio 2022 (build)

  • DirectX 9.0c SDK (build)

  • DirectShow BaseClasses include files (build)

  • DirectShow STRMBASE.lib (build)

Revisions

2026.1.18

  • Use multi-phase initialization.

2025.8.1

  • Drop support for Python 3.10, support Python 3.14.

2025.1.6

  • Add type hints.

  • Drop support for Python 3.9, support Python 3.13 and NumPy 2.

2024.1.6

  • Support Python 3.12.

  • Drop support for Python 3.8 and NumPy 1.22 (NEP 29).

2022.9.28

  • Update metadata.

2021.6.6

  • Drop support for Python 3.6 (NEP 29).

  • Fix compile error on PyPy3.

2020.1.1

  • Drop 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vidsrc-2026.1.18.tar.gz (149.7 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

vidsrc-2026.1.18-cp314-cp314t-win_arm64.whl (15.5 kB view details)

Uploaded CPython 3.14tWindows ARM64

vidsrc-2026.1.18-cp314-cp314t-win_amd64.whl (16.9 kB view details)

Uploaded CPython 3.14tWindows x86-64

vidsrc-2026.1.18-cp314-cp314t-win32.whl (16.2 kB view details)

Uploaded CPython 3.14tWindows x86

vidsrc-2026.1.18-cp314-cp314-win_arm64.whl (15.4 kB view details)

Uploaded CPython 3.14Windows ARM64

vidsrc-2026.1.18-cp314-cp314-win_amd64.whl (16.7 kB view details)

Uploaded CPython 3.14Windows x86-64

vidsrc-2026.1.18-cp314-cp314-win32.whl (15.9 kB view details)

Uploaded CPython 3.14Windows x86

vidsrc-2026.1.18-cp313-cp313-win_arm64.whl (15.0 kB view details)

Uploaded CPython 3.13Windows ARM64

vidsrc-2026.1.18-cp313-cp313-win_amd64.whl (16.3 kB view details)

Uploaded CPython 3.13Windows x86-64

vidsrc-2026.1.18-cp313-cp313-win32.whl (15.5 kB view details)

Uploaded CPython 3.13Windows x86

vidsrc-2026.1.18-cp312-cp312-win_arm64.whl (15.0 kB view details)

Uploaded CPython 3.12Windows ARM64

vidsrc-2026.1.18-cp312-cp312-win_amd64.whl (16.3 kB view details)

Uploaded CPython 3.12Windows x86-64

vidsrc-2026.1.18-cp312-cp312-win32.whl (15.5 kB view details)

Uploaded CPython 3.12Windows x86

vidsrc-2026.1.18-cp311-cp311-win_arm64.whl (15.0 kB view details)

Uploaded CPython 3.11Windows ARM64

vidsrc-2026.1.18-cp311-cp311-win_amd64.whl (16.2 kB view details)

Uploaded CPython 3.11Windows x86-64

vidsrc-2026.1.18-cp311-cp311-win32.whl (15.4 kB view details)

Uploaded CPython 3.11Windows x86

File details

Details for the file vidsrc-2026.1.18.tar.gz.

File metadata

  • Download URL: vidsrc-2026.1.18.tar.gz
  • Upload date:
  • Size: 149.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for vidsrc-2026.1.18.tar.gz
Algorithm Hash digest
SHA256 c9a02ad4118eec4000462efb2b43a71c29141fce18bcf274f6eba7d597ebcfe5
MD5 6bc743dedf09959f26b7188f2fb6e011
BLAKE2b-256 44eb7ef117f646f4a6e0bb7b841dc4ef26ed8a0187b1b978444e5298ad513511

See more details on using hashes here.

File details

Details for the file vidsrc-2026.1.18-cp314-cp314t-win_arm64.whl.

File metadata

File hashes

Hashes for vidsrc-2026.1.18-cp314-cp314t-win_arm64.whl
Algorithm Hash digest
SHA256 4b7944c2143a1e943486ed73cb1346286ff1970091ab4a61d39626fb06012b7c
MD5 47c64860619094c408f89d25663d9d45
BLAKE2b-256 194698d109ab7f6b965e9478bf1fee11803b02b2d4bd9074b0feab60b0924d37

See more details on using hashes here.

File details

Details for the file vidsrc-2026.1.18-cp314-cp314t-win_amd64.whl.

File metadata

  • Download URL: vidsrc-2026.1.18-cp314-cp314t-win_amd64.whl
  • Upload date:
  • Size: 16.9 kB
  • Tags: CPython 3.14t, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for vidsrc-2026.1.18-cp314-cp314t-win_amd64.whl
Algorithm Hash digest
SHA256 176ce11de635ea43a4c23522c88032a021daf9ad8656a2c97bd27cbf027070d5
MD5 2cf0bf837d1620c6b2d5e43b466a7c79
BLAKE2b-256 377c4edfda08ff54963bd2dab5d6e6b1a9b9f6fbf0d4569a8062e722d3a5c78b

See more details on using hashes here.

File details

Details for the file vidsrc-2026.1.18-cp314-cp314t-win32.whl.

File metadata

  • Download URL: vidsrc-2026.1.18-cp314-cp314t-win32.whl
  • Upload date:
  • Size: 16.2 kB
  • Tags: CPython 3.14t, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for vidsrc-2026.1.18-cp314-cp314t-win32.whl
Algorithm Hash digest
SHA256 f9496a7c93822f0c0f2d7a9bff8479cec462ad44f4e8b7008b35dd1b2163fcf3
MD5 67845495f30c6d013a885d1bef1f0162
BLAKE2b-256 7481af73e87b7dd320a38476141ff8c8bb89f42194ac3ea660359fc9a38a820b

See more details on using hashes here.

File details

Details for the file vidsrc-2026.1.18-cp314-cp314-win_arm64.whl.

File metadata

  • Download URL: vidsrc-2026.1.18-cp314-cp314-win_arm64.whl
  • Upload date:
  • Size: 15.4 kB
  • Tags: CPython 3.14, Windows ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for vidsrc-2026.1.18-cp314-cp314-win_arm64.whl
Algorithm Hash digest
SHA256 81138b84ff73721f0429fa3e6ab4f93701a371a3d3c610c19a9e788e3003f5b6
MD5 25745069bf8292ad5e58d01f18962dc4
BLAKE2b-256 b5d21be64c0e8dc92ee8c9ae0cd62cc3cd0ad89cefd88e08e77d80f5ab10135f

See more details on using hashes here.

File details

Details for the file vidsrc-2026.1.18-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: vidsrc-2026.1.18-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 16.7 kB
  • Tags: CPython 3.14, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for vidsrc-2026.1.18-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 92045bacd1ff440c863c34b5a14afd05d3380f259758c94d646b63b7a7215357
MD5 7b3d42c5987499ed4cf8e363b2c86a13
BLAKE2b-256 8e48b35cb9408152e44439c0ecb9be65c65ea847344c73dbe9cd710867ea359d

See more details on using hashes here.

File details

Details for the file vidsrc-2026.1.18-cp314-cp314-win32.whl.

File metadata

  • Download URL: vidsrc-2026.1.18-cp314-cp314-win32.whl
  • Upload date:
  • Size: 15.9 kB
  • Tags: CPython 3.14, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for vidsrc-2026.1.18-cp314-cp314-win32.whl
Algorithm Hash digest
SHA256 32dffa300a40077476ce07fe91b206506742cb806424a1ac0c9aa7b0b870832a
MD5 ee7e202fee6182604c77fe68c7f8c115
BLAKE2b-256 56a1467a018b27d64a046f2499d79245f5be0ad3dac75d7b89151768f1051374

See more details on using hashes here.

File details

Details for the file vidsrc-2026.1.18-cp313-cp313-win_arm64.whl.

File metadata

  • Download URL: vidsrc-2026.1.18-cp313-cp313-win_arm64.whl
  • Upload date:
  • Size: 15.0 kB
  • Tags: CPython 3.13, Windows ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for vidsrc-2026.1.18-cp313-cp313-win_arm64.whl
Algorithm Hash digest
SHA256 5c7f361e000924b7cae01cc9b14c76043e31178bab13a924236efa3a13cb9cb3
MD5 5dbcfb9b126738d019ded2b558b1af49
BLAKE2b-256 f3eb9d896de2ca8481356605165181a3817840ad47e6aab0912122bf372ad6de

See more details on using hashes here.

File details

Details for the file vidsrc-2026.1.18-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: vidsrc-2026.1.18-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 16.3 kB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for vidsrc-2026.1.18-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 6e5e1c4b3b087aeee0c83a70bf621c89e8358e24630631de2fdeb4257f8fbe3f
MD5 87be0ceb605b5948b47969f4d5d0e5a5
BLAKE2b-256 c1a16914f5c2c5fa1c1839c2e2971bbfb8abaaca6c30a87b9240369687d30035

See more details on using hashes here.

File details

Details for the file vidsrc-2026.1.18-cp313-cp313-win32.whl.

File metadata

  • Download URL: vidsrc-2026.1.18-cp313-cp313-win32.whl
  • Upload date:
  • Size: 15.5 kB
  • Tags: CPython 3.13, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for vidsrc-2026.1.18-cp313-cp313-win32.whl
Algorithm Hash digest
SHA256 b4148e862b8b32822a47e44bfdfa25068008eca9189187596c54c2294fcdf03d
MD5 f7da859282870e3b766e6256f6755fff
BLAKE2b-256 f5fc75d911966c5e4532dce024da6a1897416140504fb8153c9ae1526662a0ca

See more details on using hashes here.

File details

Details for the file vidsrc-2026.1.18-cp312-cp312-win_arm64.whl.

File metadata

  • Download URL: vidsrc-2026.1.18-cp312-cp312-win_arm64.whl
  • Upload date:
  • Size: 15.0 kB
  • Tags: CPython 3.12, Windows ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for vidsrc-2026.1.18-cp312-cp312-win_arm64.whl
Algorithm Hash digest
SHA256 284ade6a917b099f8043b0df26b59ea522f5b1c06f34937252ae96039028de92
MD5 896fef86fd69bec6a2441dc1f9b6c1f4
BLAKE2b-256 ac9ee9c944c517196008d0c7833ce07f4153736853306c7088e63cb5aacb7cc4

See more details on using hashes here.

File details

Details for the file vidsrc-2026.1.18-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: vidsrc-2026.1.18-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 16.3 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for vidsrc-2026.1.18-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 c0cba80d0dd5af0a4498a9742bfcc91900d1e34ea520c02309662b2f1b419d4d
MD5 0e1560bb705fea9f262979437c9e3577
BLAKE2b-256 51dafdee9b15c70f5cda08673c740c2f09aea2dd67549195ec79807e0659f933

See more details on using hashes here.

File details

Details for the file vidsrc-2026.1.18-cp312-cp312-win32.whl.

File metadata

  • Download URL: vidsrc-2026.1.18-cp312-cp312-win32.whl
  • Upload date:
  • Size: 15.5 kB
  • Tags: CPython 3.12, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for vidsrc-2026.1.18-cp312-cp312-win32.whl
Algorithm Hash digest
SHA256 7837797243ef3b544cf054d2e67311fa74225d667ae1230faa2fc842837ef259
MD5 ba743788f47f05e7be997ff6c773f2de
BLAKE2b-256 0e2e2f7a5a22a71e79693d320e0d98a745dd95f2b2b67c820d6f8ebf012c9a06

See more details on using hashes here.

File details

Details for the file vidsrc-2026.1.18-cp311-cp311-win_arm64.whl.

File metadata

  • Download URL: vidsrc-2026.1.18-cp311-cp311-win_arm64.whl
  • Upload date:
  • Size: 15.0 kB
  • Tags: CPython 3.11, Windows ARM64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for vidsrc-2026.1.18-cp311-cp311-win_arm64.whl
Algorithm Hash digest
SHA256 76e8b2ea7af2798766732e6e7bcd37302740bd27d3799ac4dd15daaed7cdac5a
MD5 8235aa4c2cc419299d7f40384fa97a83
BLAKE2b-256 ac0b8528984c3c1f0eb0672992437160fefdd264d21b8864345ad23b3d4b3128

See more details on using hashes here.

File details

Details for the file vidsrc-2026.1.18-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: vidsrc-2026.1.18-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 16.2 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for vidsrc-2026.1.18-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 b43df17a08f2909e62785bbede951f2359ec1a0ab986d8a02ea6fb140ff86a2a
MD5 dfbb9c05d27fac8ed5b6ac2384868883
BLAKE2b-256 0f30bec52a7d4cee0889c3d125cd0168967d77929f0654d314c8bc229b94dafe

See more details on using hashes here.

File details

Details for the file vidsrc-2026.1.18-cp311-cp311-win32.whl.

File metadata

  • Download URL: vidsrc-2026.1.18-cp311-cp311-win32.whl
  • Upload date:
  • Size: 15.4 kB
  • Tags: CPython 3.11, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for vidsrc-2026.1.18-cp311-cp311-win32.whl
Algorithm Hash digest
SHA256 1d044481f03c594bb266dccedc40f918c814931854ef4bb9770723ff2c99a118
MD5 b7e7c072fc5b1ffd70b5338793c9752e
BLAKE2b-256 c8a21272a26e47f5f3a553f0f27f2049ee03e265a5c838ce8e2d5f5b8774f5e5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page