startObs method

bool startObs(
  1. int baseWidth,
  2. int baseHeight,
  3. int outWidth,
  4. int outHeight,
  5. int fpsNumerator,
  6. int fpsDenominator
)

Start OBS. Load all modules, reset video and audio, and create the streaming service.

Example: startObs(1280, 720, 1280, 720, 30000, 1001);

Implementation

bool startObs(
  int baseWidth,
  int baseHeight,
  int outWidth,
  int outHeight,
  int fpsNumerator,
  int fpsDenominator,
) {
  try {
    if (!loadAllModules()) return false;
    if (!resetVideo(
      baseWidth,
      baseHeight,
      outWidth,
      outHeight,
      fpsNumerator,
      fpsDenominator,
    )) return false;
    if (!resetAudio()) return false;
  } catch (e) {
    print("startObs: exception: $e");
    return false;
  }
  return true;
}