---
name: Start the stream up
description: >-
  Use when the user says "start stream", "start the stream up", "make it so", go
  live / start the show, or asks to save, shut down, or start up their streaming
  window layout, for an OBS show (often plus a multistream host) that opens on a
  long opener video, then needs live idea timestamps and a chapter list at the end.
---
# Start the stream up

The producer runs the show; the streamer talks. Never paste or repeat a stream key, never read a password or key into the conversation, and never post publicly as the user without their OK.

Fill in, for this show: the streaming computer, the opener scene name, the main talking scene name, the stream host, and the folder that holds the saved window layout. Do not store keys or passwords in this skill.

## Voice commands this skill covers
- **"Start stream" / "start the stream up" / "make it so" / "go live"**: these are aliases for the same action. Run the startup layout (section 0, Start up), then Pre-flight (1) and Go live (2). Match small transcription variations ("start the stream", "start streaming").
- **"Start up the layout"**: section 0, Start up only. Don't go live.
- **"Shut down the layout"**: section 0, Shut down. Never while live; stop the stream first only if the user said to.
- **"Save the layout"**: section 0, Save.

## Context: the OBS link and auto-restart
- OBS is controlled remotely over obs-websocket (port 4455) through a private network link from the producer's computer to the streaming computer, via a small local relay if needed.
- A watchdog on the producer's computer should check the link every 30 seconds. If OBS can't be reached it restarts the network link and the relay on its own (in testing, control returned in about 30 seconds with no help from the user). Look at its log before assuming a manual fix is needed.
- The watchdog can't open OBS. OBS itself must be running on the streaming computer.
- If the watchdog process isn't running (for example after the computer was rebuilt), start it again before going live.

## 0. Window layout on the stream monitor (save, shut down, start up)
The streamer keeps the stream apps on a secondary monitor (OBS, a merged chat window, the channel page, the stream host dashboard). Keep the saved layout and two scripts in a folder on the streaming computer (fill in that path for this project; do not publish it).
- **Save**: list every window whose position falls inside that monitor's range (process, bundle id, title, position, size). For browser windows also read each window's tabs, active tab index and bounds. Note any local helper a window depends on (for example a merged chat server on a localhost port: its folder and command). Write it all to a layout JSON and regenerate both scripts from it. Exclude the assistant's own app window: closing it would end the voice call.
- **Shut down script**: close only the saved browser windows (match by tab URL, not by app, so the user's other browser windows stay open), quit OBS cleanly (never while streaming), and stop the local helper server.
- **Start up script**: start the helper server if its port isn't listening, open OBS, recreate each browser window with its tabs and active tab, set each window's bounds, then wait for the OBS window and set its position and size. The first run may trigger a desktop automation permission prompt for the browser or OBS; the user just allows it.
- After running either script, verify by listing windows again and report what's open and where.

## 1. Pre-flight
1. Make sure OBS is open on the streaming computer. If not, launch it on the opener scene and wait for the websocket to answer.
2. Stream service: prefer the host **linked with a signed-in Connect Account** (or the host's equivalent), never a custom destination with a typed-in key, because many hosts rotate keys per event. Read `GetStreamServiceSettings`. If it's a custom RTMP key, ask the user to open OBS Settings, then Stream, pick the host, click Connect Account, sign in, and click OK. The sign-in window is theirs to complete. Settings can hide behind the main OBS window, so raise it if they can't find it.
3. Multitrack Video (Enhanced Broadcasting) must be OFF for a typical multistream host (OBS profile parameter Stream1 / EnableMultitrackVideo = false). When it's on, the stream often fails to start.
4. On the host: list draft and upcoming events and the connected channels (for example Twitch and YouTube). Make sure each channel is on, and confirm the event title with the user. Hosts often reuse the last title, so it may be stale. After changing the title, push it to each destination too, then verify on those sites.
5. Chat: in the middle browser window, open the combined chat as a **new tab**; never replace the tab already there.
6. Browser scene (if the show has one that uses a window capture of the browser): open a **fresh** browser window on the streaming computer every startup, because window captures lose their target when the old window closes or the app restarts. Find the newest window for that browser, point the capture at it, and confirm with a source screenshot. A captured page that plays sound will be picked up by desktop audio capture, so mute that tab if needed.
7. Audio: the assistant's voice should have its own app-audio source in OBS so the streamer can mute or lower it on its own fader. Make sure it's in every talking scene, and keep it a few dB under the streamer's mic so it sounds like a conversation. Also make sure the streamer's **mic source is present and enabled in every talking scene** — a source that exists only in some scenes will not be heard in the others. The opener or intro scene may keep the mic off on purpose until the streamer switches away from it.

## 2. Go live
1. Switch the program scene to the **opener video scene**, and restart its media right before starting (if OBS launched on that scene, the video has already been playing).
2. Run `StartStream`, wait about 15 seconds, then run `GetStreamStatus`. You want outputActive true, outputBytes rising, and outputReconnecting false. If it's still reconnecting with 0 bytes, read the OBS log. A connection failure often means the key or service is wrong, so go back to pre-flight step 2. Do not print the key.
3. When the opener ends (watch its media duration or time it), switch to the **main talking scene**. OBS doesn't auto-advance. Fill in those two scene names for this show.
4. Confirm with the host that the event is in progress, and tell the user in one line where it's live.

## 3. While live
- When the user says **"we're live"**, start the idea log. Each time they begin a new idea or topic, note the stream time (OBS outputTimecode) and a short title. Keep it in a file on the producer's computer so it survives restarts.
- Every few minutes, check stream health (GetStreamStatus and GetStats). Message the user only about problems such as skipped frames, congestion, or reconnecting.
- Note clip-worthy moments for shorts.

## 4. Wrap-up
1. Run `StopStream` and confirm outputActive is false.
2. Turn the idea log into a chapter list: the first line is 00:00, timestamps are ascending, and each has a short title (YouTube needs at least 3 chapters, each at least 10 seconds). Send it to the user for approval before it goes into any description.
3. Offer shorts picks from the noted moments (see the stream-to-shorts skill).
4. If the user wants the desk cleared, run the layout Shut down (section 0).

## Failure quick-fixes
- Can't reach OBS: wait 30 to 45 seconds for the watchdog, check its log, then check that OBS is actually open.
- Stream won't start: check Multitrack Video and the service type.
- Stop request returns 'not running' while OBS shows reconnecting: ask the user to click Stop Streaming in OBS.
