Video capture best practices
Overview
Overwolf offers two APIs with video capturing capabilities:
- Mainly used to capture short highlight video replays of the currently running game.
- You can capture a highlight manually, or you can use auto-highlights capturing.
- Meant only for video capture to the local hard drive, without streaming.
- Mainly used to capture long videos of the currently running game, up to a full game capture.
- Only manual capture is available, No auto-highlights capturing.
- In addition to local capture, streaming option is available to supported services like Twitch, YouTube, Facebook, etc.
Required Permissions
Using any of the above APIs requires the VideoCaptureSettings permission flag in your app manifest: Only apps with this permission will be defined as capture apps which can be configured in the OW client "capture" tab (see /ow-native/reference/manifest/manifest-json-json#permissions-array)
Notes
- For playing a video from the local disk (using absolute file paths instead of the generated Overwolf "media://" path), you require adding allow_local_file_access: true flag in your app manifest.
- There is a problem with playing a video from the local disk when your app is running from within an iframe that is on a non-local domain.
See for an example the overwolf.streaming.stop() documentation.
Choosing the right Encoder
When capturing a video, a "video encoder" is used.
Both of the APIs, overwolf.streaming and overwolf.media.replays offer ways to manually set a video encoder or use the default encoder that the user defines through the OW client UI.
To get the best capture results according to your requirements, It is highly recommended to check which encoder is set before capturing videos in your app. You can get the list of available encoders for the current user using overwolf.streaming.getStreamEncoders().
There are CPU/software-based encoders, like the X264, and there are GPU based encoders from Intel (QSV), NVIDIA (NVEnc) and AMD (VCE). CPU encoding is focused on quality where GPU encoding is focused on speed. So CPU/software encoders like the X264 are quality wise better than GPU based encoders.
If you can accept lower quality or higher final bitrate then GPU encoder will be faster, if your goal is highest possible quality at lowest possible bitrate then CPU based encoder will be closer to your goal at a cost of encoding time. Just remember that CPU/software encoders like X264 consume a lot of CPU and might cause some lagging videos or other issues, mostly if the capture resolution or FPS are set to high in through the OW client.
If you recognize that the user is using a CPU/software-based encoder, like the X264, it's recommended to choose one of these options:
- Without notifying the user - manually override the user encoder with other available GPU-based encoders.
- Note that these settings will apply only to your app and will not change the encoder settings as defined by the user through the OW client UI.
- With Notifying the user - let them know that the chosen encoder might cause low-quality video captures.
Then, let the user decide if they want to change the encoder to other GPU based encoders, or choose to lower the resolution and/or FPS.- You can use this suggested warning window with a link to the "capture" OW client settings.