NGALAC/Subsystems: Difference between revisions
Jump to navigation
Jump to search
| Line 181: | Line 181: | ||
</nowiki> | </nowiki> | ||
inputs ->+ Arduino/[http://playground.arduino.cc/Code/CmdMessenger CmdMessenger] <-> Serial port <-> USB <-> streaming CPU <-> [https://github.com/harmsm/PyCmdMessenger PyCmdMessenger] <-> obs-wc-controller <-> obs | inputs ->+ Arduino/RaspberryPi <-> [http://playground.arduino.cc/Code/CmdMessenger CmdMessenger] <-> Serial port <-> USB <-> streaming CPU <-> [https://github.com/harmsm/PyCmdMessenger PyCmdMessenger] <-> obs-wc-controller <-> obs | ||
outputs <-+ | outputs <-+ | ||
[https://stackoverflow.com/questions/9344235/how-to-restart-program-automatically-if-it-crashes-in-windows Guardian Process] - Windows OBS restart automatically on fail strategy | [https://stackoverflow.com/questions/9344235/how-to-restart-program-automatically-if-it-crashes-in-windows Guardian Process] - Windows OBS restart automatically on fail strategy | ||
Revision as of 18:47, 24 March 2018
Power
Streaming PC
BIOS setting for Auto-on with power-on (e.g. from switch)
Audio
Gainclones are a DIY version of a $3000 audio system called the GainCard.
NGALAC possesses a LM3886TF based dual supply amp which requires a split rail +28/-28 DC supply
Example DIY circuits which are easy to build with clear instructions
Error creating thumbnail: Unable to save thumbnail to destination
DIY PSU price is very high, will compare to purchase options
Using computer PSU may be possible after boosting +/-12 to +/-28, however, current on -12V line may not be enough to rate maximum wattage
| Qty | Short Name | Price | Part | Link | Part Total |
|---|---|---|---|---|---|
| 1 | Transformer Dual 28V secondaries | $3.00 - $10.00 (based on current required) | F56-220-C2 (e.g.) | Digikey | $10.00 |
| 16 | Diode | $1.00 | MUR860 | Digikey | $16.00 |
| 4 | Linear Voltage Regulator | $2.10 | LM338T | Digikey | $9.00 |
| 8 | Rectifier Diode | $0.20 | LM4002 | Digikey | $1.60 |
| 4 | 1200uF Radial Aluminum Electrolytic Caps | $1.00 - $6.00 (depending on current) | EEU-FS1J102B | Digikey | $24.00 |
| $10.00 | Various Caps and Resistors (1W) | * | * | * | $10.00 |
| Total | $76.80 | ||||
Controls
OBS automation
obs-wc-rc - OBS Web Socket control API with Python support
Query and send commands to OBS from python (can theoretically control everything)
import asyncio
from obswsrc import OBSWS
from obswsrc.requests import (ResponseStatus,
StartStreamingRequest,
GetStreamingStatusRequest
)
from obswsrc.types import Stream, StreamSettings
async def main():
async with OBSWS('localhost', 4444, 'password') as obsws:
response = await obsws.require(GetStreamingStatusRequest())
print("Streaming: {}".format(response.streaming))
print("Recording: {}".format(response.recording))
loop = asyncio.get_event_loop()
loop.run_until_complete(main())
loop.close()
Output:
Streaming: False Recording: True
Event Listener
import asyncio
import logging
import sys
from obswsrc import OBSWS
from obswsrc.logs import logger
# We will output logging to sys.stdout, as many events might raise errors
# on creation (that's because protocol.json is not perfect) - such errors
# are logged by obs-ws-rc automatically, we just need to see them
logger.setLevel(logging.ERROR)
logger.addHandler(logging.StreamHandler(stream=sys.stdout))
async def main():
async with OBSWS('localhost', 4444, "password") as obsws:
print("Connection established.")
# We will receive events here by awaiting for them (you can await for
# an event of a specific type by providing `type_name` argument to
# the obsws.event() method)
event = await obsws.event()
# Awaited event might be None if connection is closed
while event is not None:
print("Awaited for '{}' event!".format(event.type_name))
event = await obsws.event()
print("Connection terminated.")
Output:
Awaited for 'TransitionBegin' event! Awaited for 'SwitchScenes' event! Awaited for 'RecordingStarting' event! Awaited for 'StreamStarting' event!
inputs ->+ Arduino/RaspberryPi <-> CmdMessenger <-> Serial port <-> USB <-> streaming CPU <-> PyCmdMessenger <-> obs-wc-controller <-> obs
outputs <-+
Guardian Process - Windows OBS restart automatically on fail strategy