Set Up Session Replay

Learn how to capture gameplay video and attach it to crash reports with Sentry's Unreal Engine SDK.

Session Replay records what was happening on screen in the moments leading up to a crash, giving you a visual reproduction to pair with the captured event.

Unlike the web and mobile Session Replay experiences, which reconstruct the UI from the view hierarchy and aggressively mask text and images by default, the Unreal Engine SDK captures the rendered output of your game directly. On desktop and console, it continuously encodes the rendered frames into a short rolling video clip and attaches that clip to crash reports. On Android, the feature delegates to the underlying Android SDK's Session Replay.

PlatformWhat gets capturedRequirements
WindowsA rolling video clip of the game's backbuffer, attached to crash reports.Engine codec plugins matching the GPU vendor (NVIDIA or AMD) and a plugin rebuild.*
LinuxA rolling video clip of the game's backbuffer, attached to crash reports.Engine codec plugins, an NVIDIA GPU, and a plugin rebuild.*
macOSA rolling video clip of the game's backbuffer, attached to crash reports.Engine codec plugins and a plugin rebuild.*
XboxAn OS-captured gameplay clip, attached to crash reports.Development kits only.
AndroidA full-session replay via the Android SDK, with default text and image masking.None beyond the standard Android setup.

* See the Desktop platform notes below for the exact plugin, GPU, and driver requirements.

All other platforms (iOS, PlayStation, and Nintendo Switch) are not currently supported. On those platforms the setting is a no-op.

To enable Session Replay, navigate to Project Settings > Plugins > Sentry and expand the Session Replay section, then toggle Enable session replay (experimental).

Alternatively, add the following to your project's configuration .ini file:

Copied
[/Script/Sentry.SentrySettings]
AttachSessionReplay=True

The following settings are available under the Session Replay section in the plugin settings:

  • Enable session replay (experimental) (AttachSessionReplay, default False) — Master toggle for the feature.
  • Replay duration (ms) (SessionReplayDurationMs, default 5000, range 100060000) — The requested length of the retroactive replay window. On Windows, Linux, and macOS this is the rolling clip length kept on disk for crash attachment; on Xbox it's the requested length of the OS-captured clip (which may be shorter if not enough frames are buffered). This value is ignored on Android, where the underlying SDK determines the duration.

The Advanced recording options group (SessionReplayOptions) provides low-level encoder and muxer tuning for the desktop recorders. The defaults are sensible for most projects.

  • Fragment duration (seconds) (FragmentSeconds, default 0.5, range 0.12.0) — Length of each video fragment. Shorter values reduce the worst-case amount of footage lost at crash time, but increase keyframe frequency and lower compression efficiency.
  • Rotation interval (seconds) (RotationIntervalSeconds, default 1.0, range 0.255.0) — How often the on-disk attachment file is refreshed.
  • Target framerate (Framerate, default 30, range 1060) — Capture framerate. The game can render faster; frames are sampled down to this rate.
  • Target bitrate (kbps) (BitrateKbps, default 2000, range 20020000) — Encoder target bitrate.
Copied
[/Script/Sentry.SentrySettings]
AttachSessionReplay=True
SessionReplayDurationMs=5000
SessionReplayOptions=(FragmentSeconds=0.500000,RotationIntervalSeconds=1.000000,Framerate=30,BitrateKbps=2000)

On desktop platforms, Session Replay continuously encodes the game's backbuffer into a rolling video clip that's attached to crash reports captured by the native crash handler. Encoding is hardware-accelerated; the SDK automatically picks an encoder at runtime from the codec plugins enabled in your project:

PlatformEncoderEngine pluginsGPU and driver requirements
WindowsNVIDIA NVENCAVCodecsCore, NVCodecsNVIDIA GPU with driver 531.61 or newer.
WindowsAMD AMFAVCodecsCore, AMFCodecsAMD GPU with a recent Adrenalin driver. D3D11/D3D12 RHI only — not available when running with -vulkan.
LinuxNVIDIA NVENCAVCodecsCore, NVCodecsNVIDIA GPU with proprietary driver 530.41 or newer — NVENC isn't available with the open-source Nouveau driver.
macOSApple VideoToolboxAVCodecsCore, VTCodecsNone — uses the dedicated hardware media engine on Apple Silicon and a software fallback on Intel Macs.
  • Enable the codec plugins for every GPU vendor you want to cover. The Sentry plugin only compiles the recorder when AVCodecsCore is present. On Windows, NVCodecs and AMFCodecs can be enabled side by side — the encoder matching the player's GPU is selected at runtime.
  • A plugin rebuild is required after toggling the setting. Whether Session Replay is compiled in is decided at build time from AttachSessionReplay, so after enabling or disabling it, delete your project's Binaries and Intermediate directories and rebuild.
  • Machines without a compatible encoder fall back to no recording. The feature self-disables for the session and logs a warning; crash reporting itself is unaffected.

On Xbox, Session Replay uses the operating system's game-capture facility to grab a clip of recent gameplay at crash time. This is supported on development kits only and is not available in retail builds.

On Android, enabling the setting turns on the Android SDK's Session Replay, recording the full session rather than a crash-attached clip. As with the standalone Android SDK, all text and images are masked by default. See the Android Session Replay docs for details on masking, sampling, and privacy.

On Android, the underlying SDK masks all text and images by default. Review the Android Session Replay privacy documentation before adjusting those defaults.

If you run into issues or have feedback about Session Replay on Unreal Engine, please open a GitHub issue.

Was this helpful?
Help improve this content
Our documentation is open source and available on GitHub. Your contributions are welcome, whether fixing a typo (drat!) or suggesting an update ("yeah, this would be better").