Video FFmpeg Processing
Use the video_ffmpeg_process tool to process video files with FFmpeg.
Use video_info first to inspect the source video (resolution, FPS, duration).
Tool: `video_ffmpeg_process`
Required: path — the input video file.
Presets — use action to apply common operations:
| Action | What it does |
|---|---|
| improve_quality | Denoise + auto-contrast (good default for noisy lab videos) |
| auto_contrast | Brightness/contrast/saturation enhancement only |
| downsample | Halve resolution and FPS (reduce file size) |
| denoise | Temporal + spatial denoising (hqdn3d) |
| crop | Crop to a region (requires crop object) |
| custom | Only explicit parameters are applied |
Fine-grained parameters — override any preset default:
scale_factor: spatial scale (0–1], e.g. 0.25 for quarter resolutiontarget_fps: output frame rateauto_contrast: booleancontrast_strength: 0–3 (higher = more contrast/saturation)denoise: booleancrop:{x, y, width, height}in pixels
Natural-Language Mapping
| User request | Recommended parameters |
|---|---|
| "improve the quality of this video" | action=improve_quality |
| "make the video brighter" | action=auto_contrast, contrast_strength=1.5 |
| "enhance contrast" | action=auto_contrast |
| "reduce file size" / "compress this video" | action=downsample |
| "downsample to 15 fps" | action=custom, target_fps=15 |
| "downsample spatially and temporally" | action=downsample |
| "half the resolution" | action=custom, scale_factor=0.5 |
| "denoise this recording" | action=denoise |
| "remove noise from the video" | action=denoise |
| "crop to region x=100 y=50 w=640 h=480" | action=crop, crop={x:100, y:50, width:640, height:480} |
| "clean up and shrink" | action=improve_quality, scale_factor=0.5 |
Recommended Flow
- Call
video_infoto inspect the source video. - Call
video_ffmpeg_processwith the appropriate action/params. - Report the
output_pathand key settings from the result to the user. - If processing fails, report the
errorand suggest the user check FFmpeg availability.
Tips
- Combine presets with overrides:
action=downsample+scale_factor=0.25gives quarter resolution at half FPS. - For very noisy videos, use
action=improve_qualitywithcontrast_strength=2.0. - Always confirm the output file was created before reporting success.
- Set
overwrite=trueonly when the user explicitly says to replace the existing file.