@kolbo/kolbo-code-linux-arm64-musl 0.0.0-dev-202604161628
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/bin/kolbo +0 -0
- package/package.json +14 -0
- package/skills/brainstorming/SKILL.md +164 -0
- package/skills/brainstorming/scripts/frame-template.html +214 -0
- package/skills/brainstorming/scripts/helper.js +88 -0
- package/skills/brainstorming/scripts/server.cjs +354 -0
- package/skills/brainstorming/scripts/start-server.sh +148 -0
- package/skills/brainstorming/scripts/stop-server.sh +56 -0
- package/skills/brainstorming/spec-document-reviewer-prompt.md +49 -0
- package/skills/brainstorming/visual-companion.md +287 -0
- package/skills/color-grading/SKILL.md +152 -0
- package/skills/dispatching-parallel-agents/SKILL.md +182 -0
- package/skills/docx/.skillfish.json +10 -0
- package/skills/docx/SKILL.md +196 -0
- package/skills/docx/docx-js.md +350 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
- package/skills/docx/ooxml/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
- package/skills/docx/ooxml/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
- package/skills/docx/ooxml/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
- package/skills/docx/ooxml/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
- package/skills/docx/ooxml/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
- package/skills/docx/ooxml/schemas/mce/mc.xsd +75 -0
- package/skills/docx/ooxml/schemas/microsoft/wml-2010.xsd +560 -0
- package/skills/docx/ooxml/schemas/microsoft/wml-2012.xsd +67 -0
- package/skills/docx/ooxml/schemas/microsoft/wml-2018.xsd +14 -0
- package/skills/docx/ooxml/schemas/microsoft/wml-cex-2018.xsd +20 -0
- package/skills/docx/ooxml/schemas/microsoft/wml-cid-2016.xsd +13 -0
- package/skills/docx/ooxml/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
- package/skills/docx/ooxml/schemas/microsoft/wml-symex-2015.xsd +8 -0
- package/skills/docx/ooxml/scripts/pack.py +159 -0
- package/skills/docx/ooxml/scripts/unpack.py +29 -0
- package/skills/docx/ooxml/scripts/validate.py +69 -0
- package/skills/docx/ooxml/scripts/validation/__init__.py +15 -0
- package/skills/docx/ooxml/scripts/validation/base.py +951 -0
- package/skills/docx/ooxml/scripts/validation/docx.py +274 -0
- package/skills/docx/ooxml/scripts/validation/pptx.py +315 -0
- package/skills/docx/ooxml/scripts/validation/redlining.py +279 -0
- package/skills/docx/ooxml.md +599 -0
- package/skills/docx/scripts/__init__.py +1 -0
- package/skills/docx/scripts/document.py +1272 -0
- package/skills/docx/scripts/templates/comments.xml +3 -0
- package/skills/docx/scripts/templates/commentsExtended.xml +3 -0
- package/skills/docx/scripts/templates/commentsExtensible.xml +3 -0
- package/skills/docx/scripts/templates/commentsIds.xml +3 -0
- package/skills/docx/scripts/templates/people.xml +3 -0
- package/skills/docx/scripts/utilities.py +374 -0
- package/skills/executing-plans/SKILL.md +70 -0
- package/skills/ffmpeg-patterns/SKILL.md +240 -0
- package/skills/finishing-a-development-branch/SKILL.md +200 -0
- package/skills/frontend-design/SKILL.md +42 -0
- package/skills/fullstack-app/SKILL.md +621 -0
- package/skills/image-prompting-guide/SKILL.md +143 -0
- package/skills/kolbo/SKILL.md +610 -0
- package/skills/music-prompting/SKILL.md +146 -0
- package/skills/pdf/.skillfish.json +10 -0
- package/skills/pdf/FORMS.md +205 -0
- package/skills/pdf/REFERENCE.md +612 -0
- package/skills/pdf/SKILL.md +293 -0
- package/skills/pdf/scripts/check_bounding_boxes.py +70 -0
- package/skills/pdf/scripts/check_bounding_boxes_test.py +226 -0
- package/skills/pdf/scripts/check_fillable_fields.py +12 -0
- package/skills/pdf/scripts/convert_pdf_to_images.py +35 -0
- package/skills/pdf/scripts/create_validation_image.py +41 -0
- package/skills/pdf/scripts/extract_form_field_info.py +152 -0
- package/skills/pdf/scripts/fill_fillable_fields.py +114 -0
- package/skills/pdf/scripts/fill_pdf_form_with_annotations.py +108 -0
- package/skills/photo-studio/SKILL.md +130 -0
- package/skills/pptx/.skillfish.json +10 -0
- package/skills/pptx/SKILL.md +483 -0
- package/skills/pptx/html2pptx.md +626 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chart.xsd +1499 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-chartDrawing.xsd +146 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-diagram.xsd +1085 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-lockedCanvas.xsd +11 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-main.xsd +3081 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-picture.xsd +23 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-spreadsheetDrawing.xsd +185 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/dml-wordprocessingDrawing.xsd +287 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/pml.xsd +1676 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-additionalCharacteristics.xsd +28 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-bibliography.xsd +144 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-commonSimpleTypes.xsd +174 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlDataProperties.xsd +25 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-customXmlSchemaProperties.xsd +18 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesCustom.xsd +59 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesExtended.xsd +56 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-documentPropertiesVariantTypes.xsd +195 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-math.xsd +582 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/shared-relationshipReference.xsd +25 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/sml.xsd +4439 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-main.xsd +570 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-officeDrawing.xsd +509 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-presentationDrawing.xsd +12 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-spreadsheetDrawing.xsd +108 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/vml-wordprocessingDrawing.xsd +96 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/wml.xsd +3646 -0
- package/skills/pptx/ooxml/schemas/ISO-IEC29500-4_2016/xml.xsd +116 -0
- package/skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-contentTypes.xsd +42 -0
- package/skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-coreProperties.xsd +50 -0
- package/skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-digSig.xsd +49 -0
- package/skills/pptx/ooxml/schemas/ecma/fouth-edition/opc-relationships.xsd +33 -0
- package/skills/pptx/ooxml/schemas/mce/mc.xsd +75 -0
- package/skills/pptx/ooxml/schemas/microsoft/wml-2010.xsd +560 -0
- package/skills/pptx/ooxml/schemas/microsoft/wml-2012.xsd +67 -0
- package/skills/pptx/ooxml/schemas/microsoft/wml-2018.xsd +14 -0
- package/skills/pptx/ooxml/schemas/microsoft/wml-cex-2018.xsd +20 -0
- package/skills/pptx/ooxml/schemas/microsoft/wml-cid-2016.xsd +13 -0
- package/skills/pptx/ooxml/schemas/microsoft/wml-sdtdatahash-2020.xsd +4 -0
- package/skills/pptx/ooxml/schemas/microsoft/wml-symex-2015.xsd +8 -0
- package/skills/pptx/ooxml/scripts/pack.py +159 -0
- package/skills/pptx/ooxml/scripts/unpack.py +29 -0
- package/skills/pptx/ooxml/scripts/validate.py +69 -0
- package/skills/pptx/ooxml/scripts/validation/__init__.py +15 -0
- package/skills/pptx/ooxml/scripts/validation/base.py +951 -0
- package/skills/pptx/ooxml/scripts/validation/docx.py +274 -0
- package/skills/pptx/ooxml/scripts/validation/pptx.py +315 -0
- package/skills/pptx/ooxml/scripts/validation/redlining.py +279 -0
- package/skills/pptx/ooxml.md +427 -0
- package/skills/pptx/scripts/html2pptx.js +995 -0
- package/skills/pptx/scripts/inventory.py +1020 -0
- package/skills/pptx/scripts/rearrange.py +231 -0
- package/skills/pptx/scripts/replace.py +385 -0
- package/skills/pptx/scripts/thumbnail.py +450 -0
- package/skills/production-review/SKILL.md +152 -0
- package/skills/receiving-code-review/SKILL.md +213 -0
- package/skills/remotion-best-practices/SKILL.md +62 -0
- package/skills/remotion-best-practices/rules/3d.md +86 -0
- package/skills/remotion-best-practices/rules/animations.md +27 -0
- package/skills/remotion-best-practices/rules/assets/charts-bar-chart.tsx +173 -0
- package/skills/remotion-best-practices/rules/assets/text-animations-typewriter.tsx +100 -0
- package/skills/remotion-best-practices/rules/assets/text-animations-word-highlight.tsx +103 -0
- package/skills/remotion-best-practices/rules/assets.md +78 -0
- package/skills/remotion-best-practices/rules/audio-visualization.md +198 -0
- package/skills/remotion-best-practices/rules/audio.md +169 -0
- package/skills/remotion-best-practices/rules/calculate-metadata.md +134 -0
- package/skills/remotion-best-practices/rules/can-decode.md +81 -0
- package/skills/remotion-best-practices/rules/charts.md +120 -0
- package/skills/remotion-best-practices/rules/compositions.md +154 -0
- package/skills/remotion-best-practices/rules/display-captions.md +184 -0
- package/skills/remotion-best-practices/rules/extract-frames.md +229 -0
- package/skills/remotion-best-practices/rules/ffmpeg.md +38 -0
- package/skills/remotion-best-practices/rules/fonts.md +152 -0
- package/skills/remotion-best-practices/rules/get-audio-duration.md +58 -0
- package/skills/remotion-best-practices/rules/get-video-dimensions.md +68 -0
- package/skills/remotion-best-practices/rules/get-video-duration.md +60 -0
- package/skills/remotion-best-practices/rules/gifs.md +141 -0
- package/skills/remotion-best-practices/rules/images.md +134 -0
- package/skills/remotion-best-practices/rules/import-srt-captions.md +69 -0
- package/skills/remotion-best-practices/rules/light-leaks.md +73 -0
- package/skills/remotion-best-practices/rules/lottie.md +70 -0
- package/skills/remotion-best-practices/rules/maps.md +412 -0
- package/skills/remotion-best-practices/rules/measuring-dom-nodes.md +34 -0
- package/skills/remotion-best-practices/rules/measuring-text.md +140 -0
- package/skills/remotion-best-practices/rules/motion-design.md +215 -0
- package/skills/remotion-best-practices/rules/parameters.md +109 -0
- package/skills/remotion-best-practices/rules/sequencing.md +118 -0
- package/skills/remotion-best-practices/rules/sfx.md +30 -0
- package/skills/remotion-best-practices/rules/subtitles.md +36 -0
- package/skills/remotion-best-practices/rules/tailwind.md +11 -0
- package/skills/remotion-best-practices/rules/text-animations.md +20 -0
- package/skills/remotion-best-practices/rules/timing.md +179 -0
- package/skills/remotion-best-practices/rules/transcribe-captions.md +70 -0
- package/skills/remotion-best-practices/rules/transitions.md +197 -0
- package/skills/remotion-best-practices/rules/transparent-videos.md +106 -0
- package/skills/remotion-best-practices/rules/trimming.md +51 -0
- package/skills/remotion-best-practices/rules/videos.md +171 -0
- package/skills/remotion-best-practices/rules/voiceover.md +99 -0
- package/skills/requesting-code-review/SKILL.md +105 -0
- package/skills/requesting-code-review/code-reviewer.md +146 -0
- package/skills/short-form-video/SKILL.md +168 -0
- package/skills/sound-design/SKILL.md +154 -0
- package/skills/storytelling/SKILL.md +139 -0
- package/skills/subagent-driven-development/SKILL.md +277 -0
- package/skills/subagent-driven-development/code-quality-reviewer-prompt.md +26 -0
- package/skills/subagent-driven-development/implementer-prompt.md +113 -0
- package/skills/subagent-driven-development/spec-reviewer-prompt.md +61 -0
- package/skills/subtitle-production/SKILL.md +244 -0
- package/skills/subtitle-production/reference/burn_to_video.py +222 -0
- package/skills/subtitle-production/reference/export_srts.py +127 -0
- package/skills/subtitle-production/reference/gen_srt.py +42 -0
- package/skills/supabase/.skillfish.json +10 -0
- package/skills/supabase/SKILL.md +106 -0
- package/skills/supabase/assets/feedback-issue-template.md +17 -0
- package/skills/supabase/references/skill-feedback.md +17 -0
- package/skills/supabase-postgres-best-practices/.skillfish.json +10 -0
- package/skills/supabase-postgres-best-practices/SKILL.md +64 -0
- package/skills/supabase-postgres-best-practices/references/_contributing.md +170 -0
- package/skills/supabase-postgres-best-practices/references/_sections.md +39 -0
- package/skills/supabase-postgres-best-practices/references/_template.md +34 -0
- package/skills/supabase-postgres-best-practices/references/advanced-full-text-search.md +55 -0
- package/skills/supabase-postgres-best-practices/references/advanced-jsonb-indexing.md +49 -0
- package/skills/supabase-postgres-best-practices/references/conn-idle-timeout.md +46 -0
- package/skills/supabase-postgres-best-practices/references/conn-limits.md +44 -0
- package/skills/supabase-postgres-best-practices/references/conn-pooling.md +41 -0
- package/skills/supabase-postgres-best-practices/references/conn-prepared-statements.md +46 -0
- package/skills/supabase-postgres-best-practices/references/data-batch-inserts.md +54 -0
- package/skills/supabase-postgres-best-practices/references/data-n-plus-one.md +53 -0
- package/skills/supabase-postgres-best-practices/references/data-pagination.md +50 -0
- package/skills/supabase-postgres-best-practices/references/data-upsert.md +50 -0
- package/skills/supabase-postgres-best-practices/references/lock-advisory.md +56 -0
- package/skills/supabase-postgres-best-practices/references/lock-deadlock-prevention.md +68 -0
- package/skills/supabase-postgres-best-practices/references/lock-short-transactions.md +50 -0
- package/skills/supabase-postgres-best-practices/references/lock-skip-locked.md +54 -0
- package/skills/supabase-postgres-best-practices/references/monitor-explain-analyze.md +45 -0
- package/skills/supabase-postgres-best-practices/references/monitor-pg-stat-statements.md +55 -0
- package/skills/supabase-postgres-best-practices/references/monitor-vacuum-analyze.md +55 -0
- package/skills/supabase-postgres-best-practices/references/query-composite-indexes.md +44 -0
- package/skills/supabase-postgres-best-practices/references/query-covering-indexes.md +40 -0
- package/skills/supabase-postgres-best-practices/references/query-index-types.md +48 -0
- package/skills/supabase-postgres-best-practices/references/query-missing-indexes.md +43 -0
- package/skills/supabase-postgres-best-practices/references/query-partial-indexes.md +45 -0
- package/skills/supabase-postgres-best-practices/references/schema-constraints.md +80 -0
- package/skills/supabase-postgres-best-practices/references/schema-data-types.md +46 -0
- package/skills/supabase-postgres-best-practices/references/schema-foreign-key-indexes.md +59 -0
- package/skills/supabase-postgres-best-practices/references/schema-lowercase-identifiers.md +55 -0
- package/skills/supabase-postgres-best-practices/references/schema-partitioning.md +55 -0
- package/skills/supabase-postgres-best-practices/references/schema-primary-keys.md +61 -0
- package/skills/supabase-postgres-best-practices/references/security-privileges.md +54 -0
- package/skills/supabase-postgres-best-practices/references/security-rls-basics.md +50 -0
- package/skills/supabase-postgres-best-practices/references/security-rls-performance.md +57 -0
- package/skills/supabase-quickstart/SKILL.md +400 -0
- package/skills/systematic-debugging/CREATION-LOG.md +119 -0
- package/skills/systematic-debugging/SKILL.md +296 -0
- package/skills/systematic-debugging/condition-based-waiting-example.ts +158 -0
- package/skills/systematic-debugging/condition-based-waiting.md +115 -0
- package/skills/systematic-debugging/defense-in-depth.md +122 -0
- package/skills/systematic-debugging/find-polluter.sh +63 -0
- package/skills/systematic-debugging/root-cause-tracing.md +169 -0
- package/skills/systematic-debugging/test-academic.md +14 -0
- package/skills/systematic-debugging/test-pressure-1.md +58 -0
- package/skills/systematic-debugging/test-pressure-2.md +68 -0
- package/skills/systematic-debugging/test-pressure-3.md +69 -0
- package/skills/test-driven-development/SKILL.md +371 -0
- package/skills/test-driven-development/testing-anti-patterns.md +299 -0
- package/skills/typography-video/SKILL.md +182 -0
- package/skills/typography-video/reference/KineticTitleScene.tsx +345 -0
- package/skills/using-git-worktrees/SKILL.md +218 -0
- package/skills/using-superpowers/SKILL.md +115 -0
- package/skills/using-superpowers/references/codex-tools.md +100 -0
- package/skills/using-superpowers/references/gemini-tools.md +33 -0
- package/skills/verification-before-completion/SKILL.md +139 -0
- package/skills/video-editing/SKILL.md +128 -0
- package/skills/video-production/SKILL.md +247 -0
- package/skills/video-prompting-guide/SKILL.md +268 -0
- package/skills/writing-plans/SKILL.md +152 -0
- package/skills/writing-plans/plan-document-reviewer-prompt.md +49 -0
- package/skills/writing-skills/SKILL.md +655 -0
- package/skills/writing-skills/anthropic-best-practices.md +1150 -0
- package/skills/writing-skills/examples/CLAUDE_MD_TESTING.md +189 -0
- package/skills/writing-skills/graphviz-conventions.dot +172 -0
- package/skills/writing-skills/persuasion-principles.md +187 -0
- package/skills/writing-skills/render-graphs.js +168 -0
- package/skills/writing-skills/testing-skills-with-subagents.md +384 -0
- package/skills/xlsx/.skillfish.json +10 -0
- package/skills/xlsx/SKILL.md +288 -0
- package/skills/xlsx/recalc.py +178 -0
- package/skills/youtube-clipper/SKILL.md +187 -0
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: timing
|
|
3
|
+
description: Interpolation curves in Remotion - linear, easing, spring animations
|
|
4
|
+
metadata:
|
|
5
|
+
tags: spring, bounce, easing, interpolation
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
A simple linear interpolation is done using the `interpolate` function.
|
|
9
|
+
|
|
10
|
+
```ts title="Going from 0 to 1 over 100 frames"
|
|
11
|
+
import { interpolate } from "remotion";
|
|
12
|
+
|
|
13
|
+
const opacity = interpolate(frame, [0, 100], [0, 1]);
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
By default, the values are not clamped, so the value can go outside the range [0, 1].
|
|
17
|
+
Here is how they can be clamped:
|
|
18
|
+
|
|
19
|
+
```ts title="Going from 0 to 1 over 100 frames with extrapolation"
|
|
20
|
+
const opacity = interpolate(frame, [0, 100], [0, 1], {
|
|
21
|
+
extrapolateRight: "clamp",
|
|
22
|
+
extrapolateLeft: "clamp",
|
|
23
|
+
});
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Spring animations
|
|
27
|
+
|
|
28
|
+
Spring animations have a more natural motion.
|
|
29
|
+
They go from 0 to 1 over time.
|
|
30
|
+
|
|
31
|
+
```ts title="Spring animation from 0 to 1 over 100 frames"
|
|
32
|
+
import { spring, useCurrentFrame, useVideoConfig } from "remotion";
|
|
33
|
+
|
|
34
|
+
const frame = useCurrentFrame();
|
|
35
|
+
const { fps } = useVideoConfig();
|
|
36
|
+
|
|
37
|
+
const scale = spring({
|
|
38
|
+
frame,
|
|
39
|
+
fps,
|
|
40
|
+
});
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Physical properties
|
|
44
|
+
|
|
45
|
+
The default configuration is: `mass: 1, damping: 10, stiffness: 100`.
|
|
46
|
+
This leads to the animation having a bit of bounce before it settles.
|
|
47
|
+
|
|
48
|
+
The config can be overwritten like this:
|
|
49
|
+
|
|
50
|
+
```ts
|
|
51
|
+
const scale = spring({
|
|
52
|
+
frame,
|
|
53
|
+
fps,
|
|
54
|
+
config: { damping: 200 },
|
|
55
|
+
});
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
The recommended configuration for a natural motion without a bounce is: `{ damping: 200 }`.
|
|
59
|
+
|
|
60
|
+
Here are some common configurations:
|
|
61
|
+
|
|
62
|
+
```tsx
|
|
63
|
+
const smooth = { damping: 200 }; // Smooth, no bounce (subtle reveals)
|
|
64
|
+
const snappy = { damping: 20, stiffness: 200 }; // Snappy, minimal bounce (UI elements)
|
|
65
|
+
const bouncy = { damping: 8 }; // Bouncy entrance (playful animations)
|
|
66
|
+
const heavy = { damping: 15, stiffness: 80, mass: 2 }; // Heavy, slow, small bounce
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### Delay
|
|
70
|
+
|
|
71
|
+
The animation starts immediately by default.
|
|
72
|
+
Use the `delay` parameter to delay the animation by a number of frames.
|
|
73
|
+
|
|
74
|
+
```tsx
|
|
75
|
+
const entrance = spring({
|
|
76
|
+
frame: frame - ENTRANCE_DELAY,
|
|
77
|
+
fps,
|
|
78
|
+
delay: 20,
|
|
79
|
+
});
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### Duration
|
|
83
|
+
|
|
84
|
+
A `spring()` has a natural duration based on the physical properties.
|
|
85
|
+
To stretch the animation to a specific duration, use the `durationInFrames` parameter.
|
|
86
|
+
|
|
87
|
+
```tsx
|
|
88
|
+
const spring = spring({
|
|
89
|
+
frame,
|
|
90
|
+
fps,
|
|
91
|
+
durationInFrames: 40,
|
|
92
|
+
});
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
### Combining spring() with interpolate()
|
|
96
|
+
|
|
97
|
+
Map spring output (0-1) to custom ranges:
|
|
98
|
+
|
|
99
|
+
```tsx
|
|
100
|
+
const springProgress = spring({
|
|
101
|
+
frame,
|
|
102
|
+
fps,
|
|
103
|
+
});
|
|
104
|
+
|
|
105
|
+
// Map to rotation
|
|
106
|
+
const rotation = interpolate(springProgress, [0, 1], [0, 360]);
|
|
107
|
+
|
|
108
|
+
<div style={{ rotate: rotation + "deg" }} />;
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
### Adding springs
|
|
112
|
+
|
|
113
|
+
Springs return just numbers, so math can be performed:
|
|
114
|
+
|
|
115
|
+
```tsx
|
|
116
|
+
const frame = useCurrentFrame();
|
|
117
|
+
const { fps, durationInFrames } = useVideoConfig();
|
|
118
|
+
|
|
119
|
+
const inAnimation = spring({
|
|
120
|
+
frame,
|
|
121
|
+
fps,
|
|
122
|
+
});
|
|
123
|
+
const outAnimation = spring({
|
|
124
|
+
frame,
|
|
125
|
+
fps,
|
|
126
|
+
durationInFrames: 1 * fps,
|
|
127
|
+
delay: durationInFrames - 1 * fps,
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
const scale = inAnimation - outAnimation;
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
## Easing
|
|
134
|
+
|
|
135
|
+
Easing can be added to the `interpolate` function:
|
|
136
|
+
|
|
137
|
+
```ts
|
|
138
|
+
import { interpolate, Easing } from "remotion";
|
|
139
|
+
|
|
140
|
+
const value1 = interpolate(frame, [0, 100], [0, 1], {
|
|
141
|
+
easing: Easing.inOut(Easing.quad),
|
|
142
|
+
extrapolateLeft: "clamp",
|
|
143
|
+
extrapolateRight: "clamp",
|
|
144
|
+
});
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
The default easing is `Easing.linear`.
|
|
148
|
+
There are various other convexities:
|
|
149
|
+
|
|
150
|
+
- `Easing.in` for starting slow and accelerating
|
|
151
|
+
- `Easing.out` for starting fast and slowing down
|
|
152
|
+
- `Easing.inOut`
|
|
153
|
+
|
|
154
|
+
and curves (sorted from most linear to most curved):
|
|
155
|
+
|
|
156
|
+
- `Easing.quad`
|
|
157
|
+
- `Easing.sin`
|
|
158
|
+
- `Easing.exp`
|
|
159
|
+
- `Easing.circle`
|
|
160
|
+
|
|
161
|
+
Convexities and curves need be combined for an easing function:
|
|
162
|
+
|
|
163
|
+
```ts
|
|
164
|
+
const value1 = interpolate(frame, [0, 100], [0, 1], {
|
|
165
|
+
easing: Easing.inOut(Easing.quad),
|
|
166
|
+
extrapolateLeft: "clamp",
|
|
167
|
+
extrapolateRight: "clamp",
|
|
168
|
+
});
|
|
169
|
+
```
|
|
170
|
+
|
|
171
|
+
Cubic bezier curves are also supported:
|
|
172
|
+
|
|
173
|
+
```ts
|
|
174
|
+
const value1 = interpolate(frame, [0, 100], [0, 1], {
|
|
175
|
+
easing: Easing.bezier(0.8, 0.22, 0.96, 0.65),
|
|
176
|
+
extrapolateLeft: "clamp",
|
|
177
|
+
extrapolateRight: "clamp",
|
|
178
|
+
});
|
|
179
|
+
```
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: transcribe-captions
|
|
3
|
+
description: Transcribing audio to generate captions in Remotion
|
|
4
|
+
metadata:
|
|
5
|
+
tags: captions, transcribe, whisper, audio, speech-to-text
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Transcribing audio
|
|
9
|
+
|
|
10
|
+
To transcribe audio to generate captions in Remotion, you can use the [`transcribe()`](https://www.remotion.dev/docs/install-whisper-cpp/transcribe) function from the [`@remotion/install-whisper-cpp`](https://www.remotion.dev/docs/install-whisper-cpp) package.
|
|
11
|
+
|
|
12
|
+
## Prerequisites
|
|
13
|
+
|
|
14
|
+
First, the @remotion/install-whisper-cpp package needs to be installed.
|
|
15
|
+
If it is not installed, use the following command:
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
npx remotion add @remotion/install-whisper-cpp
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
## Transcribing
|
|
22
|
+
|
|
23
|
+
Make a Node.js script to download Whisper.cpp and a model, and transcribe the audio.
|
|
24
|
+
|
|
25
|
+
```ts
|
|
26
|
+
import path from "path";
|
|
27
|
+
import {
|
|
28
|
+
downloadWhisperModel,
|
|
29
|
+
installWhisperCpp,
|
|
30
|
+
transcribe,
|
|
31
|
+
toCaptions,
|
|
32
|
+
} from "@remotion/install-whisper-cpp";
|
|
33
|
+
import fs from "fs";
|
|
34
|
+
|
|
35
|
+
const to = path.join(process.cwd(), "whisper.cpp");
|
|
36
|
+
|
|
37
|
+
await installWhisperCpp({
|
|
38
|
+
to,
|
|
39
|
+
version: "1.5.5",
|
|
40
|
+
});
|
|
41
|
+
|
|
42
|
+
await downloadWhisperModel({
|
|
43
|
+
model: "medium.en",
|
|
44
|
+
folder: to,
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
// Convert the audio to a 16KHz wav file first if needed:
|
|
48
|
+
// import {execSync} from 'child_process';
|
|
49
|
+
// execSync('ffmpeg -i /path/to/audio.mp4 -ar 16000 /path/to/audio.wav -y');
|
|
50
|
+
|
|
51
|
+
const whisperCppOutput = await transcribe({
|
|
52
|
+
model: "medium.en",
|
|
53
|
+
whisperPath: to,
|
|
54
|
+
whisperCppVersion: "1.5.5",
|
|
55
|
+
inputPath: "/path/to/audio123.wav",
|
|
56
|
+
tokenLevelTimestamps: true,
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
// Optional: Apply our recommended postprocessing
|
|
60
|
+
const { captions } = toCaptions({
|
|
61
|
+
whisperCppOutput,
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
// Write it to the public/ folder so it can be fetched from Remotion
|
|
65
|
+
fs.writeFileSync("captions123.json", JSON.stringify(captions, null, 2));
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
Transcribe each clip individually and create multiple JSON files.
|
|
69
|
+
|
|
70
|
+
See [Displaying captions](display-captions.md) for how to display the captions in Remotion.
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: transitions
|
|
3
|
+
description: Scene transitions and overlays for Remotion using TransitionSeries.
|
|
4
|
+
metadata:
|
|
5
|
+
tags: transitions, overlays, fade, slide, wipe, scenes
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## TransitionSeries
|
|
9
|
+
|
|
10
|
+
`<TransitionSeries>` arranges scenes and supports two ways to enhance the cut point between them:
|
|
11
|
+
|
|
12
|
+
- **Transitions** (`<TransitionSeries.Transition>`) — crossfade, slide, wipe, etc. between two scenes. Shortens the timeline because both scenes play simultaneously during the transition.
|
|
13
|
+
- **Overlays** (`<TransitionSeries.Overlay>`) — render an effect (e.g. a light leak) on top of the cut point without shortening the timeline.
|
|
14
|
+
|
|
15
|
+
Children are absolutely positioned.
|
|
16
|
+
|
|
17
|
+
## Prerequisites
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
npx remotion add @remotion/transitions
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Transition example
|
|
24
|
+
|
|
25
|
+
```tsx
|
|
26
|
+
import { TransitionSeries, linearTiming } from "@remotion/transitions";
|
|
27
|
+
import { fade } from "@remotion/transitions/fade";
|
|
28
|
+
|
|
29
|
+
<TransitionSeries>
|
|
30
|
+
<TransitionSeries.Sequence durationInFrames={60}>
|
|
31
|
+
<SceneA />
|
|
32
|
+
</TransitionSeries.Sequence>
|
|
33
|
+
<TransitionSeries.Transition
|
|
34
|
+
presentation={fade()}
|
|
35
|
+
timing={linearTiming({ durationInFrames: 15 })}
|
|
36
|
+
/>
|
|
37
|
+
<TransitionSeries.Sequence durationInFrames={60}>
|
|
38
|
+
<SceneB />
|
|
39
|
+
</TransitionSeries.Sequence>
|
|
40
|
+
</TransitionSeries>;
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Overlay example
|
|
44
|
+
|
|
45
|
+
Any React component can be used as an overlay. For a ready-made effect, see the **light-leaks** rule.
|
|
46
|
+
|
|
47
|
+
```tsx
|
|
48
|
+
import { TransitionSeries } from "@remotion/transitions";
|
|
49
|
+
import { LightLeak } from "@remotion/light-leaks";
|
|
50
|
+
|
|
51
|
+
<TransitionSeries>
|
|
52
|
+
<TransitionSeries.Sequence durationInFrames={60}>
|
|
53
|
+
<SceneA />
|
|
54
|
+
</TransitionSeries.Sequence>
|
|
55
|
+
<TransitionSeries.Overlay durationInFrames={20}>
|
|
56
|
+
<LightLeak />
|
|
57
|
+
</TransitionSeries.Overlay>
|
|
58
|
+
<TransitionSeries.Sequence durationInFrames={60}>
|
|
59
|
+
<SceneB />
|
|
60
|
+
</TransitionSeries.Sequence>
|
|
61
|
+
</TransitionSeries>;
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Mixing transitions and overlays
|
|
65
|
+
|
|
66
|
+
Transitions and overlays can coexist in the same `<TransitionSeries>`, but an overlay cannot be adjacent to a transition or another overlay.
|
|
67
|
+
|
|
68
|
+
```tsx
|
|
69
|
+
import { TransitionSeries, linearTiming } from "@remotion/transitions";
|
|
70
|
+
import { fade } from "@remotion/transitions/fade";
|
|
71
|
+
import { LightLeak } from "@remotion/light-leaks";
|
|
72
|
+
|
|
73
|
+
<TransitionSeries>
|
|
74
|
+
<TransitionSeries.Sequence durationInFrames={60}>
|
|
75
|
+
<SceneA />
|
|
76
|
+
</TransitionSeries.Sequence>
|
|
77
|
+
<TransitionSeries.Overlay durationInFrames={30}>
|
|
78
|
+
<LightLeak />
|
|
79
|
+
</TransitionSeries.Overlay>
|
|
80
|
+
<TransitionSeries.Sequence durationInFrames={60}>
|
|
81
|
+
<SceneB />
|
|
82
|
+
</TransitionSeries.Sequence>
|
|
83
|
+
<TransitionSeries.Transition
|
|
84
|
+
presentation={fade()}
|
|
85
|
+
timing={linearTiming({ durationInFrames: 15 })}
|
|
86
|
+
/>
|
|
87
|
+
<TransitionSeries.Sequence durationInFrames={60}>
|
|
88
|
+
<SceneC />
|
|
89
|
+
</TransitionSeries.Sequence>
|
|
90
|
+
</TransitionSeries>;
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
## Transition props
|
|
94
|
+
|
|
95
|
+
`<TransitionSeries.Transition>` requires:
|
|
96
|
+
|
|
97
|
+
- `presentation` — the visual effect (e.g. `fade()`, `slide()`, `wipe()`).
|
|
98
|
+
- `timing` — controls speed and easing (e.g. `linearTiming()`, `springTiming()`).
|
|
99
|
+
|
|
100
|
+
## Overlay props
|
|
101
|
+
|
|
102
|
+
`<TransitionSeries.Overlay>` accepts:
|
|
103
|
+
|
|
104
|
+
- `durationInFrames` — how long the overlay is visible (positive integer).
|
|
105
|
+
- `offset?` — shifts the overlay relative to the cut point center. Positive = later, negative = earlier. Default: `0`.
|
|
106
|
+
|
|
107
|
+
## Available transition types
|
|
108
|
+
|
|
109
|
+
Import transitions from their respective modules:
|
|
110
|
+
|
|
111
|
+
```tsx
|
|
112
|
+
import { fade } from "@remotion/transitions/fade";
|
|
113
|
+
import { slide } from "@remotion/transitions/slide";
|
|
114
|
+
import { wipe } from "@remotion/transitions/wipe";
|
|
115
|
+
import { flip } from "@remotion/transitions/flip";
|
|
116
|
+
import { clockWipe } from "@remotion/transitions/clock-wipe";
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
## Slide transition with direction
|
|
120
|
+
|
|
121
|
+
```tsx
|
|
122
|
+
import { slide } from "@remotion/transitions/slide";
|
|
123
|
+
|
|
124
|
+
<TransitionSeries.Transition
|
|
125
|
+
presentation={slide({ direction: "from-left" })}
|
|
126
|
+
timing={linearTiming({ durationInFrames: 20 })}
|
|
127
|
+
/>;
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Directions: `"from-left"`, `"from-right"`, `"from-top"`, `"from-bottom"`
|
|
131
|
+
|
|
132
|
+
## Timing options
|
|
133
|
+
|
|
134
|
+
```tsx
|
|
135
|
+
import { linearTiming, springTiming } from "@remotion/transitions";
|
|
136
|
+
|
|
137
|
+
// Linear timing - constant speed
|
|
138
|
+
linearTiming({ durationInFrames: 20 });
|
|
139
|
+
|
|
140
|
+
// Spring timing - organic motion
|
|
141
|
+
springTiming({ config: { damping: 200 }, durationInFrames: 25 });
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
## Duration calculation
|
|
145
|
+
|
|
146
|
+
Transitions overlap adjacent scenes, so the total composition length is **shorter** than the sum of all sequence durations. Overlays do **not** affect the total duration.
|
|
147
|
+
|
|
148
|
+
For example, with two 60-frame sequences and a 15-frame transition:
|
|
149
|
+
|
|
150
|
+
- Without transitions: `60 + 60 = 120` frames
|
|
151
|
+
- With transition: `60 + 60 - 15 = 105` frames
|
|
152
|
+
|
|
153
|
+
Adding an overlay between two other sequences does not change the total.
|
|
154
|
+
|
|
155
|
+
### Getting the duration of a transition
|
|
156
|
+
|
|
157
|
+
Use the `getDurationInFrames()` method on the timing object:
|
|
158
|
+
|
|
159
|
+
```tsx
|
|
160
|
+
import { linearTiming, springTiming } from "@remotion/transitions";
|
|
161
|
+
|
|
162
|
+
const linearDuration = linearTiming({
|
|
163
|
+
durationInFrames: 20,
|
|
164
|
+
}).getDurationInFrames({ fps: 30 });
|
|
165
|
+
// Returns 20
|
|
166
|
+
|
|
167
|
+
const springDuration = springTiming({
|
|
168
|
+
config: { damping: 200 },
|
|
169
|
+
}).getDurationInFrames({ fps: 30 });
|
|
170
|
+
// Returns calculated duration based on spring physics
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
For `springTiming` without an explicit `durationInFrames`, the duration depends on `fps` because it calculates when the spring animation settles.
|
|
174
|
+
|
|
175
|
+
### Calculating total composition duration
|
|
176
|
+
|
|
177
|
+
```tsx
|
|
178
|
+
import { linearTiming } from "@remotion/transitions";
|
|
179
|
+
|
|
180
|
+
const scene1Duration = 60;
|
|
181
|
+
const scene2Duration = 60;
|
|
182
|
+
const scene3Duration = 60;
|
|
183
|
+
|
|
184
|
+
const timing1 = linearTiming({ durationInFrames: 15 });
|
|
185
|
+
const timing2 = linearTiming({ durationInFrames: 20 });
|
|
186
|
+
|
|
187
|
+
const transition1Duration = timing1.getDurationInFrames({ fps: 30 });
|
|
188
|
+
const transition2Duration = timing2.getDurationInFrames({ fps: 30 });
|
|
189
|
+
|
|
190
|
+
const totalDuration =
|
|
191
|
+
scene1Duration +
|
|
192
|
+
scene2Duration +
|
|
193
|
+
scene3Duration -
|
|
194
|
+
transition1Duration -
|
|
195
|
+
transition2Duration;
|
|
196
|
+
// 60 + 60 + 60 - 15 - 20 = 145 frames
|
|
197
|
+
```
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: transparent-videos
|
|
3
|
+
description: Rendering transparent videos in Remotion
|
|
4
|
+
metadata:
|
|
5
|
+
tags: transparent, alpha, codec, vp9, prores, webm
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# Rendering Transparent Videos
|
|
9
|
+
|
|
10
|
+
Remotion can render transparent videos in two ways: as a ProRes video or as a WebM video.
|
|
11
|
+
|
|
12
|
+
## Transparent ProRes
|
|
13
|
+
|
|
14
|
+
Ideal for when importing into video editing software.
|
|
15
|
+
|
|
16
|
+
**CLI:**
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npx remotion render --image-format=png --pixel-format=yuva444p10le --codec=prores --prores-profile=4444 MyComp out.mov
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
**Default in Studio** (restart Studio after changing):
|
|
23
|
+
|
|
24
|
+
```ts
|
|
25
|
+
// remotion.config.ts
|
|
26
|
+
import { Config } from "@remotion/cli/config";
|
|
27
|
+
|
|
28
|
+
Config.setVideoImageFormat("png");
|
|
29
|
+
Config.setPixelFormat("yuva444p10le");
|
|
30
|
+
Config.setCodec("prores");
|
|
31
|
+
Config.setProResProfile("4444");
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
**Setting it as the default export settings for a composition** (using `calculateMetadata`):
|
|
35
|
+
|
|
36
|
+
```tsx
|
|
37
|
+
import { CalculateMetadataFunction } from "remotion";
|
|
38
|
+
|
|
39
|
+
const calculateMetadata: CalculateMetadataFunction<Props> = async ({
|
|
40
|
+
props,
|
|
41
|
+
}) => {
|
|
42
|
+
return {
|
|
43
|
+
defaultCodec: "prores",
|
|
44
|
+
defaultVideoImageFormat: "png",
|
|
45
|
+
defaultPixelFormat: "yuva444p10le",
|
|
46
|
+
defaultProResProfile: "4444",
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
<Composition
|
|
51
|
+
id="my-video"
|
|
52
|
+
component={MyVideo}
|
|
53
|
+
durationInFrames={150}
|
|
54
|
+
fps={30}
|
|
55
|
+
width={1920}
|
|
56
|
+
height={1080}
|
|
57
|
+
calculateMetadata={calculateMetadata}
|
|
58
|
+
/>;
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
## Transparent WebM (VP9)
|
|
62
|
+
|
|
63
|
+
Ideal for when playing in a browser.
|
|
64
|
+
|
|
65
|
+
**CLI:**
|
|
66
|
+
|
|
67
|
+
```bash
|
|
68
|
+
npx remotion render --image-format=png --pixel-format=yuva420p --codec=vp9 MyComp out.webm
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
**Default in Studio** (restart Studio after changing):
|
|
72
|
+
|
|
73
|
+
```ts
|
|
74
|
+
// remotion.config.ts
|
|
75
|
+
import { Config } from "@remotion/cli/config";
|
|
76
|
+
|
|
77
|
+
Config.setVideoImageFormat("png");
|
|
78
|
+
Config.setPixelFormat("yuva420p");
|
|
79
|
+
Config.setCodec("vp9");
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
**Setting it as the default export settings for a composition** (using `calculateMetadata`):
|
|
83
|
+
|
|
84
|
+
```tsx
|
|
85
|
+
import { CalculateMetadataFunction } from "remotion";
|
|
86
|
+
|
|
87
|
+
const calculateMetadata: CalculateMetadataFunction<Props> = async ({
|
|
88
|
+
props,
|
|
89
|
+
}) => {
|
|
90
|
+
return {
|
|
91
|
+
defaultCodec: "vp8",
|
|
92
|
+
defaultVideoImageFormat: "png",
|
|
93
|
+
defaultPixelFormat: "yuva420p",
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
|
|
97
|
+
<Composition
|
|
98
|
+
id="my-video"
|
|
99
|
+
component={MyVideo}
|
|
100
|
+
durationInFrames={150}
|
|
101
|
+
fps={30}
|
|
102
|
+
width={1920}
|
|
103
|
+
height={1080}
|
|
104
|
+
calculateMetadata={calculateMetadata}
|
|
105
|
+
/>;
|
|
106
|
+
```
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: trimming
|
|
3
|
+
description: Trimming patterns for Remotion - cut the beginning or end of animations
|
|
4
|
+
metadata:
|
|
5
|
+
tags: sequence, trim, clip, cut, offset
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
Use `<Sequence>` with a negative `from` value to trim the start of an animation.
|
|
9
|
+
|
|
10
|
+
## Trim the Beginning
|
|
11
|
+
|
|
12
|
+
A negative `from` value shifts time backwards, making the animation start partway through:
|
|
13
|
+
|
|
14
|
+
```tsx
|
|
15
|
+
import { Sequence, useVideoConfig } from "remotion";
|
|
16
|
+
|
|
17
|
+
const fps = useVideoConfig();
|
|
18
|
+
|
|
19
|
+
<Sequence from={-0.5 * fps}>
|
|
20
|
+
<MyAnimation />
|
|
21
|
+
</Sequence>;
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
The animation appears 15 frames into its progress - the first 15 frames are trimmed off.
|
|
25
|
+
Inside `<MyAnimation>`, `useCurrentFrame()` starts at 15 instead of 0.
|
|
26
|
+
|
|
27
|
+
## Trim the End
|
|
28
|
+
|
|
29
|
+
Use `durationInFrames` to unmount content after a specified duration:
|
|
30
|
+
|
|
31
|
+
```tsx
|
|
32
|
+
<Sequence durationInFrames={1.5 * fps}>
|
|
33
|
+
<MyAnimation />
|
|
34
|
+
</Sequence>
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
The animation plays for 45 frames, then the component unmounts.
|
|
38
|
+
|
|
39
|
+
## Trim and Delay
|
|
40
|
+
|
|
41
|
+
Nest sequences to both trim the beginning and delay when it appears:
|
|
42
|
+
|
|
43
|
+
```tsx
|
|
44
|
+
<Sequence from={30}>
|
|
45
|
+
<Sequence from={-15}>
|
|
46
|
+
<MyAnimation />
|
|
47
|
+
</Sequence>
|
|
48
|
+
</Sequence>
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
The inner sequence trims 15 frames from the start, and the outer sequence delays the result by 30 frames.
|