Check (and convert) media for Instagram
prepare_mediaChecks an image or video for Instagram placement issues such as format, codec, aspect ratio, length, and size, then optionally writes a corrected JPEG or MP4 copy.
Instructions
Inspect an image or video and list what Instagram would reject for a placement (format, codec, aspect ratio, length, size). With convert=true, writes a fixed copy (JPEG / H.264+AAC MP4, reframed with fit) and returns its path. Publishing tools do this automatically. Needs ffmpeg.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| fit | No | ||
| kind | Yes | Where it will be posted. | |
| convert | No | Write a converted copy when needed. | |
| file_path | Yes | Image or video on this computer. |