Skip to content

Interface: CompressOptions ​

Options for compressing a video file.

Properties ​

PropertyTypeDescription
bitratenumberExplicit target bitrate in bits per second. Overrides quality when set. -1 to use quality preset.
frameRatenumberTarget frame rate. -1 to keep original.
heightnumberTarget height in pixels. -1 to keep original. Width is auto-calculated to preserve aspect ratio.
outputExtstringOutput file extension (e.g. "mp4"). Default "mp4".
qualitystringQuality preset: "low" (smallest file), "medium" (balanced), "high" (best quality). On Android the presets target 500 kbps, 2 Mbps and 5 Mbps; on iOS they set FFmpeg -global_quality to 28, 23 and 18. Ignored when bitrate is set.
removeAudiobooleanWhen true, strips the audio track from the output. Default false.
widthnumberTarget width in pixels. -1 to keep original. Height is auto-calculated to preserve aspect ratio.

Released under the MIT License.