Better FFmpeg icon

Better FFmpeg

Run FFmpeg media operations

Editing & Transcode → Crop

AI-generated

Summary

Crop a video frame based on specified dimensions and coordinates.

Inputs

  • ffmpegPath — Path to FFmpeg binary (or keep as "ffmpeg" if in PATH)
  • ffprobePath — Path to FFprobe binary (or keep as "ffprobe" if in PATH)
  • cropInput (required) — Path to the input video file to crop.
  • cropW (required) — Width (in pixels) of the cropped area.
  • cropH (required) — Height (in pixels) of the cropped area.
  • cropX (required) — X coordinate (in pixels) of the top-left corner of the cropped area.
  • cropY (required) — Y coordinate (in pixels) of the top-left corner of the cropped area.
  • cropOutput (required) — Path for the output cropped video file.
  • cropOverwrite — Overwrite existing output file if it exists.

Output shape

a single output record detailing the success status and output path of the cropped video.

If the specified width and height are not greater than 0, an error will be returned.

Examples

Example 1: Crop a video to a 640x480 area starting at coordinates (100,100).

Set cropInput to the path of the video, cropW to 640, cropH to 480, cropX to 100, cropY to 100, cropOutput to 'output.mp4', and cropOverwrite to true.

Discussion