Install MSS with python -m pip install -U --user mss, then use its MSS class to capture a monitor or screen region. Call grab() to get pixels for processing, or save the capture as a PNG with mss.tools.to_png(), Pillow, or MSS’s convenience methods. The examples below use the current MSS class rather than the deprecated mss.mss() spelling.
Install MSS and make your first screenshot
MSS is a cross-platform Python package for capturing screenshots from monitors and screen regions. Its project name stands for “Multiple ScreenShots.” The package page lists Python 3.9 or later as a requirement. Install it from a terminal with pip:
python -m pip install -U --user mss
On a system where you manage Python packages through Conda, the official usage guide also documents a Conda installation route; follow the current instructions in the MSS usage documentation. If you use multiple Python installations or virtual environments, run the install command with the same Python interpreter that will run your script.
This minimal script captures the display MSS identifies as the primary monitor and saves a PNG:
#1 Best Overall
- 【1080P 60FPS Video Capture Card】 This HDMI game capture card is based on USB3.0 high speed transmission port, input resolution up to 4K@30HZ, output resolution up to 2K@30Hz or 1920×1080@60Hz. Type c and USB interface can meet most of the devices in daily life. Easily meet the online capture, real-time recording, online meetings, live gaming and other functions, so you have a better visual enjoyment. Note: For capture use only; requires capture software to function and is not intended for direct screen casting to a monitor or TV
- 【Ultra Low Latency Screen Sharing】 HDMI capture card is made of good quality aluminum alloy with strong heat dissipation, allowing you to enjoy ultra low latency while live gaming or video recording or live streaming, avoiding blue screens and lag. This HDMI to USBC capture card supports easy recording of good quality audio or HD video and transferring it to your computer or streaming platform, allowing you to record 60 fps HD video directly on your hard drive and real-time preview
- 【Plug and Play, Easy to Carry】 This HDMI 1080P video capture card does not require any additional drivers or external power supply, just plug and play for fast capture. The capture card is small and lightweight, so you can put it in your bag for emergencies, making it very portable for outdoor live streaming. It's also a great way to share content in game recording, video conference, video recorder and online teaching
- 【Wide Compatibility USB Capture Card】 Easily streams to Facebook, Youtube or Twitch. With the connection, this HDMI to USB C/3.0 video capture devices can be working on several Operating Systems and various software: Windows 7/ 8/ 10, Mac OS or above, Linux, Android, Laptop, Xbox One, PS3/PS4/PS5, Camera, DVDs, Set Top Box, Webcame, DSLR, Switch/Switch 2, TV BOX, HDTV, Potplayer/VLC, ZOOM, OBS Studio etc.
- 【Package Content & Note】 1x HD Audio Capture Card , 1x USB 3.0 to USB C Adapter (A-side 3.0, B-side 2.0), 1x user manual. Please note that you need to restart the OBS Studio software after the audio setup is complete, otherwise it will result in no sound output. When using an adapter, if the device is recognized as USB 2.0, try using the other side with the USB-C port. Simply flip the capture card and reconnect it to be recognized as USB 3.0
from mss import MSS
with MSS() as sct:
filename = sct.shot()
print(f"Saved screenshot to {filename}")
The with block manages the capture session. shot() is a convenience method that captures the first monitor and writes a PNG by default. For an explicit target, pixel processing, or a different save path, use grab() and save the returned image as described below.
Choose a monitor or a screen region
MSS exposes monitors through sct.monitors. Index 0 represents the combined virtual desktop across all attached monitors; indices starting at 1 refer to individual displays. sct.primary_monitor selects the display MSS identifies as primary. If the system does not mark a primary display, or the platform cannot report one, the API says MSS falls back to the first individual monitor.
Capture the primary display
from mss import MSS
with MSS() as sct:
image = sct.grab(sct.primary_monitor)
print(image.size)
grab() returns an MSS ScreenShot object. Its size gives the captured image dimensions; the object also exposes pixel data for saving or conversion.
Rank #2
- AV TO USB Converter: Capture videos and audios from VHS, VCR, Hi8, DV tapes to a PC, with the help of our USB Video Converter. Save room while digitizing your favorite old memories
- Quality Capture Card: Our USB Video Capture Card converting anolog RCA composite input into HD 720P USB output and capturing audio without any sound card. Advanced signal processing technology provides you with great precision, colors, resolutions, and details.
- Plug and Play: Automatically install the driver once you hook up this RCA to USB Converter to a PC. No external power is needed. User-friendly and easy to operate
- Wide Compatibility: The Video Capture Card can work with video devices with RCA connector or S-Video connector, such as VHS, VCR, Hi8, camcorder, compatible with Windows and Mac OS. Support video formats like NTSC, PAL, and support brightness, contrast, hue, and saturation control
- Note: The Video Converter is used with acquisition software. We recommend OBS Studio or PotPlayer for Windows, and QuickTime Player for Mac. They can be downloaded for free online. Please operate according to the steps in User Manual or contact us if you have any questions
Capture one monitor or the combined desktop
from mss import MSS
with MSS() as sct:
# Individual monitor: use 1 for the first display, 2 for the second, and so on.
first_display = sct.grab(sct.monitors[1])
# All displays combined into the virtual desktop bounds.
whole_desktop = sct.grab(sct.monitors[0])
Monitor numbering and geometry come from the system’s display setup. Inspect sct.monitors if you need to confirm the available bounds before selecting a display.
Free tools Windows power users keep installed
One-click scans. No signup required.
Capture a rectangle
Use an MSS Region to state a rectangle as its left and top coordinates plus width and height:
from mss import MSS
from mss.models import Region
with MSS() as sct:
area = Region(left=100, top=80, width=640, height=480)
image = sct.grab(area)
The same bounds can be passed as a dictionary with left, top, width, and height. A PIL-style tuple is also supported: (left, top, right, bottom). Check the API reference for the supported region forms and platform-specific details. Coordinates must describe an area that exists on the desktop; for multi-monitor layouts, monitor positions may include negative coordinates or be offset from the primary display.
Rank #3
- 【4K HDMI Input, 2K@30Hz Recording】Powered by a true USB 3.0 high-speed interface, the capture card supports up to 4K@30Hz HDMI input and records at 2K@30Hz or 1080P@60Hz. Perfect for gamers, streamers, and professionals who need crisp, smooth video for live streaming, gameplay recording, or online meetings.
- 【Ultra Low Latency Screen Sharing】Built with a premium aluminum alloy shell and advanced chipset for stable heat dissipation, ensuring ultra-low latency transmission. Capture high-quality video and dual-channel audio in real time—no lag, no frame drop—ideal for Twitch, YouTube, or OBS streaming.
- 【Easy Plug and Play, Compact & Portable】No driver or external power required—just plug and play via USB 3.0 or Type-C connection to your Windows or macOS computer. Lightweight and compact design makes it easy to carry for outdoor streaming, live shows, or mobile recording setups.
- 【Wide Compatibility & Multi-Device Support】Compatible with Windows 7 8 10 11, macOS, Linux,Android and supports most popular software such as OBS, Zoom, VLC, Twitch Studio, and more. Works seamlessly with PS4, PS5, Xbox, Switch, DSLR cameras, TV boxes, and other HDMI-output devices for streaming to YouTube, Twitch, etc.
- 【What You Get】Includes: HDMI Capture Card, USB 3.0 to USB-C Adapter, User Manual. Tips: Make sure your tablet’s OTG function is enabled before connecting. Test your HDMI device with a monitor first to confirm video and audio output, then connect to the Video Capture Card for recording.
Save the capture as a PNG
To save the exact pixels returned by a single grab() call, pass its RGB data and dimensions to mss.tools.to_png(). This avoids taking a second screenshot just to write a file.
import mss.tools
from mss import MSS
with MSS() as sct:
image = sct.grab(sct.primary_monitor)
mss.tools.to_png(image.rgb, image.size, output="screenshot.png")
The official MSS examples also show sct.save() for saving monitor images and sct.shot() as a concise helper for the first monitor. Use those when their built-in capture-and-save behavior suits your task; use grab() followed by an explicit save when you need to process or inspect the same capture.
Recommended Free Tools
Convert pixels for Pillow or OpenCV
If you need image operations rather than a file alone, convert the ScreenShot object into the format expected by your library.
Rank #4
- [Enhanced 4K-1080P Video Capture Experience] Capture the Magic: Elevate your video recordings to new heights with our upgraded anti-static 1080P Video Capture Card. Immerse yourself in stunning visuals, supporting HDMI input at 4K 60FPS and USB output for capturing in 1080P, complete with rich stereo sound. Enjoy crystal-clear video recordings, dynamic gaming live streams, and professional conference broadcasts. Note: HDMI resolution: Max input can be 3840×2160@30Hz / Video output resolution: Max output can be 1920×1080@30Hz
- [Seamless Real-Time Preview] Stay in the Moment: Our advanced ultra-low latency technology ensures seamless real-time transmission of video streams. Experience instant, lag-free previews, allowing you to capture every detail precisely. Effortlessly record video directly to your hard disk, all without compromising on quality or introducing any delays.
- [Versatility and Broad Compatibility] Your Creative Hub: Connect your DSLR, camcorder, or action camera to a wide range of operating systems, including Windows, MacOS, and Linux. Unlock a world of possibilities with real-time streaming to popular platforms like Twitch, Youtube, OBS, Zoom, Potplayer, and VLC, giving you the tools to share your content effortlessly.
- [Effortless Plug and Play] Simplicity Redefined: Say goodbye to complex installations. Our plug-and-play design eliminates the need for drivers or external power supplies. Seamlessly integrate high-definition acquisition into various scenarios, whether it's educational recordings, immersive gaming, precise medical imaging, captivating live streams, or professional broadcasting.
- [Seize Every Detail with Precision] Unleash your creativity and attention to detail with our video capture card. Capture every nuance, every color, and every moment with precision, thanks to the enhanced capabilities of our technology. Whether you're a content creator, a gamer, or a professional, our capture card empowers you to seize the finest elements and bring them to life in your recordings and live streams.
Save with Pillow
from mss import MSS
with MSS() as sct:
image = sct.grab(sct.primary_monitor)
pil_image = image.to_pil("RGB")
pil_image.save("screenshot.png")
Use RGB when the image is destined for ordinary Pillow workflows or libraries that expect RGB channel order.
Pass pixels to OpenCV
from mss import MSS
with MSS() as sct:
image = sct.grab(sct.primary_monitor)
frame = image.to_numpy(channels="BGR")
The MSS examples recommend BGR for OpenCV. The documented default RGB ordering is appropriate for scikit-image and many other image-processing frameworks. Do not assume the alpha channel represents meaningful transparency on every platform or capture backend.
Capture repeatedly without reopening the session
For repeated captures, create one MSS instance and reuse it rather than constructing a new one each time. The usage documentation presents this as the more memory-efficient pattern. A simple loop that captures and writes successive PNGs looks like this:
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Best Value
- 【1080P HD High Quality】Capture resolution up to 1080p for video source and it is ideal for all HDMI devices such as PS4, PS3, Xbox One, Xbox 360, Wii U, DVDs, DSLR, Camera, Security Camera and set top box. Note: Video input supports 4K30/60Hz and 1080p120/144Hz. Does not support 4K120Hz/144Hz. Output supports up to 2K30Hz.
- 【Plug and Play】No driver or external power supply required, true PnP. Once plugged in, the device is identified automatically as a webcam. Detect input and adjust output automatically. Won't occupy CPU, optional audio capture. No freeze with correct setting.
- 【Compatible with Multiple Systems】suitable for Windows and Mac OS. High speed USB 3.0 technology and superior low latency technology makes it easier for you to transmit live streaming to Twitch, Youtube, Facebook, Twitter, OBS, Potplayer and VLC.
- 【HDMI LOOP-OUT】Based on the high-speed USB 3.0 technology, it can capture one single channel HD HDMI video signal. There is no delay when you are playing game live.
- 【Support Mic-in for Commentary】Rybozen capture card has microphone input and you can use it to add external commentary when playing a game. Please note: it only accepts 3.5mm TRS standard microphone headset.
import time
import mss.tools
from mss import MSS
with MSS() as sct:
monitor = sct.primary_monitor
for index in range(5):
image = sct.grab(monitor)
mss.tools.to_png(image.rgb, image.size, output=f"capture-{index}.png")
time.sleep(1)
MSS documents thread-safety, but calls to grab() on a shared instance are serialized automatically. A shared instance therefore does not make simultaneous capture calls run in parallel. The documented direct-buffer optimization is limited to GNU/Linux with Python 3.12 or later. MSS’s official material does not establish one generally applicable frames-per-second figure, so actual throughput depends on operating system, display setup, backend, capture area, and workload.
Platform details that affect capture
- GNU/Linux: The default display is obtained from
DISPLAY. MSS normally uses thexshmgetimagebackend and can fall back toxgetimagewhen MIT-SHM is unavailable, including some remote SSH display configurations. This documented fallback does not guarantee that a headless machine or remote session has a usable display configured. - Windows and macOS: MSS documents platform-specific backend details in its usage guide and API reference. Capture availability and behavior still depend on the local display/session setup.
- CLI use: MSS also provides a command-line interface with options for monitor selection, coordinates, cursor inclusion, and backend choice. Consult the current usage documentation for the exact installed-version syntax rather than assuming the CLI options match a different release.
The latest documentation describes additions in version 11.0 and marks mss.mss() deprecated since 10.2. Because the “latest” documentation can change as the project evolves, check the installed version’s documentation if code will be maintained across upgrades.
Troubleshooting common MSS problems
ModuleNotFoundError: No module named 'mss': Install MSS with the interpreter that runs the script:python -m pip install -U --user mss. In a virtual environment, activate it first; for a different interpreter, invoke that interpreter’s-m pip.- The screenshot is from the wrong display: Print or inspect
sct.monitors, then pass the intended individual monitor tograb(). Remember that index0means all monitors together, not the first physical display. - The region is misplaced or empty: Verify
left,top,width, andheightagainst the desktop layout. For a tuple, MSS expects(left, top, right, bottom), not position plus width and height. - Capture fails in a Linux or SSH session: Check whether the process has access to the intended X display and whether
DISPLAYis set. Remote or headless setups may lack a capture-capable display; the documented backend fallback is not a substitute for configuring one. - The saved colors look wrong in a processing library: Confirm channel order. Use
to_numpy(channels="BGR")for OpenCV; use RGB for Pillow and libraries expecting RGB. - A loop behaves slower than expected: Keep one
MSSobject open and avoid assuming that concurrent calls on that shared object will capture in parallel. MSS provides no universal speed guarantee; test with the actual OS, display, region, and downstream work.
Or skip the browser setup
MSS captures pixels from a desktop display. If your goal is a screenshot of a public website rather than your local screen, a screenshot API avoids installing or managing a browser. ScreenshotNeo provides a website screenshot API and MCP server for developers. One GET request returns a PNG, JPEG, WebP, or PDF; this example saves a WebP response:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
See the ScreenshotNeo API documentation for authentication and request options. It accepts cookie or consent banners before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each cleanup step can be turned off. Bot checks/CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and responses identify the page verdict and billing status in headers. An MCP server offers take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000. Sign up for ScreenshotNeo’s free plan.
Frequently Asked Questions
Can MSS capture a website URL directly?
No. MSS captures a monitor or screen region. To capture a website without opening it on your desktop, use a browser-based capture workflow or a website screenshot API.
Does MSS save JPEG or WebP by default?
The documented convenience method saves PNG by default. For other output formats, convert or encode the captured pixels with an appropriate image library.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

