Code Monkey home page Code Monkey logo

obs-for-developers's Introduction

OBS ‘Window Capture’ for Developers

Challenge

Unlike streaming video games, showcasing software development entails interaction with many windows, often on multiple monitors.

This inconvenient proliferation of application windows makes anything but 'Display Capture' impractical. This is an unfortunate burden to those who would otherwise be willing to stream from their (often highly-configured) personal or work machines.

To further detriment, arranging windows to fit a solitary display counteracts the productivity boon of extra screen real-estate.

Solution

Leverage the ahkUnwrapped Python package and OBS Scripting API to asynchronously monitor application windows from an allowlist, populating and layering Window Captures within OBS as necessary to reflect focus, child windows, etc.

Demo

See recent Software and Game Development broadcasts at https://www.twitch.tv/CodeOptimist.

Features

  • Explicit allowlist for intentional window captures.
  • Regular expression matching of window titles.
  • On-demand capture of child windows.
  • Capture windows from any monitor.
  • Automated layering by recently focused.

Get started

Automatic configuration

I value minimal setup, but it's not here yet.

Manual configuration

It's recommended that you aren't broadcasting, or if so, edit the included captures.yaml before loading the script.

  1. Install Python 3.6 to a unique path, e.g. %AppData%\..\Local\Programs\Python\Python36-obs
    (Python 3.6 is the latest OBS supports, and it won't use virtualenv.)
    You probably don't want to add this to your system PATH.
  2. Clone (or download) this repository to a preferred location, e.g. C:\path\to\repo
  3. Install dependencies via commandline:
    %AppData%\..\Local\Programs\Python\Python36-obs\python -m pip install -r C:\path\to\repo\requirements.txt
    
  4. Within OBS, create an empty group named Windows on the desired scene(s). The script will manage its contents.
  5. Within OBS, select Tools->Scripts, Python Settings and browse to your Python install path.
  6. Within OBS, select Tools->Scripts, ➕ (Add Scripts) and browse to capture-windows.py
  7. Done. Matching application windows from captures.yaml should automatically be captured within OBS.
  8. Make changes to captures.yaml and 🔃 (Reload) capture-windows.py (make sure it's selected) anytime.

Troubleshooting

POLL_INTERVAL_MS at the top of capture-windows.py will be adjustable from Loaded Scripts in the future. If you encounter:

Encoding overloaded! Consider turning down video settings or using a faster encoding preset.

try increasing the value to 500 (half a second). Default is 250 (and can probably be set to 100 on many machines).

obs-for-developers's People

Contributors

codeoptimist avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.