media_convert
Convert video and audio files between formats with presets for web MP4 (H.264/AAC), WebM, and animated GIF; control resolution, frame rate, quality, and hardware acceleration.
Instructions
Convert video and audio files between formats. Includes presets for web MP4 (H.264/AAC), WebM (VP9/Opus), and animated GIF. Supports hardware acceleration on Apple Silicon, NVIDIA, Intel, and AMD.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| crf | No | Quality factor from 0 to 51. Lower numbers mean higher quality. Default: 23 for MP4, 30 for WebM. | |
| fps | No | Target frame rate in frames per second, such as 30, 60, or 15 | |
| preset | No | Encoding preset: 'web_mp4' for browser playback, 'webm' for WebM video, 'gif' for animated GIF, or 'auto'. Default: 'auto'. | |
| inputPath | Yes | Path to the source media file to convert | |
| outputPath | Yes | Destination path for the converted file (e.g. ./output.mp4, ./output.webm, ./animation.gif) | |
| resolution | No | Target size formatted as 'WIDTHxHEIGHT', such as '1920x1080' or '1280x720' | |
| hardwareAcceleration | No | Use hardware-accelerated video encoding (VideoToolbox, NVENC, QSV, etc.) when available. Default: true. |