Sets fit cover and writes keyframes of crop_left and crop_right (and crop_top and crop_bottom when the source is taller than the frame) so the visible window follows the face track of the clip's asset, smoothed, with a dead zone and a maximum pan speed, over the source range the clip plays. Any crop keyframes the clip already has are replaced, in one undoable step. The face track comes from a face_track job and is supplied by the service in resolved; the command never starts a job. The same track and options always give the same keyframes. The clip must play at a constant speed, forward, and not be a freeze frame.
Arguments#
| Argument | Type | Required | Notes |
|---|---|---|---|
dead_zone | integer | no | How far the face may drift before the frame follows, in ten-thousandths of the window. Default 800.; min 0; max 5000 |
hold_ms | integer | no | How long the last position is held when no face is seen. Default 1500.; min 0; max 30000 |
item_id | string | yes | A clip of a video asset.; pattern ^itm_[0123456789abcdefghjkmnpqrstvwxyz]{10}$ |
keyframe_ms | integer | no | The least time between two keyframes, 50 to 5000 ms. Default 200.; min 50; max 5000 |
max_pan | integer | no | Fastest pan, in ten-thousandths of the source width per second. Default 6000.; min 100; max 100000 |
smoothing_ms | integer | no | Time constant of the smoothing, 0 to 5000 ms. Default 400.; min 0; max 5000 |
Errors#
Scope#
Scope edit. The scope is the one an API key needs in network mode. Run stuarty command:help clip.face_frame for the same description from the binary, or call the command_help tool.
Next steps#
As an MCP call
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "edit",
"arguments": {
"project_id": "prj_7k2m9x4q1b",
"base_revision": 12,
"operations": [
{
"op": "clip.face_frame",
"args": {
"item_id": "itm_m1n2p3q4r5"
}
}
]
}
}
}As a batch file for the CLI
[
{
"op": "clip.face_frame",
"args": {
"item_id": "itm_m1n2p3q4r5"
}
}
]stuarty edit --project prj_7k2m9x4q1b --ops batch.json --jsonOver HTTP
curl -X POST "http://127.0.0.1:7878/api/v1/projects/prj_7k2m9x4q1b/edit" \
-H "Authorization: Bearer $STUARTY_KEY" \
-H "Content-Type: application/json" \
-d '{
"base_revision": 12,
"operations": [
{
"op": "clip.face_frame",
"args": {
"item_id": "itm_m1n2p3q4r5"
}
}
]
}'The ids in the example are illustrative: read the real ones with project_get.