dsh-remotion 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +7 -5
- package/README.md +3 -3
- package/lib/index.d.ts +2 -2
- package/lib/index.js +15 -2
- package/package.json +1 -1
- package/skills/remotion-best-practices/SKILL.md +59 -0
- package/skills/remotion-best-practices/agents/openai.yaml +7 -0
- package/skills/remotion-best-practices/assets/remotion-icon.png +0 -0
- package/skills/remotion-best-practices/remotion-captions/SKILL.md +36 -0
- package/skills/remotion-best-practices/remotion-captions/agents/openai.yaml +7 -0
- package/skills/remotion-best-practices/remotion-captions/assets/remotion-icon.png +0 -0
- package/skills/{remotion/rules → remotion-best-practices/remotion-captions}/display-captions.md +9 -3
- package/skills/{remotion/rules → remotion-best-practices/remotion-captions}/import-srt-captions.md +5 -1
- package/skills/remotion-best-practices/remotion-create/SKILL.md +68 -0
- package/skills/remotion-best-practices/remotion-create/agents/openai.yaml +7 -0
- package/skills/remotion-best-practices/remotion-create/assets/remotion-icon.png +0 -0
- package/skills/{remotion/rules → remotion-best-practices/remotion-create}/tailwind.md +1 -1
- package/skills/remotion-best-practices/remotion-create/video-layout.md +9 -0
- package/skills/remotion-best-practices/remotion-docs/SKILL.md +46 -0
- package/skills/remotion-best-practices/remotion-docs/agents/openai.yaml +7 -0
- package/skills/remotion-best-practices/remotion-docs/assets/remotion-icon.png +0 -0
- package/skills/remotion-best-practices/remotion-interactivity/SKILL.md +247 -0
- package/skills/remotion-best-practices/remotion-interactivity/agents/openai.yaml +7 -0
- package/skills/remotion-best-practices/remotion-interactivity/assets/remotion-icon.png +0 -0
- package/skills/remotion-best-practices/remotion-maps/SKILL.md +36 -0
- package/skills/remotion-best-practices/remotion-maps/agents/openai.yaml +7 -0
- package/skills/remotion-best-practices/remotion-maps/assets/remotion-icon.png +0 -0
- package/skills/remotion-best-practices/remotion-maps/techniques/cesium/TECHNIQUE.md +89 -0
- package/skills/remotion-best-practices/remotion-maps/techniques/cesium/assets/CesiumFlythrough.tsx +284 -0
- package/skills/remotion-best-practices/remotion-maps/techniques/cesium/assets/cesium-path.json +299 -0
- package/skills/remotion-best-practices/remotion-maps/techniques/cesium/assets/city-path.json +12 -0
- package/skills/remotion-best-practices/remotion-maps/techniques/cesium/assets/example-Root.tsx +39 -0
- package/skills/remotion-best-practices/remotion-maps/techniques/cesium/assets/flight-path.ts +35 -0
- package/skills/remotion-best-practices/remotion-maps/techniques/cesium/assets/sample-river.geojson +215 -0
- package/skills/remotion-best-practices/remotion-maps/techniques/cesium/references/3d-data-sources.md +43 -0
- package/skills/remotion-best-practices/remotion-maps/techniques/cesium/references/3d-flyover-architecture.md +128 -0
- package/skills/remotion-best-practices/remotion-maps/techniques/cesium/references/3d-troubleshooting.md +57 -0
- package/skills/remotion-best-practices/remotion-maps/techniques/cesium/scripts/prep-cesium-path.mjs +161 -0
- package/skills/remotion-best-practices/remotion-maps/techniques/mapbox/TECHNIQUE.md +449 -0
- package/skills/remotion-best-practices/remotion-maps/techniques/mapbox/references/render-stability.md +64 -0
- package/skills/remotion-best-practices/remotion-maps/techniques/maplibre/TECHNIQUE.md +465 -0
- package/skills/remotion-best-practices/remotion-maps/techniques/maplibre/references/render-stability.md +64 -0
- package/skills/remotion-best-practices/remotion-maps/techniques/maptiler/TECHNIQUE.md +80 -0
- package/skills/remotion-best-practices/remotion-maps/techniques/maptiler/assets/CountryLabel.tsx +70 -0
- package/skills/remotion-best-practices/remotion-maps/techniques/maptiler/assets/MapTilerVectorElement.ts +80 -0
- package/skills/remotion-best-practices/remotion-maps/techniques/maptiler/assets/RiverReveal.tsx +363 -0
- package/skills/remotion-best-practices/remotion-maps/techniques/maptiler/assets/example-Root.tsx +22 -0
- package/skills/remotion-best-practices/remotion-maps/techniques/maptiler/assets/sample-data/country-meta.json +7535 -0
- package/skills/remotion-best-practices/remotion-maps/techniques/maptiler/assets/sample-data/yarlung-flow.json +605 -0
- package/skills/remotion-best-practices/remotion-maps/techniques/maptiler/assets/tokens.ts +34 -0
- package/skills/remotion-best-practices/remotion-maps/techniques/maptiler/references/map-data-sources.md +91 -0
- package/skills/remotion-best-practices/remotion-maps/techniques/maptiler/references/map-explainer-architecture.md +129 -0
- package/skills/remotion-best-practices/remotion-maps/techniques/maptiler/references/map-geo-prep.md +85 -0
- package/skills/remotion-best-practices/remotion-maps/techniques/maptiler/references/render-stability.md +64 -0
- package/skills/remotion-best-practices/remotion-maps/techniques/maptiler/scripts/prep-geo.mjs +202 -0
- package/skills/remotion-best-practices/remotion-maps/techniques/static-map/TECHNIQUE.md +37 -0
- package/skills/remotion-best-practices/remotion-markup/SKILL.md +365 -0
- package/skills/remotion-best-practices/remotion-markup/agents/openai.yaml +7 -0
- package/skills/remotion-best-practices/remotion-markup/assets/remotion-icon.png +0 -0
- package/skills/{remotion/rules → remotion-best-practices/remotion-markup}/audio.md +4 -2
- package/skills/{remotion/rules → remotion-best-practices/remotion-markup}/calculate-metadata.md +4 -2
- package/skills/remotion-best-practices/remotion-markup/compositions.md +117 -0
- package/skills/remotion-best-practices/remotion-markup/cropping.md +34 -0
- package/skills/remotion-best-practices/remotion-markup/effects.md +251 -0
- package/skills/{remotion/rules/videos.md → remotion-best-practices/remotion-markup/embedding-videos.md} +6 -4
- package/skills/{remotion/rules → remotion-best-practices/remotion-markup}/ffmpeg.md +5 -1
- package/skills/{remotion/rules → remotion-best-practices/remotion-markup}/gifs.md +55 -9
- package/skills/remotion-best-practices/remotion-markup/google-fonts.md +76 -0
- package/skills/remotion-best-practices/remotion-markup/html-in-canvas.md +128 -0
- package/skills/remotion-best-practices/remotion-markup/images.md +73 -0
- package/skills/remotion-best-practices/remotion-markup/light-leaks.md +106 -0
- package/skills/remotion-best-practices/remotion-markup/local-fonts.md +69 -0
- package/skills/{remotion/rules → remotion-best-practices/remotion-markup}/lottie.md +4 -1
- package/skills/{remotion/rules → remotion-best-practices/remotion-markup}/measuring-dom-nodes.md +5 -1
- package/skills/{remotion/rules → remotion-best-practices/remotion-markup}/measuring-text.md +8 -2
- package/skills/remotion-best-practices/remotion-markup/multi-scene-video.md +81 -0
- package/skills/{remotion/rules → remotion-best-practices/remotion-markup}/parameters.md +3 -1
- package/skills/remotion-best-practices/remotion-markup/remotion-maps/SKILL.md +36 -0
- package/skills/remotion-best-practices/remotion-markup/remotion-maps/agents/openai.yaml +7 -0
- package/skills/remotion-best-practices/remotion-markup/remotion-maps/assets/remotion-icon.png +0 -0
- package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/cesium/TECHNIQUE.md +89 -0
- package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/cesium/assets/CesiumFlythrough.tsx +284 -0
- package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/cesium/assets/cesium-path.json +299 -0
- package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/cesium/assets/city-path.json +12 -0
- package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/cesium/assets/example-Root.tsx +39 -0
- package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/cesium/assets/flight-path.ts +35 -0
- package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/cesium/assets/sample-river.geojson +215 -0
- package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/cesium/references/3d-data-sources.md +43 -0
- package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/cesium/references/3d-flyover-architecture.md +128 -0
- package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/cesium/references/3d-troubleshooting.md +57 -0
- package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/cesium/scripts/prep-cesium-path.mjs +161 -0
- package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/mapbox/TECHNIQUE.md +449 -0
- package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/mapbox/references/render-stability.md +64 -0
- package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/maplibre/TECHNIQUE.md +465 -0
- package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/maplibre/references/render-stability.md +64 -0
- package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/maptiler/TECHNIQUE.md +80 -0
- package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/maptiler/assets/CountryLabel.tsx +70 -0
- package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/maptiler/assets/MapTilerVectorElement.ts +80 -0
- package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/maptiler/assets/RiverReveal.tsx +363 -0
- package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/maptiler/assets/example-Root.tsx +22 -0
- package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/maptiler/assets/sample-data/country-meta.json +7535 -0
- package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/maptiler/assets/sample-data/yarlung-flow.json +605 -0
- package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/maptiler/assets/tokens.ts +34 -0
- package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/maptiler/references/map-data-sources.md +91 -0
- package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/maptiler/references/map-explainer-architecture.md +129 -0
- package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/maptiler/references/map-geo-prep.md +85 -0
- package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/maptiler/references/render-stability.md +64 -0
- package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/maptiler/scripts/prep-geo.mjs +202 -0
- package/skills/remotion-best-practices/remotion-markup/remotion-maps/techniques/static-map/TECHNIQUE.md +37 -0
- package/skills/{remotion/rules → remotion-best-practices/remotion-markup}/sequencing.md +63 -12
- package/skills/remotion-best-practices/remotion-markup/sfx.md +51 -0
- package/skills/remotion-best-practices/remotion-markup/text-highlights.md +56 -0
- package/skills/remotion-best-practices/remotion-markup/timing.md +111 -0
- package/skills/{remotion/rules → remotion-best-practices/remotion-markup}/transitions.md +49 -7
- package/skills/remotion-best-practices/remotion-markup/video-editing.md +90 -0
- package/skills/{remotion/rules → remotion-best-practices/remotion-markup}/voiceover.md +2 -2
- package/skills/remotion-best-practices/remotion-multimedia/SKILL.md +20 -0
- package/skills/remotion-best-practices/remotion-multimedia/agents/openai.yaml +7 -0
- package/skills/remotion-best-practices/remotion-multimedia/assets/remotion-icon.png +0 -0
- package/skills/{remotion/rules → remotion-best-practices/remotion-multimedia}/get-audio-duration.md +1 -3
- package/skills/{remotion/rules → remotion-best-practices/remotion-multimedia}/get-video-dimensions.md +1 -3
- package/skills/{remotion/rules → remotion-best-practices/remotion-multimedia}/get-video-duration.md +1 -3
- package/skills/remotion-best-practices/remotion-render/SKILL.md +27 -0
- package/skills/remotion-best-practices/remotion-render/agents/openai.yaml +7 -0
- package/skills/remotion-best-practices/remotion-render/assets/remotion-icon.png +0 -0
- package/skills/remotion-best-practices/remotion-saas/SKILL.md +33 -0
- package/skills/remotion-best-practices/remotion-saas/agents/openai.yaml +7 -0
- package/skills/remotion-best-practices/remotion-saas/assets/remotion-icon.png +0 -0
- package/skills/remotion-best-practices/remotion-saas/framework.md +21 -0
- package/skills/remotion-best-practices/remotion-saas/player.md +33 -0
- package/skills/remotion-best-practices/remotion-saas/rendering.md +69 -0
- package/skills/remotion-best-practices/remotion-studio/SKILL.md +24 -0
- package/skills/remotion-best-practices/remotion-studio/agents/openai.yaml +7 -0
- package/skills/remotion-best-practices/remotion-studio/assets/remotion-icon.png +0 -0
- package/skills/remotion-best-practices/remotion-upgrade/SKILL.md +31 -0
- package/skills/remotion-best-practices/remotion-upgrade/agents/openai.yaml +7 -0
- package/skills/remotion-best-practices/remotion-upgrade/assets/remotion-icon.png +0 -0
- package/skills/remotion-captions/SKILL.md +36 -0
- package/skills/remotion-captions/agents/openai.yaml +7 -0
- package/skills/remotion-captions/assets/remotion-icon.png +0 -0
- package/skills/remotion-captions/display-captions.md +190 -0
- package/skills/remotion-captions/import-srt-captions.md +73 -0
- package/skills/remotion-captions/transcribe-captions.md +70 -0
- package/skills/remotion-create/SKILL.md +68 -0
- package/skills/remotion-create/agents/openai.yaml +7 -0
- package/skills/remotion-create/assets/remotion-icon.png +0 -0
- package/skills/remotion-create/tailwind.md +11 -0
- package/skills/remotion-create/video-layout.md +9 -0
- package/skills/remotion-docs/SKILL.md +46 -0
- package/skills/remotion-docs/agents/openai.yaml +7 -0
- package/skills/remotion-docs/assets/remotion-icon.png +0 -0
- package/skills/remotion-interactivity/SKILL.md +247 -0
- package/skills/remotion-interactivity/agents/openai.yaml +7 -0
- package/skills/remotion-interactivity/assets/remotion-icon.png +0 -0
- package/skills/remotion-maps/SKILL.md +36 -0
- package/skills/remotion-maps/agents/openai.yaml +7 -0
- package/skills/remotion-maps/assets/remotion-icon.png +0 -0
- package/skills/remotion-maps/techniques/cesium/TECHNIQUE.md +89 -0
- package/skills/remotion-maps/techniques/cesium/assets/CesiumFlythrough.tsx +284 -0
- package/skills/remotion-maps/techniques/cesium/assets/cesium-path.json +299 -0
- package/skills/remotion-maps/techniques/cesium/assets/city-path.json +12 -0
- package/skills/remotion-maps/techniques/cesium/assets/example-Root.tsx +39 -0
- package/skills/remotion-maps/techniques/cesium/assets/flight-path.ts +35 -0
- package/skills/remotion-maps/techniques/cesium/assets/sample-river.geojson +215 -0
- package/skills/remotion-maps/techniques/cesium/references/3d-data-sources.md +43 -0
- package/skills/remotion-maps/techniques/cesium/references/3d-flyover-architecture.md +128 -0
- package/skills/remotion-maps/techniques/cesium/references/3d-troubleshooting.md +57 -0
- package/skills/remotion-maps/techniques/cesium/scripts/prep-cesium-path.mjs +161 -0
- package/skills/remotion-maps/techniques/mapbox/TECHNIQUE.md +449 -0
- package/skills/remotion-maps/techniques/mapbox/references/render-stability.md +64 -0
- package/skills/remotion-maps/techniques/maplibre/TECHNIQUE.md +465 -0
- package/skills/remotion-maps/techniques/maplibre/references/render-stability.md +64 -0
- package/skills/remotion-maps/techniques/maptiler/TECHNIQUE.md +80 -0
- package/skills/remotion-maps/techniques/maptiler/assets/CountryLabel.tsx +70 -0
- package/skills/remotion-maps/techniques/maptiler/assets/MapTilerVectorElement.ts +80 -0
- package/skills/remotion-maps/techniques/maptiler/assets/RiverReveal.tsx +363 -0
- package/skills/remotion-maps/techniques/maptiler/assets/example-Root.tsx +22 -0
- package/skills/remotion-maps/techniques/maptiler/assets/sample-data/country-meta.json +7535 -0
- package/skills/remotion-maps/techniques/maptiler/assets/sample-data/yarlung-flow.json +605 -0
- package/skills/remotion-maps/techniques/maptiler/assets/tokens.ts +34 -0
- package/skills/remotion-maps/techniques/maptiler/references/map-data-sources.md +91 -0
- package/skills/remotion-maps/techniques/maptiler/references/map-explainer-architecture.md +129 -0
- package/skills/remotion-maps/techniques/maptiler/references/map-geo-prep.md +85 -0
- package/skills/remotion-maps/techniques/maptiler/references/render-stability.md +64 -0
- package/skills/remotion-maps/techniques/maptiler/scripts/prep-geo.mjs +202 -0
- package/skills/remotion-maps/techniques/static-map/TECHNIQUE.md +37 -0
- package/skills/remotion-markup/3d.md +86 -0
- package/skills/remotion-markup/SKILL.md +365 -0
- package/skills/remotion-markup/agents/openai.yaml +7 -0
- package/skills/remotion-markup/assets/remotion-icon.png +0 -0
- package/skills/remotion-markup/audio-visualization.md +198 -0
- package/skills/remotion-markup/audio.md +171 -0
- package/skills/remotion-markup/calculate-metadata.md +136 -0
- package/skills/remotion-markup/compositions.md +117 -0
- package/skills/remotion-markup/cropping.md +34 -0
- package/skills/remotion-markup/effects.md +251 -0
- package/skills/remotion-markup/embedding-videos.md +173 -0
- package/skills/remotion-markup/ffmpeg.md +38 -0
- package/skills/remotion-markup/gifs.md +187 -0
- package/skills/remotion-markup/google-fonts.md +76 -0
- package/skills/remotion-markup/html-in-canvas.md +128 -0
- package/skills/remotion-markup/images.md +73 -0
- package/skills/remotion-markup/light-leaks.md +106 -0
- package/skills/remotion-markup/local-fonts.md +69 -0
- package/skills/remotion-markup/lottie.md +73 -0
- package/skills/remotion-markup/measuring-dom-nodes.md +38 -0
- package/skills/remotion-markup/measuring-text.md +146 -0
- package/skills/remotion-markup/multi-scene-video.md +81 -0
- package/skills/remotion-markup/parameters.md +111 -0
- package/skills/remotion-markup/remotion-maps/SKILL.md +36 -0
- package/skills/remotion-markup/remotion-maps/agents/openai.yaml +7 -0
- package/skills/remotion-markup/remotion-maps/assets/remotion-icon.png +0 -0
- package/skills/remotion-markup/remotion-maps/techniques/cesium/TECHNIQUE.md +89 -0
- package/skills/remotion-markup/remotion-maps/techniques/cesium/assets/CesiumFlythrough.tsx +284 -0
- package/skills/remotion-markup/remotion-maps/techniques/cesium/assets/cesium-path.json +299 -0
- package/skills/remotion-markup/remotion-maps/techniques/cesium/assets/city-path.json +12 -0
- package/skills/remotion-markup/remotion-maps/techniques/cesium/assets/example-Root.tsx +39 -0
- package/skills/remotion-markup/remotion-maps/techniques/cesium/assets/flight-path.ts +35 -0
- package/skills/remotion-markup/remotion-maps/techniques/cesium/assets/sample-river.geojson +215 -0
- package/skills/remotion-markup/remotion-maps/techniques/cesium/references/3d-data-sources.md +43 -0
- package/skills/remotion-markup/remotion-maps/techniques/cesium/references/3d-flyover-architecture.md +128 -0
- package/skills/remotion-markup/remotion-maps/techniques/cesium/references/3d-troubleshooting.md +57 -0
- package/skills/remotion-markup/remotion-maps/techniques/cesium/scripts/prep-cesium-path.mjs +161 -0
- package/skills/remotion-markup/remotion-maps/techniques/mapbox/TECHNIQUE.md +449 -0
- package/skills/remotion-markup/remotion-maps/techniques/mapbox/references/render-stability.md +64 -0
- package/skills/remotion-markup/remotion-maps/techniques/maplibre/TECHNIQUE.md +465 -0
- package/skills/remotion-markup/remotion-maps/techniques/maplibre/references/render-stability.md +64 -0
- package/skills/remotion-markup/remotion-maps/techniques/maptiler/TECHNIQUE.md +80 -0
- package/skills/remotion-markup/remotion-maps/techniques/maptiler/assets/CountryLabel.tsx +70 -0
- package/skills/remotion-markup/remotion-maps/techniques/maptiler/assets/MapTilerVectorElement.ts +80 -0
- package/skills/remotion-markup/remotion-maps/techniques/maptiler/assets/RiverReveal.tsx +363 -0
- package/skills/remotion-markup/remotion-maps/techniques/maptiler/assets/example-Root.tsx +22 -0
- package/skills/remotion-markup/remotion-maps/techniques/maptiler/assets/sample-data/country-meta.json +7535 -0
- package/skills/remotion-markup/remotion-maps/techniques/maptiler/assets/sample-data/yarlung-flow.json +605 -0
- package/skills/remotion-markup/remotion-maps/techniques/maptiler/assets/tokens.ts +34 -0
- package/skills/remotion-markup/remotion-maps/techniques/maptiler/references/map-data-sources.md +91 -0
- package/skills/remotion-markup/remotion-maps/techniques/maptiler/references/map-explainer-architecture.md +129 -0
- package/skills/remotion-markup/remotion-maps/techniques/maptiler/references/map-geo-prep.md +85 -0
- package/skills/remotion-markup/remotion-maps/techniques/maptiler/references/render-stability.md +64 -0
- package/skills/remotion-markup/remotion-maps/techniques/maptiler/scripts/prep-geo.mjs +202 -0
- package/skills/remotion-markup/remotion-maps/techniques/static-map/TECHNIQUE.md +37 -0
- package/skills/remotion-markup/sequencing.md +169 -0
- package/skills/remotion-markup/sfx.md +51 -0
- package/skills/remotion-markup/silence-detection.md +71 -0
- package/skills/remotion-markup/text-highlights.md +56 -0
- package/skills/remotion-markup/timing.md +111 -0
- package/skills/remotion-markup/transitions.md +239 -0
- package/skills/remotion-markup/video-editing.md +90 -0
- package/skills/remotion-markup/voiceover.md +99 -0
- package/skills/remotion-multimedia/SKILL.md +20 -0
- package/skills/remotion-multimedia/agents/openai.yaml +7 -0
- package/skills/remotion-multimedia/assets/remotion-icon.png +0 -0
- package/skills/remotion-multimedia/get-audio-duration.md +56 -0
- package/skills/remotion-multimedia/get-video-dimensions.md +66 -0
- package/skills/remotion-multimedia/get-video-duration.md +58 -0
- package/skills/remotion-render/SKILL.md +27 -0
- package/skills/remotion-render/agents/openai.yaml +7 -0
- package/skills/remotion-render/assets/remotion-icon.png +0 -0
- package/skills/remotion-render/transparent-videos.md +106 -0
- package/skills/remotion-saas/SKILL.md +33 -0
- package/skills/remotion-saas/agents/openai.yaml +7 -0
- package/skills/remotion-saas/assets/remotion-icon.png +0 -0
- package/skills/remotion-saas/framework.md +21 -0
- package/skills/remotion-saas/player.md +33 -0
- package/skills/remotion-saas/rendering.md +69 -0
- package/skills/remotion-studio/SKILL.md +24 -0
- package/skills/remotion-studio/agents/openai.yaml +7 -0
- package/skills/remotion-studio/assets/remotion-icon.png +0 -0
- package/skills/remotion-upgrade/SKILL.md +31 -0
- package/skills/remotion-upgrade/agents/openai.yaml +7 -0
- package/skills/remotion-upgrade/assets/remotion-icon.png +0 -0
- package/skills/remotion/SKILL.md +0 -95
- package/skills/remotion/rules/animations.md +0 -31
- package/skills/remotion/rules/assets.md +0 -78
- package/skills/remotion/rules/can-decode.md +0 -81
- package/skills/remotion/rules/charts.md +0 -120
- package/skills/remotion/rules/compositions.md +0 -154
- package/skills/remotion/rules/extract-frames.md +0 -229
- package/skills/remotion/rules/fonts.md +0 -152
- package/skills/remotion/rules/images.md +0 -134
- package/skills/remotion/rules/light-leaks.md +0 -73
- package/skills/remotion/rules/maps.md +0 -412
- package/skills/remotion/rules/sfx.md +0 -30
- package/skills/remotion/rules/subtitles.md +0 -36
- package/skills/remotion/rules/text-animations.md +0 -20
- package/skills/remotion/rules/timing.md +0 -136
- package/skills/remotion/rules/trimming.md +0 -51
- /package/skills/{remotion/rules → remotion-best-practices/remotion-captions}/transcribe-captions.md +0 -0
- /package/skills/{remotion/rules → remotion-best-practices/remotion-markup}/3d.md +0 -0
- /package/skills/{remotion/rules → remotion-best-practices/remotion-markup}/audio-visualization.md +0 -0
- /package/skills/{remotion/rules → remotion-best-practices/remotion-markup}/silence-detection.md +0 -0
- /package/skills/{remotion/rules → remotion-best-practices/remotion-render}/transparent-videos.md +0 -0
|
@@ -0,0 +1,365 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: remotion-markup
|
|
3
|
+
description: Content, animation and effects best practices
|
|
4
|
+
version: 4.0.519
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
This is guidance for writing Remotion React Markup.
|
|
8
|
+
If this is not relevant, load [Remotion Best Practices](../remotion-best-practices/SKILL.md) instead.
|
|
9
|
+
|
|
10
|
+
## Preserve user changes
|
|
11
|
+
|
|
12
|
+
Users may make edits in the code outside of the conversation.
|
|
13
|
+
|
|
14
|
+
If you detect a surprising change made in the meanwhile, don't overwrite it, assume it was intentional or ask for confirmation.
|
|
15
|
+
|
|
16
|
+
## General rules
|
|
17
|
+
|
|
18
|
+
Drive animations using `useCurrentFrame()` and `interpolate()`.
|
|
19
|
+
CSS `transition` or `animation` will not render correctly, they need to refactored.
|
|
20
|
+
Tailwind animation class will not render correctly, they need to be refactored.
|
|
21
|
+
|
|
22
|
+
Use `Easing.bezier()` and `Easing.spring()` to customize timing.
|
|
23
|
+
|
|
24
|
+
Structure your markup according to [Remotion Interactivity Best Practices](../remotion-interactivity/SKILL.md)
|
|
25
|
+
|
|
26
|
+
```tsx
|
|
27
|
+
import { useCurrentFrame, Easing, interpolate, Interactive } from "remotion";
|
|
28
|
+
|
|
29
|
+
export const FadeIn = () => {
|
|
30
|
+
const frame = useCurrentFrame();
|
|
31
|
+
|
|
32
|
+
return (
|
|
33
|
+
<Interactive.Div
|
|
34
|
+
name="Title"
|
|
35
|
+
style={{
|
|
36
|
+
opacity: interpolate(frame, [0, 2 * fps], [0, 1], {
|
|
37
|
+
extrapolateRight: "clamp",
|
|
38
|
+
extrapolateLeft: "clamp",
|
|
39
|
+
easing: Easing.bezier(0.16, 1, 0.3, 1),
|
|
40
|
+
}),
|
|
41
|
+
}}
|
|
42
|
+
>
|
|
43
|
+
Hello World!
|
|
44
|
+
</Interactive.Div>
|
|
45
|
+
);
|
|
46
|
+
};
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
Keep the `interpolate()` call inline in the `style` prop.
|
|
50
|
+
Use `scale`, `translate`, `rotate` CSS properties over `transform`.
|
|
51
|
+
|
|
52
|
+
```tsx
|
|
53
|
+
// 👍 Inline editable keyframes and transform shorthands
|
|
54
|
+
style={{
|
|
55
|
+
scale: interpolate(frame, [0, 100], [0, 1], {
|
|
56
|
+
extrapolateLeft: 'clamp',
|
|
57
|
+
extrapolateRight: 'clamp',
|
|
58
|
+
easing: Easing.spring({damping: 200}),
|
|
59
|
+
output: 'perceptual-scale' // For `scale` animations, use "output: 'perceptual-scale'"
|
|
60
|
+
}),
|
|
61
|
+
translate: interpolate(frame, [0, 100], ["0px 0px", "100px 100px"], {
|
|
62
|
+
extrapolateLeft: 'clamp',
|
|
63
|
+
extrapolateRight: 'clamp',
|
|
64
|
+
easing: Easing.spring({damping: 200}),
|
|
65
|
+
}),
|
|
66
|
+
rotate: interpolate(frame, [0, 100], ["20deg", "90deg"], {
|
|
67
|
+
extrapolateLeft: 'clamp',
|
|
68
|
+
extrapolateRight: 'clamp',
|
|
69
|
+
easing: Easing.spring({damping: 200}),
|
|
70
|
+
}),
|
|
71
|
+
}}
|
|
72
|
+
|
|
73
|
+
// 👎 Non-inline values and transform strings become harder to edit in Studio
|
|
74
|
+
const scale = interpolate(frame, [0, 100], [0, 1]);
|
|
75
|
+
|
|
76
|
+
style={{
|
|
77
|
+
transform: `scale(${scale})`,
|
|
78
|
+
}}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Assets
|
|
82
|
+
|
|
83
|
+
Place assets in the `public/` folder at your project root.
|
|
84
|
+
Use `staticFile()` to reference files from the `public/` folder.
|
|
85
|
+
|
|
86
|
+
## Media components
|
|
87
|
+
|
|
88
|
+
Add video and audio using `<Video>` and `<Audio>` from `@remotion/media`.
|
|
89
|
+
Add images using the `<CanvasImage>` component.
|
|
90
|
+
Add animated GIFs, APNG, WebP or AVIF images using `<AnimatedImage>`, use `@remotion/gif` if not using Chrome.
|
|
91
|
+
Use `staticFile()` for files in `public/` or pass a remote URL directly:
|
|
92
|
+
|
|
93
|
+
```tsx
|
|
94
|
+
import { Audio, Video } from "@remotion/media";
|
|
95
|
+
import { staticFile, CanvasImage, AnimatedImage } from "remotion";
|
|
96
|
+
|
|
97
|
+
export const MyComposition = () => {
|
|
98
|
+
return (
|
|
99
|
+
<>
|
|
100
|
+
<Video src={staticFile("video.mp4")} style={{ opacity: 0.5 }} />
|
|
101
|
+
<Audio src={staticFile("audio.mp3")} />
|
|
102
|
+
<CanvasImage
|
|
103
|
+
src={staticFile("logo.png")}
|
|
104
|
+
style={{ width: 100, height: 100 }}
|
|
105
|
+
/>
|
|
106
|
+
<Video src="https://remotion.media/video.mp4" />
|
|
107
|
+
<AnimatedImage src={staticFile('nyancat.gif')} />
|
|
108
|
+
</>
|
|
109
|
+
);
|
|
110
|
+
};
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## Example scene
|
|
114
|
+
|
|
115
|
+
```tsx
|
|
116
|
+
import {
|
|
117
|
+
AbsoluteFill,
|
|
118
|
+
Easing,
|
|
119
|
+
Interactive,
|
|
120
|
+
interpolate,
|
|
121
|
+
useCurrentFrame,
|
|
122
|
+
useVideoConfig
|
|
123
|
+
} from "remotion";
|
|
124
|
+
|
|
125
|
+
export const Empty = () => {
|
|
126
|
+
const {fps} = useVideoConfig();
|
|
127
|
+
const frame = useCurrentFrame();
|
|
128
|
+
|
|
129
|
+
return (
|
|
130
|
+
<AbsoluteFill
|
|
131
|
+
name="Scene"
|
|
132
|
+
style={{
|
|
133
|
+
display: 'flex',
|
|
134
|
+
justifyContent: 'center',
|
|
135
|
+
alignItems: 'center',
|
|
136
|
+
backgroundColor: 'white'
|
|
137
|
+
}}
|
|
138
|
+
>
|
|
139
|
+
<Interactive.Div
|
|
140
|
+
name="Title"
|
|
141
|
+
style={{
|
|
142
|
+
opacity: interpolate(frame, [1 * fps, 2 * fps], [0, 1], {
|
|
143
|
+
extrapolateRight: "clamp",
|
|
144
|
+
extrapolateLeft: "clamp",
|
|
145
|
+
easing: Easing.bezier(0.16, 1, 0.3, 1),
|
|
146
|
+
}),
|
|
147
|
+
fontSize: 88
|
|
148
|
+
}}
|
|
149
|
+
>
|
|
150
|
+
Title
|
|
151
|
+
</Interactive.Div>
|
|
152
|
+
<Interactive.Div
|
|
153
|
+
name="Subtitle"
|
|
154
|
+
style={{
|
|
155
|
+
opacity: interpolate(frame, [2 * fps, 3 * fps, 8 * fps, 10 * fps], [0, 1, 1, 0], {
|
|
156
|
+
extrapolateRight: "clamp",
|
|
157
|
+
extrapolateLeft: "clamp",
|
|
158
|
+
easing: [Easing.bezier(0.16, 1, 0.3, 1), Easing.linear, Easing.bezier(0.16, 1, 0.3, 1)],
|
|
159
|
+
}),
|
|
160
|
+
fontSize: 32
|
|
161
|
+
}}
|
|
162
|
+
>
|
|
163
|
+
Subtitle
|
|
164
|
+
</Interactive.Div>
|
|
165
|
+
</AbsoluteFill>
|
|
166
|
+
);
|
|
167
|
+
}
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
## Delaying, trimming
|
|
171
|
+
|
|
172
|
+
Most components (`<AbsoluteFill>`, `<Interactive.*>` `<Img>`, `<AnimatedImage>`, `<CanvasImage>`, `<HtmlInCanvas>`, `<Solid>`, `<Sequence>` from `remotion`, `<Video>` and `<Audio>` from `@remotion/media`, `<Gif>`, and more) support the following props:
|
|
173
|
+
|
|
174
|
+
### from
|
|
175
|
+
|
|
176
|
+
```tsx
|
|
177
|
+
<Img from={1 * fps} {/* ... */}/>
|
|
178
|
+
<Video from={1 * fps} {/* ... */}/>
|
|
179
|
+
<Interactive.Div from={1 * fps} {/* ... */}/>
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
When the element starts appearing in the timelien.
|
|
183
|
+
|
|
184
|
+
### durationInFrames
|
|
185
|
+
|
|
186
|
+
```tsx
|
|
187
|
+
<Img durationInFrames={20 * fps} {/* ... */}/>
|
|
188
|
+
<Interactive.Div durationInFrames={20 * fps} {/* ... */}/>
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
For how long the layer plays in the timeline.
|
|
192
|
+
For media, pass the natural duration of the media: `<Video durationInFrames={29.322 * fps}/>`
|
|
193
|
+
|
|
194
|
+
### `trimBefore`
|
|
195
|
+
|
|
196
|
+
Useful for components whose internal clock should start later:
|
|
197
|
+
|
|
198
|
+
```tsx
|
|
199
|
+
// Trim away first 2 seconds of footage
|
|
200
|
+
<Video trimBefore={2 * fps} {/* ... */} />
|
|
201
|
+
|
|
202
|
+
// `useCurrenFrame()` for children starts at `10 * fps`
|
|
203
|
+
<Sequence trimBefore={10 * fps} {/* ... */} />
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
### Fallback
|
|
207
|
+
|
|
208
|
+
If a component does not support these props, wrap it in`<Sequence>` from `remotion`, which has them.
|
|
209
|
+
|
|
210
|
+
- `layout="absolute-fill"` makes the Sequence behave like AbsoluteFill
|
|
211
|
+
- `layout="none"` is "headless" mode, no wrapper element is used.
|
|
212
|
+
|
|
213
|
+
## Maps
|
|
214
|
+
|
|
215
|
+
See [Remotion Maps](./remotion-maps/SKILL.md) if wanting to include maps in the video.
|
|
216
|
+
|
|
217
|
+
## Text highlights and annotations
|
|
218
|
+
|
|
219
|
+
See [text-highlights.md](text-highlights.md) for text highlights (highlight markers), circles, underlines, strike-throughs, crossed-off text, boxes.
|
|
220
|
+
|
|
221
|
+
## Multi-scene videos
|
|
222
|
+
|
|
223
|
+
See [multi-scene-video.md](multi-scene-video.md) if planning to make a video with multiple subsequent scenes.
|
|
224
|
+
|
|
225
|
+
## Voiceover
|
|
226
|
+
|
|
227
|
+
See [voiceover.md](voiceover.md) for adding an AI-generated voiceover to Remotion compositions using ElevenLabs TTS.
|
|
228
|
+
|
|
229
|
+
## Embedding Videos
|
|
230
|
+
|
|
231
|
+
See [embedding-videos.md](embedding-videos.md) for advanced knowledge about embedding videos - trimming, volume, speed, looping, pitch.
|
|
232
|
+
|
|
233
|
+
## Embedding Audio
|
|
234
|
+
|
|
235
|
+
See [audio.md](audio.md) for advanced audio features like trimming, volume, speed, pitch.
|
|
236
|
+
|
|
237
|
+
## Video editing
|
|
238
|
+
|
|
239
|
+
See [video-editing.md](video-editing.md) for structuring editable video timelines in Remotion Studio.
|
|
240
|
+
|
|
241
|
+
## Cropping
|
|
242
|
+
|
|
243
|
+
See [cropping.md](cropping.md) if needing to crop the visible rectangle of a component.
|
|
244
|
+
|
|
245
|
+
## Transitions
|
|
246
|
+
|
|
247
|
+
See [transitions.md](transitions.md) for scene transition patterns.
|
|
248
|
+
|
|
249
|
+
## Visual and pixel effects
|
|
250
|
+
|
|
251
|
+
When creating a visual effect, consider whether it is feasible using CSS and HTML, or whether a shader is needed.
|
|
252
|
+
Order or preference:
|
|
253
|
+
|
|
254
|
+
1. Regular HTML + CSS or other web techniques
|
|
255
|
+
2. An effect applied to the element directly (`<Video>`, `<Img>`), or by wrapping the content in [`<HtmlInCanvas>`](html-in-canvas.md), which also accepts `effects`:
|
|
256
|
+
|
|
257
|
+
- A listed effect via [effects.md](effects.md)
|
|
258
|
+
- A custom `createEffect()` via [effects.md](effects.md) when no preset is available.
|
|
259
|
+
|
|
260
|
+
## 3D content
|
|
261
|
+
|
|
262
|
+
See [./3d.md](./3d.md) for 3D content in Remotion using Three.js and React Three Fiber.
|
|
263
|
+
|
|
264
|
+
## Sound effects
|
|
265
|
+
|
|
266
|
+
When needing to use sound effects, load the [./sfx.md](./sfx.md) file for more information.
|
|
267
|
+
|
|
268
|
+
## Audio visualization
|
|
269
|
+
|
|
270
|
+
When needing to visualize audio (spectrum bars, waveforms, bass-reactive effects), load the [./audio-visualization.md](./audio-visualization.md) file for more information.
|
|
271
|
+
|
|
272
|
+
## Maps
|
|
273
|
+
|
|
274
|
+
For static maps, animated routes and markers, geographic explainers, Mapbox, MapLibre, MapTiler, GeoJSON, or 3D geographic flyovers, load [Remotion Maps](./remotion-maps/SKILL.md).
|
|
275
|
+
|
|
276
|
+
## Captions
|
|
277
|
+
|
|
278
|
+
When dealing with captions or subtitles, load the [Remotion Captions](../remotion-captions/SKILL.md) skill for more information.
|
|
279
|
+
|
|
280
|
+
## Google Fonts
|
|
281
|
+
|
|
282
|
+
Is the recommended way to load fonts in Remotion. See [google-fonts.md](google-fonts.md) for how to load Google Fonts.
|
|
283
|
+
|
|
284
|
+
## Local fonts
|
|
285
|
+
|
|
286
|
+
See [local-fonts.md](local-fonts.md) for how to load local fonts.
|
|
287
|
+
|
|
288
|
+
## GIFs
|
|
289
|
+
|
|
290
|
+
See [gifs.md](gifs.md) for how to display GIFs synchronized with Remotion's timeline.
|
|
291
|
+
|
|
292
|
+
## Advanced Images
|
|
293
|
+
|
|
294
|
+
See [images.md](images.md) for sizing and positioning images, dynamic image paths, and getting image dimensions.
|
|
295
|
+
|
|
296
|
+
## Lottie animations
|
|
297
|
+
|
|
298
|
+
See [lottie.md](lottie.md) for embedding Lottie animations in Remotion.
|
|
299
|
+
|
|
300
|
+
## Timing
|
|
301
|
+
|
|
302
|
+
See [timing.md](timing.md) for more timing techniques for `interpolate()`.
|
|
303
|
+
|
|
304
|
+
## Parameterized videos
|
|
305
|
+
|
|
306
|
+
See [parameters.md](parameters.md) for making a composition parametrizable by adding a Zod schema.
|
|
307
|
+
|
|
308
|
+
## Measuring DOM nodes
|
|
309
|
+
|
|
310
|
+
See [measuring-dom-nodes.md](measuring-dom-nodes.md) for measuring DOM element dimensions in Remotion.
|
|
311
|
+
|
|
312
|
+
## Measuring text
|
|
313
|
+
|
|
314
|
+
See [measuring-text.md](measuring-text.md) for measuring text dimensions, fitting text to containers, and checking overflow.
|
|
315
|
+
|
|
316
|
+
## Using FFmpeg
|
|
317
|
+
|
|
318
|
+
For some video operations, such as trimming videos or detecting silence, FFmpeg should be used. Load the [./ffmpeg.md](./ffmpeg.md) file for more information.
|
|
319
|
+
|
|
320
|
+
## Silence detection
|
|
321
|
+
|
|
322
|
+
When needing to detect and trim silent segments from video or audio files, load the [./silence-detection.md](./silence-detection.md) file.
|
|
323
|
+
|
|
324
|
+
## Dynamic duration, dimensions and data
|
|
325
|
+
|
|
326
|
+
See [calculate-metadata.md](calculate-metadata.md) for dynamically set composition duration, dimensions, and props.
|
|
327
|
+
|
|
328
|
+
## Advanced compositions
|
|
329
|
+
|
|
330
|
+
See [compositions.md](compositions.md) for how to define stills, folders, default props and for how to nest compositions.
|
|
331
|
+
|
|
332
|
+
## Advanced sequencing
|
|
333
|
+
|
|
334
|
+
See [sequencing.md](sequencing.md) for more sequencing patterns - delay, trim, limit duration of items.
|
|
335
|
+
|
|
336
|
+
## Install modules
|
|
337
|
+
|
|
338
|
+
Use `npx remotion add` to add new packages with the right version:
|
|
339
|
+
|
|
340
|
+
```
|
|
341
|
+
npx remotion add @remotion/media
|
|
342
|
+
```
|
|
343
|
+
|
|
344
|
+
This goes for `@remotion/*` packages, `mediabunny`, `@mediabunny/*`, and `zod`.
|
|
345
|
+
|
|
346
|
+
## Previewing markup
|
|
347
|
+
|
|
348
|
+
```
|
|
349
|
+
npx remotion studio --no-open
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
This will start a long-running process and print the server URL for the preview.
|
|
353
|
+
If server is already started, it will print the URL.
|
|
354
|
+
You can visit a specific composition by navigating to `/[composition-id]`, for example `http://localhost:3000/MapAnimation`.
|
|
355
|
+
|
|
356
|
+
## Optional: one-frame render check
|
|
357
|
+
|
|
358
|
+
You can render a single frame with the CLI to sanity-check layout, colors, or timing.
|
|
359
|
+
Skip it for trivial edits, pure refactors, or when you already have enough confidence from Studio or prior renders.
|
|
360
|
+
|
|
361
|
+
```bash
|
|
362
|
+
npx remotion still [composition-id] --scale=0.25 --frame=30
|
|
363
|
+
```
|
|
364
|
+
|
|
365
|
+
At 30 fps, `--frame=30` is the one-second mark (`--frame` is zero-based).
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
interface:
|
|
2
|
+
display_name: '/remotion-markup'
|
|
3
|
+
short_description: 'Apply Remotion animation and effects practices'
|
|
4
|
+
icon_small: './assets/remotion-icon.png'
|
|
5
|
+
icon_large: './assets/remotion-icon.png'
|
|
6
|
+
brand_color: '#0B84F3'
|
|
7
|
+
default_prompt: '$remotion-markup: Apply best Remotion Practices to MyComp.tsx.'
|
|
Binary file
|
|
@@ -0,0 +1,198 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: audio-visualization
|
|
3
|
+
description: Audio visualization patterns - spectrum bars, waveforms, bass-reactive effects
|
|
4
|
+
metadata:
|
|
5
|
+
tags: audio, visualization, spectrum, waveform, bass, music, audiogram, frequency
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Audio Visualization in Remotion
|
|
9
|
+
|
|
10
|
+
## Prerequisites
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npx remotion add @remotion/media-utils
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Loading Audio Data
|
|
17
|
+
|
|
18
|
+
Use `useWindowedAudioData()` (https://www.remotion.dev/docs/use-windowed-audio-data) to load audio data:
|
|
19
|
+
|
|
20
|
+
```tsx
|
|
21
|
+
import { useWindowedAudioData } from "@remotion/media-utils";
|
|
22
|
+
import { staticFile, useCurrentFrame, useVideoConfig } from "remotion";
|
|
23
|
+
|
|
24
|
+
const frame = useCurrentFrame();
|
|
25
|
+
const { fps } = useVideoConfig();
|
|
26
|
+
|
|
27
|
+
const { audioData, dataOffsetInSeconds } = useWindowedAudioData({
|
|
28
|
+
src: staticFile("podcast.wav"),
|
|
29
|
+
frame,
|
|
30
|
+
fps,
|
|
31
|
+
windowInSeconds: 30,
|
|
32
|
+
});
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Spectrum Bar Visualization
|
|
36
|
+
|
|
37
|
+
Use `visualizeAudio()` (https://www.remotion.dev/docs/visualize-audio) to get frequency data for bar charts:
|
|
38
|
+
|
|
39
|
+
```tsx
|
|
40
|
+
import { useWindowedAudioData, visualizeAudio } from "@remotion/media-utils";
|
|
41
|
+
import { staticFile, useCurrentFrame, useVideoConfig } from "remotion";
|
|
42
|
+
|
|
43
|
+
const frame = useCurrentFrame();
|
|
44
|
+
const { fps } = useVideoConfig();
|
|
45
|
+
|
|
46
|
+
const { audioData, dataOffsetInSeconds } = useWindowedAudioData({
|
|
47
|
+
src: staticFile("music.mp3"),
|
|
48
|
+
frame,
|
|
49
|
+
fps,
|
|
50
|
+
windowInSeconds: 30,
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
if (!audioData) {
|
|
54
|
+
return null;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
const frequencies = visualizeAudio({
|
|
58
|
+
fps,
|
|
59
|
+
frame,
|
|
60
|
+
audioData,
|
|
61
|
+
numberOfSamples: 256,
|
|
62
|
+
optimizeFor: "speed",
|
|
63
|
+
dataOffsetInSeconds,
|
|
64
|
+
});
|
|
65
|
+
|
|
66
|
+
return (
|
|
67
|
+
<div style={{ display: "flex", alignItems: "flex-end", height: 200 }}>
|
|
68
|
+
{frequencies.map((v, i) => (
|
|
69
|
+
<div
|
|
70
|
+
key={i}
|
|
71
|
+
style={{
|
|
72
|
+
flex: 1,
|
|
73
|
+
height: `${v * 100}%`,
|
|
74
|
+
backgroundColor: "#0b84f3",
|
|
75
|
+
margin: "0 1px",
|
|
76
|
+
}}
|
|
77
|
+
/>
|
|
78
|
+
))}
|
|
79
|
+
</div>
|
|
80
|
+
);
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
- `numberOfSamples` must be power of 2 (32, 64, 128, 256, 512, 1024)
|
|
84
|
+
- Values range 0-1; left of array = bass, right = highs
|
|
85
|
+
- Use `optimizeFor: "speed"` for Lambda or high sample counts
|
|
86
|
+
|
|
87
|
+
**Important:** When passing `audioData` to child components, also pass the `frame` from the parent. Do not call `useCurrentFrame()` in each child - this causes discontinuous visualization when children are inside `<Sequence>` with offsets.
|
|
88
|
+
|
|
89
|
+
## Waveform Visualization
|
|
90
|
+
|
|
91
|
+
Use `visualizeAudioWaveform()` (https://www.remotion.dev/docs/media-utils/visualize-audio-waveform) with `createSmoothSvgPath()` (https://www.remotion.dev/docs/media-utils/create-smooth-svg-path) for oscilloscope-style displays:
|
|
92
|
+
|
|
93
|
+
```tsx
|
|
94
|
+
import {
|
|
95
|
+
createSmoothSvgPath,
|
|
96
|
+
useWindowedAudioData,
|
|
97
|
+
visualizeAudioWaveform,
|
|
98
|
+
} from "@remotion/media-utils";
|
|
99
|
+
import { staticFile, useCurrentFrame, useVideoConfig } from "remotion";
|
|
100
|
+
|
|
101
|
+
const frame = useCurrentFrame();
|
|
102
|
+
const { width, fps } = useVideoConfig();
|
|
103
|
+
const HEIGHT = 200;
|
|
104
|
+
|
|
105
|
+
const { audioData, dataOffsetInSeconds } = useWindowedAudioData({
|
|
106
|
+
src: staticFile("voice.wav"),
|
|
107
|
+
frame,
|
|
108
|
+
fps,
|
|
109
|
+
windowInSeconds: 30,
|
|
110
|
+
});
|
|
111
|
+
|
|
112
|
+
if (!audioData) {
|
|
113
|
+
return null;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
const waveform = visualizeAudioWaveform({
|
|
117
|
+
fps,
|
|
118
|
+
frame,
|
|
119
|
+
audioData,
|
|
120
|
+
numberOfSamples: 256,
|
|
121
|
+
windowInSeconds: 0.5,
|
|
122
|
+
dataOffsetInSeconds,
|
|
123
|
+
});
|
|
124
|
+
|
|
125
|
+
const path = createSmoothSvgPath({
|
|
126
|
+
points: waveform.map((y, i) => ({
|
|
127
|
+
x: (i / (waveform.length - 1)) * width,
|
|
128
|
+
y: HEIGHT / 2 + (y * HEIGHT) / 2,
|
|
129
|
+
})),
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
return (
|
|
133
|
+
<svg width={width} height={HEIGHT}>
|
|
134
|
+
<path d={path} fill="none" stroke="#0b84f3" strokeWidth={2} />
|
|
135
|
+
</svg>
|
|
136
|
+
);
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
## Bass-Reactive Effects
|
|
140
|
+
|
|
141
|
+
Extract low frequencies for beat-reactive animations:
|
|
142
|
+
|
|
143
|
+
```tsx
|
|
144
|
+
const frequencies = visualizeAudio({
|
|
145
|
+
fps,
|
|
146
|
+
frame,
|
|
147
|
+
audioData,
|
|
148
|
+
numberOfSamples: 128,
|
|
149
|
+
optimizeFor: "speed",
|
|
150
|
+
dataOffsetInSeconds,
|
|
151
|
+
});
|
|
152
|
+
|
|
153
|
+
const lowFrequencies = frequencies.slice(0, 32);
|
|
154
|
+
const bassIntensity =
|
|
155
|
+
lowFrequencies.reduce((sum, v) => sum + v, 0) / lowFrequencies.length;
|
|
156
|
+
|
|
157
|
+
const scale = 1 + bassIntensity * 0.5;
|
|
158
|
+
const opacity = Math.min(0.6, bassIntensity * 0.8);
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
## Volume-Based Waveform
|
|
162
|
+
|
|
163
|
+
Use `getWaveformPortion()` (https://www.remotion.dev/docs/get-waveform-portion) when you need simplified volume data instead of frequency spectrum:
|
|
164
|
+
|
|
165
|
+
```tsx
|
|
166
|
+
import { getWaveformPortion } from "@remotion/media-utils";
|
|
167
|
+
import { useCurrentFrame, useVideoConfig } from "remotion";
|
|
168
|
+
|
|
169
|
+
const frame = useCurrentFrame();
|
|
170
|
+
const { fps } = useVideoConfig();
|
|
171
|
+
const currentTimeInSeconds = frame / fps;
|
|
172
|
+
|
|
173
|
+
const waveform = getWaveformPortion({
|
|
174
|
+
audioData,
|
|
175
|
+
startTimeInSeconds: currentTimeInSeconds,
|
|
176
|
+
durationInSeconds: 5,
|
|
177
|
+
numberOfSamples: 50,
|
|
178
|
+
});
|
|
179
|
+
|
|
180
|
+
// Returns array of { index, amplitude } objects (amplitude: 0-1)
|
|
181
|
+
waveform.map((bar) => (
|
|
182
|
+
<div key={bar.index} style={{ height: bar.amplitude * 100 }} />
|
|
183
|
+
));
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
## Postprocessing
|
|
187
|
+
|
|
188
|
+
Low frequencies naturally dominate. Apply logarithmic scaling for visual balance:
|
|
189
|
+
|
|
190
|
+
```tsx
|
|
191
|
+
const minDb = -100;
|
|
192
|
+
const maxDb = -30;
|
|
193
|
+
|
|
194
|
+
const scaled = frequencies.map((value) => {
|
|
195
|
+
const db = 20 * Math.log10(value);
|
|
196
|
+
return (db - minDb) / (maxDb - minDb);
|
|
197
|
+
});
|
|
198
|
+
```
|