Skip to content

Interface: BaseOptions ​

Base options shared by both the editor and headless trim operations.

Extended by ​

Properties ​

PropertyTypeDescription
enablePreciseTrimmingbooleanWhen 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.
outputExtstringOutput file extension (e.g. "mp4", "wav").
removeAfterFailedToSavePhotobooleanWhether to remove the output file if saving to the photo library fails.
removeAfterSavedToPhotobooleanWhether to remove the output file after it has been saved to the photo library.
removeAudiobooleanWhen 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.
saveToPhotobooleanWhether to save the output file to the device's photo library.
speednumberPlayback 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.
typestringMedia type: "video" or "audio".

Released under the MIT License.