Detect black frames in a file
detect_black_frames_in_fileDetect black segments in video files to locate fades, slugs, missing media, or act breaks for export quality control; returns start, end, and duration for each black range.
Instructions
Find the parts of a video file where the picture is black (ffmpeg blackdetect): fades to black, slugs, missing media in an export. Returns black ranges as {start, end, duration} in file time (seconds from the start of the file), black_count and black_seconds. Use it for quality control of an export or to find act breaks. detect_letterbox_in_file finds black bars instead. Works on the file on disk with ffmpeg, not on the timeline; Premiere Pro is not needed. ffmpeg and ffprobe must be installed (see check_ffmpeg), else FFMPEG_NOT_FOUND.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"path": "<path>"
},
"name": "detect_black_frames_in_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end | No | Analyse up to this file time, in seconds; clamped to the file's length. Must be greater than start. Default: the end of the file. | |
| path | Yes | Absolute path of the media file on this computer. | |
| start | No | Analyse from this file time (seconds from the start of the file). Default 0. | |
| max_results | No | Maximum ranges to return. When there are more, the result has truncated=true and the total count. Default 500. | |
| min_duration | No | Shortest black stretch to report, in seconds. Default 0.1. | |
| timeout_seconds | No | Stop ffmpeg and fail with TIMEOUT after this many seconds. Default 600. | |
| picture_black_ratio | No | Fraction of the pixels (0-1) that must be black for a frame to count as black. Default 0.98. | |
| pixel_black_threshold | No | Luminance (0-1) below which a pixel counts as black. Default 0.1. |