timotheeg / nestrischamps

A web-based OCR and restreamer system for NES Classic Tetris players
MIT License
45 stars 11 forks source link

Share player cam to multiple views #152

Open timotheeg opened 9 months ago

timotheeg commented 9 months ago

At the moment in NTC, the players cams are only shared with one "primary view".

That is done because layouts dictate some characteristics of the videos, like the resolution requested.

The "primary view" is basically the last loaded view owned by the game host. When a game host loads a view, it will set itself as the primary view, and instruct all the producers to push their video streams to it, while stopping their previous sharing.

This has caused some issues in the past:

Potential approach:

Note that views also have additional characteristics like the number of players they support, and whether the view support 2 concurrent matches ornot. The primary view is still an important concept because it dictates what the admin page shows based on what the primary view supports.

This has also been an issue when folks are loading both a single match view and a 2-concurrent-match view, refreshing one or the other (currently) changes what the admin page shows (i.e. all the match controls...)

timotheeg commented 9 months ago

In addition to the primary view concept, NTC has not supported player cams to multi-views to save on network bandwidth. This was to guard against cases where game host may have multiple OBS scenes where the browser source stays active, but the scene is not displayed. In such setup, there could be a huge amount of video stream data travelling on the network to feed all these views.

In my own setup, I typically only have one NTC scene and I switch the browser source URL to the view I want when I need. But there is no way to prevent people from loading MANY views, so there's a risk people do not notice.