Skip to main content

MacSS

Mac Alternative of MSS for Apple Silicon (M-Series) based on new ScreenCaptureKit

MacSS is a high-performance, zero-copy screen capture utility By leveraging Apple's modern ScreenCaptureKit and a direct C-interop pointer to Unified Memory.

Zero Copy Architecture

1. The macOS GPU writes screen data to a specific memory address.
2. MacSS maps a Python pointer directly to that exact address.
3. You read the data with zero latency. No data is moved; you are simply "looking" at the GPU's shoulder.


Performance Benchmarks

Tested on M1 (8GB Ram Model)

Test Script

import time
from mss import mss
from macss import macss

region = {"top": 0, "left": 0, "width": 400, "height": 400}
N = 10_000


with macss() as sct:
    t = time.time()
    sct.grab(region)
    for _ in range(N):
        sct.grab(region)
    dt = time.time() - t
    print(f"macss: {dt:.4f}s | iterations : {N} | {1000*dt/N:.4f} ms | {N/dt:.2f} FPS")

with mss() as sct:
    t = time.time()
    for _ in range(N):
        sct.grab(region)
    dt = time.time() - t
    print(f"mss: {dt:.4f}s | iterations : {N} | {1000*dt/N:.4f} ms | {N/dt:.2f} FPS")

Results

macss: 0.2126s | iterations : 1000 | 0.2126 ms  | 4704.66 FPS
mss: 20.0145s  | iterations : 1000 | 20.0145 ms | 49.96 FPS

Installation

pip install macss

Basic Usage

import cv2
from macss import macss

region = {"top": 0, "left": 0, "width": 400, "height": 400}

with macss() as sct:
    while True:
        frame = sct.grab(region) # Returns numpy.ndarray with RGBA Channel
        
        img = cv2.cvtColor(frame, cv2.COLOR_BGRA2BGR)
        
        cv2.imshow("MacSS High-Speed Feed", img)
        if cv2.waitKey(1) & 0xFF == ord('q'):
            break

Metadata

Release files for macss 0.1.6

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

Source distribution (sdist)

Source distribution for macss 0.1.6
File Size Uploaded Provenance Actions
macss-0.1.6.tar.gz 19.9 kB Without provenance Details for macss-0.1.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for macss 0.1.6
File Interpreter ABI Platform Actions
macss-0.1.6-py3-none-any.whl Python 3 none any Details for macss-0.1.6-py3-none-any.whl

Total release size: 38.7 kB

Release files / macss-0.1.6.tar.gz

Download URL macss-0.1.6.tar.gz
Size 19.9 kB
Tags Source
SHA-256 checksum
How to use checksums
583bf690d26f35acc1bfde663f5bc72ee703da7fea3b5cc5bf50a65222e966c9
BLAKE2b-256 checksum
How to use checksums
974867ac9f8166a3134ff01234fe3edd6e3edc3b8b40b2af628025ac9e541b3a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Release files / macss-0.1.6-py3-none-any.whl

Download URL macss-0.1.6-py3-none-any.whl
Size 18.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
18c9e095fa931c8e71eb7d8db5dde65e12a7d54b875d93a534ad80d912dd609c
BLAKE2b-256 checksum
How to use checksums
d4f3e0ec61a2fb5dcc823726e95ace25ffcc6fc25c00374fdd260be16d3156c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.3

Security for macss 0.1.6

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.

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