smithery.ai

FFmpeg Helper

Guidelines for generating valid FFmpeg commands for the mobile FFmpeg Kit.

Installation

$ npx skills add https://smithery.ai

Similar popular skills

Related neighbors and high-traction skills in the same topics — useful to compare before installing.

Also in this package

Other skills from smithery.ai · top by installs.

npx skills add https://smithery.ai

Browse all from smithery.ai

More details

Agent compatibility

Declared targets from SKILL.md / docs. Unmarked agents are not listed — the skill may still install via the CLI.

Claude Code Not declared
Cursor Not declared
Codex Not declared
GitHub Copilot Not declared
Windsurf Not declared
Gemini CLI Not declared
Cline Not declared
OpenCode Not declared

Package contents

Files included with this skill beyond the listing page.

  • skill md SKILL.md 1,571 B
  • docs SUMMARY.md 95 B

History

  1. First recorded snapshot · 1 installs

SKILL.md

FFmpeg Helper

Use this skill when working with ffmpegkitflutter_new.

1. Syntax Handling

  • Space Escaping: Paths with spaces must be escaped.

- Incorrect: -i /storage/emulated/0/My Folder/video.mp4 - Correct: -i "/storage/emulated/0/My Folder/video.mp4"

  • Codecs: Mobile devices often prefer aac for audio and libx264 (software) or h264_mediacodec (hardware) for video.

2. Common Recipes

Merge Audio and Video

final command = '-i "$videoPath" -i "$audioPath" -c:v copy -c:a aac "$outputPath"';

Convert to MP3

final command = '-i "$inputPath" -vn -acodec libmp3lame -q:a 2 "$outputPath"';
  • -vn: Disable video recording.
  • -acodec libmp3lame: Use MP3 codec.
  • -q:a 2: Variable bit rate (high quality).

Trim Video

final command = '-ss 00:00:10 -i "$inputPath" -t 00:00:30 -c copy "$outputPath"';
  • -ss: Start time.
  • -t: Duration.

3. Session Handling

Always check the return code:

FFmpegKit.execute(command).then((session) async {
  final returnCode = await session.getReturnCode();
  if (ReturnCode.isSuccess(returnCode)) {
    // Success
  } else {
    // Failure
    final failStackTrace = await session.getFailStackTrace();
    print("FFmpeg failed: $failStackTrace");
  }
});

4. Permissions

  • Ensure Permission.manageExternalStorage (Android 11+) or Permission.storage is granted before running commands involving external files.