# GPU/cloud render, with a real hardware check

GPU acceleration is not a property of a `--gl` flag alone. Chromium, the graphics driver, Remotion, Three.js, the server/container and a visible GPU must all work together. Device presence is only a candidate. A cloud VM can have an NVIDIA card while Chrome still uses SwiftShader. **Do not promise a speedup until a short 3D scene has been rendered with hardware and timed against the same scene on CPU.** For many flat/text scenes the encode, asset I/O and browser startup dominate; a GPU may not help.

## Local or GPU-worker route

1. Run `node <skill-dir>/scripts/motioncraft.mjs doctor` and `gpu probe --dir <project> --gl angle`. On Linux, check GPU devices and driver/Chromium logs, not only `nvidia-smi`. On Windows ANGLE often uses D3D; on macOS it may use Metal. The probe is an inventory check, not an acceleration benchmark.
2. Make sure the project has its real media under `public/` or `src/`. Run `npm install` in the project to create `package-lock.json`. Check no secrets are in the project. `worker manifest --dir <project> --comp <composition> --gl angle --out render-job.json` hashes the project files, skips generated output and refuses symlinks and secret-looking filenames. `worker verify --dir <project> --manifest render-job.json` checks for changed or missing files after copying to a machine you control.
3. Copy the **complete project** and manifest securely to a GPU-capable machine of your choice. Node 18+, compatible OS packages and browser libraries, GPU drivers, appropriate Chrome/Remotion version, fonts/media and ffmpeg are needed there. Run `npm ci` there after reviewing the dependencies. Do not put API keys or GitHub tokens in the job or project. This skill does not provision a vendor account, start cloud instances, upload assets or incur spend automatically.
4. Start with a short 3D segment, e.g. `npx remotion render src/index.ts Main out/probe.mp4 --frames=0-89 --gl=angle --concurrency=2`, inspect actual frames and browser/driver logs for hardware use, and compare elapsed times with `--gl=swangle` on the same machine/settings. If acceleration is unverified or frames differ, stop. Then render the full composition through `motioncraft render --dir <project> --comp Main --gl angle --require-gpu --concurrency 2`, using reviewed props and audio when applicable. `--require-gpu` only fails closed on missing candidate hardware or software GL; it cannot prove hardware use, so the short comparison stays mandatory.
5. Bring the finished output back over your chosen secure transfer method, run `qa all`, inspect final pixels at intended size and listen to audio. Keep your cloud job stopped when finished. Cloud compute, storage and data transfer may cost money; confirm provider/region, total and limits before starting a paid instance.

## Honest limitations

This is a portable worker handoff, not an integrated cloud-render button. No GPU was available in the development container (no NVIDIA driver or `/dev/dri`), so acceleration and provider-specific deployment are **untested**. Worker manifest verifies source integrity but does not sign or encrypt files, lock external font/service responses, or pin operating-system drivers. A `package-lock.json` pins npm versions; use the same Node/Remotion/Chromium/ffmpeg versions for repeatability. Third-party assets referenced only by URLs can change or fail; bundle licensed assets locally. Extra heavy 3D can still need lower concurrency or a pre-rendered PNG cache. A cloud VM is not necessarily faster or cheaper after upload/download, cold start and failed attempts.
