Skip to content

Releases: JustLachin/PyDisplayWindow

v2.0.0

19 Mar 19:31
8c57c41

Choose a tag to compare

PyDisplayWindow

Display to Window Capture Stream Application

A professional screen capture application that displays your screen in a window, enabling full screen sharing through window capture in streaming platforms like Discord, TikTok Live, OBS Studio, and more.


🎯 What Problem Does This Solve?

When streaming on platforms like TikTok Live or Discord, you're often limited to either:

  • Window Capture - Share only a specific application window
  • Screen Capture - Share your entire screen

However, many platforms (especially TikTok Live Studio app) only offer Window Capture with no "Share Screen" option. This is problematic when you want to share multiple windows or your entire desktop.

PyDisplayWindow solves this by:

  1. Capturing your entire screen (or selected monitor)
  2. Displaying it in a window
  3. You select this window in the streaming platform's "Window Capture"
  4. Result: Full screen sharing through a window! 🎉

✨ Features

  • 🖥️ Multi-Monitor Support - Select any connected display to capture
  • High Performance - Optimized for 15-60 FPS with minimal CPU usage
  • Scale Factor - Reduce resolution for better performance (25-100%)
  • FPS Counter - Real-time performance monitoring
  • 🎛️ Professional Controls - Pause, resume, change displays on-the-fly
  • 🪟 Always on Top - Keep the window visible above other applications
  • 💾 Persistent Settings - Your preferences are saved between sessions
  • 🎨 Dark Theme - Modern, eye-friendly interface
  • ⌨️ Keyboard Shortcuts - Quick access to common actions
  • 📝 Logging System - Detailed logs for troubleshooting

📦 Installation

Requirements

  • Python 3.8 or higher
  • Windows, macOS, or Linux

Install Dependencies

pip install -r requirements.txt

Or install individually:

pip install PyQt6 Pillow numpy opencv-python

🚀 Usage

Quick Start

Option 1: Use Launcher (Windows)

  1. Double-click start.bat
  2. The launcher will check dependencies and start the app

Option 2: Manual Start

  1. Run the application:

    python main.py
  2. Select your display:

    • On first launch, the Display Selector dialog appears automatically
    • Choose which monitor you want to capture
    • Set your preferred FPS (15-60)
    • Click "OK"
  3. Start capturing:

    • Click the "Start Capture" button
    • Your selected screen will appear in the window
  4. Stream!

    • Open your streaming platform (Discord, TikTok, OBS, etc.)
    • Select "Window Capture"
    • Choose "PyDisplayWindow" from the window list
    • Your viewers now see your full screen!

Controls

Button Function
▶ Start Capture Begin screen capture
⏹ Stop Capture Stop screen capture
⏸ Pause Pause the stream (freeze frame)
🖥 Change Display Switch to a different monitor
FPS Dropdown Change frame rate (15/30/45/60)

Keyboard Shortcuts

Shortcut Action
Ctrl + D Select Display
Ctrl + Q Quit Application
F11 Toggle Fullscreen

🎮 Use Cases

TikTok Live Streaming

Share your entire gaming setup, tutorial, or desktop when TikTok only offers window capture.

Discord Screen Sharing

Work around Discord's limitations when you need to share multiple windows seamlessly.

OBS Studio

Use as a source in OBS for advanced scene switching and effects.

Presentations & Tutorials

Mirror your main screen to a secondary window for recording or streaming.


⚙️ Configuration

Settings are automatically saved to:

  • Windows: %USERPROFILE%\.pydisplaywindow\config.json
  • macOS/Linux: ~/.pydisplaywindow/config.json

Adjustable Settings

Setting Range Default Description
Target FPS 15-60 30 Frame rate for capture
Quality 50-100% 85% Image quality
Scale Factor 25-100% 50% Reduce resolution for better performance
Always on Top On/Off Off Keep window above others
Show FPS On/Off On Display FPS counter

🔧 Troubleshooting

Application won't start

  • Ensure all dependencies are installed: pip install -r requirements.txt
  • Check Python version: python --version (must be 3.8+)

Display not detected

  • Click the "🔄 Refresh Display List" button
  • Ensure your monitor is properly connected
  • Try restarting the application

Low FPS / Stuttering

  • Lower the FPS setting (try 15 or 30)
  • Use Scale Factor - Reduce to 50% or 25% for much better performance
  • Close other applications to free up CPU/GPU
  • Reduce screen resolution if possible

Black screen

  • Some applications with DRM protection may show black (this is expected)
  • Try capturing a different display or region

🏗️ Architecture

PyDisplayWindow/
├── main.py              # Main application entry point
├── start.bat            # Windows launcher script
├── requirements.txt     # Python dependencies
└── README.md           # This file

Key Components

Component Purpose
DisplayManager Detects and manages connected monitors
CaptureWorker Background thread for screen capture
DisplaySelectionDialog UI for choosing display and settings
MainWindow Primary application window with controls

📝 License

MIT License - Feel free to use, modify, and distribute!


🙏 Credits

  • Built with PyQt6 for the user interface
  • Screen capture powered by Windows APIs and Pillow
  • Image processing with Pillow, NumPy, and OpenCV

💡 Tips for Best Results

  1. Match FPS to your stream - If streaming at 30fps, set PyDisplayWindow to 30fps
  2. Use "Always on Top" when you need the window visible while working
  3. Pause when switching - Pause capture when changing sensitive content
  4. Close unnecessary apps - For best performance, minimize background applications

📧 Support

For issues, suggestions, or contributions:

  • Open an issue on the project repository
  • Contact the PyDisplayWindow team

Enjoy streaming with PyDisplayWindow! 🎥✨