---
title: "Session Replay"
description: "Learn how to capture gameplay video of the moments leading up to a crash with Sentry's Unreal Engine SDK."
url: https://docs.sentry.io/platforms/unreal/session-replay/
---

# Set Up Session Replay | Sentry for Unreal Engine

Session Replay for Unreal Engine is **experimental**. The API and behavior may change in future releases.

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](https://docs.sentry.io/platforms/javascript/session-replay.md) and [mobile](https://docs.sentry.io/platforms/android/session-replay.md) 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. When a crash occurs, the recording is sent to Sentry as a session replay that's linked to the crash event and viewable on the [**Replays**](https://sentry.io/orgredirect/organizations/:orgslug/replays/) page. Capture and delivery differ per platform — see [Platform Notes](https://docs.sentry.io/platforms/unreal/session-replay.md#platform-notes) for the details.

## [Platform Support](https://docs.sentry.io/platforms/unreal/session-replay.md#platform-support)

| Platform    | What gets captured                                            | Requirements                                                                         |
| ----------- | ------------------------------------------------------------- | ------------------------------------------------------------------------------------ |
| **Windows** | A rolling video clip of the game's backbuffer.                | Engine codec plugins matching the GPU vendor (NVIDIA or AMD) and a plugin rebuild.\* |
| **Linux**   | A rolling video clip of the game's backbuffer.                | Engine codec plugins, an NVIDIA GPU, and a plugin rebuild.\*                         |
| **macOS**   | A rolling video clip of the game's backbuffer.                | Engine codec plugins and a plugin rebuild.\*                                         |
| **iOS**     | A rolling video clip of the game's backbuffer.                | Unreal Engine **5.8 or newer**, engine codec plugins, and a plugin rebuild.\*        |
| **Android** | A sequence of periodic screenshots stitched into a video.     | None beyond the standard Android setup.                                              |
| **Xbox**    | An OS-captured gameplay clip, attached to crash reports only. | Development kits only.                                                               |

\* See the [Platform Notes](https://docs.sentry.io/platforms/unreal/session-replay.md#platform-notes) below for the exact engine version, plugin, GPU, and driver requirements.

PlayStation and Nintendo Switch are not currently supported. On those platforms the setting is a no-op.

## [Enabling Session Replay](https://docs.sentry.io/platforms/unreal/session-replay.md#enabling-session-replay)

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:

```ini
[/Script/Sentry.SentrySettings]
AttachSessionReplay=True
```

## [Configuration](https://docs.sentry.io/platforms/unreal/session-replay.md#configuration)

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 `1000`–`60000`) — The requested length of the retroactive replay window. On Windows, Linux, macOS, and iOS 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.

### [Advanced Recording Options (Windows, Linux, macOS & iOS)](https://docs.sentry.io/platforms/unreal/session-replay.md#advanced-recording-options-windows-linux-macos--ios)

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

* **Fragment duration (seconds)** (`FragmentSeconds`, default `0.5`, range `0.1`–`2.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.25`–`5.0`) — How often the on-disk attachment file is refreshed.
* **Target framerate** (`Framerate`, default `30`, range `10`–`60`) — Capture framerate. The game can render faster; frames are sampled down to this rate.
* **Target bitrate (kbps)** (`BitrateKbps`, default `2000`, range `200`–`20000`) — Encoder target bitrate.

```ini
[/Script/Sentry.SentrySettings]
AttachSessionReplay=True
SessionReplayDurationMs=5000
SessionReplayOptions=(FragmentSeconds=0.500000,RotationIntervalSeconds=1.000000,Framerate=30,BitrateKbps=2000)
```

## [Platform Notes](https://docs.sentry.io/platforms/unreal/session-replay.md#platform-notes)

### [Desktop (Windows, macOS, and Linux)](https://docs.sentry.io/platforms/unreal/session-replay.md#desktop-windows-macos-and-linux)

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

| Platform    | Encoder            | Engine plugins              | GPU and driver requirements                                                                                         |
| ----------- | ------------------ | --------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| **Windows** | NVIDIA NVENC       | `AVCodecsCore`, `NVCodecs`  | NVIDIA GPU with driver **531.61** or newer.                                                                         |
| **Windows** | AMD AMF            | `AVCodecsCore`, `AMFCodecs` | AMD GPU with a recent Adrenalin driver. D3D11/D3D12 RHI only — not available when running with `-vulkan`.           |
| **Linux**   | NVIDIA NVENC       | `AVCodecsCore`, `NVCodecs`  | NVIDIA GPU with proprietary driver **530.41** or newer — NVENC isn't available with the open-source Nouveau driver. |
| **macOS**   | Apple VideoToolbox | `AVCodecsCore`, `VTCodecs`  | None — 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.
* **The replay may arrive after the next app launch.** With the default backends (Crashpad on Windows and Linux, sentry-cocoa on macOS), the replay is uploaded on the next application launch after the crash. With the opt-in native backend, it's uploaded during the crashed session.

The most recent fraction of a second of footage (up to one fragment duration) may be missing from the attached clip, since the fragment being encoded at the moment of the crash isn't yet finalized.

### [iOS](https://docs.sentry.io/platforms/unreal/session-replay.md#ios)

On iOS, Session Replay uses the same recording pipeline as desktop, encoding the game's backbuffer with Apple VideoToolbox via the `AVCodecsCore` and `VTCodecs` engine plugins. Encoding is hardware-accelerated on all devices, and the desktop notes above (plugin rebuild, encoder fallback) apply equally.

iOS requires **Unreal Engine 5.8 or newer** — earlier engine versions don't ship the AVCodecs plugins for iOS, and the setting is a no-op there.

The replay is uploaded on the next app launch, together with the crash report.

Session Replay assumes your game runs in a **fixed screen orientation** (typical for games). The recording orientation is determined once when the SDK initializes; if your game supports both portrait and landscape and the device is rotated mid-session, the recording stays locked to the initial orientation and subsequent footage may appear squeezed or stretched. Crash reporting itself is unaffected.

The AVCodecs plugins link Apple's `AVFoundation` framework, which references camera and microphone APIs. App Store submissions will be rejected with `ITMS-90683: Missing purpose string in Info.plist` unless your `Info.plist` contains `NSCameraUsageDescription` and `NSMicrophoneUsageDescription` entries — even though Session Replay never accesses the camera or microphone. Add them via **Project Settings > Platforms > iOS > Extra PList Data**, or in your `DefaultEngine.ini`:

```ini
[/Script/IOSRuntimeSettings.IOSRuntimeSettings]
AdditionalPlistData=<key>NSCameraUsageDescription</key><string>This app does not use the camera. A system video-encoding framework used for crash replay recording references camera APIs.</string><key>NSMicrophoneUsageDescription</key><string>This app does not use the microphone. A system video-encoding framework used for crash replay recording references microphone APIs.</string>
```

### [Android](https://docs.sentry.io/platforms/unreal/session-replay.md#android)

On Android, enabling the setting turns on the [Android SDK's Session Replay](https://docs.sentry.io/platforms/android/session-replay.md), which records the full session rather than a short pre-crash clip. It works differently from the desktop and iOS recorders: instead of encoding the game's rendered frames, it periodically captures screenshots of the game surface and stitches them into a video. See the [Android Session Replay docs](https://docs.sentry.io/platforms/android/session-replay.md) for details on sampling and configuration.

### [Xbox](https://docs.sentry.io/platforms/unreal/session-replay.md#xbox)

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.

## [Privacy](https://docs.sentry.io/platforms/unreal/session-replay.md#privacy)

On Windows, Linux, macOS, iOS, Android, and Xbox, Session Replay records the rendered game frames as-is — there is **no automatic masking**. Any sensitive information shown on screen (player names, chat, email addresses, in-game purchases, and so on) will be present in the captured video. Only enable this feature if the content rendered by your game is safe to record, and make sure your data-handling and privacy policies account for it.

On Android, the SDK's default text and image masking applies to the native Android view hierarchy, not to the game's rendering surface, which is captured directly. Review the [Android Session Replay privacy documentation](https://docs.sentry.io/platforms/android/session-replay/privacy.md) for details on masking any native UI your game overlays.

If you run into issues or have feedback about Session Replay on Unreal Engine, please open a [GitHub issue](https://github.com/getsentry/sentry-unreal/issues).
