API Method: /api/photo/edit/set-trimming
Set the clip or trimming information for a video
Parameters
Parameter | Description |
---|---|
photo_id (required) | The ID of the video for which to apply trimming. |
ranges (required) | A space-separated list of start and end points for the trimming. Both integers and floats are allowed, but all numbers must fall between 0 and the length of the video clip (both included). |
duplicate_p | Should the trimmimg be applied to a duplicate of this video? The default is 0 in which case the trimming is applied to the specified clip directly. If the value is 1 a new video is created, the trimmimg applied and a new photo_id returned. |
duplicate_published_p | If the call is creating a duplicate video, should the new clip be published or not? By default, the publish state of the original will be used. |
Permission level
The minimum required permission level is:
read
Example XML Response
<response status="ok" permission_level="read" cached="0">
<untrimmed_video_length>149</untrimmed_video_length>
<ranges>99.17259978425028 133.6429447852761</ranges>
<current_video_length>34.493</current_video_length>
<applied_photo_id>1234</applied_photo_id>
</response>
Example JSON Response
{
"status": "ok",
"permission_level":"read",
"cached":"0",
"trimming":{
"untrimmed_video_length": "149",
"ranges": "99.17259978425028 133.6429447852761",
"current_video_length": "34.493",
"applied_photo_id": "1234",
},
"p": "1",
"size": "1",
"site": {...},
"endpoint": "/api/photo/edit/set-trimming"
}