CASE STUDY

Indoor Cycling App with Live Video Streaming

Pain Cave Live
Indoor Cycling App with Live Video Streaming
Industry Fitness / Indoor Cycling
Region International
Timeline Full-cycle engagement
Team Trembit dedicated engineering team
Media Server
Janus (WebRTC)
Frontend
Angular
Backend
Node.js
Realtime
WebSocket
Sensors
ANT+ Bluetooth

The Problem

Pain Cave Live wanted to turn indoor cycling into a shared experience — riders training together in real time, pushing each other through live leaderboards and coaching cues, regardless of where they were physically located. The fitness platforms available at the time either offered pre-recorded classes with no real interaction or repurposed generic video conferencing tools that had no concept of performance data. Neither could synchronize a rider's live power output, cadence, and heart rate with a video feed and display it to every other participant in the group. They needed a purpose-built platform where the streaming layer and the data layer worked as one — so a virtual peloton could actually feel like riding together.

Why Synchronizing Live Video with Real-Time Performance Data Is Hard

Building a live cycling platform that feels like a real group ride introduces challenges that neither standard video conferencing nor typical fitness apps are designed to handle:

  • Sub-second data-video synchronization — power, cadence, and heart rate metrics must align precisely with live video feeds; even a half-second drift breaks immersion and makes leaderboards feel unreliable
  • Variable network conditions — riders connect from home Wi-Fi with unpredictable bandwidth; the platform must degrade gracefully without dropping participants or desynchronizing their streams from the group
  • Multi-participant streaming at scale — group rides with multiple simultaneous video feeds and data overlays require an SFU architecture that manages bandwidth efficiently without server-side transcoding bottlenecks
  • Real-time leaderboard computation — ranking riders by live performance metrics requires a low-latency pipeline that ingests sensor data, computes standings, and pushes updates to all clients without perceptible delay
  • Coaching overlays during live sessions — instructors broadcast visual overlays (target power zones, interval cues, prompts) synchronized with the ride timeline without competing with the video streams
  • Device and sensor fragmentation — integrating with ANT+ and Bluetooth-enabled power meters, smart trainers, and heart rate monitors across many manufacturers and firmware versions

What We Did

1

Streaming Architecture & Infrastructure

  • Designed the real-time streaming architecture around the Janus WebRTC Gateway in SFU mode — routing each rider's video to every other participant without transcoding, keeping latency low and CPU overhead manageable
  • Built the Node.js backend handling session orchestration, participant management, WebRTC signaling, and room lifecycle, with adaptive bitrate logic per participant
  • Established WebSocket channels for low-latency bidirectional data transport running alongside the media streams
2

Core Platform & Metrics Integration

  • Developed the Angular frontend with a ride interface combining live video tiles, real-time metrics dashboards, and interactive leaderboards in a single responsive view
  • Built the real-time metrics synchronization pipeline — ingesting power, cadence, and heart rate data from connected sensors and aligning it with video timestamps to maintain sub-second sync across all participants
  • Implemented group ride simulations with virtual peloton mechanics and integrated support for ANT+ and Bluetooth sensor protocols across different manufacturers
3

Coaching Tools & Leaderboards

  • Built a coaching overlay system allowing instructors to broadcast interval cues, target power zones, and motivational prompts as synchronized visual layers on top of the live video feed
  • Developed the real-time leaderboard engine — ranking riders by configurable metrics and pushing live standings to all participants as sensor data arrives
  • Implemented ride recording and post-ride analytics — capturing full performance data for review, personal records, and progress comparison across sessions
4

Network Resilience & Performance Optimization

  • Built network variability handling with automatic quality adaptation — detecting bandwidth constraints per participant and adjusting their outgoing stream without disrupting the group experience
  • Implemented reconnection logic for dropped participants — preserving ride state and metrics continuity so riders rejoin without losing their position
  • Tuned Janus media server configuration for minimal forwarding latency across geographically distributed participants, adjusting NACK/PLI strategies for ride-length sessions

Key Results

Sub-second sync Metrics and video aligned across all participants in real time
Real-time rankings Live standings updated as sensor data arrives, no perceptible delay
Adaptive streaming Quality maintained across variable home network conditions
Reconnect-safe Riders rejoin mid-ride with metrics continuity preserved
Full-cycle Frontend, backend, streaming infrastructure, and device integration

In Their Words

Trembit understood that this was not just a video call — it is a live sports experience. They built the streaming and data sync layer that makes our virtual peloton actually feel real.
Pain Cave Live product stakeholder
Their proactive team gets things done as if it were their own project.
Trembit client

What We Learned

Video sync is not solved by WebRTC alone — the data layer is where immersion lives or dies

WebRTC handles media transport, but synchronizing performance metrics with video frames is a separate problem. We built a dedicated timestamp-alignment pipeline that tags incoming sensor data with media timeline references, so when a rider sees their power spike on screen, the leaderboard and coaching overlay reflect it simultaneously. Without this layer, the experience felt technically functional but experientially flat.

Network degradation in fitness apps has a different failure mode than in video calls

In a video conference, a dropped frame is a minor annoyance. In a competitive group ride, a bandwidth dip that desynchronizes one rider's metrics undermines the entire session's credibility. We designed the adaptive bitrate logic to prioritize metrics accuracy over video resolution — reducing visual quality gracefully while keeping the data pipeline intact, so riders on poor connections still competed fairly.

Janus SFU was the right architecture for fitness streaming — but it required careful tuning

Janus gave us selective forwarding for multi-participant rides without the CPU overhead of an MCU. But out-of-the-box Janus was not optimized for simultaneous video plus high-frequency data channels per participant. We tuned plugin configuration for data channel priority, adjusted NACK and PLI strategies for ride-length sessions, and implemented custom room management for the join/leave patterns specific to group fitness.

Need a Live Fitness Platform?

Book a 30-minute architecture session — we'll discuss your streaming requirements and the infrastructure decisions that matter most. No pitch deck. Just engineering clarity.

Thank you! Your message has been successfully sent. We will contact you shortly.

Something went wrong. Please try again or email us at welcome@trembit.com