Skip to main content

WinVideo Python API (sinary-winvideo)

PyPI version License Platform

Modern, high-performance, driverless Windows screen and per-window video capture library for Python by SINARY™.

Powered by Windows Graphics Capture (WGC) and Direct3D 11, delivering zero-copy GPU frame extraction at 60–120+ FPS with ~1% CPU usage. Built-in hardware MP4 encoding using Windows Media Foundation (MFT).


Features

  • 🎯 Target Any Window or Monitor: Capture video by executable name (name="chrome.exe"), Process ID (pid=1234), window title substring (window="YouTube"), or monitor index (monitor=1).
  • ⚡ Direct3D 11 Hardware Acceleration: Zero-copy GPU memory extraction delivers 60–120+ FPS with ~1% CPU usage.
  • 🐍 Zero-Copy NumPy Pipeline for AI: Stream raw BGRA frames directly into NumPy arrays for OpenCV, PyTorch, or Vision LLM agents (Claude Computer-Use, OpenAI Operator).
  • 🎬 Hardware MP4 Recording: Encode directly to .mp4 using NVENC, Intel QuickSync, or AMD AMF hardware encoders with zero external ffmpeg dependencies.
  • 🚫 Yellow Border Suppression: Programmatically disables the Windows capture border (border=False).
  • 🖱️ Cursor Control: Optional capture of the mouse cursor (cursor=True or cursor=False).
  • 📸 Lossless Screenshots: Save single frames directly to PNG, JPEG, or BMP.

Installation

pip install sinary-winvideo

System Requirements

  • Operating System: Windows 10 Build 19041 (Version 2004) or later, or Windows 11
  • Python: 3.8, 3.9, 3.10, 3.11, 3.12, or 3.13 (64-bit)
  • Direct3D 11 Capable GPU: NVIDIA, Intel, or AMD graphics

Quick Start

1. Enumerate Windows & Monitors

import winvideo

# List all open application windows
for win in winvideo.list_windows():
    print(f"[{win.pid}] {win.process_name} ({win.width}x{win.height}) - '{win.title}'")

# List all display monitors
for mon in winvideo.list_monitors():
    primary = " (Primary)" if mon.is_primary else ""
    print(f"[{mon.index}] {mon.name}{primary} - {mon.width}x{mon.height} @ {mon.refresh_rate}Hz")

2. Lossless Screenshots

import winvideo

# Instant screenshot of Chrome
winvideo.screenshot("chrome.png", name="chrome.exe")

# Instant screenshot of primary display
winvideo.screenshot("display.png", monitor=1)

3. Stream Video Frames into OpenCV / AI Models

import winvideo
import cv2

# Stream 60 FPS directly into NumPy arrays
with winvideo.Capture(name="chrome.exe", cursor=False) as cap:
    for frame in cap.stream():
        # frame is a zero-copy NumPy ndarray of shape (Height, Width, 4) uint8
        cv2.imshow("DirectX Stream", frame)
        if cv2.waitKey(1) == 27:  # ESC to exit
            break

cv2.destroyAllWindows()

4. Record Application Window to MP4

import winvideo

# Record 10 seconds of Chrome directly to hardware-encoded MP4
winvideo.record(name="chrome.exe", out="chrome.mp4", duration=10.0, fps=60)

5. Pair with WinAudio for Simultaneous Audio + Video

import threading
import winaudio
import winvideo

TARGET = "Spotify.exe"

# Record 10s of audio and video concurrently
t_audio = threading.Thread(target=lambda: winaudio.record(name=TARGET, out="audio.wav", duration=10))
t_video = threading.Thread(target=lambda: winvideo.record(name=TARGET, out="video.mp4", duration=10))

t_audio.start()
t_video.start()
t_audio.join()
t_video.join()

print("Recorded audio.wav and video.mp4 simultaneously!")

License

Dual-licensed under the MIT License or Apache License 2.0. Copyright © 2026 SINARY™.

Metadata

Release files for sinary-winvideo 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for sinary-winvideo 0.1.0
File Actions
sinary_winvideo-0.1.0-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details for sinary_winvideo-0.1.0-cp313-cp313-win_amd64.whl
sinary_winvideo-0.1.0-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details for sinary_winvideo-0.1.0-cp312-cp312-win_amd64.whl
sinary_winvideo-0.1.0-cp311-cp311-win_amd64.whl CPython 3.11 CPython 3.11 Windows x86-64 Details for sinary_winvideo-0.1.0-cp311-cp311-win_amd64.whl
sinary_winvideo-0.1.0-cp310-cp310-win_amd64.whl CPython 3.10 CPython 3.10 Windows x86-64 Details for sinary_winvideo-0.1.0-cp310-cp310-win_amd64.whl
sinary_winvideo-0.1.0-cp39-cp39-win_amd64.whl CPython 3.9 CPython 3.9 Windows x86-64 Details for sinary_winvideo-0.1.0-cp39-cp39-win_amd64.whl
sinary_winvideo-0.1.0-cp38-cp38-win_amd64.whl CPython 3.8 CPython 3.8 Windows x86-64 Details for sinary_winvideo-0.1.0-cp38-cp38-win_amd64.whl

Total release size: 2.5 MB

Release files / sinary_winvideo-0.1.0-cp313-cp313-win_amd64.whl

Download URL sinary_winvideo-0.1.0-cp313-cp313-win_amd64.whl
Size 413.1 kB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
e1558c64a7eba1248e3acf36be6e9d0dafee5a5f9e3162ea064fb5e0c8c0b408
BLAKE2b-256 checksum
How to use checksums
56ae3ff28425676c81e5bcac529a7770f982211af449d24f998ed26ff7d6b0df
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.16.0

Release files / sinary_winvideo-0.1.0-cp312-cp312-win_amd64.whl

Download URL sinary_winvideo-0.1.0-cp312-cp312-win_amd64.whl
Size 413.4 kB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
7ab49f20c2b726c90d3db184b59960b48845e0a89b9b726042bcb965c3d95faa
BLAKE2b-256 checksum
How to use checksums
8add253bd94089e87354ec26b8747a7c3aff00451fa6d218fc30d4eab7ba1a66
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.16.0

Release files / sinary_winvideo-0.1.0-cp311-cp311-win_amd64.whl

Download URL sinary_winvideo-0.1.0-cp311-cp311-win_amd64.whl
Size 413.4 kB
Tags CPython 3.11 Windows x86-64
SHA-256 checksum
How to use checksums
ba83047bf5c33eaab0c00fc7f419b43e516cde87869bd041d79e17369575bce5
BLAKE2b-256 checksum
How to use checksums
edeec6c111f7cc0c4ab9aa51bc813eca13bd559880f26839ff60c3611eb276c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.16.0

Release files / sinary_winvideo-0.1.0-cp310-cp310-win_amd64.whl

Download URL sinary_winvideo-0.1.0-cp310-cp310-win_amd64.whl
Size 413.7 kB
Tags CPython 3.10 Windows x86-64
SHA-256 checksum
How to use checksums
2ffd26f4a0e93cd2cfe4b1a9ad3ec543bc6dc42a9437e0f57d9b4b783f464746
BLAKE2b-256 checksum
How to use checksums
d2a58238bf257ae819e3c2d3d3df09f2f315232e3af425fdc47397f7d8797282
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.16.0

Release files / sinary_winvideo-0.1.0-cp39-cp39-win_amd64.whl

Download URL sinary_winvideo-0.1.0-cp39-cp39-win_amd64.whl
Size 414.3 kB
Tags CPython 3.9 Windows x86-64
SHA-256 checksum
How to use checksums
ca8d03887538dea488ef53c3bbc288e39afd55c00b8bc4d4c2e644c824ccb7e3
BLAKE2b-256 checksum
How to use checksums
d476f7fc05c51db5f80ed25c86b5a07ceab209014cf2737d0024fe8616ff680e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.16.0

Release files / sinary_winvideo-0.1.0-cp38-cp38-win_amd64.whl

Download URL sinary_winvideo-0.1.0-cp38-cp38-win_amd64.whl
Size 413.1 kB
Tags CPython 3.8 Windows x86-64
SHA-256 checksum
How to use checksums
da2c54d291773e040a6bf19adbb397b23763f70168d4b35d826124e1169af8ad
BLAKE2b-256 checksum
How to use checksums
fbf304a071b3d33c5bb64c555f90c00c9f338d95c2f22979c4cdc0dd2c83c8b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.16.0

Security for sinary-winvideo 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

6 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page