ffmpeg_processor
Skill1 starsChanged 5 months agoMITView on GitHub
FFmpeg 视频/音频处理工具 - 格式转换、裁剪、合并、水印、字幕、GIF转换等
In this repository13 other files it gives its agents.
- batch_renamerSkill
- data_processorSkill
- directory_treeSkill
- file_comparatorSkill
- file_organizerSkill
- image_downloaderSkill
- image_processorSkill
- password_generatorSkill
- pdf_toolSkill
- pdf-word-converterSkill
- sftp_toolSkill
- web-crawlerSkill
- wechat_image_downloaderSkill
The file
Files
FFmpeg Processor Skill
FFmpeg 视频/音频处理工具,提供丰富的媒体处理功能。
功能特性
🎥 格式转换
- MP4 / WebM / AVI / MOV / MKV 互转
- 视频转 GIF
- 视频转 MP3 / AAC / WAV / FLAC
✂️ 视频编辑
- 裁剪视频
- 调整尺寸
- 调整速度
- 旋转视频
- 提取视频帧
📦 视频处理
- 合并多个视频
- 添加水印
- 添加字幕
- 图片合成视频
📊 媒体信息
- 获取视频信息
- 获取音频信息
- 获取格式信息
使用方法
Python API
from skills.ffmpeg_processor import FFmpegProcessor
ff = FFmpegProcessor()
# 检查 FFmpeg 是否可用
print(f"FFmpeg 可用: {ff.check_ffmpeg()}")
# 格式转换
ff.to_mp4('input.avi', 'output.mp4')
ff.to_mp3('input.mp4', 'output.mp3')
# 获取媒体信息
info = ff.get_video_info('video.mp4')
print(f"分辨率: {info['video_resolution']}")
print(f"时长: {info['duration']}秒")
# 裁剪视频
ff.trim_video('input.mp4', 'output.mp4',
start_time='00:00:10',
duration='00:00:30')
# 调整尺寸
ff.resize_video('input.mp4', 'output.mp4', 1280, 720)
# 视频转 GIF
ff.video_to_gif('input.mp4', 'output.gif', fps=15)
# 添加水印
ff.add_watermark('input.mp4', 'output.mp4',
'logo.png', position='br')
# 提取帧
frames = ff.extract_all_frames('video.mp4', 'frames/', fps=1)API 参考
FFmpegProcessor 类
初始化
FFmpegProcessor(ffmpeg_path='ffmpeg', ffprobe_path='ffprobe')检查与信息
check_ffmpeg()- 检查 FFmpeg 是否可用get_file_info(filepath)- 获取文件详细信息get_video_info(filepath)- 获取视频信息get_ffmpeg_version()- 获取 FFmpeg 版本
格式转换
convert_format(input, output, video_codec, audio_codec, ...)- 通用格式转换to_mp4(input, output, codec)- 转换为 MP4to_webm(input, output, codec)- 转换为 WebMto_avi(input, output, codec)- 转换为 AVIto_mp3(input, output, bitrate)- 转换为 MP3to_aac(input, output, bitrate)- 转换为 AAC
视频编辑
resize_video(input, output, width, height, keep_aspect_ratio)- 调整尺寸trim_video(input, output, start_time, duration, end_time)- 裁剪视频extract_frame(input, output, time)- 提取单帧extract_all_frames(input, output_dir, format, fps)- 提取所有帧change_speed(input, output, speed)- 调整速度rotate_video(input, output, rotation)- 旋转视频
视频处理
video_to_gif(input, output, fps, width)- 视频转 GIFcreate_video_from_images(image_dir, output, pattern, fps)- 从图片创建视频add_watermark(input, output, watermark, position, opacity)- 添加水印add_subtitle(input, output, subtitle_path)- 添加字幕merge_videos(file_list, output, use_concat_demuxer)- 合并视频
音频处理
extract_audio(input, output, codec, bitrate)- 提取音频
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

