-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update requirements.txt, camera_view.py, INSTALL.md, http_server.py, …
….github/workflows/build.yaml, README.md, and docs/vmix.md files
- Loading branch information
Showing
16 changed files
with
173 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
# Using the ScoreSight HTTP Server | ||
|
||
Get your scoreboard information in the browser for a simple integration into many streaming software, like OBS. | ||
|
||
This feature is only available on ScoreSight Pro. | ||
|
||
To get started, set up your scoreboard with the information you want to extract. See the Setup Process Guide for instructions. | ||
|
||
Enable the HTTP Server from the bottom-right section of ScoreSight: "Start HTTP Server" | ||
|
||
You can then open any browser and enter "http://localhost:18099/scoresight" as the URL. A simple scoreboard will appear. You may now use this URL in your streaming software. | ||
|
||
All the scoreboard information will be delivered as JSON in http://localhost:18099/json . This can be used as API in any other software or even HTML pages. | ||
|
||
If you want to create a more customized HTML scoreboard you are able to do so. Create a ".html" file anywhere on your disk and use the template example below to fetch data automatically from ScoreSight into the browser. | ||
|
||
Here is a simple HTML example that uses the JSON output: | ||
|
||
```html | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Scoreboard</title> | ||
<style> | ||
body { font-family: Arial, sans-serif; text-align: center; } | ||
.scoreboard { display: flex; justify-content: normal; align-items: center; margin-top: 20px; } | ||
.team { width: 25%; } | ||
.info { background: #f0f0f0; padding: 20px; border-radius: 10px; } | ||
.team-name { font-size: 24px; margin-bottom: 10px; } | ||
.score { font-size: 48px; margin-bottom: 10px; } | ||
.timer { font-size: 78px; margin: 0 20px; } | ||
.fouls { font-size: 24px; } | ||
</style> | ||
</head> | ||
<body> | ||
<script> | ||
function updateScoreboard() { | ||
fetch('http://localhost:18099/json') | ||
.then(response => response.json()) | ||
.then(data => { | ||
const homeScore = data.find(item => item.name === 'Home Score').text; | ||
const awayScore = data.find(item => item.name === 'Away Score').text; | ||
const time = data.find(item => item.name === 'Time').text; | ||
const homeFouls = data.find(item => item.name === 'Home Fouls').text; | ||
const awayFouls = data.find(item => item.name === 'Away Fouls').text; | ||
document.querySelector('.team.home .score').textContent = homeScore; | ||
document.querySelector('.team.away .score').textContent = awayScore; | ||
document.querySelector('.timer').textContent = time; | ||
document.querySelector('.team.home .fouls').textContent = `Fouls: ${homeFouls}`; | ||
document.querySelector('.team.away .fouls').textContent = `Fouls: ${awayFouls}`; | ||
}) | ||
.catch(error => console.error('Error:', error)); | ||
} | ||
setInterval(updateScoreboard, 100); | ||
</script> | ||
|
||
<div class="scoreboard"> | ||
<div class="team home"> | ||
<div class="info"> | ||
<div class="team-name">Home Team</div> | ||
<div class="score">0</div> | ||
<div class="fouls">Fouls: 0</div> | ||
</div> | ||
</div> | ||
<div class="timer">00:00</div> | ||
<div class="team away"> | ||
<div class="info"> | ||
<div class="team-name">Away Team</div> | ||
<div class="score">0</div> | ||
<div class="fouls">Fouls: 0</div> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
</body> | ||
</html> | ||
``` |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
# vMix Integration | ||
|
||
ScoreSight can interact directly with vMix through an API, providing a smooth and fast connection to vMix scoreboard Titles. Here is how to get it up and running. | ||
|
||
First make sure vMix is accepting connections. This can be verified in the vMix Settings -> Web Controller screen. (Enable the TCP API option) | ||
|
||
![alt text](image-8.png) | ||
|
||
In a vMix input add a Title that fits your needs, for example this scoreboard (which is available in vMix): | ||
|
||
![alt text](image-9.png) | ||
|
||
Right click and open the Title Editor: | ||
|
||
![alt text](image-10.png) | ||
|
||
Note the names of the various texts in the Title, these would be controlled by ScoreSight. | ||
|
||
In ScoreSight setup your scoreboard with detection boxes: | ||
|
||
![alt text](image-11.png) | ||
|
||
Go on the vMix tab and update or inspect the connection information like host and port (8099 is the vMix default), and choose the vMix Input according to your vMix setup. Next, set the mapping between ScoreSight detections and the vMix Title texts according to the information in the Title Editor (seen above). | ||
|
||
![alt text](image-12.png) | ||
|
||
Make sure the mappings are exactly as they appear in the Title Editor. | ||
|
||
Once the mapping is complete the information will be updated on vMix automatically. | ||
|
||
![alt text](image-13.png) | ||
|
||
Consult the vMix guide on their API for reference: vMix User Guide | ||
|
||
ScoreSight will be sending information using the SetText function. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters