Spaces:
Sleeping

VR-MEDIA / README.md
Zero124's picture
VR Media Server 2.0 β€” latest build (custom Blomp thumbnail auto-detection + full pipeline)
5c0175e
|
Raw History Blame Contribute Delete
28 kB
metadata
title: VR Media Server 2.0
emoji: πŸ₯½
colorFrom: blue
colorTo: pink
sdk: docker
app_port: 7860
pinned: false
license: mit

VR Media Server 2.0

Offcloud + TeraBox + Blomp β†’ DEOVR β†’ Quest 3 Passthrough

A professional GUI-based VR Media Server that runs on Hugging Face Docker Spaces. It connects directly to your Offcloud account and/or TeraBox (cookie session or official Open Platform OAuth) and/or Blomp (OpenStack Swift), runs an 11-layer metadata detection pipeline on every video, and serves a DEOVR-compatible JSON feed that your Quest 3 can consume for passthrough playback.

Metadata-first streaming gateway. Videos stay on Offcloud / TeraBox / Blomp. The server never downloads or permanently stores video binaries β€” it only fetches metadata, samples frames transiently, and serves stream URLs.


How Hugging Face Docker Spaces Work

HF Spaces with the docker SDK are just a Docker image + a git repo. The mechanics:

  1. Required files (commit these to the Space repo):

    • README.md β€” must have the YAML frontmatter at the top (the sdk: docker line tells HF to build your Dockerfile)
    • Dockerfile β€” HF builds this image and runs it
    • All your app source code
  2. Port binding: HF expects the app to listen on port 7860 by default. You can override via app_port in the README frontmatter, but 7860 is the convention. The Dockerfile in this repo sets ENV PORT=7860 and EXPOSE 7860.

  3. Persistent storage: HF Spaces are ephemeral β€” the filesystem is wiped on every restart. To persist data (your SQLite DB, scan history, corrections), enable Persistent Storage in the Space settings and mount it at /data. This repo's Dockerfile writes the DB to /data/vrms.db.

  4. Secrets: API keys should be set as HF Space Secrets, not in code or env files. Go to Space β†’ Settings β†’ Repository secrets and add OFFCLOUD_API_KEY (and/or TERABOX_COOKIE / TeraBox OAuth credentials, and/or BLOMP_EMAIL + BLOMP_PASSWORD). The container will receive them as env vars.

  5. Resource limits (free tier):

    • 16 GB RAM
    • 2 vCPU
    • 50 GB persistent storage (if enabled)
    • Container restarts after 48h of inactivity on free tier
  6. Build & deploy: Every git push to the Space repo triggers a rebuild. Build time ~3-5 minutes. Logs are visible in the Space β†’ Logs tab.

  7. Public URL: Your space is accessible at https://<your-username>-<space-name>.hf.space. The DEOVR feed endpoint is at /api/feeds/deovr.


Quick Deploy (5 minutes)

Option A: One-click from this repo

  1. Create a new Hugging Face Space at huggingface.co/new-space

    • Owner: your account
    • Space name: vr-media-server
    • License: MIT
    • SDK: Docker
    • Hardware: CPU basic (free)
    • Persistent storage: optional but recommended (small tier is fine)
  2. Clone this repo locally and push to your Space:

    git clone <this-repo>
    cd vr-media-server
    git remote add space https://huggingface.co/spaces/<your-username>/vr-media-server
    git push -u space main
    
  3. Wait ~5 minutes for the build to finish (check Space β†’ Logs).

  4. (Optional) Connect your sources:

    • Offcloud β€” Space β†’ Settings β†’ Repository secrets β†’ New secret: OFFCLOUD_API_KEY (from offcloud.com/account)
    • TeraBox β€” either add TERABOX_COOKIE as a secret, or open the app's Settings β†’ TeraBox Connection and connect with a cookie or OAuth.
    • Blomp β€” add BLOMP_EMAIL + BLOMP_PASSWORD as secrets, or open Settings β†’ Blomp Connection and sign in with your Blomp account.
  5. Open the Space URL. You'll see the VR Dark Pro dashboard. Click Scan Library in the top bar (or Scan TeraBox / Scan Blomp in Settings) to populate the combined library.

Option B: Without a real cloud source (mock mode)

If you just want to try the UI, skip step 4 above. When neither Offcloud, TeraBox nor Blomp is configured, the server falls back to a realistic mock library of 12 sample VR videos (VR180, VR360, Fisheye, Passthrough, etc.). All 11 detection layers run on the mock data β€” the UI is fully demoable. As soon as one real source is connected, mock data is disabled so it never mixes with your library.


Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚  Offcloud   β”‚ β†’  β”‚  VR Media Server β”‚ β†’  β”‚ DEOVR Feed  β”‚ β†’  β”‚ DEOVR  β”‚ β†’  β”‚ Quest 3  β”‚
β”‚  (CDN/API)  β”‚    β”‚  (this app)      β”‚    β”‚ /api/feeds/ β”‚    β”‚ Player β”‚    β”‚ Passthru β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”‚  TeraBox    β”‚ β†’            β”‚
β”‚ (cookie /   β”‚              β”œβ”€ Metadata Engine (11 layers)
β”‚  OAuth API) β”‚              β”œβ”€ AI Analysis Platform (v3.0 stub)
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€              β”œβ”€ Confidence Scoring (weighted)
β”‚   Blomp     β”‚ β†’            └─ SQLite @ /data/vrms.db
β”‚  (Swift v1) β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

The server acts as Content Manager + Metadata Engine + DEOVR Feed Generator. It is explicitly NOT a storage server β€” videos remain on Offcloud / TeraBox / Blomp and are streamed through this server's proxy via refreshed signed URLs.

All three sources are merged into one library, tagged with a source badge, and can be filtered by source in the Library view. The DEOVR feed groups scenes into Offcloud Library, TeraBox Library, and Blomp Library (<root>) - the Blomp tab shows the folder(s) it was built from. With no root configured the scanner starts at /deovr and auto-detects every other folder that contains videos.


TeraBox Integration

TeraBox can be used alongside Offcloud as a second content source. There are two connection modes:

1. Cookie / session mode (recommended, full drive)

  1. Log in to terabox.com in a desktop browser.
  2. Open DevTools β†’ Application β†’ Cookies β†’ https://www.terabox.com.
  3. Copy the ndus cookie value (or the entire cookie header).
  4. In this app: Settings β†’ TeraBox Connection β†’ mode "Cookie / session".
  5. Paste the cookie, set the Library Root (default /), then Save TeraBox β†’ Test connection.

Cookie mode walks your entire personal drive recursively and can stream any video file. The ndus cookie expires periodically β€” paste a fresh one if scanning or playback starts failing.

2. Official Open Platform OAuth (app folder only)

The official API requires a business/partner app from terabox.com/integrations:

  1. Create an app and note its client_id, client_secret, and private_secret.
  2. Enter them in Settings β†’ TeraBox Connection β†’ mode "Open Platform OAuth" and save.
  3. Authenticate with either:
    • QR / device-code flow β€” click Get QR code, scan it in the TeraBox mobile app, and approve.
    • Authorization code flow β€” complete the OAuth login, paste the returned code, and click Exchange.
  4. Access tokens last 2 days, refresh tokens 30 days; the server refreshes and persists them automatically.

Important: the official Open Platform API is sandboxed to the app's assigned folder β€” /From: Other Applications/<app>/. It cannot see the rest of your personal drive. Set the Library Root to that folder. Use cookie mode for full-drive access.

Streaming details

  • TeraBox dlinks are temporary; the server refreshes them before every playback, ffprobe probe, and thumbnail.
  • The /api/stream/... proxy forwards the required browser User-Agent, ndus cookie, and terabox.com Referer, and preserves them across redirects.
  • Detection and thumbnails use the internal authenticated proxy (?token=...) because ffprobe/ffmpeg cannot send cookies.
  • OAuth dlinks get &access_tokens=<token> appended as required by the official API.

Blomp Integration

Blomp can be used alongside Offcloud and TeraBox as a third content source. Blomp exposes an OpenStack Swift object store (it is not S3-compatible), so this integration talks to Blomp's Keystone v2 auth endpoint and the Swift storage endpoint directly.

Setup

  1. Create a free account at blomp.com and upload your videos.
  2. In this app: Settings β†’ Blomp Connection.
  3. Enter your Blomp account email and password, then Save Blomp β†’ Test connection.
  4. Optionally set a Container and Library Root:
    • Container β€” Blomp containers are usually named after your account email. Leave blank to auto-detect the email-named container (or the only container on the account).
    • Library Root - leave blank to auto-detect: the scanner starts at /deovr and also finds every other folder that contains videos. Enter a path to scan only that folder, or use / for the whole container.
  5. Click Save Blomp. The account is indexed immediately and then checked every 60 seconds, so new videos appear and deleted videos disappear without any manual scan. Scan Blomp is still there for an on-demand pass.

You can also preconfigure it with the BLOMP_EMAIL, BLOMP_PASSWORD, BLOMP_CONTAINER, and BLOMP_ROOT environment variables / Space Secrets. The BLOMP_SYNC_ENABLED and BLOMP_SYNC_INTERVAL_SECONDS variables control the automatic sync.

How it works

  • Auth: POST https://authenticate.blomp.com/v2.0/tokens with tenantName: "storage" and your email/password. The returned token and object-store endpoint are cached in memory until shortly before expiry.
  • Listing: Swift container/object listings are paginated with limit + marker; the scanner walks the whole configured prefix and excludes .file-segments/ (Static Large Object chunks).
  • Objects: Each video is stored as source="blomp" with sourceId/sourcePath = <container>/<objectName>.
  • Auto-sync: saving the Blomp connection starts a full reconcile immediately; afterwards the server polls the container every 60 seconds (configurable with BLOMP_SYNC_INTERVAL_SECONDS). New objects are added and queued for detection automatically, and objects deleted from Blomp are hidden from the library/feed and purged after the shared grace period. Re-uploading a removed object restores its row.
  • Playback: Blomp object URLs are stable, but objects are private. The /api/stream/... proxy attaches X-Auth-Token (and re-attaches it across redirects), forwards HTTP Range requests for seeking, and streams the body without downloading it to disk.
  • Almost read-only: this app only lists and downloads from Blomp. The only writes are the small auto-fetched thumbnail images (see below) β€” uploaded with If-None-Match, so an existing file is never overwritten. Videos are never uploaded, overwritten or deleted.
  • Thumbnails / detection: both go through the internal authenticated proxy (?token=...) because ffprobe/ffmpeg cannot send Swift auth headers.

Blomp's upload path has historically had a per-object limit for plain Swift uploads; large files stored as Static Large Objects are served transparently by Swift, so they work here without special handling.

Custom thumbnails from your drive

Upload an image anywhere in your Blomp drive that is named like a video β€” e.g. Trip to Mars.mp4 pairs with trip_to_mars.JPG, Trip to Mars.mp4.png, or Trip to Mars - poster.webp β€” and within one sync cycle (60 s, or immediately with Scan Blomp) that exact image becomes the video's thumbnail everywhere: dashboard, library, VR gallery, DEOVR feed and PLAY'A library. The bytes you uploaded are served as-is. Replace the image and the thumbnail updates; delete it and the video falls back to the auto-extracted frame. See README-CUSTOM-THUMBNAILS.md for the full naming and priority rules.

Auto-fetched thumbnails from the web

For videos you have not given a thumbnail, the server searches the public internet for one using the video title and uploads the best match back to your Blomp drive β€” automatically, the moment the video is indexed:

  • Search: the title is cleaned of file/codec/VR junk (GTA Rampage 8K SBS.mp4 β†’ GTA Rampage) and searched keyless on DuckDuckGo, then Bing, then Openverse. Results are ranked against the title (token overlap, image size, format) and the first one that downloads and sniffs as a real image wins.
  • Folder: the title also picks the destination β€” a folder that already exists on the drive whose name appears in the title. GTA Rampage.mp4 goes to your gta folder, SLR Fun.mp4 to SLR. Folders are never created; when no folder name matches, the thumbnail lands next to the video.
  • Apply: the image is uploaded as <video name>.<ext>, so the name matcher above picks it up immediately β€” the uploader triggers an instant re-sync, so a new video shows its thumbnail within seconds.
  • Precedence: thumbnails you upload yourself always win; a video whose web thumbnail was fetched once is never fetched again (deleting it on the drive is respected).
  • Control: on by default β€” the Auto-fetch thumbnails switch in Settings β†’ Blomp, or BLOMP_AUTO_THUMB=false. Failures back off linearly (10 min per attempt) so a blocked search engine never becomes a retry storm.

The 11-Layer Metadata Detection Pipeline

Every video discovered on Offcloud, TeraBox or Blomp runs through these layers in order. The classifier combines all results with weighted confidence scoring per the spec.

# Layer Source Confidence What it detects
1 Container Metadata ffprobe 0.0–0.9 Title, author, codec, duration, creation date, projection tag, stereo tag
2 Spatial Metadata ffprobe tags 0.0–0.85 VR180 / VR360 / 180Γ—180 / 360Γ—180 / SBS / OU / Mono / Stereo
3 Stream-Level Detection ffprobe 0.0–0.95 Video/audio/subtitle/data stream counts, extra video tracks
4 Alpha Channel Detection ffprobe pix_fmt 0.0 / 0.95 RGBA, YUVA, alpha plane β€” Very High confidence
5 Mask Track Detection ffprobe + filename 0.0–0.9 mask.mp4 / alpha.mp4 / matte.mp4 / transparency.mp4 β€” High confidence
6 Filename Intelligence regex 0.5–0.9 VR180, SBS, OU, Fisheye, DualFisheye, AR/MR/Passthrough/Quest3, 4K–12K β€” Medium to High
7 Folder Intelligence regex 0.4–0.75 Passthrough/, MixedReality/, Fisheye/, SBS/, VR180/, VR360/ β€” Medium
8 Feed Metadata Detection historical corrections 0.0 / 1.0 Prior user overrides β€” Extremely High when present
9 Thumbnail Analysis ffmpeg frame sample 0.0–0.35 Foreground subject, background removal clues β€” Low (supporting only)
10 Frame Analysis ffmpeg + pixel stats 0.0–0.9 Green screen, segmentation mask, foreground map β€” High
11 Depth Detection ffmpeg + luminance gradient 0.0–0.85 Near/far objects, depth layers β€” Medium to High
12 Historical Learning Engine Correction table n/a User-issued corrections feed back into Layer 8 (v3.0 will add ML)

Weighted Confidence Scoring

Passthrough Score =  (alpha_channel Γ— 0.40)
                   + (mask_track      Γ— 0.25)
                   + (feed_metadata   Γ— 0.15)
                   + (frame_analysis  Γ— 0.10)
                   + (filename        Γ— 0.05)
                   + (folder          Γ— 0.05)

When ffprobe is unavailable (network error, mock mode, expired URL), alpha/mask are unknown β€” not confirmed absent. In that case, the classifier falls back to keyword evidence (filename OR folder) as sufficient signal for passthrough, optionally corroborated by frame analysis.

Fallback Behavior

  • No ffprobe installed β†’ Layers 1–5 return confidence 0, pipeline continues
  • Stream URL unreachable β†’ ffprobe returns null, frame sampling returns null, pipeline continues
  • No Offcloud key and no TeraBox/Blomp connection β†’ server uses mock library, all detection layers still run on mock URLs
  • No Offcloud key but TeraBox or Blomp connected β†’ Offcloud is marked "not configured"; mock data stays off
  • SQLite locked / read-only β†’ scan engine logs error, marks video as error status, continues with next video

DEOVR Feed

The feed is served at /api/feeds/deovr and returns the standard DEOVR scenes JSON, grouped by source:

{
  "authorized": "1",
  "scenes": [
    {
      "name": "Offcloud Library",
      "list": [
        {
          "id": 1,
          "title": "Beach_Sunset_AR_VR180_SBS_8K",
          "videoLength": 1242,
          "is3d": true,
          "screenType": "fisheye",
          "stereoMode": "sbs",
          "encodings": [{ "name": "h264", "videoSources": [{ "resolution": 4320, "url": "https://.../api/stream/..." }] }],
          "thumbnailUrl": "https://.../api/thumbnail/...",
          "source": "offcloud",
          "tags": ["VR180", "SBS", "8K", "Passthrough", "QuestReady"],
          "isPassthrough": true,
          "chromakey": { "enabled": "true" }
        }
      ]
    },
    {
      "name": "TeraBox Library",
      "list": []
    },
    {
      "name": "Blomp Library (/deovr)",
      "list": []
    }
  ]
}

Empty source groups are omitted. source on each scene is "offcloud", "terabox", or "blomp". The Blomp tab carries the folder(s) it was built from in the name (default /deovr, plus any other folder the auto-scan finds videos in); when the root is /, the name is just Blomp Library.

Adding the feed to DEOVR

  1. Open DEOVR on your Quest 3
  2. Go to Settings β†’ Developer β†’ Add local file source (or Local feed)
  3. Enter the URL: https://<your-space>.hf.space/api/feeds/deovr?token=<APP_PASSWORD>
  4. The feed appears in your DEOVR library β€” all connected source groups are listed
  5. Videos flagged as passthrough: true automatically trigger Quest passthrough mode β€” no manual configuration

Auto Passthrough Workflow

User Opens Video β†’ DEOVR Reads Feed β†’ Passthrough Metadata Found
  β†’ Quest Passthrough Enabled (no manual config)

API Reference

Method Endpoint Description
GET /api/stats Dashboard overview stats (counts, status, per-source distribution)
GET /api/offcloud/status Offcloud connection test (real / mock / disconnected)
POST /api/offcloud/scan Scan the Offcloud source β€” returns immediately with queued count
POST /api/offcloud/rescan Reset + re-analyze all Offcloud videos
POST /api/scan Scan all sources (or { "source": "offcloud" | "terabox" | "blomp" })
POST /api/rescan Reset + re-analyze all sources (or one source)
GET /api/terabox/status TeraBox connection test (?force=1 bypasses the 30s cache)
POST /api/terabox/scan Scan the TeraBox source
GET /api/terabox/debug Redacted TeraBox config + root listing diagnostics
POST /api/terabox/disconnect Remove the saved cookie / OAuth tokens
POST /api/terabox/auth/device Start the QR device-code flow (returns deviceCode + qrCodeUrl)
POST /api/terabox/auth/device/poll Poll a deviceCode; returns { pending: true } until approved
POST /api/terabox/auth/exchange Exchange an authorization code for tokens
GET /api/blomp/status Blomp auth + container resolution test (?force=1 bypasses the 30s cache)
POST /api/blomp/scan Scan the Blomp source
GET /api/blomp/debug Redacted Blomp config, containers, and object listing diagnostics
POST /api/blomp/disconnect Remove the saved Blomp password
GET /api/videos List videos with filters (?source=blomp&projection=vr180&q=...)
GET /api/videos/[id] Detailed video for the Inspector (full detection report)
PATCH /api/videos/[id] Apply manual correction (Layer 12) β€” body: { projection, stereo, passthrough, reason }
POST /api/videos/[id]/analyze Re-run the full 11-layer detection on a single video
GET /api/queue Processing queue with per-step progress
GET /api/feeds Feed Manager view (grouped feed + per-video validation)
GET /api/feeds/deovr The actual DEOVR JSON feed (requires ?token=APP_PASSWORD)
GET /api/search?q=... Natural-language search (VR180 SBS 8K, duration > 20 minutes)
GET /api/corrections All manual corrections (Layer 12 log)
GET /api/settings List settings (secrets masked)
POST /api/settings Upsert settings (Offcloud key, TeraBox credentials/mode/root, Blomp credentials/container/root, scan config)

All endpoints return JSON. API routes are protected by the app password β€” use the vrms_auth cookie from the UI or append ?token=APP_PASSWORD (DEOVR does this for the feed and stream URLs).


Search Query Examples

The search engine parses natural-language queries into structured filters:

Query Parsed Filters
VR180 SBS 8K projection=vr180, stereo=sbs, resolution=8K
Fisheye Videos lensType=fisheye
Passthrough Ready passthrough=true
Quest 3 Compatible questCompatible=true
Resolution > 6K minResolution=6K (ranks 7K, 8K, 12K)
Duration > 20 Minutes minDuration=1200 (seconds)
MR passthrough=true (mixed reality implies passthrough)
AR passthrough=true

Multi-word keywords like side-by-side, over-under, dual-fisheye, mixed-reality are auto-joined. Short tokens (ar, mr, pt, ou, tb) use word-boundary matching to avoid false positives on substrings like "start" β†’ "ar".


Tech Stack

  • Framework: Next.js 16 (App Router, Turbopack, standalone output)
  • Language: TypeScript 5 (strict)
  • Styling: Tailwind CSS 4 + shadcn/ui (VR Dark Pro custom theme)
  • Database: Prisma ORM + SQLite (single file at /data/vrms.db)
  • Media analysis: ffprobe + ffmpeg (system packages in Docker image)
  • State: Zustand (client view routing) + TanStack Query (server state)
  • Icons: lucide-react
  • Fonts: Geist Sans + Geist Mono

Local Development

# 1. Install deps
bun install

# 2. Set up the database
cp .env.example .env  # edit DATABASE_URL if needed
bun run db:push

# 3. Start the dev server (port 3000)
bun run dev

# 4. Open http://localhost:3000
# 5. Connect Offcloud, TeraBox and/or Blomp in Settings, then click "Scan Library"

To install ffmpeg locally (needed for Layers 1–5 and 9–11 to actually run):

  • macOS: brew install ffmpeg
  • Ubuntu/Debian: sudo apt install ffmpeg
  • Without ffmpeg, the server still runs β€” it just skips the ffprobe/frame layers and relies on filename + folder intelligence.

File Structure

.
β”œβ”€β”€ Dockerfile                  # HF Spaces Docker image (Node 20 + ffmpeg, port 7860)
β”œβ”€β”€ docker-entrypoint.sh        # Ensures /data DB, runs runtime schema migration, starts Next.js
β”œβ”€β”€ README.md                   # This file (HF frontmatter at top)
β”œβ”€β”€ .env.example                # Environment variable template
β”œβ”€β”€ prisma/
β”‚   └── schema.prisma           # Video (multi-source), Correction, Setting, QueueItem, ScanLog
β”œβ”€β”€ scripts/
β”‚   β”œβ”€β”€ ensure-schema.mjs       # Idempotent runtime migration (adds source columns to old DBs)
β”‚   └── test-classifier.mjs     # Manual classifier verification script
β”œβ”€β”€ src/
β”‚   β”œβ”€β”€ app/
β”‚   β”‚   β”œβ”€β”€ page.tsx            # SPA shell (single route, client-side view switching)
β”‚   β”‚   β”œβ”€β”€ layout.tsx          # Root layout (VR Dark Pro theme, fonts, metadata)
β”‚   β”‚   β”œβ”€β”€ globals.css         # VR Dark Pro theme (cyan/magenta, glassmorphism)
β”‚   β”‚   └── api/                # All API routes (see API Reference above)
β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”œβ”€β”€ layout/             # Sidebar + TopBar (per-source status pills)
β”‚   β”‚   β”œβ”€β”€ views/              # Dashboard, Library, Inspector, FeedManager, Search, Queue, Learning, Settings, TeraBox/Blomp settings, V3Roadmap
β”‚   β”‚   └── shared/             # StatCard, VR badges + SourceBadge (Offcloud/TeraBox/Blomp)
β”‚   └── lib/
β”‚       β”œβ”€β”€ types.ts            # All TypeScript types + detection constants
β”‚       β”œβ”€β”€ db.ts               # Prisma client singleton
β”‚       β”œβ”€β”€ offcloud.ts         # Offcloud API client (real + mock fallback)
β”‚       β”œβ”€β”€ terabox.ts          # TeraBox cookie/OAuth client, scan, dlink refresh, auth flows
β”‚       β”œβ”€β”€ blomp.ts            # Blomp Swift/Keystone client, scan, proxy headers, diagnostics
β”‚       β”œβ”€β”€ sources.ts          # Unified source helpers, proxy URLs, redirect-safe fetch
β”‚       β”œβ”€β”€ deovr.ts            # DEOVR feed generator (grouped by source) + validator
β”‚       β”œβ”€β”€ search.ts           # Natural-language search query parser
β”‚       β”œβ”€β”€ scan-engine.ts      # Orchestrates multi-source discovery + detection pipeline
β”‚       β”œβ”€β”€ store.ts            # Zustand SPA view routing
β”‚       └── detection/
β”‚           β”œβ”€β”€ ffprobe.ts      # Layers 1–5: container, spatial, stream, alpha, mask
β”‚           β”œβ”€β”€ filename.ts     # Layer 6: filename intelligence
β”‚           β”œβ”€β”€ folder.ts       # Layer 7: folder intelligence
β”‚           β”œβ”€β”€ frame.ts        # Layers 9–11: thumbnail, frame, depth (ffmpeg sampling)
β”‚           └── classifier.ts   # Master pipeline + weighted confidence scoring
└── ...

v3.0 Roadmap β€” AI Passthrough Generation

For videos that lack passthrough metadata, v3.0 will generate it on the fly:

Offcloud Stream β†’ Frame Sampling β†’ Segmentation β†’ Depth Estimation
  β†’ Mask Generation β†’ Metadata Creation β†’ Feed Publication

Why it's a stub in v2.0: Real on-device ML inference (segmentation + depth via @xenova/transformers) needs ~500MB of model weights and ideally a GPU. HF's free CPU tier would make each video take 5+ minutes β€” too slow for interactive use. v3.0 will ship as an opt-in GPU-enabled Docker variant (Dockerfile.gpu).

The v3.0 panel in the UI shows the planned pipeline diagram and explains the trade-offs.


License

MIT. See LICENSE file if present.

Acknowledgements

  • Offcloud β€” cloud download + caching service
  • TeraBox β€” cloud storage (cookie + Open Platform integration)
  • Blomp β€” cloud storage (OpenStack Swift integration)
  • DEOVR β€” VR video player for Quest / PC VR
  • ffmpeg β€” media analysis
  • Prisma β€” ORM
  • Next.js β€” React framework
  • shadcn/ui β€” component library