OHS CAM FX  v1.0.0
Your cam effects module, as a program that runs on a PC.
================================================================================

WHAT IT IS
  Every filter, backdrop, border and overlay from the OHS Social cam room,
  pulled straight out of index.php and wrapped in a standalone app. Point it at
  your webcam, build a look, save it, snapshot it, record it, or push it to a
  virtual camera so Zoom and Discord see the filtered picture.

  Nothing is uploaded. There is no server and no account. It works offline.


HOW TO RUN IT
  Windows           double-click  "RUN - Windows.bat"
  Mac / Linux       double-click  "RUN - Mac and Linux.command"

  Both start a tiny local server and open the app in your browser. That is
  needed because some browsers only allow camera access over http://localhost,
  not from a file:// path.

  You can also just double-click OHS-CamFX.html. That works in most browsers;
  if the camera refuses to start, use the RUN script instead.


WHAT'S IN IT
  16 filters      bw, sepia, invert, vibrant, dream, noir, warm, cool, vintage,
                  bright, dim, contrast, hue, emerald, rose, sunset
                  — they stack, in catalogue order, exactly like the room
   1 blur         0-20px, with the same 1.15x zoom the room applies
   8 backdrops    solid/gradient fills that hide the camera
  17 borders      solid through to neon, chase, chrome, gold, film, glitch,
                  pulse and retro, with thickness and two colours
  22 overlays     rain, snow, bubbles, underwater, fire, smoke, storm, confetti,
                  sparkle, leaves, matrix, fireflies, hearts, stars, fog, embers,
                  petals, plasma, bokeh, static, aurora


THE CHAIN READOUT
  Under the preview is the exact CSS filter string being applied, plus lit
  segments for which layers are active. It is the same string the platform
  builds, so it doubles as a way to see what a look actually resolves to.


PRESETS, AND GETTING A LOOK BACK INTO THE PLATFORM
  "Save file"        writes the look to a .json you can keep or send
  "Open file"        loads one back
  "Copy room state"  puts the platform's own _vbgState JSON on your clipboard,
                     so a look built here can go straight into a cam room


USING IT AS A REAL WEBCAM (Zoom, Discord, Meet, OBS)
  The browser app cannot pretend to be a webcam — that needs an OS-level
  device. The virtualcam folder does that part.

    cd virtualcam
    pip install -r requirements.txt
    python ohs_camfx_vcam.py --preset ../my-look.json

  Then pick "OBS Virtual Camera" as your camera in Zoom/Discord.

  First time only:
    Windows / macOS   install OBS Studio once — it provides the virtual device
    Linux             sudo modprobe v4l2loopback

  Options:
    --list                       show every filter name
    --filters noir,warm --blur 6
    --backdrop color-blue --mirror
    --device 1                   if you have more than one camera

  The filters there are the CSS filter primitives implemented as colour
  matrices from the Filter Effects spec — the same maths the browser runs — so
  a look built in the app comes out the same on the virtual camera.


KNOWN LIMITS, SAID PLAINLY
  * Animated overlays are preview only. They are CSS layers, not part of the
    video signal, so they do not appear in snapshots, recordings, or on the
    virtual camera. Filters, blur, zoom, mirror, backdrop and border all do.
  * The virtual camera bridge has not been run against real hardware here —
    the filter maths is verified against the spec, the device end is standard
    pyvirtualcam. If it does not find a device, that message tells you which
    of the two first-time installs is missing.
  * Recording produces .webm. Most players handle it; if you need mp4, run it
    through a converter.


REBUILDING IT AFTER YOU ADD EFFECTS
  The app is generated from index.php, not hand-copied. When you add a filter,
  border or overlay to the platform:

    python3 build.py /path/to/index.php

  It re-reads ohs_vbg_filters(), ohs_vbg_backdrops(), ohs_vbg_border_styles(),
  ohs_vbg_overlays() and _vbgBuildFilterCSS(), lifts the effect CSS block, and
  writes a fresh OHS-CamFX.html. Nothing to edit by hand.

  If you rename those functions or move the CSS markers, the build stops with
  a message naming what it could not find rather than shipping a half-built app.