Troubleshooting Genvid in Unreal Engine 4

Here are a few hints at how to work around some potential issues when using the Genvid Plugin.

Rendering resolution is incorrect while running the game from the UE4Editor

First Solution

When launching a game inside the UE4Editor, we have observed that the created window is not exactly the specified resolution.

For example, when launching a game in 1280x720 resolution, the created window is actually 1290x754. UE4 renders the window decorations itself.

To work around this problem, configure your stream input to specify the IDXGISwapChain’s rendered resolution (1290x754 in the above example). Since this means that you will then capture everything including window decoration, we include the ability to crop that input using extra parameters.

Here is a sample HCL file specifying proper values for this scenario:

{
  "settings": {
    "encode": {
      "input": {"width": 1290, "height": 754, "left": 5, "top": 29},
      "output": {"width": 1280, "height": 720}
    }
  }
}

To ensure the settings are honored, clean and restart the whole stack. See Unreal Tournament Sample Usage for more information.

genvid-sdk setup # Make sure the local cluster is created.
genvid-sdk clean-config # Clean old config in case of existing cluster.
genvid-sdk load-config-sdk # Configure the basic services for the SDK.
py ut4.py load # Load UT4 jobs and configurations.

Second Solution

The Genvid Plugin is compatible with all the available Play Modes. By selecting New Editor Window (PIE), the window will have the good resolution.

Framerate is too low

Sometimes, our underlying encoding service crashes. This causes the Native SDK to try reconnecting to the encoding service at every frame, which leads to the game taking multiple seconds per frame.

This is a known issue that we intend to fix in an upcoming release.

In the meantime, the workaround is to restart the services and game:

genvid-sdk stop services game
genvid-sdk start services game

Audio doesn’t work

Unreal Engine 4 turns audio off when in the background. The simplest workaround is to add in DefaultEngine.ini the following lines:

[Audio]
UnfocusedVolumeMultiplier=1.0

Low framerate in UE4Editor

By design, the UE4Editor slows down its framerate when it loses the focus. To disable this feature, go to the Menu: Edit Editor Preferences and select General - Miscellaneous. On the Performance section, uncheck the option Use Less CPU when in Background.

../../../_images/UE4_EditorPreferences_Miscellaneous_Performance.png

Fig. 64 Editor Preferences - Miscellaneous

UE4 Cube Sample Build Error

Starting with version 4.20, Unreal Engine uses Visual Studio 2017 by default. If you aren’t using Visual Studio 2017, you’ll get the following error when you try to build the Unreal Engine Cube sample.

WARNING: Visual Studio 2017 is installed, but is missing the C++ toolchain.
Please verify that the "VC++ 2017 toolset" component is selected in the
Visual Studio 2017 installation options.

To fix this issue, you need to install or update to the Visual Studio 2017 toolchain version 15.6.

For more information, see the version 4.20 release notes on the Unreal Engine website.