Skip to main content

Types Reference

CaptureSettingsOptions

  • videoEncoder?: kSupportedEncodersTypes kSupportedEncodersTypes—encoder type to create capture setting. use Default for the best default encoder detected (GPU -> x264).
  • audioEncoder?: kKnownAudioEncodersTypes kKnownAudioEncodersTypes—default is ffmpeg_aac (FFmpeg AAC) use queryInformation().encoders.audio for supported encoders.
  • separateAudioTracks?: boolean—when using the default audio sources, the input and the output audio sources, will use dedicate tracks (2, 3) as well as track number 1 will include both.
  • includeDefaultAudioSources?: boolean—add default input & output audio Devices.

CaptureSettings

  • The capture settings object is responsible of holding all of the options & configurations. required to start capture or replays, it contains the capture sources (video / audio) and the specific configurations related to them. as well as general recording options.
  • Capture settings object is created using the CaptureSettingsBuilder.build() method.
  • The object is used as an argument to the startRecording & startReplays methods. Components:

CaptureSettingsBuilder

extends CaptureSettings The capture settings builder, is responsible of exposing methods for preparing the CaptureSettings object. It allows the addition of capture sources, whether its a display / audio device or a game, as well as changing audio / video properties. Once the settings are ready to be applied, use the build() method to create the CaptureSettings object

RecordEventArgs

  • filePath?: string | undefined—recording output file path.
  • error?: string—error message (optional).
  • reason?: ErrorCode | number—error code (optional).
  • stats?: RecorderStatsRecording stats.

RecordStopEventArgs

*(extends RecordEventArgs)

  • duration?: number—video duration in milliseconds when recording ended successfully.
  • hasError: boolean
  • splitCount?: number—number of splits (if had any).
  • startTimeEpoch?: number—video start time (Epoch).

SplitRecordArgs

*(extends RecordEventArgs)

  • duration?: number—video duration in milliseconds when recording ended successfully.
  • startTimeEpoch?: number—video start time (Epoch).
  • splitCount?: number—number of splits (if had any).
  • nextFilePath: string—next video file path..

ReplayVideo

*(extends RecordEventArgs)

  • duration?: number—video duration in milliseconds when recording ended successfully.
  • startTimeEpoch?: number—video start time (Epoch).

RecorderStats

  • cpuUsage: number—current CPU usage in percent.
  • memoryUsage: number—amount of memory in MB currently being used by the Recorder.
  • availableDiskSpace: number—available disk space on the device being used for recording storage.
  • activeFps: number—current FPS being rendered.
  • averageFrameRenderTime: number—average time in milliseconds that the Recorder is taking to render a frame.
  • renderSkippedFrames: number—number of frames skipped by Recorder in the render thread.
  • renderTotalFrames: number—total number of frames outputted by the render thread.
  • outputSkippedFrames: number—number of frames skipped by Recorder in the output thread.
  • outputTotalFrames: number—total number of frames outputted by the output thread.

RecordingAppOptions

  • statsInterval?: number—set 0 to disable stats emit.
  • overrideOBSFolder?: string—override OBS binaries.
  • customCommandLineArgs?: string[]—custom command lines when launching the Recorder.
  • enableDebugLogs?: boolean—enable the Recorder debug logs.
  • showDebugWindow?: boolean—show the Recorder capture window.

RecordingInformation

AudioInformation

VideoInformation

MonitorInfo

  • adapterIndex: number.
    • id: string.
    • altId: string.
    • dpi: number.
    • attachedToDesktop: boolean.
    • friendlyName: string.
    • refreshRate: number.
    • rect: Rect.
    • isPrimary: boolean.
    • displayIndex: number.

VideoEncoderInfo

  • type: kSupportedEncodersTypeskSupportedEncodersTypes.
  • properties—each supported encoder returns different associated properties.
    • ffmpeg_aom_av1 & ffmpeg_svt_av1 will provide EncoderSettingsAMFAV1.
    • jim_hevc_nvencwill provide EncoderSettingsNVENCHEVC.
    • obs_qsv11_hevc & obs_qsv11_v2 will provide EncoderSettingsQuickSyncHEVC`.
    • obs_x264 will provide EncoderSettingsX264.

kSupportedEncodersTypes

ffmpeg_svt_av1
ffmpeg_aom_av1
jim_nvenc
jim_hevc_nvenc
jim_av1_nvenc
obs_x264
h264_texture_amf
h265_texture_amf
av1_texture_amf
obs_qsv11_v2
obs_qsv11_hevc
obs_qsv11_av1

AdapterInfo

  • index: 0.
  • name: string.
  • driver: string.
  • hagsEnabled: boolean.
  • hagsEnabledByDefault: boolean.

AudioDevice

  • type: AudioDeviceType.
  • id: string.
  • name: string.
  • isDefault: boolean.

AudioEncoderInfo

kKnownAudioEncodersTypes

ffmpeg_aac |
ffmpeg_opus |
ffmpeg_pcm_s16le |
ffmpeg_pcm_s24le |
ffmpeg_pcm_f32le |
ffmpeg_alac |
ffmpeg_flac |
string

kVideoColorFormat

NV12 |
I420 |
I444 |
P010 |
I010 |
P216 |
P416 |
BGRA

kVideoColorRange

'Partial' | 'Full'

kVideoColorSpec

  sRGB |
709 |
601 |
2100PQ |
2100HLG

VideoEncoderSettingsBase

  • max_bitrate?: number—the maximum allowed bitrate.
  • bitrate?: number—the encoding bitrate. Default is 8000
  • keyint_sec?: number—key frames in second. Default is 0 (i.e auto, calculate by the recording engine more or less generate key frame every 4 second.).

VideoSettings

  • baseWidth: number—base width resolution. Default Half HD (main monitor ratio).
  • baseHeight: number—base height resolution. Default Half HD (main monitor ratio).
  • fps?: number—default is 30.
  • outputWidth?: number—output (scaled) resolution. Default is same as baseWidth.
  • outputHeight?: number—output (scaled) resolution. Default is same as baseHeight.
  • colorFormat?: kVideoColorFormat—default is 'NV12'.
  • colorRange?: kVideoColorRange—default is '709'.
  • colorSpec?: kVideoColorSpec—default is Partial.
  • sdrWhite?: number—default is 300 nits.
  • hdrPeak?: number—default is 1000 nits.

AudioSettings

Rect

top: number
left: number
width: number
height: number

CaptureSource

  • type: 'Display' | 'Game' | 'Window'.
  • properties: anyGameCaptureSourceSettings | MonitorCaptureSourceSettings.

GameCaptureSource

  • type: 'Game.
  • properties: GameCaptureSourceSettings.

GameCaptureSource

  • type: 'Display.
  • properties: MonitorCaptureSourceSettings.

GameCaptureSourceSettings

  • gameProcess: string | number—game Process to capture, may contain the process name or process Id.
  • sliCompatibility?: boolean—slow capture. using shared memory.
  • captureCursor?: boolean—capture mouse cursor. Default is true.
  • allowTransparency?: boolean
  • premultipliedAlpha?: boolean
  • captureOverlays?: boolean—capture third-party overlays.
  • limitFramerate?: boolean—limit capture framerate.
  • rgb10a2Space?: boolean—use Rec.2100 (PQ) color space instead sRGB.

MonitorCaptureSourceSettings

  • monitorId: string.
  • type?: DisplayCaptureType.
  • captureCursor?: boolean—capture mouse cursor. Default is true.
  • forceSDR?: boolean.

CaptureSourceSettings

-stretchToOutputSize: boolean—stretch.

AudioDeviceSettingsInfo

*extends AudioDeviceSettings

  • type: AudioDeviceType: 'input' | 'output'.
  • id: string—Device Id.

AudioDeviceSettings

  • use_device_timing?: boolean.
  • tracks?: AudioTracks—include Device tracks. All tracks included by default.
  • balance?: number—0.0. - 1.0. Default is 0.5.
  • mono?: boolean—Default is False (i.e stereo).
  • volume?: number—0.0 - 20.0, default is 1.0 (100%).

ApplicationAudioDeviceSettingsInfo

*extends AudioDeviceSettingsInfo

  • type: 'output'.

DisplayCaptureType(enum)

 Auto = 0,
DXGI = 1, // Direct Duplicator
WGC = 2, // Windows 10 (1903 and up)
BitBlt = 3, // Compatibility mode

DefaultAudioDeviceParams

separateAudioTracks?: boolean—auto separate audio tracks when using the default audio sources. The Input and the Output audio sources will use dedicated tracks (2, 3), and track number 1 will include both.

AudioDeviceParams

*extends DefaultAudioDeviceParams

  • id: string—the device Id.
  • name: string—the device name.

ApplicationAudioCaptureParams

*extends DefaultAudioDeviceParams processName: string—process name to capture audio from (i.e Discord.exe or minecraft.exe).

SplitOptions

  • enableManual: boolean—allow for manual split command to split the current running capture.
  • maxTimeSecond?: number—split video by time (in seconds).

RecordingBaseOptions

  • fileFormat?: kFileFormat—video file format. Default is fragmented_mp4.
  • audioTrack?: AudioTracks—video audio tracks. Default is Track1 or Track1| Track2 |Track3 if separateAudioTracks is on.
  • autoShutdownOnGameExit?: boolean—auto shutdown recording when game exit. **** Note: valid when recording with game capture source.

RecordingOptions

*extends RecordingBaseOptions

  • filePath: string—output file path (without file extension).
  • split?: SplitOptionsSplit Options.
  • maxBySizeMB?: number—split video by size (MB).

ReplayOptions

*extends RecordingBaseOptions

  • rootFolder: string—set the replay's root folder path. Used when replays capture is initiated.
  • bufferSecond: number—defines the length of the buffer to be recorded in seconds.

CaptureReplayOptions

  • fileName: string—replay file name (without extension).
  • pastDuration: number—the video length, in milliseconds, to include prior to the time of this call.
  • timeout?: number—auto stop (optional) in milliseconds. When set to Zero, will create replay with pass duration only. If not set, use ActiveReplay to stop the replay.

ActiveReplay

The active replay object is used to handle currently capturing replay. It can be used to stop, or prolong the replay as desired.

  • timeout: number—get current replay timeout in milliseconds (since was set, if was set).

  • stop(callback)—stop replay now.

  • stopAfter(timeout, callback)—stop after timeout in milliseconds.

    • param—timeout: number—time in ms to stop the replay capture.
    • param—ReplayCallback with ReplayVideo.

GameInfo

  • id: number.
  • classId: number.
  • name: string.
  • supported: boolean.
  • processInfo?: GameProcessInfo.
  • flags?: any.
  • type: 'Game' | 'Launcher'.

GamesFilter

  • all?: boolean—optional. When used pass empty [] for gameIds parameter.
  • includeUnsupported?: boolean—trigger on games that are not supported by ow-electron overlay api.
  • gamesIds: number[]—list of desired gameIds.