Skills2026年3月29日·1 分钟阅读

Remotion Rule: Ffmpeg

Remotion skill rule: Using FFmpeg and FFprobe in Remotion. Part of the official Remotion Agent Skill for programmatic video in React.

TO
TokRepo精选 · Community
快速使用

先拿来用,再决定要不要深挖

这里应该同时让用户和 Agent 知道第一步该复制什么、安装什么、落到哪里。

npx skills add remotion-dev/skills

This rule activates automatically when working with ffmpeg in a Remotion project.


介绍

Using FFmpeg and FFprobe in Remotion. Part of the Remotion AI Skill — the official Agent Skill for programmatic video creation in React.

Best for: Developers using Remotion for ffmpeg Works with: Claude Code, OpenAI Codex, Cursor


FFmpeg in Remotion

ffmpeg and ffprobe do not need to be installed. They are available via the bunx remotion ffmpeg and bunx remotion ffprobe:

bunx remotion ffmpeg -i input.mp4 output.mp3
bunx remotion ffprobe input.mp4

Trimming videos

You have 2 options for trimming videos:

  1. Use the FFmpeg command line. You MUST re-encode the video to avoid frozen frames at the start of the video.
# Re-encodes from the exact frame
bunx remotion ffmpeg -ss 00:00:05 -i public/input.mp4 -to 00:00:10 -c:v libx264 -c:a aac public/output.mp4
  1. Use the trimBefore and trimAfter props of the <Video> component. The benefit is that this is non-destructive and you can change the trim at any time.
import { Video } from "@remotion/media";

<Video
  src={staticFile("video.mp4")}
  trimBefore={5 * fps}
  trimAfter={10 * fps}
/>;

🙏

来源与感谢

Created by Remotion. Licensed under MIT. remotion-dev/skills — Rule: ffmpeg

Part of the Remotion AI Skill collection on TokRepo.

相关资产