VideoOutputOptions

interface VideoOutputOptions

Configuration options for a CameraVideoOutput.

See

Properties

enableAudio?

optional enableAudio: boolean

Whether to enable, or disable audio in video recordings. By default, no audio is recorded.

This requires audio/microphone permission.

Default

false

enableHigherResolutionCodecs?

Android
optional enableHigherResolutionCodecs: boolean

If set to true, the CameraVideoOutput supports using higher resolution (and potentially also higher bit-rate and higher frame rate) media codecs to encode video frames to the video container.

On Android, this binds to VIDEO_CAPABILITIES_SOURCE_CAMCORDER_PROFILE if true, and VIDEO_CAPABILITIES_SOURCE_CAMCORDER_PROFILE if set to false.

In practice, enabling this allows using formats with higher video resolutions, at the risk of higher power usage.

As codecs are very device-specific, enabling this may cause instability issues, so use this with caution.

Default

false

enablePersistentRecorder?

optional enablePersistentRecorder: boolean

If set to true, the CameraVideoOutput will be persistent.

A persistent CameraVideoOutput can continue to record even while switching Cameras.

This may require additional processing power, or choose a different (non-fully-native) path for recording, so it is disabled by default.

Default

false

fileType?

iOS
optional fileType: RecorderFileType

The container file type for recordings produced by this output.

On Android this is always .mp4 and this field is ignored.

Default

'mov'

targetBitRate?

optional targetBitRate: number

Specifies the target bit-rate for the CameraVideoOutput, in bits per second.

The encoder may or may not encode with exactly this bit-rate, depending on system pressure, moving pixels, and file size constraints - but it will be taken as reference.

Default

undefined

targetResolution

targetResolution: Size

The target Video Resolution to use.

Discussion

The CameraSession will negotiate all output targetResolutions and constraints (such as HDR, FPS, etc) in a CameraSessionConfig to finalize the Resolution used for the Output. This is therefore merely a resolution target, and may not be exactly met.

If the given targetResolution cannot be met exactly, its aspect ratio (computed by Size.width / Size.height) will be prioritized over pixel count.

On this page