Inspiration

Everyone on our team has watched a brain-computer interface demo and thought it looked like the future, and also like something we'd never get to build. At the same time, anyone who games or streams knows the worst part of sharing a clip: scrubbing through an hour of footage to find the 20 seconds that actually mattered.

Auto-clippers exist, but they cut on game events or chat activity. They can't tell the difference between a moment that looked big and a moment you actually felt. We realized a headset could fill that gap. Your brain already reacts to the good moments. We just needed something to listen.

What it does

Brainclip makes a highlight reel out of your brain's reactions while you play.

  1. You put on an Emotiv Insight headset and play. The first minute is a warm-up, so Brainclip learns what normal looks like for you.
  2. While you play, a live screen shows your excitement and focus compared to your own last minute. When one spikes, the moment gets caught and marked on the screen.
  3. When you stop, Brainclip cuts those moments out of the screen recording and joins them into a reel.
  4. The results page plays each clip with your brain activity synced underneath, so you can see exactly where you reacted.

Moments come in two kinds:

  • Hype: a sudden jump in excitement, like a last-second win.
  • Locked in: a long stretch of high focus, like a tight final lap.

There's also an OBS overlay, so a streamer could show their brain activity live on stream.

How we built it

Reading the brain. We read the Emotiv Insight through the Cortex API's band power stream, which gives us theta, alpha, low beta, high beta and gamma power for each of the 5 sensors about 8 times a second. From those we compute two signals:

$$\text{excitement} = \frac{\beta_L + \beta_H + \gamma}{\alpha} \quad \text{(all sensors)}$$

$$\text{focus} = \frac{\beta_L + \beta_H}{\alpha + \theta} \quad \text{(front sensors AF3, AF4)}$$

Comparing you to you. Raw values mean very little across different people, so every reading is compared to that same player's recent past. For each moment $t$ we take the window from 60 seconds ago up to 5 seconds ago and compute

$$z_t = \frac{x_t - \mu_{[t-60,\,t-5]}}{\max\left(\sigma_{[t-60,\,t-5]},\; 0.25\,\sigma_{\text{warm-up}}\right)}$$

The floor on $\sigma$ stops a very still stretch from making tiny wiggles look huge. A Hype moment is excitement with $z > 2$ for at least 1.5 seconds. A Locked in moment is focus with $z > 1.5$ for at least 6 seconds.

Cutting the reel. Python starts an OBS recording through the OBS WebSocket and waits for OBS to confirm it's recording, so brain time and video time line up. When the session ends, FFmpeg cuts each moment from 8 seconds before to 4 seconds after, merges moments that are close together, and joins the top 6 into one reel.

The pages. The live screen, the results page and the OBS overlay are plain HTML and canvas with no build step, served from a small local Python server. The design is based on ECG chart paper, with pen-colored traces and a highlighter marking the clipped moments.

Stack: Python (NumPy, SciPy, websocket-client, obsws-python), Emotiv Cortex API, OBS, FFmpeg, HTML/CSS/JavaScript, GitHub.

Challenges we ran into

  • Choosing a headset. The club offered a g.tec Unicorn and an Emotiv Insight. We wrote support for both, but the Unicorn's driver only runs on Windows and most of our laptops are Macs, so we switched to the Emotiv partway through the day.
  • Slow scores. Emotiv's built-in excitement and focus scores only update about every 10 seconds without a paid license, which is far too slow to catch a 2 second moment. We switched to the raw band power stream and computed our own scores from it.
  • What counts as a spike. Our first version compared gameplay to a minute of sitting still, so almost everything looked like a spike. Switching to a rolling baseline, where each moment is compared to the player's previous minute, fixed that and means a player who slowly gets more into the game doesn't trigger clips nonstop.
  • Keeping video and brain data in sync. A clip is only useful if it lands on the right moment, so we wait for OBS to confirm recording before lining up the timestamps.
  • Four people, one repo, twelve hours. We split the code so each person owned their own files, which kept merge conflicts away. Not every git push went smoothly, but we got there.

Accomplishments that we're proud of

  • A full pipeline that works end to end: headset in, highlight reel out.
  • Clips that are personal, because every threshold is relative to the player's own brain.
  • A design that looks like something people would actually want to use and share.

What we learned

  • EEG is noisy, and how you compare signals matters more than any single formula. Comparing each person to themselves made the biggest difference.
  • Consumer headsets measure brain activity, not emotions. We describe our signals as "unusual brain activity for you," not "we read your feelings."
  • In our favorites test, players named their 3 favorite moments before seeing the reel, and Brainclip caught [X of Y] of them.

What's next for Brainclip

  • Learning from feedback: letting players thumbs-up or thumbs-down clips so detection adapts to what each person values.
  • A playtesting tool for game studios, showing where players got bored or locked in across a level.
  • A live OBS integration that clips automatically during a stream.
  • Supporting more headsets, including the g.tec Unicorn on Windows. ```

Built With

Share this project:

Updates

Submission history