スキル一覧に戻る
tsiresymila1

ffmpeg-helper

by tsiresymila1

5🍴 2📅 2026年1月16日
GitHubで見るManusで実行

SKILL.md


name: FFmpeg Helper description: Guidelines for generating valid FFmpeg commands for the mobile FFmpeg Kit.

FFmpeg Helper

Use this skill when working with ffmpeg_kit_flutter_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.

スコア

総合スコア

60/100

リポジトリの品質指標に基づく評価

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

+10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

レビュー

💬

レビュー機能は近日公開予定です