Back to Coding Projects
Local streaming, your way

A local, Netflix-style streaming library built with Streamlit.

Drop video files in a folder, browse them as a poster grid, and play them in the browser. You can use this any way you like, but launching this app and running it as a local hosted web app allows you to stream video to any device in combination with a VPN.

You can use it solely on your PC alone, but with a VPN like Tailscale to create allowed devices to connect to, you can connect remotely on any device with a browser.

Launch this app on a home computer, use a VPN like Tailscale to connect to your home network from a remote device, you can then use the host's VPN address to open the app on your remote device's browser, allowing you to create your own private streaming platform with your home computer as your own private server.

The URL to connect on your phone or other device should look like:
100.xxx.xxx.xx:8501

This is intended for private use only. Copyright law still applies.

Scroll

SCREEN 01

Now Showing

The main browse view. This is a mockup reflex recreation of the app. A poster grid of everything in the library, with a sidebar for search and genre filters, plus quick access to add or manage movies.

Streaming
Welcome backV
🎬 MovieFlex

Browse the collection

Search by title
Genre ▾
+ Add Movie
⚙ Manage Library

All Movies

Alien vs Predator poster
HD▶

Alien vs Predator

2004 · Action

Arrival poster
HD▶

Arrival

2016 · Sci-Fi

Blade Runner 2049 poster
HD▶

Blade Runner 2049

2017 · Sci-Fi

Dune: Part Two poster
HD▶

Dune: Part Two

2024 · Sci-Fi

Heat poster
HD▶

Heat

1995 · Crime

Interstellar poster
HD▶

Interstellar

2014 · Sci-Fi

Mad Max: Fury Road poster
HD▶

Mad Max: Fury Road

2015 · Action

Prisoners poster
HD▶

Prisoners

2013 · Thriller

Sicario poster
HD▶

Sicario

2015 · Thriller

The Batman poster
HD▶

The Batman

2022 · Crime

SCREEN 02

Add a Movie

Adding to the library. Movies can be pulled in by scanning the local movies folder, importing a whole directory, or entering a single film by hand.

Streaming
Welcome backV
Add a Movie

Scan Movies Folder

Check the local 'movies' folder for new or removed videos, and update the library.

Scan Movies Folder

Add a Directory

e.g. D:\\Videos\\Trailers
Include subfolders
Add Directory

Add a Single Movie

Movie Details

e.g. The Matrix
C:\\Videos\\movie.mp4
C:\\Pictures\\poster.jpg
Genre ▾

Preview

Title: —

Path: —

Poster: —

Genre: Action

Submit

SCREEN 03

Manage Library

Library maintenance. Every entry listed with genre and file path, a search box, and per-row checkboxes for editing or bulk-removing entries.

Streaming
Welcome backV
Manage Library
Search by title
Genre ▾

4 of 10 movies shown.

Dune: Part Two

Science Fiction · D:\\Videos\\Dune: Part Two.mkv

✏ Edit

Blade Runner 2049

Science Fiction · D:\\Videos\\Blade Runner 2049.mkv

✏ Edit

The Batman

Action · D:\\Videos\\The Batman.mkv

✏ Edit

Interstellar

Science Fiction · D:\\Videos\\Interstellar.mkv

✏ Edit

SCREEN 04

Video Player

The playback view. MovieFlex streams video straight from disk with HTTP range requests, so seeking works without loading the whole file into memory.

Streaming
Welcome backV
🎥 Dune: Part Two

Genre: Science Fiction

Dune: Part Two — Paul Atreides standing before the Fremen
▶

Playback preview · the real app streams the full file from disk.

← Back to Browse

SCREEN 05

About MovieFlex

What the project is, what it's built with, and where the code lives.

Let's get technical. How does this work?

How it works

MovieFlex is a local movie library and streaming app built with Streamlit. It reads a JSON catalog, displays the collection as a poster grid, and streams video files directly from disk with full seek support. PyInstaller packages it as a standalone Windows release.

Navigation runs on Streamlit's session state. st.session_state is per-browser-session memory that survives reruns, so it remembers which view is open and which movie is playing. In MovieFlex, a single active_video value decides which view function runs. Clicking a button updates that value and reruns the script, switching to the Add, Manage, Edit, or player view. Each view has its own logic, but they all share the same session.

Project map

MovieFlexApp.pyStreamlit UI, catalog, and range-streaming player
launcher.pyStarts Streamlit on port 8501
DataBase.jsonMovie catalog and metadata
theme.cssCustom app styling
MovieFlex.specPyInstaller packaging config

The data layer

The catalog is DataBase.json. Each entry stores a file path, title, poster, and genre, read and written as a Python dictionary.

Posters can also be discovered from sidecar images next to the video. Manual entries are straightforward; the directory scanner uses Python's os module to compare normalized file paths against the database and add missing files. It also removes scan-sourced entries whose files have disappeared while leaving manual entries alone.


What I learned

It's also worth noting that Streamlit's limitations caused several roadblocks. The biggest was video playback. The built-in player struggled with large local files, so huge movies were out of the question. Streamlit runs on port 8501, so I added a small HTTP server class on port 8502 that streams video directly from disk instead.

I learned a lot from this one. It was my first project using this kind of data-driven functionality. I'm not that big into movies, but I guess I have my own private Netflix now.


Built with

PYTHONSTREAMLITPYINSTALLERJSONHTTP RANGE STREAMING

Playback pipeline

CatalogDataBase.json
ViewsStreamlit session state
PlayerHTTP range server :8502
BuildPyInstaller executable

(GitHub link placeholder — will point to the repo once git-hub solves my ticket.)

GitHub repository

Part of the coding collection.

Back to Coding Projects