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,31 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: remotion-upgrade
|
|
3
|
+
description: Upgrade Remotion, and related packages
|
|
4
|
+
version: 4.0.519
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# Upgrade Remotion
|
|
8
|
+
|
|
9
|
+
1. Inspect the project manifests and lockfile to identify the package manager and workspaces. Preserve unrelated changes.
|
|
10
|
+
2. Determine whether `@remotion/cli` is locally available. If it is, run:
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npx remotion upgrade
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
This also updates project-local Remotion skills. Skip the manual upgrade below.
|
|
17
|
+
|
|
18
|
+
3. If `@remotion/cli` is not available, upgrade manually:
|
|
19
|
+
- Get the latest stable Remotion version with `npm view remotion version`.
|
|
20
|
+
- Find every installed `remotion` and `@remotion/*` dependency across the project and upgrade them all to that exact version. Preserve their dependency sections and the project's workspace or catalog conventions.
|
|
21
|
+
- Read the current [Mediabunny compatibility page](https://www.remotion.dev/docs/mediabunny/version) and determine the Mediabunny version compatible with the target Remotion version. Upgrade every installed `mediabunny` and `@mediabunny/*` package to the documented compatible version.
|
|
22
|
+
- Run the project's package manager to update its lockfile.
|
|
23
|
+
4. If `@remotion/cli` is not available, update the installed Remotion skills:
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
npx skills update remotion-best-practices remotion-captions remotion-create remotion-docs remotion-interactivity remotion-maps remotion-markup remotion-multimedia remotion-render remotion-saas remotion-studio remotion-upgrade --yes
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
5. Review the manifest and lockfile diff. Ensure all Remotion packages use one version and all installed Mediabunny packages use the compatible version. If the CLI is available, run `npx remotion versions` as an additional check.
|
|
30
|
+
|
|
31
|
+
The [Remotion releases](https://github.com/remotion-dev/remotion/releases) contain the changelog and may be useful for summarizing relevant changes after the upgrade.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
interface:
|
|
2
|
+
display_name: '/remotion-upgrade'
|
|
3
|
+
short_description: 'Upgrade Remotion and related dependencies'
|
|
4
|
+
icon_small: './assets/remotion-icon.png'
|
|
5
|
+
icon_large: './assets/remotion-icon.png'
|
|
6
|
+
brand_color: '#0B84F3'
|
|
7
|
+
default_prompt: '$remotion-upgrade: Upgrade my project.'
|
|
Binary file
|
package/skills/remotion/SKILL.md
DELETED
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: remotion
|
|
3
|
-
description: "Remotion video creation best practices: build programmatic videos with React (animations, audio, captions, subtitles, 3D, charts, fonts, GIFs, Lottie, maps, transitions, text effects). Use when the user asks to create, edit, or render a video with Remotion, scaffold a Remotion project (npx create-video), add captions or audio, or debug Remotion code. 38 rule files under rules/ cover specific domains and should be loaded on demand. 中文:用 Remotion(React 编程式视频)新建项目、写/改合成、渲染视频、加字幕/音频时使用。"
|
|
4
|
-
compatibility: Requires Node.js >= 20 with npx and network access to install Remotion packages from the npm registry.
|
|
5
|
-
allowed-tools: Bash
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
## When to use
|
|
9
|
-
|
|
10
|
-
Use this skill whenever you are dealing with Remotion code to obtain the domain-specific knowledge.
|
|
11
|
-
|
|
12
|
-
## New project setup
|
|
13
|
-
|
|
14
|
-
When in an empty folder or workspace with no existing Remotion project, scaffold one using:
|
|
15
|
-
|
|
16
|
-
```bash
|
|
17
|
-
npx create-video@latest --yes --blank --no-tailwind my-video
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
Replace `my-video` with a suitable project name.
|
|
21
|
-
|
|
22
|
-
## Starting preview
|
|
23
|
-
|
|
24
|
-
Start the Remotion Studio to preview a video:
|
|
25
|
-
|
|
26
|
-
```bash
|
|
27
|
-
npx remotion studio
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
## Optional: one-frame render check
|
|
31
|
-
|
|
32
|
-
You can render a single frame with the CLI to sanity-check layout, colors, or timing.
|
|
33
|
-
Skip it for trivial edits, pure refactors, or when you already have enough confidence from Studio or prior renders.
|
|
34
|
-
|
|
35
|
-
```bash
|
|
36
|
-
npx remotion still [composition-id] --scale=0.25 --frame=30
|
|
37
|
-
```
|
|
38
|
-
|
|
39
|
-
At 30 fps, `--frame=30` is the one-second mark (`--frame` is zero-based).
|
|
40
|
-
|
|
41
|
-
## Captions
|
|
42
|
-
|
|
43
|
-
When dealing with captions or subtitles, load the [./rules/subtitles.md](./rules/subtitles.md) file for more information.
|
|
44
|
-
|
|
45
|
-
## Using FFmpeg
|
|
46
|
-
|
|
47
|
-
For some video operations, such as trimming videos or detecting silence, FFmpeg should be used. Load the [./rules/ffmpeg.md](./rules/ffmpeg.md) file for more information.
|
|
48
|
-
|
|
49
|
-
## Silence detection
|
|
50
|
-
|
|
51
|
-
When needing to detect and trim silent segments from video or audio files, load the [./rules/silence-detection.md](./rules/silence-detection.md) file.
|
|
52
|
-
|
|
53
|
-
## Audio visualization
|
|
54
|
-
|
|
55
|
-
When needing to visualize audio (spectrum bars, waveforms, bass-reactive effects), load the [./rules/audio-visualization.md](./rules/audio-visualization.md) file for more information.
|
|
56
|
-
|
|
57
|
-
## Sound effects
|
|
58
|
-
|
|
59
|
-
When needing to use sound effects, load the [./rules/sfx.md](./rules/sfx.md) file for more information.
|
|
60
|
-
|
|
61
|
-
## How to use
|
|
62
|
-
|
|
63
|
-
Read individual rule files for detailed explanations and code examples:
|
|
64
|
-
|
|
65
|
-
- [rules/3d.md](rules/3d.md) - 3D content in Remotion using Three.js and React Three Fiber
|
|
66
|
-
- [rules/animations.md](rules/animations.md) - Fundamental animation skills for Remotion
|
|
67
|
-
- [rules/assets.md](rules/assets.md) - Importing images, videos, audio, and fonts into Remotion
|
|
68
|
-
- [rules/audio.md](rules/audio.md) - Using audio and sound in Remotion - importing, trimming, volume, speed, pitch
|
|
69
|
-
- [rules/calculate-metadata.md](rules/calculate-metadata.md) - Dynamically set composition duration, dimensions, and props
|
|
70
|
-
- [rules/can-decode.md](rules/can-decode.md) - Check if a video can be decoded by the browser using Mediabunny
|
|
71
|
-
- [rules/charts.md](rules/charts.md) - Chart and data visualization patterns for Remotion (bar, pie, line, stock charts)
|
|
72
|
-
- [rules/compositions.md](rules/compositions.md) - Defining compositions, stills, folders, default props and dynamic metadata
|
|
73
|
-
- [rules/extract-frames.md](rules/extract-frames.md) - Extract frames from videos at specific timestamps using Mediabunny
|
|
74
|
-
- [rules/fonts.md](rules/fonts.md) - Loading Google Fonts and local fonts in Remotion
|
|
75
|
-
- [rules/get-audio-duration.md](rules/get-audio-duration.md) - Getting the duration of an audio file in seconds with Mediabunny
|
|
76
|
-
- [rules/get-video-dimensions.md](rules/get-video-dimensions.md) - Getting the width and height of a video file with Mediabunny
|
|
77
|
-
- [rules/get-video-duration.md](rules/get-video-duration.md) - Getting the duration of a video file in seconds with Mediabunny
|
|
78
|
-
- [rules/gifs.md](rules/gifs.md) - Displaying GIFs synchronized with Remotion's timeline
|
|
79
|
-
- [rules/images.md](rules/images.md) - Embedding images in Remotion using the Img component
|
|
80
|
-
- [rules/light-leaks.md](rules/light-leaks.md) - Light leak overlay effects using @remotion/light-leaks
|
|
81
|
-
- [rules/lottie.md](rules/lottie.md) - Embedding Lottie animations in Remotion
|
|
82
|
-
- [rules/measuring-dom-nodes.md](rules/measuring-dom-nodes.md) - Measuring DOM element dimensions in Remotion
|
|
83
|
-
- [rules/measuring-text.md](rules/measuring-text.md) - Measuring text dimensions, fitting text to containers, and checking overflow
|
|
84
|
-
- [rules/sequencing.md](rules/sequencing.md) - Sequencing patterns for Remotion - delay, trim, limit duration of items
|
|
85
|
-
- [rules/tailwind.md](rules/tailwind.md) - Using TailwindCSS in Remotion
|
|
86
|
-
- [rules/text-animations.md](rules/text-animations.md) - Typography and text animation patterns for Remotion
|
|
87
|
-
- [rules/timing.md](rules/timing.md) - Timing with interpolate and Bézier easing, springs
|
|
88
|
-
- [rules/transitions.md](rules/transitions.md) - Scene transition patterns for Remotion
|
|
89
|
-
- [rules/transparent-videos.md](rules/transparent-videos.md) - Rendering out a video with transparency
|
|
90
|
-
- [rules/trimming.md](rules/trimming.md) - Trimming patterns for Remotion - cut the beginning or end of animations
|
|
91
|
-
- [rules/videos.md](rules/videos.md) - Embedding videos in Remotion - trimming, volume, speed, looping, pitch
|
|
92
|
-
- [rules/parameters.md](rules/parameters.md) - Make a video parametrizable by adding a Zod schema
|
|
93
|
-
- [rules/maps.md](rules/maps.md) - Add a map using Mapbox and animate it
|
|
94
|
-
- [rules/silence-detection.md](rules/silence-detection.md) - Adaptive silence detection using FFmpeg loudnorm and silencedetect
|
|
95
|
-
- [rules/voiceover.md](rules/voiceover.md) - Adding AI-generated voiceover to Remotion compositions using ElevenLabs TTS
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: animations
|
|
3
|
-
description: Fundamental animation skills for Remotion
|
|
4
|
-
metadata:
|
|
5
|
-
tags: animations, transitions, frames, useCurrentFrame
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
All animations MUST be driven by the `useCurrentFrame()` hook.
|
|
9
|
-
Write animations in seconds and multiply them by the `fps` value from `useVideoConfig()`.
|
|
10
|
-
|
|
11
|
-
For eased motion, prefer `interpolate` with explicit frame ranges and an easing—especially `Easing.bezier`, which matches CSS `cubic-bezier` so timing can be shared with web specs and curve editors. See [timing](./timing.md).
|
|
12
|
-
|
|
13
|
-
```tsx
|
|
14
|
-
import { useCurrentFrame, Easing } from "remotion";
|
|
15
|
-
|
|
16
|
-
export const FadeIn = () => {
|
|
17
|
-
const frame = useCurrentFrame();
|
|
18
|
-
const { fps } = useVideoConfig();
|
|
19
|
-
|
|
20
|
-
const opacity = interpolate(frame, [0, 2 * fps], [0, 1], {
|
|
21
|
-
extrapolateRight: "clamp",
|
|
22
|
-
extrapolateLeft: "clamp",
|
|
23
|
-
easing: Easing.bezier(0.16, 1, 0.3, 1),
|
|
24
|
-
});
|
|
25
|
-
|
|
26
|
-
return <div style={{ opacity }}>Hello World!</div>;
|
|
27
|
-
};
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
CSS transitions or animations are FORBIDDEN - they will not render correctly.
|
|
31
|
-
Tailwind animation class names are FORBIDDEN - they will not render correctly.
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: assets
|
|
3
|
-
description: Importing images, videos, audio, and fonts into Remotion
|
|
4
|
-
metadata:
|
|
5
|
-
tags: assets, staticFile, images, fonts, public
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Importing assets in Remotion
|
|
9
|
-
|
|
10
|
-
## The public folder
|
|
11
|
-
|
|
12
|
-
Place assets in the `public/` folder at your project root.
|
|
13
|
-
|
|
14
|
-
## Using staticFile()
|
|
15
|
-
|
|
16
|
-
You MUST use `staticFile()` to reference files from the `public/` folder:
|
|
17
|
-
|
|
18
|
-
```tsx
|
|
19
|
-
import { Img, staticFile } from "remotion";
|
|
20
|
-
|
|
21
|
-
export const MyComposition = () => {
|
|
22
|
-
return <Img src={staticFile("logo.png")} />;
|
|
23
|
-
};
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
The function returns an encoded URL that works correctly when deploying to subdirectories.
|
|
27
|
-
|
|
28
|
-
## Using with components
|
|
29
|
-
|
|
30
|
-
**Images:**
|
|
31
|
-
|
|
32
|
-
```tsx
|
|
33
|
-
import { Img, staticFile } from "remotion";
|
|
34
|
-
|
|
35
|
-
<Img src={staticFile("photo.png")} />;
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
**Videos:**
|
|
39
|
-
|
|
40
|
-
```tsx
|
|
41
|
-
import { Video } from "@remotion/media";
|
|
42
|
-
import { staticFile } from "remotion";
|
|
43
|
-
|
|
44
|
-
<Video src={staticFile("clip.mp4")} />;
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
**Audio:**
|
|
48
|
-
|
|
49
|
-
```tsx
|
|
50
|
-
import { Audio } from "@remotion/media";
|
|
51
|
-
import { staticFile } from "remotion";
|
|
52
|
-
|
|
53
|
-
<Audio src={staticFile("music.mp3")} />;
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
**Fonts:**
|
|
57
|
-
|
|
58
|
-
```tsx
|
|
59
|
-
import { staticFile } from "remotion";
|
|
60
|
-
|
|
61
|
-
const fontFamily = new FontFace("MyFont", `url(${staticFile("font.woff2")})`);
|
|
62
|
-
await fontFamily.load();
|
|
63
|
-
document.fonts.add(fontFamily);
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
## Remote URLs
|
|
67
|
-
|
|
68
|
-
Remote URLs can be used directly without `staticFile()`:
|
|
69
|
-
|
|
70
|
-
```tsx
|
|
71
|
-
<Img src="https://example.com/image.png" />
|
|
72
|
-
<Video src="https://remotion.media/video.mp4" />
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
## Important notes
|
|
76
|
-
|
|
77
|
-
- Remotion components (`<Img>`, `<Video>`, `<Audio>`) ensure assets are fully loaded before rendering
|
|
78
|
-
- Special characters in filenames (`#`, `?`, `&`) are automatically encoded
|
|
@@ -1,81 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: can-decode
|
|
3
|
-
description: Check if a video can be decoded by the browser using Mediabunny
|
|
4
|
-
metadata:
|
|
5
|
-
tags: decode, validation, video, audio, compatibility, browser
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Checking if a video can be decoded
|
|
9
|
-
|
|
10
|
-
Use Mediabunny to check if a video can be decoded by the browser before attempting to play it.
|
|
11
|
-
|
|
12
|
-
First, install the right version of Mediabunny:
|
|
13
|
-
|
|
14
|
-
```bash
|
|
15
|
-
npx remotion add mediabunny
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
## The `canDecode()` function
|
|
19
|
-
|
|
20
|
-
This function can be copy-pasted into any project.
|
|
21
|
-
|
|
22
|
-
```tsx
|
|
23
|
-
import { Input, ALL_FORMATS, UrlSource } from "mediabunny";
|
|
24
|
-
|
|
25
|
-
export const canDecode = async (src: string) => {
|
|
26
|
-
const input = new Input({
|
|
27
|
-
formats: ALL_FORMATS,
|
|
28
|
-
source: new UrlSource(src, {
|
|
29
|
-
getRetryDelay: () => null,
|
|
30
|
-
}),
|
|
31
|
-
});
|
|
32
|
-
|
|
33
|
-
try {
|
|
34
|
-
await input.getFormat();
|
|
35
|
-
} catch {
|
|
36
|
-
return false;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
const videoTrack = await input.getPrimaryVideoTrack();
|
|
40
|
-
if (videoTrack && !(await videoTrack.canDecode())) {
|
|
41
|
-
return false;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
const audioTrack = await input.getPrimaryAudioTrack();
|
|
45
|
-
if (audioTrack && !(await audioTrack.canDecode())) {
|
|
46
|
-
return false;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
return true;
|
|
50
|
-
};
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
## Usage
|
|
54
|
-
|
|
55
|
-
```tsx
|
|
56
|
-
const src = "https://remotion.media/video.mp4";
|
|
57
|
-
const isDecodable = await canDecode(src);
|
|
58
|
-
|
|
59
|
-
if (isDecodable) {
|
|
60
|
-
console.log("Video can be decoded");
|
|
61
|
-
} else {
|
|
62
|
-
console.log("Video cannot be decoded by this browser");
|
|
63
|
-
}
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
## Using with Blob
|
|
67
|
-
|
|
68
|
-
For file uploads or drag-and-drop, use `BlobSource`:
|
|
69
|
-
|
|
70
|
-
```tsx
|
|
71
|
-
import { Input, ALL_FORMATS, BlobSource } from "mediabunny";
|
|
72
|
-
|
|
73
|
-
export const canDecodeBlob = async (blob: Blob) => {
|
|
74
|
-
const input = new Input({
|
|
75
|
-
formats: ALL_FORMATS,
|
|
76
|
-
source: new BlobSource(blob),
|
|
77
|
-
});
|
|
78
|
-
|
|
79
|
-
// Same validation logic as above
|
|
80
|
-
};
|
|
81
|
-
```
|
|
@@ -1,120 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: charts
|
|
3
|
-
description: Chart and data visualization patterns for Remotion. Use when creating bar charts, pie charts, line charts, stock graphs, or any data-driven animations.
|
|
4
|
-
metadata:
|
|
5
|
-
tags: charts, data, visualization, bar-chart, pie-chart, line-chart, stock-chart, svg-paths, graphs
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
# Charts in Remotion
|
|
9
|
-
|
|
10
|
-
Create charts using React code - HTML, SVG, and D3.js are all supported.
|
|
11
|
-
|
|
12
|
-
Disable all animations from third party libraries - they cause flickering.
|
|
13
|
-
Drive all animations from `useCurrentFrame()`.
|
|
14
|
-
|
|
15
|
-
## Bar Chart
|
|
16
|
-
|
|
17
|
-
```tsx
|
|
18
|
-
const STAGGER_DELAY = 5;
|
|
19
|
-
const frame = useCurrentFrame();
|
|
20
|
-
const { fps } = useVideoConfig();
|
|
21
|
-
|
|
22
|
-
const bars = data.map((item, i) => {
|
|
23
|
-
const height = spring({
|
|
24
|
-
frame,
|
|
25
|
-
fps,
|
|
26
|
-
delay: i * STAGGER_DELAY,
|
|
27
|
-
config: { damping: 200 },
|
|
28
|
-
});
|
|
29
|
-
return <div style={{ height: height * item.value }} />;
|
|
30
|
-
});
|
|
31
|
-
```
|
|
32
|
-
|
|
33
|
-
## Pie Chart
|
|
34
|
-
|
|
35
|
-
Animate segments using stroke-dashoffset, starting from 12 o'clock:
|
|
36
|
-
|
|
37
|
-
```tsx
|
|
38
|
-
const progress = interpolate(frame, [0, 100], [0, 1]);
|
|
39
|
-
const circumference = 2 * Math.PI * radius;
|
|
40
|
-
const segmentLength = (value / total) * circumference;
|
|
41
|
-
const offset = interpolate(progress, [0, 1], [segmentLength, 0]);
|
|
42
|
-
|
|
43
|
-
<circle
|
|
44
|
-
r={radius}
|
|
45
|
-
cx={center}
|
|
46
|
-
cy={center}
|
|
47
|
-
fill="none"
|
|
48
|
-
stroke={color}
|
|
49
|
-
strokeWidth={strokeWidth}
|
|
50
|
-
strokeDasharray={`${segmentLength} ${circumference}`}
|
|
51
|
-
strokeDashoffset={offset}
|
|
52
|
-
transform={`rotate(-90 ${center} ${center})`}
|
|
53
|
-
/>;
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
## Line Chart / Path Animation
|
|
57
|
-
|
|
58
|
-
Use `@remotion/paths` for animating SVG paths (line charts, stock graphs, signatures).
|
|
59
|
-
|
|
60
|
-
Install: `npx remotion add @remotion/paths`
|
|
61
|
-
Docs: https://remotion.dev/docs/paths.md
|
|
62
|
-
|
|
63
|
-
### Convert data points to SVG path
|
|
64
|
-
|
|
65
|
-
```tsx
|
|
66
|
-
type Point = { x: number; y: number };
|
|
67
|
-
|
|
68
|
-
const generateLinePath = (points: Point[]): string => {
|
|
69
|
-
if (points.length < 2) return "";
|
|
70
|
-
return points.map((p, i) => `${i === 0 ? "M" : "L"} ${p.x} ${p.y}`).join(" ");
|
|
71
|
-
};
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
### Draw path with animation
|
|
75
|
-
|
|
76
|
-
```tsx
|
|
77
|
-
import { evolvePath } from "@remotion/paths";
|
|
78
|
-
|
|
79
|
-
const path = "M 100 200 L 200 150 L 300 180 L 400 100";
|
|
80
|
-
const progress = interpolate(frame, [0, 2 * fps], [0, 1], {
|
|
81
|
-
extrapolateLeft: "clamp",
|
|
82
|
-
extrapolateRight: "clamp",
|
|
83
|
-
easing: Easing.out(Easing.quad),
|
|
84
|
-
});
|
|
85
|
-
|
|
86
|
-
const { strokeDasharray, strokeDashoffset } = evolvePath(progress, path);
|
|
87
|
-
|
|
88
|
-
<path
|
|
89
|
-
d={path}
|
|
90
|
-
fill="none"
|
|
91
|
-
stroke="#FF3232"
|
|
92
|
-
strokeWidth={4}
|
|
93
|
-
strokeDasharray={strokeDasharray}
|
|
94
|
-
strokeDashoffset={strokeDashoffset}
|
|
95
|
-
/>;
|
|
96
|
-
```
|
|
97
|
-
|
|
98
|
-
### Follow path with marker/arrow
|
|
99
|
-
|
|
100
|
-
```tsx
|
|
101
|
-
import {
|
|
102
|
-
getLength,
|
|
103
|
-
getPointAtLength,
|
|
104
|
-
getTangentAtLength,
|
|
105
|
-
} from "@remotion/paths";
|
|
106
|
-
|
|
107
|
-
const pathLength = getLength(path);
|
|
108
|
-
const point = getPointAtLength(path, progress * pathLength);
|
|
109
|
-
const tangent = getTangentAtLength(path, progress * pathLength);
|
|
110
|
-
const angle = Math.atan2(tangent.y, tangent.x);
|
|
111
|
-
|
|
112
|
-
<g
|
|
113
|
-
style={{
|
|
114
|
-
transform: `translate(${point.x}px, ${point.y}px) rotate(${angle}rad)`,
|
|
115
|
-
transformOrigin: "0 0",
|
|
116
|
-
}}
|
|
117
|
-
>
|
|
118
|
-
<polygon points="0,0 -20,-10 -20,10" fill="#FF3232" />
|
|
119
|
-
</g>;
|
|
120
|
-
```
|
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: compositions
|
|
3
|
-
description: Defining compositions, stills, folders, default props and dynamic metadata
|
|
4
|
-
metadata:
|
|
5
|
-
tags: composition, still, folder, props, metadata
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
A `<Composition>` defines the component, width, height, fps and duration of a renderable video.
|
|
9
|
-
|
|
10
|
-
It normally is placed in the `src/Root.tsx` file.
|
|
11
|
-
|
|
12
|
-
```tsx
|
|
13
|
-
import { Composition } from "remotion";
|
|
14
|
-
import { MyComposition } from "./MyComposition";
|
|
15
|
-
|
|
16
|
-
export const RemotionRoot = () => {
|
|
17
|
-
return (
|
|
18
|
-
<Composition
|
|
19
|
-
id="MyComposition"
|
|
20
|
-
component={MyComposition}
|
|
21
|
-
durationInFrames={100}
|
|
22
|
-
fps={30}
|
|
23
|
-
width={1080}
|
|
24
|
-
height={1080}
|
|
25
|
-
/>
|
|
26
|
-
);
|
|
27
|
-
};
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
## Default Props
|
|
31
|
-
|
|
32
|
-
Pass `defaultProps` to provide initial values for your component.
|
|
33
|
-
Values must be JSON-serializable (`Date`, `Map`, `Set`, and `staticFile()` are supported).
|
|
34
|
-
|
|
35
|
-
```tsx
|
|
36
|
-
import { Composition } from "remotion";
|
|
37
|
-
import { MyComposition, MyCompositionProps } from "./MyComposition";
|
|
38
|
-
|
|
39
|
-
export const RemotionRoot = () => {
|
|
40
|
-
return (
|
|
41
|
-
<Composition
|
|
42
|
-
id="MyComposition"
|
|
43
|
-
component={MyComposition}
|
|
44
|
-
durationInFrames={100}
|
|
45
|
-
fps={30}
|
|
46
|
-
width={1080}
|
|
47
|
-
height={1080}
|
|
48
|
-
defaultProps={
|
|
49
|
-
{
|
|
50
|
-
title: "Hello World",
|
|
51
|
-
color: "#ff0000",
|
|
52
|
-
} satisfies MyCompositionProps
|
|
53
|
-
}
|
|
54
|
-
/>
|
|
55
|
-
);
|
|
56
|
-
};
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
Use `type` declarations for props rather than `interface` to ensure `defaultProps` type safety.
|
|
60
|
-
|
|
61
|
-
## Folders
|
|
62
|
-
|
|
63
|
-
Use `<Folder>` to organize compositions in the sidebar.
|
|
64
|
-
Folder names can only contain letters, numbers, and hyphens.
|
|
65
|
-
|
|
66
|
-
```tsx
|
|
67
|
-
import { Composition, Folder } from "remotion";
|
|
68
|
-
|
|
69
|
-
export const RemotionRoot = () => {
|
|
70
|
-
return (
|
|
71
|
-
<>
|
|
72
|
-
<Folder name="Marketing">
|
|
73
|
-
<Composition id="Promo" /* ... */ />
|
|
74
|
-
<Composition id="Ad" /* ... */ />
|
|
75
|
-
</Folder>
|
|
76
|
-
<Folder name="Social">
|
|
77
|
-
<Folder name="Instagram">
|
|
78
|
-
<Composition id="Story" /* ... */ />
|
|
79
|
-
<Composition id="Reel" /* ... */ />
|
|
80
|
-
</Folder>
|
|
81
|
-
</Folder>
|
|
82
|
-
</>
|
|
83
|
-
);
|
|
84
|
-
};
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
## Stills
|
|
88
|
-
|
|
89
|
-
Use `<Still>` for single-frame images. It does not require `durationInFrames` or `fps`.
|
|
90
|
-
|
|
91
|
-
```tsx
|
|
92
|
-
import { Still } from "remotion";
|
|
93
|
-
import { Thumbnail } from "./Thumbnail";
|
|
94
|
-
|
|
95
|
-
export const RemotionRoot = () => {
|
|
96
|
-
return (
|
|
97
|
-
<Still id="Thumbnail" component={Thumbnail} width={1280} height={720} />
|
|
98
|
-
);
|
|
99
|
-
};
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
## Calculate Metadata
|
|
103
|
-
|
|
104
|
-
Use `calculateMetadata` to make dimensions, duration, or props dynamic based on data.
|
|
105
|
-
|
|
106
|
-
```tsx
|
|
107
|
-
import { Composition, CalculateMetadataFunction } from "remotion";
|
|
108
|
-
import { MyComposition, MyCompositionProps } from "./MyComposition";
|
|
109
|
-
|
|
110
|
-
const calculateMetadata: CalculateMetadataFunction<
|
|
111
|
-
MyCompositionProps
|
|
112
|
-
> = async ({ props, abortSignal }) => {
|
|
113
|
-
const data = await fetch(`https://api.example.com/video/${props.videoId}`, {
|
|
114
|
-
signal: abortSignal,
|
|
115
|
-
}).then((res) => res.json());
|
|
116
|
-
|
|
117
|
-
return {
|
|
118
|
-
durationInFrames: Math.ceil(data.duration * 30),
|
|
119
|
-
props: {
|
|
120
|
-
...props,
|
|
121
|
-
videoUrl: data.url,
|
|
122
|
-
},
|
|
123
|
-
};
|
|
124
|
-
};
|
|
125
|
-
|
|
126
|
-
export const RemotionRoot = () => {
|
|
127
|
-
return (
|
|
128
|
-
<Composition
|
|
129
|
-
id="MyComposition"
|
|
130
|
-
component={MyComposition}
|
|
131
|
-
durationInFrames={100} // Placeholder, will be overridden
|
|
132
|
-
fps={30}
|
|
133
|
-
width={1080}
|
|
134
|
-
height={1080}
|
|
135
|
-
defaultProps={{ videoId: "abc123" }}
|
|
136
|
-
calculateMetadata={calculateMetadata}
|
|
137
|
-
/>
|
|
138
|
-
);
|
|
139
|
-
};
|
|
140
|
-
```
|
|
141
|
-
|
|
142
|
-
The function can return `props`, `durationInFrames`, `width`, `height`, `fps`, and codec-related defaults. It runs once before rendering begins.
|
|
143
|
-
|
|
144
|
-
## Nesting compositions within another
|
|
145
|
-
|
|
146
|
-
To add a composition within another composition, you can use the `<Sequence>` component with a `width` and `height` prop to specify the size of the composition.
|
|
147
|
-
|
|
148
|
-
```tsx
|
|
149
|
-
<AbsoluteFill>
|
|
150
|
-
<Sequence width={COMPOSITION_WIDTH} height={COMPOSITION_HEIGHT}>
|
|
151
|
-
<CompositionComponent />
|
|
152
|
-
</Sequence>
|
|
153
|
-
</AbsoluteFill>
|
|
154
|
-
```
|