Closed timotheeg closed 4 years ago
It looks good but the json stringreplace
is pretty hackerman. Don't worry its a future problem π
Could you 1) put restreamer stuff inside scripts/restreamer since it might grow 2) add a small readme.md inside that folder?
Could you
- put restreamer stuff inside scripts/restreamer since it might grow
- add a small readme.md inside that folder?
Sure thing, I reckon only the template config file needs to move to scripts
, and I'll add a readme too
It's amazing how quickly real programmers work :jealousface:
I've added a few commits so far, but I'll finish up setting up the config tonight
PR ready. Some highlights:
Tested!
K! I think it's ready :)
I can literally be up and running streaming a match in 1 minute now πͺ
You can test it too by following these steps:
pre-req: clone NESTrisStatsUI + npm install in it
node app_competition.js
NESTrisStatsUI/public/competition_layout1_ctjc.html
python3 -m scripts.restream twitch1 1
, fine tune when calibrator shows (if needed)python3 -m scripts.restream twitch2 2
, fine tune when calibrator shows (if needed) (you can run this in parallel to step 5)Now the sad part, a bunch of processes (VLC local servers) run in the background and there's no admin UI to kill them. So when I want to stop the processes, I run this on mac:
killall python python3 python3.8 vlc Python node
I don't know what the equivalent would be in windows π
Last few Notes:
NESTrisStatsUI/public/competition_admin.html
(If you restart the node server, you need to refresh this page, so the websocket connects to the server again)NESTrisStatsUI/public/competition_layout1_ctjc.html
(just like the admin UI, if you restart the server, the scene must be refreshed so it connects to the correct node server.Now the sad part, a bunch of processes (VLC local servers) run in the background and there's no admin UI to kill them. So when I want to stop the processes, I run this on mac:
killall python python3 python3.8 vlc Python node
You could use
processes.append(StartProcess(args))
as you already have and then have a simple tkinter button that says kill all, which would callprocess.abort()
. Needs minor re-architecting, and wouldnt killnode
but should kill vlc/python assuming you started it from here
Nice suggestion! I'll open another PR when I have time to do this. Would indeed be a lot nicer if anyone actually uses this for restreaming :)
Nice suggestion! I'll open another PR when I have time to do this. Would indeed be a lot nicer if anyone actually uses this for restreaming :)
I think sharky is interested, and i think he's technical enough to command line a few things.
Yeah, I had pinged him to ask if he waned to give a try. Now that this is merged, I'll help him set up. Exciting times! :D
TLDR
Sort of half baked feature to allow easy restreaming of twitch streams that follow Stencil.
Half baked but working OK!
Longer story
Should allow a restreamer to host a competition with OCR and a re-renderer, catering for 2 players for now.
PR content:
stream
scripts/restream.py
Local requirement as a restreamer:
streamlink
,ffmpeg
,vlc
Script is invoked as:
Script does:
The VLC servers will be accessible from the following 2 URLs (for player 1 and 2 respectively)
NESTrisOCR will push its game data to port 4001 and 4002 respectively, where a suitable renderer may be listening (like NESTrisStatsUI π .
This allow for a pretty quick restream setup with sample results as folllow: