Skip to content
Write to me
The Reelhouse mark, a gold house whose body is a film reel, on a dark tile

Reelhouse

Built on my own

Demo data. Film posters and clips belong to their owners.

Transcript

The film has music and no voice. Under the music you hear a little of each film while it plays. These are the pictures and the words on screen, in order. The library is demo data: real film posters and short trailer clips, which belong to their owners.

A plain folder of film files. "Your films are just files in a folder." "There are no posters, and nothing remembers where you stopped."

A projector beam lights a wall of film posters, and the Reelhouse mark rises in it. "Reelhouse turns that folder into your own streaming service."

The Reelhouse home page in a browser, with rows of posters. "Drop a film in the folder and it shows up with its poster."

The pointer rests on a poster and its clip plays in place. "Hover over a poster and the film starts playing."

A show's page opens with its seasons and episodes. "Shows are sorted into seasons and episodes."

An episode plays, and a Skip intro button appears. "Press play, and you can skip the intro with one tap."

The soundtracks of four episodes, drawn as rows of gold bars, slide until one stretch lines up and lights. "It finds the intro by listening for the theme every episode shares."

Continue Watching on a laptop, then the same episode picks up on a phone. "Stop on your laptop and pick up on your phone."

The phone downloads an episode, then plays it offline. "You can download an episode and watch it offline."

A film plays with subtitles. "Pick your audio language and your subtitles."

A phone, a laptop and a TV each play a different film in Reelhouse, then all three together. "It works on phones, laptops and TVs."

The Netflix wordmark. "Reelhouse was inspired by Netflix." "At home, a film starts in about 150 ms."

The Reelhouse mark alone. "Reelhouse" Under it, small: "Film posters and clips belong to their owners." "Tears of Steel: Blender Foundation, CC BY 3.0" "Not affiliated with Netflix."

Read more about Reelhouse

A streaming service for your own films.

A home video library that plays on phones, TVs and laptops, resumes where you left off and works offline. It finds the intro and the credits of every episode by itself, with nobody marking them.

What it is
A streaming service for a home video library
Where it plays
Phones, TVs and laptops, with downloads that play offline
What it finds
The intro and the credits of every episode, with nobody marking them
Built with
Node.js, TypeScript, SQLite, ffmpeg, Preact, Vite and hls.js

Skip intro

It finds the intro by listening.

Nothing in a video file says where its intro starts. So Reelhouse listens. It decodes each episode's audio to mono at 8 kHz and takes a 1024-point FFT, a snapshot of how loud each pitch is, every 256 samples. That is 31.25 frames a second. Each frame becomes a 32-bit hash of how the energy moves across 33 bands between 300 and 3400 Hz. Then each episode is matched against its siblings in the season.

  • The season votesThe stretch most of the episodes share is the intro. If only one sibling agrees, it is flagged.
  • Snapped to a cutThe edges snap to the nearest shot cut.
  • Credits tooFor credits it looks for shared closing audio, then a run of dark frames, then falls back to 30 seconds before the end.
audio hashes a second
31.25
hash per frame
32-bit
frequency bands
33

Inspired by Netflix

Inspired by Netflix, played from home.

Where a show comes from

  1. Your screen
  2. Your internet provider
  3. A Netflix server in its network or at an internet exchange

Reelhouse

  1. Your screen
  2. Home Wi-Fi
  3. The PC in the house
Netflix's path, from its own pages, beside Reelhouse's at home. Not affiliated with Netflix. Netflix is a trademark of Netflix, Inc.

Reelhouse was inspired by Netflix. It has the same kind of rows, a Skip intro button and a card for the next episode. What I changed is where the video comes from.

Netflix streams from its own servers, inside internet providers' networks or at internet exchanges. At home, Reelhouse streams from a PC in the same house. The app times every start. Over two weeks on home Wi-Fi, half of all plays showed the first frame within about 150 ms of the tap. Away from home, half started within about 330 ms.

median start on home Wi-Fi
about 150 milliseconds
median start away from home
about 330 milliseconds

Encoding

A third smaller on one real episode.

The real packaging step's output, before and after, for an invented 60-second test clip. The 1080p file goes from 5.59 MB to 4.31 MB.

I lowered the 1080p bitrate cap and changed the quality setting. On one real episode the 1080p file came out about a third smaller, and after tuning, encoding ran more than twice as fast.

I tuned the 1080p stream. The bitrate cap went from 8 to 5 Mbps and the quality setting from 19 to 21. On one 4K source episode, the file went from 1.48 GB to 0.94 GB, about 36% smaller. Rerun for this page on a 60-second test clip, the real packaging step took the 1080p file from 5.59 MB to 4.31 MB. A faster encoder preset kept the same size, and encoding went from 1.0× to 2.3× real time.

One decode now feeds both the 1080p and 720p versions, and the first three segments are 2 seconds long so playback starts fast.

smaller at 1080p, one real episode
36%
1080p, a 60-second test clip
from 5.59 to 4.31 megabytes
real-time encoding speed
2.3 times real time

Playback

Home wins if it answers in 300 ms.

The real Reelhouse player's stats panel during a demo run, its path line reading Home Wi-Fi at 35 milliseconds, chosen by the app's own race between home and remote.

At home, video should come straight off the home network. Away, it has to come the long way.

The player pings both paths at once. If the home path answers within 300 ms, it wins. Otherwise the remote path plays. It checks again during an episode, so walking out of the house does not stop the show.

The demo library

The films belong to their owners.

The film shows Reelhouse with a demo library of real, well-known films and shows. You see their posters and a few seconds of each from its official trailer. They belong to their owners and are only there to show how the app works.

The subtitles shot uses Tears of Steel by the Blender Foundation, under CC BY 3.0.

The Reelhouse mark, a gold house whose body is a film reel, on a dark tileReelhouse

Your films, like a premiere.

Next project

Summa

Built on my own

A private money app that reads statements and money emails, and builds a ledger where every number traces back to its source.

About 703test cases