Video Frameserver for Numpy
===========================
Vidsrc is a Python library to read frames from video files as numpy arrays
via the DirectShow IMediaDet interface.
:Author: `Christoph Gohlke <https://www.cgohlke.com>`_
:License: BSD-3-Clause
:Version: 2025.8.1
Quickstart
----------
Install the vidsrc package and all dependencies from the
`Python Package Index <https://pypi.org/project/vidsrc/>`_::
python -m pip install -U vidsrc
See `Examples`_ for using the programming interface.
Source code and support are available on
`GitHub <https://github.com/cgohlke/vidsrc>`_.
Requirements
------------
This revision was tested with the following requirements and
dependencies (other versions may work):
- `CPython <https://www.python.org>`_ 3.11.9, 3.12.10, 3.13.5, 3.14.0rc 64-bit
- `NumPy <https://pypi.org/project/numpy/>`_ 2.3.2
- Microsoft Visual Studio 2022 (build)
- DirectX 9.0c SDK (build)
- DirectShow BaseClasses include files (build)
- DirectShow STRMBASE.lib (build)
Revisions
---------
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)
Raw data
{
"_id": null,
"home_page": "https://www.cgohlke.com",
"name": "vidsrc",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.11",
"maintainer_email": null,
"keywords": null,
"author": "Christoph Gohlke",
"author_email": "cgohlke@cgohlke.com",
"download_url": "https://files.pythonhosted.org/packages/ba/d0/8b35dd02f5b9e7eb3b59348e45b8a15a9d59cb6f1afd9a7f4bc846665e8d/vidsrc-2025.8.1.tar.gz",
"platform": "Windows",
"description": "Video Frameserver for Numpy\r\n===========================\r\n\r\nVidsrc is a Python library to read frames from video files as numpy arrays\r\nvia the DirectShow IMediaDet interface.\r\n\r\n:Author: `Christoph Gohlke <https://www.cgohlke.com>`_\r\n:License: BSD-3-Clause\r\n:Version: 2025.8.1\r\n\r\nQuickstart\r\n----------\r\n\r\nInstall the vidsrc package and all dependencies from the\r\n`Python Package Index <https://pypi.org/project/vidsrc/>`_::\r\n\r\n python -m pip install -U vidsrc\r\n\r\nSee `Examples`_ for using the programming interface.\r\n\r\nSource code and support are available on\r\n`GitHub <https://github.com/cgohlke/vidsrc>`_.\r\n\r\nRequirements\r\n------------\r\n\r\nThis revision was tested with the following requirements and \r\ndependencies (other versions may work):\r\n\r\n- `CPython <https://www.python.org>`_ 3.11.9, 3.12.10, 3.13.5, 3.14.0rc 64-bit\r\n- `NumPy <https://pypi.org/project/numpy/>`_ 2.3.2\r\n- Microsoft Visual Studio 2022 (build)\r\n- DirectX 9.0c SDK (build)\r\n- DirectShow BaseClasses include files (build)\r\n- DirectShow STRMBASE.lib (build)\r\n\r\nRevisions\r\n---------\r\n\r\n2025.8.1\r\n\r\n- Drop support for Python 3.10, support Python 3.14.\r\n\r\n2025.1.6\r\n\r\n- Add type hints.\r\n- Drop support for Python 3.9, support Python 3.13 and NumPy 2.\r\n\r\n2024.1.6\r\n\r\n- Support Python 3.12.\r\n- Drop support for Python 3.8 and NumPy 1.22 (NEP 29).\r\n\r\n2022.9.28\r\n\r\n- Update metadata.\r\n\r\n2021.6.6\r\n\r\n- Drop support for Python 3.6 (NEP 29).\r\n- Fix compile error on PyPy3.\r\n\r\n2020.1.1\r\n\r\n- Drop support for Python 2.7 and 3.5.\r\n\r\nNotes\r\n-----\r\n\r\nThe DirectShow IMediaDet interface is deprecated and may be removed from\r\nfuture releases of Windows\r\n(https://docs.microsoft.com/en-us/windows/desktop/directshow/imediadet).\r\n\r\nTo fix compile\r\n``error C2146: syntax error: missing ';' before identifier 'PVOID64'``,\r\nchange ``typedef void * POINTER_64 PVOID64;``\r\nto ``typedef void * __ptr64 PVOID64;``\r\nin ``winnt.h``.\r\n\r\nExamples\r\n--------\r\n\r\n>>> from vidsrc import VideoSource\r\n>>> video = VideoSource('test.avi', grayscale=False)\r\n>>> len(video) # number of frames in video\r\n48\r\n>>> video.duration # length in s\r\n1.6016\r\n>>> video.framerate # frames per second\r\n29.970089850329373\r\n>>> video.shape # frames, height, width, color channels\r\n(48, 64, 64, 3)\r\n>>> frame = video[0] # access first frame\r\n>>> frame = video[-1] # access last frame\r\n>>> for frame in video:\r\n... pass # do_something_with(frame)\r\n",
"bugtrack_url": null,
"license": "BSD-3-Clause",
"summary": "Video Frameserver for Numpy",
"version": "2025.8.1",
"project_urls": {
"Bug Tracker": "https://github.com/cgohlke/vidsrc/issues",
"Homepage": "https://www.cgohlke.com",
"Source Code": "https://github.com/cgohlke/vidsrc"
},
"split_keywords": [],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "f91575e69f2032fa06fc30ff7152cbbb4460b1ec49f0a956f3bfc3ed4ebffbc6",
"md5": "5986bfd3370308a966b1a52b8ca03745",
"sha256": "3aeea576a117fe75be9c3431329ba330c55108232152795a6b70ad874106aca5"
},
"downloads": -1,
"filename": "vidsrc-2025.8.1-cp311-cp311-win32.whl",
"has_sig": false,
"md5_digest": "5986bfd3370308a966b1a52b8ca03745",
"packagetype": "bdist_wheel",
"python_version": "cp311",
"requires_python": ">=3.11",
"size": 15150,
"upload_time": "2025-07-31T22:33:30",
"upload_time_iso_8601": "2025-07-31T22:33:30.332904Z",
"url": "https://files.pythonhosted.org/packages/f9/15/75e69f2032fa06fc30ff7152cbbb4460b1ec49f0a956f3bfc3ed4ebffbc6/vidsrc-2025.8.1-cp311-cp311-win32.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "ad8bcf26dac3213b5c46ea5a89e919d200dc88d36427dc6560dace0d2dc6850f",
"md5": "b4bb415b20d947561b8ac522face07f4",
"sha256": "082e0e8a5b93e6ea66191fa8cfb1d16938b58de96afb9312d3ca85ac1b1b8841"
},
"downloads": -1,
"filename": "vidsrc-2025.8.1-cp311-cp311-win_amd64.whl",
"has_sig": false,
"md5_digest": "b4bb415b20d947561b8ac522face07f4",
"packagetype": "bdist_wheel",
"python_version": "cp311",
"requires_python": ">=3.11",
"size": 15995,
"upload_time": "2025-07-31T22:33:31",
"upload_time_iso_8601": "2025-07-31T22:33:31.410263Z",
"url": "https://files.pythonhosted.org/packages/ad/8b/cf26dac3213b5c46ea5a89e919d200dc88d36427dc6560dace0d2dc6850f/vidsrc-2025.8.1-cp311-cp311-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "07dbdf297a252dbd4747ef363bccf5c0aa5c27dac77bb9a048a6f32ab7a222c3",
"md5": "ff362319f4bba5b854dfa5b0dd9fc735",
"sha256": "54c57e445ce2f5d6de85733c99d9f3e6a322298f248ef253a162ee693b0c1334"
},
"downloads": -1,
"filename": "vidsrc-2025.8.1-cp311-cp311-win_arm64.whl",
"has_sig": false,
"md5_digest": "ff362319f4bba5b854dfa5b0dd9fc735",
"packagetype": "bdist_wheel",
"python_version": "cp311",
"requires_python": ">=3.11",
"size": 14867,
"upload_time": "2025-07-31T22:33:32",
"upload_time_iso_8601": "2025-07-31T22:33:32.464171Z",
"url": "https://files.pythonhosted.org/packages/07/db/df297a252dbd4747ef363bccf5c0aa5c27dac77bb9a048a6f32ab7a222c3/vidsrc-2025.8.1-cp311-cp311-win_arm64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "b0584a0c25c591c80e814fc9d30c1c1e8ea0460aa060d1e956f5930bc7727011",
"md5": "c860aa17e97cb97025de54ed2f11f6a4",
"sha256": "3a96b207730253e1f2bee7cd7d2f2e9917619ed0c105daeecc5e3e4a85675905"
},
"downloads": -1,
"filename": "vidsrc-2025.8.1-cp312-cp312-win32.whl",
"has_sig": false,
"md5_digest": "c860aa17e97cb97025de54ed2f11f6a4",
"packagetype": "bdist_wheel",
"python_version": "cp312",
"requires_python": ">=3.11",
"size": 15202,
"upload_time": "2025-07-31T22:33:33",
"upload_time_iso_8601": "2025-07-31T22:33:33.493855Z",
"url": "https://files.pythonhosted.org/packages/b0/58/4a0c25c591c80e814fc9d30c1c1e8ea0460aa060d1e956f5930bc7727011/vidsrc-2025.8.1-cp312-cp312-win32.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "8430865f88d2c81d11bcdd7899157e73f4420ab87b45cc8c1338cbde22b3b6a0",
"md5": "ea48f1c484af501633fe04d656d06781",
"sha256": "a44cef5eff29ea5a8594217ce5da48c3f5b3baf9515f562cfba17cb605b5c5b4"
},
"downloads": -1,
"filename": "vidsrc-2025.8.1-cp312-cp312-win_amd64.whl",
"has_sig": false,
"md5_digest": "ea48f1c484af501633fe04d656d06781",
"packagetype": "bdist_wheel",
"python_version": "cp312",
"requires_python": ">=3.11",
"size": 16034,
"upload_time": "2025-07-31T22:33:34",
"upload_time_iso_8601": "2025-07-31T22:33:34.236585Z",
"url": "https://files.pythonhosted.org/packages/84/30/865f88d2c81d11bcdd7899157e73f4420ab87b45cc8c1338cbde22b3b6a0/vidsrc-2025.8.1-cp312-cp312-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "5d9d5d88c993f63e95f25c738b5e40e754ef3104dc23d9f78605255d3d8742a8",
"md5": "f2970a87ae1afec2f0ecc360fd9d6252",
"sha256": "736a5209ad5682644e77ff83baafe4d801d1233e90cbc66ee071fa38521e70b2"
},
"downloads": -1,
"filename": "vidsrc-2025.8.1-cp312-cp312-win_arm64.whl",
"has_sig": false,
"md5_digest": "f2970a87ae1afec2f0ecc360fd9d6252",
"packagetype": "bdist_wheel",
"python_version": "cp312",
"requires_python": ">=3.11",
"size": 14839,
"upload_time": "2025-07-31T22:33:35",
"upload_time_iso_8601": "2025-07-31T22:33:35.273055Z",
"url": "https://files.pythonhosted.org/packages/5d/9d/5d88c993f63e95f25c738b5e40e754ef3104dc23d9f78605255d3d8742a8/vidsrc-2025.8.1-cp312-cp312-win_arm64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "0b479c016f0e97dfb951ec97d152ae0328b3f55c8ee3b657c343b4a0ec3c3c7b",
"md5": "dda09162c90bf7e5fff4b95adc1af820",
"sha256": "eb89072b7c3e19ca1afb39a73c81b1fcfa041669b1f7f17a057dc49c148bd6ce"
},
"downloads": -1,
"filename": "vidsrc-2025.8.1-cp313-cp313-win32.whl",
"has_sig": false,
"md5_digest": "dda09162c90bf7e5fff4b95adc1af820",
"packagetype": "bdist_wheel",
"python_version": "cp313",
"requires_python": ">=3.11",
"size": 15190,
"upload_time": "2025-07-31T22:33:35",
"upload_time_iso_8601": "2025-07-31T22:33:35.972758Z",
"url": "https://files.pythonhosted.org/packages/0b/47/9c016f0e97dfb951ec97d152ae0328b3f55c8ee3b657c343b4a0ec3c3c7b/vidsrc-2025.8.1-cp313-cp313-win32.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "16e262a47689068266f0243cc15847e9ff433ea59f289ee8f1995fccdef68791",
"md5": "b590dedac85aa34c26d289f0f6a362e4",
"sha256": "d9b78ccb6cc83c8aafda7c3e54971f7db60bad19dedd530e4e7ae6988a8fcf74"
},
"downloads": -1,
"filename": "vidsrc-2025.8.1-cp313-cp313-win_amd64.whl",
"has_sig": false,
"md5_digest": "b590dedac85aa34c26d289f0f6a362e4",
"packagetype": "bdist_wheel",
"python_version": "cp313",
"requires_python": ">=3.11",
"size": 16015,
"upload_time": "2025-07-31T22:33:36",
"upload_time_iso_8601": "2025-07-31T22:33:36.971371Z",
"url": "https://files.pythonhosted.org/packages/16/e2/62a47689068266f0243cc15847e9ff433ea59f289ee8f1995fccdef68791/vidsrc-2025.8.1-cp313-cp313-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "76ccf916d9c41740dbaeedca5d2daa7d6473c4df54fa969722bc95c018da17bc",
"md5": "ae05a76c2f26aa4f924d1afafb6a94dc",
"sha256": "695021363fe0b768a2c75cfe7f3f1f4ad17ab48e61f7c52279dad887ff45d200"
},
"downloads": -1,
"filename": "vidsrc-2025.8.1-cp313-cp313-win_arm64.whl",
"has_sig": false,
"md5_digest": "ae05a76c2f26aa4f924d1afafb6a94dc",
"packagetype": "bdist_wheel",
"python_version": "cp313",
"requires_python": ">=3.11",
"size": 14840,
"upload_time": "2025-07-31T22:33:37",
"upload_time_iso_8601": "2025-07-31T22:33:37.698769Z",
"url": "https://files.pythonhosted.org/packages/76/cc/f916d9c41740dbaeedca5d2daa7d6473c4df54fa969722bc95c018da17bc/vidsrc-2025.8.1-cp313-cp313-win_arm64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "f80b208a179351dea8f788034b9460ff42b794e6a124ad08b68d83cbd9e32496",
"md5": "6b3166d466e24ed36db5eecf01d0daf6",
"sha256": "455afa783dc8003a0093127f2269806a192590d31c5e0e0ab70dc74303c954e1"
},
"downloads": -1,
"filename": "vidsrc-2025.8.1-cp314-cp314t-win32.whl",
"has_sig": false,
"md5_digest": "6b3166d466e24ed36db5eecf01d0daf6",
"packagetype": "bdist_wheel",
"python_version": "cp314",
"requires_python": ">=3.11",
"size": 15942,
"upload_time": "2025-07-31T22:33:40",
"upload_time_iso_8601": "2025-07-31T22:33:40.920076Z",
"url": "https://files.pythonhosted.org/packages/f8/0b/208a179351dea8f788034b9460ff42b794e6a124ad08b68d83cbd9e32496/vidsrc-2025.8.1-cp314-cp314t-win32.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "e42c8a558995122e46fe35f6f4dbed98a402dff5d68f414734a2418909cee5c2",
"md5": "6f980b05a1f8501c076cb21179242972",
"sha256": "e904f510629f9637bf3b3ec6ccfc0db51a4777362cb2e9cbe75c52151acba2f9"
},
"downloads": -1,
"filename": "vidsrc-2025.8.1-cp314-cp314t-win_amd64.whl",
"has_sig": false,
"md5_digest": "6f980b05a1f8501c076cb21179242972",
"packagetype": "bdist_wheel",
"python_version": "cp314",
"requires_python": ">=3.11",
"size": 16754,
"upload_time": "2025-07-31T22:33:41",
"upload_time_iso_8601": "2025-07-31T22:33:41.639274Z",
"url": "https://files.pythonhosted.org/packages/e4/2c/8a558995122e46fe35f6f4dbed98a402dff5d68f414734a2418909cee5c2/vidsrc-2025.8.1-cp314-cp314t-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "e09e554647b85929a2dd7d1120787c5468273e2574c8744ff0981e0e8159cb59",
"md5": "3dc43e8e11dece4bb76fc865f5b15098",
"sha256": "006edcfbe5e551118e1497c9c7b33fecaeb1e07d181268b357007a5b20a8f369"
},
"downloads": -1,
"filename": "vidsrc-2025.8.1-cp314-cp314t-win_arm64.whl",
"has_sig": false,
"md5_digest": "3dc43e8e11dece4bb76fc865f5b15098",
"packagetype": "bdist_wheel",
"python_version": "cp314",
"requires_python": ">=3.11",
"size": 15420,
"upload_time": "2025-07-31T22:33:42",
"upload_time_iso_8601": "2025-07-31T22:33:42.684024Z",
"url": "https://files.pythonhosted.org/packages/e0/9e/554647b85929a2dd7d1120787c5468273e2574c8744ff0981e0e8159cb59/vidsrc-2025.8.1-cp314-cp314t-win_arm64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "791473f31514deae365b4297a84b450e691bef35a8fb388d2dcdb6f2a5fe166c",
"md5": "c58a8d760f39e56dd165087232e518c7",
"sha256": "4cdc78cc2e85f7b35507010ef9e09430bc68932deb171b2c8391533e8a34c589"
},
"downloads": -1,
"filename": "vidsrc-2025.8.1-cp314-cp314-win32.whl",
"has_sig": false,
"md5_digest": "c58a8d760f39e56dd165087232e518c7",
"packagetype": "bdist_wheel",
"python_version": "cp314",
"requires_python": ">=3.11",
"size": 15588,
"upload_time": "2025-07-31T22:33:38",
"upload_time_iso_8601": "2025-07-31T22:33:38.753367Z",
"url": "https://files.pythonhosted.org/packages/79/14/73f31514deae365b4297a84b450e691bef35a8fb388d2dcdb6f2a5fe166c/vidsrc-2025.8.1-cp314-cp314-win32.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "6672bc12929b1b49901031d4dba3fb26d6c9e07ce4fbb0467a6ed6b2e60749d7",
"md5": "f315da01e31d32ecef94efab10cba34a",
"sha256": "eaa561eb3e2b4e0da1210aee348601da99979cb9fd3ee4a874e94af3c84b613c"
},
"downloads": -1,
"filename": "vidsrc-2025.8.1-cp314-cp314-win_amd64.whl",
"has_sig": false,
"md5_digest": "f315da01e31d32ecef94efab10cba34a",
"packagetype": "bdist_wheel",
"python_version": "cp314",
"requires_python": ">=3.11",
"size": 16408,
"upload_time": "2025-07-31T22:33:39",
"upload_time_iso_8601": "2025-07-31T22:33:39.496806Z",
"url": "https://files.pythonhosted.org/packages/66/72/bc12929b1b49901031d4dba3fb26d6c9e07ce4fbb0467a6ed6b2e60749d7/vidsrc-2025.8.1-cp314-cp314-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "0bc32cd43951d1c9f2023fea5eef17a3cd675542b171bdd9a05711892706f9db",
"md5": "bf5db6d687c5ef6fa2e9f8e956879754",
"sha256": "a3bc23d9bf94cb61c67db3a96eb9ef5f32690e5fd9d40e31d9300bff6b98dd0e"
},
"downloads": -1,
"filename": "vidsrc-2025.8.1-cp314-cp314-win_arm64.whl",
"has_sig": false,
"md5_digest": "bf5db6d687c5ef6fa2e9f8e956879754",
"packagetype": "bdist_wheel",
"python_version": "cp314",
"requires_python": ">=3.11",
"size": 15153,
"upload_time": "2025-07-31T22:33:40",
"upload_time_iso_8601": "2025-07-31T22:33:40.205496Z",
"url": "https://files.pythonhosted.org/packages/0b/c3/2cd43951d1c9f2023fea5eef17a3cd675542b171bdd9a05711892706f9db/vidsrc-2025.8.1-cp314-cp314-win_arm64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "bad08b35dd02f5b9e7eb3b59348e45b8a15a9d59cb6f1afd9a7f4bc846665e8d",
"md5": "1c05d8f3e4c2d575862d089391c2064b",
"sha256": "1412aaba12472a29ca8cf98ed60b274edeeaef22da3e749937ed235754cce3e8"
},
"downloads": -1,
"filename": "vidsrc-2025.8.1.tar.gz",
"has_sig": false,
"md5_digest": "1c05d8f3e4c2d575862d089391c2064b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.11",
"size": 149158,
"upload_time": "2025-07-31T22:33:43",
"upload_time_iso_8601": "2025-07-31T22:33:43.908730Z",
"url": "https://files.pythonhosted.org/packages/ba/d0/8b35dd02f5b9e7eb3b59348e45b8a15a9d59cb6f1afd9a7f4bc846665e8d/vidsrc-2025.8.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-31 22:33:43",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "cgohlke",
"github_project": "vidsrc",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "vidsrc"
}