Francis Landford.
Development

TubeStream: A Self-Hosted Video Sharing Platform With Live Streaming and Creator Payouts

TubeStream lets you run a video sharing community under your own brand: channels, uploads, Shorts, live streaming, moderation and creator earnings. A plain tour of how each part works, what it needs, and what it does not do.

Francis Landford

By

· 5 min read

Facebook X LinkedIn WhatsApp
TubeStream: A Self-Hosted Video Sharing Platform With Live Streaming and Creator Payouts

Some communities want a video site of their own: a school network, a church group, a media startup, a niche hobby community, a company with many presenters. Hosting those videos on a giant platform means giving up control of the rules, the audience and the income. TubeStream is the software I built for people who want to run their own video sharing site instead. This post is a tour of how it works and what it does not do.

To be clear from the start, TubeStream is an independent product. It is not connected to any other video service, and you must only use videos, pictures and trademarks that you own or are licensed to use.

Channels and creators

Anyone with an account can create a channel with a handle such as @yourname. A person can own several channels, up to ten by default, and switch between them. A channel has a picture, a banner, a description and up to five links. The owner can add team members as managers, editors or moderators, each with different powers.

Viewers can subscribe to a channel and choose a notification setting: all, personalized or none.

Uploads and how videos are processed

When a creator uploads a file, the server first checks that it really is a video, whatever its name says. Then a background worker reads its details and converts it into an adaptive stream in several sizes, from 360p up to 1080p, never enlarging beyond the original. Three thumbnail frames are offered, and creators can upload their own. Vertical or square videos up to three minutes are treated as Shorts and appear in a swipeable vertical feed. Creators can add subtitles as SRT or VTT files, and videos can be public, unlisted, private, scheduled or members only.

Watching

The player supports quality choice, speed, subtitles, picture-in-picture, chapters and keyboard shortcuts. It remembers where each viewer stopped. Playback uses short-lived signed permissions rather than public file links, and a video that is made private stops serving at the next request. A view is counted only after a viewer has really watched for thirty seconds, which keeps numbers more honest.

Live streaming

Creators can go live from OBS or any encoder that supports RTMP. They get a stream address and a key, and the key is shown only once; the server stores only a scrambled version of it. Live video is packaged into the same kind of adaptive stream, with a delay of roughly six to ten seconds. Viewers can rewind while the stream is live, chat in real time, and watch a replay afterwards, with the chat replayed alongside. Creators can also schedule a premiere, which shows a countdown and a waiting-room chat before the video starts for everyone together.

Community and moderation

Viewers can comment and reply, like and share. Channels can post text, images and polls. A report button feeds a moderation queue, and serious violations count as strikes that expire after ninety days. Creators can appeal a decision once, and a different moderator reviews it. Channel teams can hold comments for review, block words and hide a user. Every staff action is written to an append-only audit log.

Earning money

Monetization is optional. A channel can apply to a partner program once it meets thresholds you set, such as a number of subscribers and watch hours. Approved channels can offer memberships with up to five monthly tiers, and viewers can send paid highlighted messages in live chat or comments, from one to five hundred dollars. Payments go through Stripe, and the notifications from Stripe are checked and handled so that a payment is recorded only once.

The platform keeps a percentage you choose, with thirty percent as the default, and creators' earnings become withdrawable after a holding period, seven days by default. Payouts are sent by you, outside the app, and then marked as paid with a reference. Two honest limits: the advertising feature is a placeholder that shows a house advert and sends nothing to an ad network, and I have not built automatic bank transfers.

Running it

There is a full admin: users, channels, videos, catalog and home-page shelves, a support desk, announcements, settings and analytics. A web installer sets up the site. A readiness command runs 34 checks before you go live, backups are made and verified, and media can be delivered through your server, nginx or a content delivery network. There is also a mobile interface that supports a companion app, and a plugin system.

What it needs

1. PHP 8.4 or newer, MySQL 8 or MariaDB 10.6 or newer, and HTTPS.
2. FFmpeg, and background workers that keep running, which in practice means a VPS.
3. For live streaming, a media server such as MediaMTX, which the included Docker setup contains.
4. Enough disk space and bandwidth. As a rough start, a small site fits a server with four processor cores, 8 GB of memory and 200 GB of disk, and video bandwidth grows with your audience.

Moderating a video site is real work, and you are responsible for what your users upload. Please plan for that before you open sign-ups.

Licences

A single licence covers one live site and an extended licence up to five, each with six months of updates and email support. The details, screenshots and licences are on the TubeStream page in my marketplace. Online payment there is not open yet, so you contact me and I arrange it personally.

Discussion (0)

Sign in or create a free account to join the conversation.

No comments yet. Start the conversation.

Enjoyed this?

Get new articles and tutorials by email

No spam. Unsubscribe any time. Privacy

Francis Landford

About the author

Francis Landford

Software Engineer | Creative Problem Solver | Innovative Software Solutions & Modern Applications

More about Francis Landford →

More stories