# Capture media on the creator's computer Build and render the app outside Hackemist. Upload the finished thumbnail, screenshots and demo through MCP. The platform stores and validates the finished files; it does not need to run Chromium or encode a demo for this workflow. `project_capture_media` defaults to `execution: "client"`. Its result is a **plan**, with `accepted: false`, `rendered: false` and `status: "client_capture_required"`. No browser job, launch, account save, upload ticket or draft fork is created. Never describe this response as completed capture or uploaded media. Rendering runs wherever the coding agent/browser runs. A desktop coding agent can use the creator's computer. A cloud-only connector cannot start a browser on someone else's PC without a local agent/recorder; use its own approved browser environment or finished media supplied by the creator. Never ask for a connector's bearer or copy it to a shell, recorder, browser page or external service. ## Agent workflow Run the [required local release checks](/docs/agent-authentication.md#required-checks-before-publishing) without GitHub Actions. Do not create workflows, dispatch jobs or push code to run creator media QA. 1. Save the static build locally. Read the current project, listing revision, honest device targets and `hosting_info.publishing.local_media`. Preserve existing media unless the creator specifically authorizes replacement. 2. Call `project_capture_media` with the saved `version_id`, current `base_listing_revision`, `idempotency_key`, selected `media_kinds`, meaningful inputs and scene descriptions. Save only the returned `capture_plan` as `capture-plan.json`. Its omitted descriptive text stays blank; fill those fields from the real inspected scenes, using short useful captions rather than technical capture boilerplate. 3. Use a local browser/recorder, or the helper below, to finish **all** selected files before starting uploads. Pass local full decoding and browser playback/seeks; inspect every still and watch the entire demo, including actual text, controls and outcomes. Fix app/media defects, rebuild or re-record the affected files, rerun preflight and review the new results. Do not upload or publish failed, incomplete or unreviewed selected media. Include five to eight genuinely different scenes, across advertised devices; desktop/phone/tablet defaults use 3+3+2. A complete demo is 30–60 seconds. Scene labels and changed pixels do not prove a feature worked. 4. Re-read `listing_get`. When `hosting_info.direct_uploads.available` is true and the coding client can transfer local files with its approved network tools, use the [private direct upload workflow](/docs/direct-uploads.md). Otherwise, for each finished file create a `media_upload_create` ticket with its exact SHA-256, `byte_length`, kind, accurate caption, alt text, description and **current** `base_revision`. Transfer bounded base64 chunks with `media_upload_chunk`, then `media_upload_finalize`. Use its returned listing revision for the next file. Inspect `media_upload_status` after an uncertain response; never blindly create another ticket. 5. For an authorized gallery replacement, detach only the selected old **draft** screenshot references with `listing_asset_remove` and current revisions before adding the new set. Live media and retained originals remain intact. Do not delete retained files unless their creator explicitly requests permanent deletion. Re-read the checklist and publish explicitly with `project_release`. Keep unselected thumbnail, screenshots and demo unchanged. Media needs consent and `media:write` when replacing published assets. The normal ownership, current token, plan, quota, byte/hash, decoder, revision, moderation and release guards remain enforced. Local manifests are authored evidence and never impersonate trusted server capture receipts or authenticated save tests. ## Local helper The helper requires **Node 22+, Playwright, FFmpeg and FFprobe** on the recorder computer. It creates a fresh sandboxed Chromium session without the person's cookies/profile. It fulfils browser requests from checked files in the selected static build, opens no HTTP listener and blocks external connections, uses an ephemeral in-memory SDK bridge, and never connects to an account database or uploads media. Root-relative bundled assets are supported. External-service flows need your own approved local recorder and honest finished media. Download every `helper_files` entry returned by `hosting_info.publishing.local_media` into one tools directory. This includes `creator_capture.mjs`, `creator_preflight.mjs`, `creator_audio.mjs`, `capture-engine.mjs`, `capture-bridge.mjs`, `publishing_progress.mjs` and `sdk.js`. Use the URLs from the connected server. Install dependencies once in that directory: ```sh npm init -y npm install --save-dev playwright@1.62.0 npx playwright install chromium ``` FFmpeg must be on PATH, or supply its absolute path with `--ffmpeg`. Run from the tools directory, using your own build/plan paths and a **new** output directory: ```sh node creator_capture.mjs --build /path/to/dist --plan /path/to/capture-plan.json --output /path/to/new-media ``` Prefer a current stable Chrome build for native interaction with cross-site iframes, selecting it with `--browser /absolute/path/to/chrome`. Older bundled browser builds can misroute native iframe input even when DOM geometry is correct; inspect the actual action and result. Keep the output directory outside the build. The helper never overwrites an earlier capture, runs build scripts, accepts API keys or uploads files. A failed run has no completed `manifest.json`; repair the source/plan and use a new output directory. The result contains `thumbnail.webp`, selected `screenshot-01.webp` through `screenshot-08.webp`, selected `demo.mp4`, `preflight.json`, and a final `manifest.json` with exact file sizes, SHA-256 and descriptive text. Only selected media files are written. Before writing the completed manifest, the helper fully decodes the video with local FFmpeg, then decodes every still and plays/seeks the video in a fresh local browser context. It checks actual dimensions, duration, byte limits and hashes. Failed decoding or playback stops completion and uploads nothing. `visual_review: "required"` remains until the agent actually reviews the results; automated checks cannot establish that a feature works. The server still determines container dimensions/duration and sanitized bytes, so stored hashes can differ from the upload manifest. A local report is authored evidence, not independently verified capture provenance. To recheck an existing helper output (for example after changing captions), use a new report filename by moving the old `preflight.json` into your own evidence archive, then run: ```sh node creator_preflight.mjs --media /path/to/media --browser /absolute/path/to/chrome --ffmpeg /absolute/path/to/ffmpeg ``` This command accepts no credentials and never uploads. It rejects changed hashes, symlinked media, unsafe paths, oversized files, failed full decoding and failed browser playback. Re-record changed pixels; do not edit a hash to conceal a failed recording. The cover uses **1280×800 CSS pixels at device scale 2**, producing **2560×1600 pixels**, exactly **16:10**. Design the full composition for this frame: readable app/game title, a useful representative scene, safe margins and no browser/player chrome. Screenshots retain their actual planned desktop, phone or tablet viewport. Do not enlarge a tiny image or crop a phone screenshot into a pretend desktop cover. Existing low-resolution media needs a creator-authorized recapture to gain real detail. The helper normalizes stills to simple metadata-free WebP on the agent computer, retaining up to 2560 pixels per edge without upscaling. These finished stills take a bounded server header path, preserving bytes without pixel decoding or generating responsive derivatives. Legacy PNG/JPEG/GIF or extended WebP uploads retain bounded server compatibility normalization; use the helper's finished WebP to avoid that work. Finished MP4/H.264/yuv420p demos use bounded container and stream-metadata checks, followed by stream copy preserving optional AAC audio while removing private metadata and chapters. Hackemist does **not** decode or encode uploaded video/audio samples. Both manual and MCP uploads that still need encoding are rejected with an instruction to finish locally. Header checks are not proof that every sample plays correctly; local full video/audio decoding and real browser playback are required before upload. Upload authorization, consent, quotas, byte/hash integrity, safe container references and current revisions remain server-enforced. No GitHub job or remote verification worker is used for demo QA. ## Optional demo audio Silent demos remain valid. Finished manual and MCP uploads may include one AAC audio track; the server preserves it by stream copy. Record and encode on the creator/agent computer, watch and **listen to the entire finished clip**, check sync, fix defects, rerun local checks and review again before publishing. Existing media is never automatically replaced. Previously stripped audio needs the original recording and authorized replacement; it cannot be reconstructed from a silent stored clip. For the local helper, request `project_capture_media` with `audio: "app"` to record live app/game sound. The helper uses a fresh, sandboxed full Chromium/Chrome browser and selects only its own randomly named tab. It captures the tab's mixed WebAudio and HTML media sound; it does not request a microphone, desktop/system audio or another browser profile. Only the trusted recorder parent may initiate tab capture; authored app frames retain their permission restrictions. Include real Start/Play actions when the app requires a gesture to enable sound. Audio starts with the recorded demo timeline after setup/cover capture. Unsupported capture fails explicitly; it never substitutes microphone input or silently drops requested sound. Use `--browser` for an installed compatible full Chrome executable, or install Playwright's full Chromium. Alternatively, request `audio: "local_file"` and pass `--audio /path/to/track.wav` to `creator_capture.mjs`. The explicitly selected local WAV, MP3, FLAC, Ogg, WebM or MP4 audio starts at demo time zero; it is trimmed or padded with silence to match the video. Align recorded app sound, narration or music locally and use only authorized material. The helper encodes AAC locally, copies the recorded video without another video encode, and checks both streams before completing its manifest. The default audio bitrate is 128000 bits/second; `--audio-bitrate` accepts a positive supported bitrate. Existing total file/duration limits and native codec capabilities apply. Local paths stay on the computer and are not sent in the MCP plan. Omit `audio` or select `"none"` for the existing silent capture. Audio applies only when a positive-duration demo is selected. The optional server recorder remains silent and rejects audio requests; use client execution or a finished local video for sound. The helper requires local **FFmpeg and FFprobe**. `--ffmpeg` and `--ffprobe` select installed executables. For a finished video made with another local recorder, run: ```sh node creator_preflight.mjs --demo /path/to/finished.mp4 --output /path/to/new-review --browser /absolute/path/to/chrome ``` This keeps the original file and writes a verified copy, checksum manifest and `preflight.json` in a new directory. Automated checks fully decode video and audio locally, exercise browser playback/seeks and report audio presence/format. Browser audio analysis uses zero output gain; it does not replace human listening. `audio_review: "required"` remains for a clip with sound. Upload the exact reviewed file/hash only after the whole clip has been heard and inspected. Gallery videos retain normal playback/volume controls and do not autoplay. ## Required agent review before uploading 1. **Match the saved app.** Use the current immutable source version and honest declared device targets. Build locally and open the actual app. Map each advertised feature to a reproducible action, visible result and planned scene. Mark usable scenes with `Hackemist.markReady()` after assets and controls are usable. Wait for loading to finish; repair errors instead of hiding them in the recording. 2. **Exercise the whole journey.** For a game, demonstrate menu, start, actual movement/actions, progress/score, pause/resume and a result/retry where implemented. For other apps, show the core input-to-result workflow and recovery from an invalid input. Do not invent a win screen or feature merely to fill a scene slot. Use meaningful `actions`/`demo_actions` and truthful `scene` descriptions in the capture plan. 3. **Check advertised screens.** Test narrow phone portrait (including 320 CSS pixels), phone landscape, tablet and desktop. Inspect safe areas, text wrapping, clipped overlays, touch target reach, scroll behavior and orientation changes. For a game, hold an overlay direction while a second finger uses the game, release/cancel fingers, leave/return to the app, and verify that controls never stick. Check WebGL/canvas edges after resizing; a CSS-sized canvas alone is insufficient. 4. **Prove connected features separately.** A local preview uses ephemeral simulated SDK state and blocks external connections. For multiplayer, use two authorized independent sessions, demonstrate joining the same room, synchronized progress/competition, leaving and reconnecting, and distinguish real peers from bots/ghosts. Test real account save/reload with authorized disposable data separately. Do not claim local recording proves real peers, cloud saves, payments, external services or Android hardware performance. Capture those flows with an approved recorder only when the creator has authorized their test data and access. 5. **Review every delivered pixel.** Watch the entire 30–60 second demo at normal speed, including its opening, transitions and ending. Check for black/frozen/loading frames, repeated idle scenes, tiny or clipped text, wrong aspect ratio, color-range problems, browser chrome, personal data and watermarks. Open every full-resolution still and compare it with the intended feature/action. Five to eight genuinely distinct scenes are required; different hashes or labels alone are insufficient. Use desktop/phone/tablet coverage only where the app actually supports it. Never relabel one viewport as another. 6. **Compose the cover and public copy.** Review the real 2560×1600 cover at both full size and listing thumbnail size. Use a readable title, representative app scene, clear margins and no misleading claims. Write short scene-specific captions, useful alt text and accurate descriptions from what is visible. Keep a local review note mapping scene → action → observed result → file/time. Record defects and repair/re-record them before upload. 7. **Finish, then transfer.** Confirm `preflight.json` passed for the exact asset hashes, the manual review is recorded, the full clip is 30–60 seconds, and no credentials or personal data appear. Re-read `listing_get`, upload exact finished bytes with current revisions, preserve unselected assets, inspect final attachments and resolve `project_release_checklist` blockers. Never call a plan a recording, an upload a publication, or a local QA report an independent platform receipt. Repository CI is a separate source-code regression suite. It tests synthetic fixtures on CI runners and is not invoked by an agent recording or uploading a demo. The existing independent **app startup/layout publication check** is also separate from media playback QA; it still runs in the private checker service when a complete release explicitly requires it. Moving demo work locally does not disable that publication gate. ## Optional server recorder Admin → Settings → Publishing checks → **Allow optional server media rendering** is off by default. Even when enabled, MCP still defaults to client capture. `execution: "server"` explicitly requests the existing bounded private recorder and its durable receipt. Disabling the switch prevents new server jobs and prevents an outstanding job from attaching media at its next authorization guard. Publishing safety checks remain independent and are not disabled by moving media capture off the server. Implementation references: [Playwright browser contexts](https://playwright.dev/docs/api/class-browsercontext) and [FFmpeg stream copy](https://ffmpeg.org/ffmpeg.html#Streamcopy). ## Maintainer acceptance check After building the application and checker test images, run `python tests/run_client_media_acceptance.py --app-image hackemist:test --checker-image hackemist-checker:test`. Docker and host Python are required. The runner uses only its own labeled containers/private network, explicit source/test mounts and a new fixture directory. It records a real 30-second demo and eight mixed-device scenes locally, checks detailed-cover compression, then uploads through scoped MCP tools and publishes with the independent browser check. It creates no server media-capture job. Reports stay under `.local/`; production data, environment files and ports are not used. The same check runs in CI. The older optional-server browser acceptance requires `HACKEMIST_SERVER_CAPTURE_TESTS=1` alongside its existing isolated-deployment/mutation flags. It temporarily enables the server switch through its test administrator and restores the previous value afterward. Do not point mutation fixtures at the live site. ## Progress and time limits The local helper and optional server recorder start with an allowance derived from the validated dimensions, timeline, actions and planned stills: 30–240 seconds (up to 60 seconds initially for short diagnostics). Successful asset delivery, completed non-wait actions, fresh stills, accepted video frames and increasing counters from the owned FFmpeg process can reserve another 30 seconds, up to a ten-minute absolute work limit. The recording itself remains at most 60 seconds. App heartbeats, polling, waiting, failed transfers and a live process without advancing work do not extend that limit. Loading and capture steps retain inactivity/watchdog bounds; a stuck encoder gets at most 30 seconds without input/output progress. Use a fresh copy of all helper files together. The local manifest records its safe `work_budget`; local decode/playback and visual review remain required. Optional server capture returns bounded diagnostics and cleanup health, uses a 610-second private transport/preview lifetime, and advertises a 720-second client timeout. Existing media is attached only after all validation and current ownership/revision/consent checks succeed.