VideoOutputOptions
interface VideoOutputOptionsConfiguration options for a CameraVideoOutput.
See
Properties
enableAudio?
optional enableAudio: booleanWhether to enable, or disable audio in video recordings. By default, no audio is recorded.
This requires audio/microphone permission.
Default
falseenableHigherResolutionCodecs?
optional enableHigherResolutionCodecs: booleanIf 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
falseenablePersistentRecorder?
optional enablePersistentRecorder: booleanIf 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.
- On iOS, enabling
enablePersistentRecorderwill use a customAVCaptureVideoDataOutput+AVAssetWriterpipeline instead of the fully internalAVCaptureMovieFileOutput. - On Android, enabling
enablePersistentRecorderwill useasPersistentRecording().
Default
falsefileType?
optional fileType: RecorderFileTypeThe 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: numberSpecifies 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
undefinedtargetResolution
targetResolution: SizeThe 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.