Blog
Customer story 6 min read

How LearnBase made course video feel instant across LATAM with rehelios

LearnBase moved its course catalog off Bunny Stream to rehelios — collapsing two video systems into one, killing 1–2s cold-start origin spikes for Latin American learners, and keeping encoding free as the catalog grows.

rehelios

Engineering

LearnBase

LearnBase is an AI-native, white-label platform for building, running, and selling online academies — zero sales commission, used by course creators across LATAM, Spain, and Brazil. uselearnbase.com

1–2s → 0

cold-start origin spikes for LATAM learners — gone

0

lines of player code changed — it just reads playbackUrl

$0

encoding cost as the course catalog keeps growing

2 → 1

video systems on the hot path (S3 kept only as fallback)

LearnBase turns a creator's uploaded videos into a structured course — transcribing them, drafting titles and descriptions, generating quizzes and subtitles, the whole pipeline. The product is built on the same stack we are: Bun, Elysia, Drizzle, Postgres, React 19. So when their course video started feeling slower than the rest of the app, they knew exactly where to look — and it wasn't the player.

The company: AI-built academies for Latin America

LearnBase's audience skews heavily toward Spanish-speaking LATAM, with a big cluster of learners in Argentina. A student opens a course and watches a run of short module videos back-to-back — finish one, click the next, finish it, click again. That rhythm is the product. Anything that interrupts it — a spinner between modules, a stutter on the first frame — reads as the course feels cheap, even when the content is excellent.

The problem: a fast player with a far-away origin

Course videos were uploaded to S3, then pushed to Bunny Stream for HLS encoding and delivery. The player itself was never the issue — it's a vidstack + hls.js setup that's plenty fast. The issue was where the bytes came from on a cold cache.

Bunny served LATAM from an Argentine edge, but its origin storage sat in Brazil. So the first time a learner hit a segment that wasn't warm on that edge, the edge had to pull it across the continent from origin — and we watched that show up as periodic 1–2 second cold-start spikes on first play. For a single long video you'd barely notice. For a student clicking through fifteen short modules in a sitting, you hit that cold path again and again.

Why video was the right thing to fix

There were really three reasons to move it, and only one was latency:

  • Latency. Kill the cold-origin spike for the learners who make up most of the audience.
  • Cost shape. A course catalog only grows — every creator who joins uploads more video. On a per-minute encoding model, that bill compounds forever. rehelios encodes for free and bills per GB stored and delivered, so the catalog can grow without the encoding line item growing with it.
  • One less moving part. Course content is private. rehelios gates playback at the edge with either a short-lived signed token or a per-org domain allowlist — so private videos stay private without LearnBase running its own token service.

The migration: import from the same S3 origin

The clever part is that there was no re-upload. Every original already lived in S3, and rehelios can pull from a public URL with a single call: POST /v1/videos/import. So migrating a video was a backend job, not a creator-facing event — hand rehelios the S3 URL, get back a video id and a playbackUrl, store them next to the existing Bunny id.

Because both ids live on the same row, the playback resolver could flip one video at a time and stay reversible the whole way. Crucially, the player never had to learn anything new: it asks the backend for a URL and plays it. Swapping a Bunny URL for a rehelios playbackUrl was zero lines of player code.

The benchmark: an EZE edge instead of a Brazilian origin

Before flipping the default, LearnBase benchmarked HLS startup latency, rehelios vs. Bunny, from Argentina. Both providers answered from an Argentine edge — but rehelios delivers from a Cloudflare PoP in Buenos Aires (EZE), with no cross-border origin pull in the hot path. The benchmark made the earlier hunch concrete: the 1–2s cold-origin spikes that came from reaching back to Brazil simply weren't there.

The player was never the bottleneck. The distance to origin was. Moving the origin onto the edge made the first frame feel free.

The routing, after

The flip was never a hard cutover. LearnBase resolves a playback URL through a priority chain, so a half-migrated catalog and a fully-migrated one behave identically to the learner:

1 rehelios (primary)

If the video has a rehelios id, serve its HLS playbackUrl from the Cloudflare edge.

2 Bunny Stream (during migration)

Not yet migrated? Fall back to the existing Bunny HLS URL. Reversible at any time.

3 S3 presigned (cold fallback)

No streaming copy at all? Hand back a presigned URL to the original file in S3.

What changed

Two video systems on the hot path became one, with S3 demoted to a cold fallback that almost never fires. First-play across LATAM stopped paying the Brazil round-trip. And the cost of running video stopped scaling with the size of the catalog — encoding is free, and the per-GB bill tracks only what's actually stored and streamed.

None of it touched the player, the upload flow, or the AI pipeline that makes LearnBase what it is. It was an infrastructure swap underneath a product that kept shipping the entire time — which is exactly the kind of move rehelios is built to be the boring, reliable half of.

Put your first video live today

Create an account, upload a file, and have a fast, embeddable video live in minutes. Pay only for what you store and stream.