Interface: TrimOptions
Options for headless (non-UI) trim operations.
Extends
Properties
| Property | Type | Description | Inherited from |
|---|---|---|---|
enablePreciseTrimming | boolean | When true, FFmpeg re-encodes the video using the platform's hardware encoder (h264_videotoolbox on iOS, h264_mediacodec on Android) for frame-accurate trimming. When false (default), uses stream copy (-c copy) which is much faster but can only cut at keyframes, so the actual start/end may drift by several seconds. Note: if the user applies any transform (flip/rotate/crop), re-encoding already happens regardless of this flag, so precise trimming comes for free in that case. | BaseOptions.enablePreciseTrimming |
endTime | number | End time of the trim range in milliseconds. | - |
outputExt | string | Output file extension (e.g. "mp4", "wav"). | BaseOptions.outputExt |
removeAfterFailedToSavePhoto | boolean | Whether to remove the output file if saving to the photo library fails. | BaseOptions.removeAfterFailedToSavePhoto |
removeAfterSavedToPhoto | boolean | Whether to remove the output file after it has been saved to the photo library. | BaseOptions.removeAfterSavedToPhoto |
removeAudio | boolean | When true, strips the audio track from the output. Default false. In the editor, playback also starts muted, and the output has no audio even if the user unmutes. | BaseOptions.removeAudio |
saveToPhoto | boolean | Whether to save the output file to the device's photo library. | BaseOptions.saveToPhoto |
speed | number | Playback speed multiplier applied during export. 1.0 is normal speed, 2.0 is double speed, 0.5 is half speed. Valid range: 0.25–4.0. When not 1.0, re-encoding is forced regardless of enablePreciseTrimming. | BaseOptions.speed |
startTime | number | Start time of the trim range in milliseconds. | - |
type | string | Media type: "video" or "audio". | BaseOptions.type |