Skip to content

feat: Game event timestamps, recording chapters, and sport-aware labels#1

Merged
JRemitz merged 6 commits intomainfrom
claude/obs-game-event-timestamps-jwd8W
Mar 12, 2026
Merged

feat: Game event timestamps, recording chapters, and sport-aware labels#1
JRemitz merged 6 commits intomainfrom
claude/obs-game-event-timestamps-jwd8W

Conversation

@JRemitz
Copy link
Copy Markdown
Contributor

@JRemitz JRemitz commented Mar 12, 2026

Summary

  • Game event timestamps — automatically logs goals, penalties, period changes with stream-relative timestamps for YouTube chapter markers; "Copy Timestamps to Clipboard" button and timestamps.txt output
  • Recording chapter markers — embeds chapters into Hybrid MP4/MOV recordings via OBS 32+ API; writes companion .chapters.txt file next to any recording for reeln-cli or manual ffmpeg injection
  • Sport-aware score labels — "Goal" for hockey/soccer/lacrosse, "Try" for rugby; score logging disabled by default for basketball/football (too frequent)
  • Clock auto-stop — clock stops automatically at 0:00 (count-down) or period length (count-up)
  • Scrollable dock layout — process queue no longer pushes scoreboard controls out of view
  • UX fixes — period start dedup, phantom penalty event fix, reeln segment command gated on streaming

Test plan

  • All 7 test binaries pass
  • 100% line coverage on scoreboard-core
  • Manual testing: timestamps copy to clipboard, recording chapters in Hybrid MP4, companion .chapters.txt written
  • Backwards compatibility verified (runtime API detection via dlsym/GetProcAddress)
  • CI build on all platforms

🤖 Generated with Claude Code

claude and others added 6 commits March 11, 2026 00:37
Capture timestamped game events (goals, penalties, period changes, game
end) relative to OBS stream start time. Events are automatically logged
when streaming is active and written as YouTube-compatible chapter
markers (H:MM:SS label) to timestamps.txt in the output directory.

Core layer: append-only event log (up to 256 events) with add/get/clear/
write API. Plugin layer: hooks into OBS streaming start/stop events,
auto-logs from all score/penalty/period/clock UI and hotkey actions,
writes timestamps on game finish and stream stop, adds "Copy Timestamps
to Clipboard" button for pasting into YouTube descriptions.

https://claude.ai/code/session_0114mYCqW5FWaebWuGZMSCTX
Persists the event log to disk on every event so that timestamps
survive OBS crashes. Previously timestamps were only written at
game end or stream stop.

https://claude.ai/code/session_0114mYCqW5FWaebWuGZMSCTX
- Goals: subtract 10s delay from timestamp to approximate actual goal
  time (clamped to 0:00:00). Decrementing a score removes the most
  recent goal event for that team (handles called-off goals and
  accidental presses).
- Penalties: renamed from "Penalty" to "Power Play" in event labels.
  Manually clearing a penalty removes its timestamp (called-off
  penalty). Natural expiry does not remove the event.
- Core: added scoreboard_event_log_remove() and
  scoreboard_event_log_find_last() for prefix-based reverse search.
- Tests: 12 new tests covering remove, find_last, and combined
  find-and-remove workflows.

https://claude.ai/code/session_0114mYCqW5FWaebWuGZMSCTX
The penalty event was logging the penalized team as "Power Play: {team}"
but the power play belongs to the opposing team. Swap the ternary so
when the home team takes a penalty, the away team is shown on the
power play label, and vice versa.

https://claude.ai/code/session_0114mYCqW5FWaebWuGZMSCTX
…d UX fixes

- Recording chapter markers: embeds chapters into Hybrid MP4/MOV via
  OBS 32+ API (runtime-detected for backwards compatibility) and writes
  companion .chapters.txt next to any recording for reeln-cli/MKV use
- "Record chapters in game file" checkbox in Game Settings with tooltip
  explaining Hybrid MP4 requirement and API availability
- Sport-aware score labels: "Goal" for hockey/soccer/lacrosse, "Try"
  for rugby; score logging disabled by default for basketball/football
- Clock auto-stops at 0:00 (count-down) or period length (count-up)
- Period Start event deduplication: only logged once per period
- Segment CLI only runs when streaming (no spurious failures offline)
- Process queue bounded with internal scroll; dock layout is stable
- Fix: hotkey penalty-add no longer logs phantom events when slots full
- Fix: find_last("") no longer matches every event
- Version bump to 0.4.0

Co-Authored-By: Claude <noreply@anthropic.com>
@JRemitz JRemitz self-assigned this Mar 12, 2026
@JRemitz JRemitz merged commit 3d70da3 into main Mar 12, 2026
7 checks passed
@JRemitz JRemitz deleted the claude/obs-game-event-timestamps-jwd8W branch March 12, 2026 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants