46 lines
1.2 KiB
Markdown
46 lines
1.2 KiB
Markdown
# Media Studio — probe, transform, transcode
|
|
|
|
## What this example does
|
|
|
|
Batch media tools on the default **media** pack (`bare-media` + `bare-ffmpeg`):
|
|
|
|
- probe `info`
|
|
- `imageTransform` (resize / WebP)
|
|
- `extractFrame`
|
|
- `transcode` with progress events
|
|
|
|
Files stay under `BRIDGE_SWARM_STORAGE/cap-jobs/`.
|
|
|
|
## Prerequisites
|
|
|
|
Install the [BridgeSwarm extension and native host](../../README.md#easy-install-recommended). On macOS after a host update, run `npm run repair:macos` and fully quit the browser.
|
|
|
|
## How to run
|
|
|
|
**Recommended:** Extension Settings → enable **Examples server**.
|
|
|
|
```bash
|
|
npm run examples
|
|
```
|
|
|
|
Open **http://127.0.0.1:4173/media-demo/**. Do not use `file://`.
|
|
|
|
## Usage
|
|
|
|
1. Drop or pick an image or video.
|
|
2. Run **Info**, **Transform**, **Extract frame**, or **Transcode**.
|
|
3. Progress and errors show in the log; outputs can be downloaded from the page.
|
|
|
|
## Files in this directory
|
|
|
|
- **index.html** — File picker and action buttons.
|
|
- **style.css** — Stage layout.
|
|
- **app.js** — `BridgeSwarm.media.*` wrappers.
|
|
|
|
## APIs and concepts
|
|
|
|
- `BridgeSwarm.media.info / imageTransform / extractFrame / transcode / cancel`
|
|
- `cap-chunk` / `cap-end` / `cap-error` events under the NMH size limit
|
|
|
|
See [Capabilities](../../docs/CAPABILITIES.md).
|