Upload, Stream & OBS Setup.
Upload Video or HTML Artifact
Max 5 MB / MP4 · WebM · HTMLZero tracking pixels injected on publish.
Live Broadcast Control
00:00:00Setting Up OBS Studio
Recommended Encoder Profiletinyfiles.tv accepts standard RTMP/RTMPS feeds without transcoding overhead when your stream matches our baseline container profile. Open OBS Studio → Settings → Stream, select Custom..., and paste your Ingest Server and Stream Key above. Then match the output parameters below under Settings → Output (Advanced):
| OBS Setting | Recommended Value | Notes |
|---|---|---|
| Video Encoder | x264 or NVENC H.264 |
Baseline / High Profile; avoid HEVC/AV1 for direct browser playback. |
| Rate Control | CBR (Constant Bitrate) |
Required for stable HLS segment chunking on low-overhead edges. |
| Video Bitrate | 2,500 – 4,500 Kbps |
3,500 Kbps is ideal for crisp 1080p30 code editors and 2D pixel art. |
| Keyframe Interval | 2 seconds |
Mandatory for clean 2-second HLS segment alignment. |
| Base / Output Resolution | 1920x1080 or 1280x720 |
30 fps or 60 fps. Downscale with Lanczos if scaling from 1440p+. |
| Audio Track | AAC · 160 Kbps · 48 kHz |
Stereo. Keeps WebAudio synthesis and voice commentary clean. |
Daily Views & Bandwidth Trend (Last 14 Days)
Privacy-Preserving Edge CountersTop Performing Works
| Title | Format | Views | Avg Duration |
|---|---|---|---|
| Building a 32KB WebAudio FM Synthesizer from Scratch | MP4 · 1080p | 14,208 | 6:42 (74%) |
| Daily Game Day 1 — Postmortem & Architecture | HTML5 + Audio | 11,640 | 5:18 (69%) |
| Why Single-File HTML Outlives Modern JS Frameworks | MP4 · 1080p | 9,815 | 4:55 (65%) |
| Late Night Techno & Procedural Canvas Jam #09 | VOD · Stream | 6,490 | 18:10 (52%) |
Audience Retention Curve
Payout & Settlement Ledger
| Date | Source | Reference | Status | Amount |
|---|---|---|---|---|
| 2026-11-15 | Direct Supporter Tip | TX-8841-CC0 | Cleared | $25.00 |
| 2026-11-12 | Marketplace — SNES Cartridge Lot | ORD-1094 | Cleared | $115.00 |
| 2026-11-01 | Monthly Patronage Disbursement | PAY-2026-11 | Paid Out | $612.00 |
| 2026-10-01 | Monthly Patronage Disbursement | PAY-2026-10 | Paid Out | $588.00 |
Signed Community Feed & Preset Reactions
PG-13 · ECDSA Verified · No Free-Text SpamTrim, Chapters & Loudness Normalization
Non-Destructive Edge PipelineCreator Studio Backend — Proposed Architecture
Right now this page is a console mock — upload is a dropzone, Go Live is a test toggle, charts are canvas with canned data, earnings is a ledger table. This is the map to make it real: same tabs, same panels, but uploads go to object storage, encoding runs in a worker, live goes through RTMP → HLS, and analytics / earnings come from real events.
01 / Files to create
api/creator/create_upload.php POST /api/creator/create_upload
api/creator/confirm_upload.php POST /api/creator/confirm_upload
api/creator/list_works.php GET /api/creator/list_works
api/creator/get_work.php GET /api/creator/get_work?id={{work_id}}
api/creator/update_work.php POST /api/creator/update_work
api/creator/start_stream.php POST /api/creator/start_stream
api/creator/end_stream.php POST /api/creator/end_stream
api/creator/regenerate_key.php POST /api/creator/regenerate_key
api/creator/get_analytics.php GET /api/creator/get_analytics?range=28d
api/creator/get_retention.php GET /api/creator/get_retention?work_id={{work_id}}
api/creator/get_earnings.php GET /api/creator/get_earnings
api/creator/list_comments.php GET /api/creator/list_comments?work_id={{work_id}}
api/creator/post_comment.php POST /api/creator/post_comment
api/creator/create_edit_job.php POST /api/creator/create_edit_job
api/creator/get_edit_job.php GET /api/creator/get_edit_job?id={{job_id}}
worker/encode_worker.php -- CLI: picks up queued uploads, runs ffmpeg
worker/analytics_rollup.php -- CLI: nightly rollup, views -> daily aggregates
sql/creator_tables.sql
Same tinyfiles pattern: /api/bootstrap.php, json_in() / json_out(), member session, prepared PDO. Uploads never go through PHP as a file blob — PHP issues a signed upload URL, browser uploads direct to storage.
02 / Database tables
-- sql/creator_tables.sql
creator_channels
member VARCHAR(80) PRIMARY KEY
handle VARCHAR(40) NOT NULL UNIQUE -- e.g. @retrogames10000
stream_key_hash CHAR(64) NOT NULL -- hash only, never plaintext key
rtmp_url VARCHAR(255) NOT NULL DEFAULT 'rtmps://ingest.tinyfiles.tv:1935/live'
created_at DATETIME
creator_works
id CHAR(36) PRIMARY KEY
member VARCHAR(80) NOT NULL
title VARCHAR(200) NOT NULL
license ENUM('cc0','cc-by','standard') NOT NULL DEFAULT 'cc0'
rating VARCHAR(10) NOT NULL DEFAULT 'PG-13'
status ENUM('uploading','queued','encoding','ready','failed') NOT NULL DEFAULT 'uploading'
original_key VARCHAR(255) NULL -- object storage key, original file
playback_key VARCHAR(255) NULL -- object storage key, encoded MP4 / HTML
mime VARCHAR(80) NULL -- video/mp4, video/webm, text/html, audio/wav
size_bytes BIGINT NOT NULL DEFAULT 0 -- hard cap 5 MB (5,242,880) in create_upload
duration_sec INT NULL
created_at DATETIME
published_at DATETIME NULL
INDEX (member, created_at)
creator_streams
id CHAR(36) PRIMARY KEY
member VARCHAR(80) NOT NULL
title VARCHAR(200) NOT NULL
status ENUM('live','ended') NOT NULL DEFAULT 'live'
started_at DATETIME
ended_at DATETIME NULL
peak_viewers INT NOT NULL DEFAULT 0
creator_analytics_daily
member VARCHAR(80) NOT NULL
day DATE NOT NULL
views INT NOT NULL DEFAULT 0
bandwidth_bytes BIGINT NOT NULL DEFAULT 0
PRIMARY KEY (member, day)
creator_events
id BIGINT AUTO_INCREMENT PRIMARY KEY
work_id CHAR(36) NULL
member VARCHAR(80) NOT NULL
event_type ENUM('view','play_25','play_50','play_75','play_100','preset_reaction') NOT NULL
preset_id SMALLINT NULL -- 1..64, for preset-only chat / reactions
second INT NULL -- for retention: second in video where event fired
created_at DATETIME
INDEX (work_id, event_type, created_at)
creator_earnings
id CHAR(36) PRIMARY KEY
member VARCHAR(80) NOT NULL
period VARCHAR(7) NOT NULL -- YYYY-MM
gross_cents INT NOT NULL DEFAULT 0
fee_cents INT NOT NULL DEFAULT 0
net_cents INT NOT NULL DEFAULT 0
status ENUM('pending','paid') NOT NULL DEFAULT 'pending'
paid_at DATETIME NULL
INDEX (member, period)
creator_edit_jobs
id CHAR(36) PRIMARY KEY
work_id CHAR(36) NOT NULL
member VARCHAR(80) NOT NULL
trim_start_sec INT NOT NULL DEFAULT 0
trim_end_sec INT NULL
chapters TEXT NULL -- JSON: [{ "at": 0, "label": "..." }]
loudness_target VARCHAR(10) NOT NULL DEFAULT '-14 LUFS'
status ENUM('queued','running','done','failed') NOT NULL DEFAULT 'queued'
output_key VARCHAR(255) NULL
created_at DATETIME
03 / API endpoints & request flow — upload / publish
POST /api/creator/create_upload
{ "title": "WebAudio Bassline Synth Breakdown #14", "license": "cc0", "mime": "video/mp4", "size_bytes": 4200000 }
- server: check size <= 5 MB, mime in [video/mp4, video/webm, text/html, audio/wav, audio/mp3]
- server: insert creator_works status='uploading', return signed upload URL
-> { "ok": true, "work_id": "{{uuid}}", "upload_url": "{{signed_url}}", "expires_in": 600 }
-- browser uploads file DIRECT to upload_url, never through PHP --
POST /api/creator/confirm_upload
{ "work_id": "{{uuid}}" }
- server: verify file exists in storage, set status='queued', enqueue encode_worker
-> { "ok": true, "status": "queued" }
GET /api/creator/list_works
-> { "ok": true, "works": [ { "id": "{{uuid}}", "title": "...", "status": "ready", "duration_sec": 420 } ] }
POST /api/creator/update_work
{ "work_id": "{{uuid}}", "title": "...", "license": "cc-by" }
- owner only, member must match work.member
04 / Encoding worker — FFmpeg
// worker/encode_worker.php (CLI, cron / queue)
// 1. SELECT oldest creator_works WHERE status='queued' LIMIT 1
// 2. Download original_key to tmp
// 3. ffmpeg -i input -c:v libx264 -preset veryfast -crf 23 -c:a aac -b:a 128k output.mp4
// - HTML artifacts: no transcode, just sanitize + store as playback_key
// - Audio: normalize to loudness_target if edit job says so
// 4. Upload playback_key, set duration_sec, status='ready', published_at=NOW()
// 5. On failure: status='failed', keep original, log error, do NOT delete
// Edit jobs (Trim / Chapters / Loudness panel):
POST /api/creator/create_edit_job
{ "work_id": "{{uuid}}", "trim_start_sec": 12, "trim_end_sec": 300,
"chapters": [ { "at": 0, "label": "Intro" } ], "loudness_target": "-14 LUFS" }
- worker runs: ffmpeg -ss trim_start -to trim_end -i input -af loudnorm=I=-14:TP=-1:LRA=11 output.mp4
- chapters stored as JSON, not burned into video
05 / Live — RTMP / HLS / stream key
POST /api/creator/start_stream
{ "title": "Late Night Vanilla JS & WebAudio Coding Session" }
-> { "ok": true, "stream_id": "{{uuid}}", "rtmp_url": "rtmps://ingest.tinyfiles.tv:1935/live",
"stream_key": "{{key — shown ONCE, never returned again}}" }
-- OBS: Settings → Stream → Custom... → paste rtmp_url + stream_key
-- OBS Output (from page): x264 / NVENC H.264, CBR, 2500–4500 Kbps, keyframe 2s
-- Ingest server (nginx-rtmp / SRS / Owncast-style):
-- verifies stream_key_hash, accepts RTMP, segments to HLS (2s segments, 6s latency target)
-- writes HLS to /hls/{member}/index.m3u8, updates creator_streams peak_viewers
POST /api/creator/end_stream
{ "stream_id": "{{uuid}}" } -> status='ended', ended_at=NOW()
POST /api/creator/regenerate_key
{} -> new stream_key_hash, old key stops working immediately.
-- Never log stream keys. Never return key on GET. Rotate on leak.
06 / Analytics, retention, earnings, community
GET /api/creator/get_analytics?range=28d
-> { "ok": true, "daily": [ { "day": "2026-11-04", "views": 120, "bandwidth_bytes": 45000000 } ],
"top_works": [ { "work_id": "{{uuid}}", "title": "...", "views": 1200 } ] }
-- Source: creator_analytics_daily (nightly rollup from creator_events).
-- Do NOT COUNT live chart data from raw events on every page load.
GET /api/creator/get_retention?work_id={{uuid}}
-> { "ok": true, "curve": [100, 91, 84, 80, 77, 75, 72, 69, 68.5, 66, 63, 59, 54.2],
"hook": "84.0%", "mid": "68.5%", "end": "54.2%" }
-- curve = % still watching at each 1/13 slice, from play_25/50/75/100 events.
-- Same shape as the canvas chart on the page, just real numbers.
GET /api/creator/get_earnings
-> { "ok": true, "ledger": [ { "period": "2026-11", "gross_cents": 12000, "fee_cents": 1200, "net_cents": 10800, "status": "pending" } ] }
GET /api/creator/list_comments?work_id={{uuid}}
POST /api/creator/post_comment
{ "work_id": "{{uuid}}", "preset_id": 12 }
- preset_id must be 1..64, no free text. Server rejects any text field.
- Signed: member is recorded, but display is handle only.
07 / Front-end integration contract
// When API exists:
// - Queue for Encoding button -> POST create_upload -> direct upload -> POST confirm_upload
// - Go Live / Start Live Session -> POST start_stream -> show RTMP + key once
// - Analytics tab -> GET get_analytics?range=28d -> draw same canvas chart
// - Retention tab -> GET get_retention?work_id -> draw same retention curve
// - Earnings tab -> GET get_earnings -> render same ledger table
// - Community tab -> GET list_comments -> POST post_comment { preset_id }
// - Editing Tools -> POST create_edit_job -> poll GET get_edit_job until done
// Recommended states: uploading, queued, encoding, ready, failed, live, ended, server unavailable.
// Keep the current canned charts as fallback if API is down — label them "Demo data".
// Never show a real stream key in HTML source, logs, or screenshots.
Build order: 1) tables + channels + stream_key_hash, 2) create_upload + confirm + encode_worker, 3) list_works + analytics rollup, 4) start/end_stream + RTMP ingest, 5) retention + earnings + preset community + edit jobs.