name: remotion-best-practices description: Remotion最佳实践 - 在React中创建视频 author: remotion-dev version: “1.0” metadata: tags: remotion, video, react, animation, composition
何时使用
每当您处理Remotion代码时,使用此技能以获取特定领域的知识。
如何使用
阅读各个规则文件以获取详细解释和代码示例:
- rules/3d.md - 在Remotion中使用Three.js和React Three Fiber的3D内容
- rules/animations.md - Remotion的基本动画技能
- rules/assets.md - 将图像、视频、音频和字体导入到Remotion中
- rules/audio.md - 在Remotion中使用音频和声音 - 导入、修剪、音量、速度、音调
- rules/calculate-metadata.md - 动态设置组合持续时间、尺寸和道具
- rules/can-decode.md - 使用Mediabunny检查视频是否可以在浏览器中解码
- rules/charts.md - Remotion的图表和数据可视化模式
- rules/compositions.md - 定义组合、静态图像、文件夹、默认道具和动态元数据
- rules/display-captions.md - 在Remotion中显示字幕,具有TikTok风格的页面和单词高亮
- rules/extract-frames.md - 使用Mediabunny在特定时间戳从视频中提取帧
- rules/fonts.md - 在Remotion中加载Google字体和本地字体
- rules/get-audio-duration.md - 使用Mediabunny获取音频文件的持续时间(以秒为单位)
- rules/get-video-dimensions.md - 使用Mediabunny获取视频文件的宽度和高度
- rules/get-video-duration.md - 使用Mediabunny获取视频文件的持续时间(以秒为单位)
- rules/gifs.md - 显示与Remotion时间线同步的GIF
- rules/images.md - 使用Img组件在Remotion中嵌入图像
- rules/import-srt-captions.md - 使用@remotion/captions将.srt字幕文件导入到Remotion中
- rules/lottie.md - 在Remotion中嵌入Lottie动画
- rules/measuring-dom-nodes.md - 在Remotion中测量DOM元素尺寸
- rules/measuring-text.md - 测量文本尺寸,将文本适配到容器,并检查溢出
- rules/sequencing.md - Remotion的序列模式 - 延迟、修剪、限制项目持续时间
- rules/tailwind.md - 在Remotion中使用TailwindCSS
- rules/text-animations.md - Remotion的排版和文本动画模式
- rules/timing.md - Remotion中的插值曲线 - 线性、缓动、弹簧动画
- rules/transcribe-captions.md - 转录音频以在Remotion中生成字幕
- rules/transitions.md - Remotion的场景过渡模式
- rules/trimming.md - Remotion的修剪模式 - 剪切动画的开始或结束
- rules/videos.md - 在Remotion中嵌入视频 - 修剪、音量、速度、循环、音调