Skip to main content

Camera Preview

This tutorial explains how to render a preview of your camera feed.


Before you start, set up your project.

Set up camera preview

  1. Find BP_DolbyIOVideoPreviewPlane in the VideoSamples folder of the plugin's content in Content Browser and drag it onto the scene.

NOTE: If you do not see this item, go to the Content Browser settings and tick Show Plugin Content.

  1. Rescale the plane to the desired aspect ratio, for example, [6.4, 3.6, 1.0], and rotate it by [90, 0, 90] to make it face the player start, as in the following example:

  1. Open the sample menu by pressing "M".

  2. Open the "Video devices" combo box and select a device to enable video streaming from that device or select "--- None ---" to disable video streaming. You should see your camera feed on the plane when you select a valid device and the plane should disappear when you select none.

How it works

W_DolbyIOSampleDeviceControls is a sample widget whose "Video devices" combo box is filled using Get Video Devices (and an additional "None" device). We also save the devices in a variable and use Get Current Video Device to select the device that is currently in use.

When you select a device from the combo box, we get a corresponding device from the variable and use Enable Video to start streaming or Disable Video if the device is "None".

BP_DolbyIOVideoPreviewPlane is a sample Blueprint with a simple Event Graph, which handles On Video Enabled and On Video Disabled.

It also contains a generic Construction Script to set up the plane's material: