feat: Add extra-low and extra-high bit-rate options (#2225)

This commit is contained in:
Marc Rousavy
2023-11-27 17:29:25 +01:00
committed by GitHub
parent d7f7095d1a
commit a28135da20
2 changed files with 22 additions and 13 deletions

View File

@@ -21,20 +21,26 @@ export interface RecordVideoOptions {
/**
* The Video Codec to record in.
* - `h264`: Widely supported, but might be less efficient, especially with larger sizes or framerates.
* - `h265`: The HEVC (High-Efficient-Video-Codec) for higher efficient video recordings.
* - `h265`: The HEVC (High-Efficient-Video-Codec) for higher efficient video recordings. Results in up to 50% smaller file-sizes.
*/
videoCodec?: 'h264' | 'h265'
/**
* The bit-rate for encoding the video into a file, in Mbps (Megabits per second).
*
* Bit-rate is dependant on various factors such as resolution, FPS, pixel format (whether it's 10 bit HDR or not), and codec.
* Bit-rate is dependant on various factors such as resolution, FPS, pixel format (whether it's 10 bit HDR or not), and video codec.
*
* By default, it will be calculated using those factors.
* For example, at 1080p, 30 FPS, H.264 codec, without HDR it will result to 10 Mbps.
* By default, it will be calculated by the hardware encoder, which takes all those factors into account.
*
* * `extra-low`: 40% lower than whatever the hardware encoder recommends.
* * `low`: 20% lower than whatever the hardware encoder recommends.
* * `normal`: The recommended value by the hardware encoder.
* * `high`: 20% higher than whatever the hardware encoder recommends.
* * `extra-high`: 40% higher than whatever the hardware encoder recommends.
* * `number`: Any custom number for the bit-rate, in Mbps.
*
* @default 'normal'
*/
videoBitRate?: 'low' | 'normal' | 'high' | number
videoBitRate?: 'extra-low' | 'low' | 'normal' | 'high' | 'extra-high' | number
}
/**