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 stalls when running the game from the UE4Editor

When launching a game inside the UE4Editor, we have observed that the created window is not quite of the requested resolution.

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

To work around this problem, you need to configure your stream input to specify the actual IDXGISwapChain’s proper resolution, e.g. 1290x754. Since this means that you will then capture everything, including window decoration, we have implemented the ability to crop that input using extra parameters.

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

genvid {
  encode {
    input {
      width = 1290
      height = 754
      crop {
        width = 1280
        height = 720
        left = 5
        top = 29
      }
    }
    output {
      width = 1280
      height = 720
    }
  }
}

The easiest way for such settings to be honored is to clean and restart the whole stack (see Unreal Engine Sample Usage for details).

py local.py reload-project
py local.py start

Framerate is really low

Sometimes, our underlying encoding service crashes, and the Native SDK ends up trying to reconnect to the encoding service at every frame. This 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:

py local.py restart services game

Audio doesn’t work

Unreal Engine 4 turns audio off when in the background. The simplest workaround is to keep the game in the foreground.