Skip to content

guanyang/open-agent-hub / skills/remotion-markup

remotion-markup

Verified

Content, animation and effects best practices

FileKindSize
3d.mdmarkdown2.2 KB
SKILL.mdskill md13.4 KB
agents/openai.yamlconfig310 B
arabic-text.mdmarkdown4.4 KB
assets/remotion-icon.pngbinary1.3 KB
assets/remotion-icon.svgother1.3 KB
audio-visualization.mdmarkdown4.8 KB
audio.mdmarkdown4.5 KB
calculate-metadata.mdmarkdown3.5 KB
color-correction.mdmarkdown7.3 KB
compositions.mdmarkdown5.0 KB
connected-compositions.mdmarkdown3.4 KB
cropping.mdmarkdown1.3 KB
effects.mdmarkdown10.6 KB
embedding-videos.mdmarkdown3.6 KB
ffmpeg.mdmarkdown1.1 KB
gifs.mdmarkdown3.7 KB
google-fonts.mdmarkdown1.7 KB
html-in-canvas.mdmarkdown2.6 KB
images.mdmarkdown1.5 KB
light-leaks.mdmarkdown3.1 KB
local-fonts.mdmarkdown2.5 KB
lottie.mdmarkdown1.8 KB
map.mdmarkdown670 B
mapbox.mdmarkdown12.1 KB
maplibre.mdmarkdown12.2 KB
measuring-dom-nodes.mdmarkdown995 B
measuring-text.mdmarkdown2.7 KB
motion-blur.mdmarkdown4.0 KB
multi-scene-video.mdmarkdown1.0 KB
parameters.mdmarkdown2.5 KB
remotion-maps/REFERENCE.mdmarkdown1.0 KB
remotion-maps/agents/openai.yamlconfig293 B
remotion-maps/assets/remotion-icon.pngbinary1.3 KB
remotion-maps/assets/remotion-icon.svgother1.3 KB
remotion-maps/techniques/cesium/TECHNIQUE.mdmarkdown3.9 KB
remotion-maps/techniques/cesium/assets/CesiumFlythrough.tsxother8.2 KB
remotion-maps/techniques/cesium/assets/cesium-path.jsonconfig12.0 KB
remotion-maps/techniques/cesium/assets/city-path.jsonconfig223 B
remotion-maps/techniques/cesium/assets/example-Root.tsxother923 B
remotion-maps/techniques/cesium/assets/flight-path.tsscript1.2 KB
remotion-maps/techniques/cesium/assets/sample-river.geojsonother6.3 KB
remotion-maps/techniques/cesium/references/3d-data-sources.mdmarkdown1.6 KB
remotion-maps/techniques/cesium/references/3d-flyover-architecture.mdmarkdown7.8 KB
remotion-maps/techniques/cesium/references/3d-troubleshooting.mdmarkdown6.6 KB
remotion-maps/techniques/cesium/scripts/prep-cesium-path.mjsscript5.4 KB
remotion-maps/techniques/mapbox/TECHNIQUE.mdmarkdown12.7 KB
remotion-maps/techniques/mapbox/references/render-stability.mdmarkdown3.6 KB
remotion-maps/techniques/maplibre/TECHNIQUE.mdmarkdown13.5 KB
remotion-maps/techniques/maplibre/references/render-stability.mdmarkdown3.6 KB
remotion-maps/techniques/maptiler/TECHNIQUE.mdmarkdown3.5 KB
remotion-maps/techniques/maptiler/assets/CountryLabel.tsxother1.8 KB
remotion-maps/techniques/maptiler/assets/MapTilerVectorElement.tsscript1.5 KB
remotion-maps/techniques/maptiler/assets/RiverReveal.tsxother10.6 KB
remotion-maps/techniques/maptiler/assets/example-Root.tsxother1.0 KB
remotion-maps/techniques/maptiler/assets/sample-data/country-meta.jsonconfig325.3 KB
remotion-maps/techniques/maptiler/assets/sample-data/yarlung-flow.jsonconfig12.8 KB
remotion-maps/techniques/maptiler/assets/tokens.tsscript1.2 KB
remotion-maps/techniques/maptiler/references/map-data-sources.mdmarkdown4.6 KB
remotion-maps/techniques/maptiler/references/map-explainer-architecture.mdmarkdown6.7 KB
remotion-maps/techniques/maptiler/references/map-geo-prep.mdmarkdown4.0 KB
remotion-maps/techniques/maptiler/references/render-stability.mdmarkdown3.6 KB
remotion-maps/techniques/maptiler/scripts/prep-geo.mjsscript7.4 KB
remotion-maps/techniques/static-map/TECHNIQUE.mdmarkdown1.1 KB
sequencing.mdmarkdown1.3 KB
sfx.mdmarkdown1.8 KB
silence-detection.mdmarkdown2.5 KB
text-highlights.mdmarkdown1.8 KB
timing-props.mdmarkdown3.2 KB
timing.mdmarkdown3.2 KB
transitions.mdmarkdown8.9 KB
trimming.mdmarkdown1.2 KB
video-editing.mdmarkdown5.6 KB
video-matting.mdmarkdown3.3 KB
voiceover.mdmarkdown3.6 KB

video-matting.md

View on GitHub
# Video matting

Use `@remotion/video-matting` to separate a source video into an opaque base and
a foreground WebM with transparency. Process the source once and reuse the
outputs in compositions; do not run the model during frame rendering.

## Generate the layers

Reuse an existing foreground if it was generated from the same source and has
matching timing and dimensions.

In Remotion Studio, select a video and choose **Remove background**. This
replaces its source with a transparent WebM. Duplicate the layer first when
the original video is needed underneath. Agents with Studio WebMCP access can
also use `remove_video_background`.

For local files in Node.js:

1. Install `@remotion/video-matting`, `@huggingface/transformers`, `mediabunny`,
   and `@mediabunny/server` with `remotion add` using the project's package manager.
2. Call `registerMediabunnyServer()` from `@mediabunny/server` before processing.
3. Choose `modnet` for people. Use the experimental `ben2-base` model for general
   foreground subjects; it requires more GPU memory and fp16 support.
4. Call `canUseVideoMatting({model})`. If unsupported, report its `detailedReason`
   instead of promising a result. A compatible GPU is required.
5. Call `downloadVideoMattingModel({model})`, then
   `separateVideoLayers({src, model, audio: 'base'})`. `src` may be a local path.
6. Retrieve each output with `base.getBlob()` and `foreground.getBlob()` and
   write the bytes to `.webm` files in `public/`. Dispose the outputs after
   saving them. Call `disposeVideoMattingModel({model})` when no more processing
   is needed.

See the [Node.js setup](https://www.remotion.dev/docs/video-matting/node) and
[`separateVideoLayers()` reference](https://www.remotion.dev/docs/video-matting/separate-video-layers)
for output streams, progress reporting, and disposal APIs. Custom output streams
must honor each chunk's `position`; writes are not necessarily append-only.

## Compose the result

Use `<Video>` from `@remotion/media` for both layers and `staticFile()` for saved
assets. JSX order determines stacking, from back to front:

- **Text behind a subject:** original or base video, an `Interactive.Div` with
  editable text, then the foreground.
- **Background blur:** original or base video with `blur()` from
  `@remotion/effects/blur`, then the sharp foreground.
- **Background replacement:** a new background, then the foreground. Omit the
  original video.
- **Subject-only effects:** apply effects such as `glow()`, `dropShadow()`, or
  `colorCorrection()` to the foreground. Keep the original video underneath
  when its background should remain visible.

The base still contains the subject. Matting does not reconstruct what was
hidden behind it; strong background blur may leave a halo around the subject.

Keep both layers' position, dimensions, `objectFit`, cropping, `from`,
`trimBefore`, `durationInFrames`, and `playbackRate` aligned. Play the original
audio once: mute the foreground when the base has audio. For replacement
backgrounds, use `audio: 'foreground'` during separation or add the original
audio separately. Preserve the foreground's alpha-capable WebM format.

Rendered frames or Studio scrubbing CAN show synchronization and the edges of
hair or moving objects. See the
[video matting guide](https://www.remotion.dev/docs/video-matting-guide) for
complete composition examples.
slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack."Stars: 198kUpdated Claude CodeCodexVerifiedInstall
ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read.Stars: 196kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report.Stars: 196kUpdated Claude CodeCodexVerifiedInstall
ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt.Stars: 196kUpdated Claude CodeCodexVerifiedInstall