lichess.org
Donate

streaming LiChess with OBS studio - how to capture the board

OBS studio is the most popular streaming software and I am able to use it fine on other sites. However, I am confused how to deploy it on LiChess because of a quirk in its programming...

I would like to do a window capture to grab the board. In OBS there are 3 options for window captures:
1. Window title must match
2. Match title, otherwise find window of same type
3. Match title, otherwise find window of same executable

For some reason I cannot fathom, LiChess has decided to put a different title on the browser window every single game. This makes it impossible to setup OBS studio to grab the LiChess window.

I can set it up to grab a random browser window and hope it happens to pick LiChess. I can set it up to grab a browser window and not open any other websites. Neither seem like good options.

How are other streamers dealing with this? Is there some way to override LiChess's crazy window title behavior with some sort of browser plugin? Is there some OBS studio plugin that will search window titles for keywords rather than requiring an exact match?

I'd appreciate any feedback on the best way to deal with LiChess's terrible programming decision.
I suppose I could use a browser capture instead of a windows capture. The downside there is it would not grab my cursor and it would be impossible to modify the board type as it would be viewing anonymously instead of with my login and settings.
What I have been doing, is a Monitor Capture with a sub-region to grab the board and the clocks and such. If you make sure to always put your browser window on the same location when streaming, this method works fine.
The disadvantage of those techniques is if you go look in another window, it will show that window instead of staying on the board.

I am considering writing a greasemonkey script to search for lichess in the browser page title and update it to something stable rather than its crazy default.
- open OBS
- open lichess.org in a browser
- make window capture from the lichess.org window
- go to the lichess.org browser and navigate to a game page
- go back to OBS and crop out the window capture so that you only see what you want to see: the board, the player names, the clock

Now every time you open OBS just make sure there is a browser on lichess.org and it will work automatically. If OBS somehow points to the wrong window just change it to the right one in the source properties.
@nh78 Yes, in my second comment when I mentioned browser capture instead of window capture, I meant capturing the tv URL, which has the problems I mentioned there: no cursor and no user board appearance settings.

Window capturing a second browser window with the tv URL wouldn't work because LiChess still (for some crazy reason) changes the title every game. Even if it didn't change the page (and thus window) title every game, the cursor would still be unavailable.
@NoJoke No, it will not work automatically. That's not how OBS works. OBS matches the window title. LiChess changes the window title every game.
@chuckmoulton If you originally create the window capture on a "lichess.org" page, i.e. the homepage, OBS will always look for that when it starts. If you go from the homepage to a game page OBS will follow.

I'm streamed thousands of hours. This is how I've always done it.
forget about window titles, noob. Create screen capture -> rightclick -> add filter -> crop

This topic has been archived and can no longer be replied to.