UE4 4.18 - Android Streaming MediaPlayer clearing GL error: 0x500

Related:

I recreated the project in 4.17 and it works without issues.

The MP4 Video Streaming bug is something new introduced to 4.18.

Here is a working 4.17 repro project.

https://bitbucket.org/tgraupmann/ue4playvideo_17

The issue exists in the 4.18 version.

I’m trying to stream an MP4 H.264 video on Android to play in a UMG Image but it just disappears on Android logging this error.

GLConsumer: [SurfaceTexture-68-14713-2] bindTextureImage: clearing GL error: 0x500

I followed the same steps from the streaming media source guide.

I’ve created a 4.18 repro project here.

https://bitbucket.org/tgraupmann/ue4playvideo

The repro project automatically plays the streaming video and logs the following errors.

12-26 11:23:22.140  1035  1509 E ACDB-LOADER: Error: ACDB AudProc vol returned = -19
12-26 11:23:24.647  1040 12189 E OMXNodeInstance: setConfig(4100179:google.aac.decoder, ConfigPriority(0x6f800002)) ERROR: Undefined(0x80001001)
12-26 11:23:24.650  1040  1249 E OMXNodeInstance: setConfig(4100179:google.aac.decoder, ConfigPriority(0x6f800002)) ERROR: Undefined(0x80001001)
12-26 11:23:24.704  1040 32471 E OMXNodeInstance: getConfig(410017a:qcom.decoder.avc, ??(0x7f000062)) ERROR: UnsupportedSetting(0x80001019)
12-26 11:23:24.750  1040 12188 E OMXNodeInstance: getConfig(410017a:qcom.decoder.avc, ??(0x7f000062)) ERROR: UnsupportedSetting(0x80001019)
12-26 11:23:24.777  1040 32471 E OMXNodeInstance: getConfig(410017a:qcom.decoder.avc, ??(0x7f000062)) ERROR: UnsupportedSetting(0x80001019)
12-26 11:23:24.782  8148  8211 W GLConsumer: [SurfaceTexture-77-8148-0] bindTextureImage: clearing GL error: 0x500

I’ve reproduced the issue on a Samsung Galaxy Note 5 and the Razer Phone.

The video plays fine in UE4 on Windows. It’s just not playing the video on Android. Although I do hear sound.

This error is referenced here.

The post suggests this being a shader issue, where the material needs to be set to an external or custom shader.

This sounds similar to the upgrade guide, although I started in 4.18.

Updating Materials to 4.18
If your pre-4.18 project uses Media Textures inside a Material, you may need to update your Material and change the Sampler Type to the new External type.

The above error is using the original MediaPlayer with the original brush and original material.

I also tried to create a custom material for Android so that I can set the Sampler Type to External.

I created an external sampler material for the video material.

I tried to set the video material on the UMG Image brush, but still the image disappears when streaming video.

Same error.

GLConsumer: [SurfaceTexture-68-14713-2] bindTextureImage: clearing GL error: 0x500

I also tried to set the external sampler video material on the UMG Image but again I get the error and the image control goes transparent.

Here’s setting the UMG Image Video Material before setting the video source and playing the video. I get the same result. You’d figure having a sampler with external and using that would bypass the error???

Hello tgraupmann,

Thank you for the information provided. However, after taking a look at the project provided this appears to be working as intended. You will need to create a material for the media texture rather than assign it directly to the brush. This material will need to have the domain set to “User Interface”. I hope that this information helps.

Make it a great day

Edit: Corrected Typo (changed texture to material)

The MyMediaPlayer_Video is the texture created per the instructions at - Play a Video Stream | Unreal Engine Documentation

The video plays on Windows but not on Android in 4.18.

Are you sure you tested your answer on Android?

A lot of the original post was just about testing different ways to set the texture to avoid the error without success.

On Android, you cannot use the MediaTexture asset directly, unfortunately. You have to create a Material from it and use that instead. Android is a bit special right now in that it uses the new external texture sampler feature for maximum performance. Unfortunately, this means that media textures no longer behave like normal textures.

I’m not sure if there will be a fix for this. We will likely just add a warning in the Editor to inform users about this Android specific behavior.

I’m having the same problem outlined in this post, but I’m confused about what you’re suggesting. I have a Media Texture plugged into a Material (as noted in the OP), and when packaged for Android the video does not play.
Is there a workaround you can suggest?

Were you able to solve this problem?