(Android) Media texture problem

I created a widget with an image that has a mediatexture. When i install the apk, the mediatexture works, but only on one of the two devices I’m using for the test. What could be the problem?

In truth they are both LG phones but they have different hardware, I will try to check the logs and I’ll let you know.
sorry for bad english

If it works on one then it’s pretty safe to say it’s not the game code. First guess is that the other doesn’t have sufficient hardware – or it’s a driver bug.

Given the way things work on this forum, now is when you tell me both devices are the same make/model, hehe.

There might be something in the logs. Try diffing the logs from both devices (or eyeball it). There may be a clue in the differences between them.

how can I do it?

Please try referring to this: logging - How to get Android crash logs? - Stack Overflow.

is a texture problem?

12-19 17:33:36.359 29392 29594 W Adreno-ES20: : GL_INVALID_OPERATION

12-19 17:33:36.405 29392 29594 W GLConsumer: [SurfaceTexture-75-29392-1] bindTextureImage: clearing GL error: 0x502

12-19 17:33:36.406 29392 29594 W Adreno-ES20: : GL_INVALID_OPERATION

12-19 17:33:36.410 339 29509 D NuPlayerDriver: notifyListener_l(0xb21ee1e0), (2, 0, 0), loop setting(0, 0)

12-19 17:33:36.413 339 339 D NuPlayerDriver: seekTo(0xb21ee1e0) 0 ms at state 6

12-19 17:33:36.414 339 339 D NuPlayerDriver: notifyListener_l(0xb21ee1e0), (7, 0, 0), loop setting(0, 0)

12-19 17:33:36.416 339 1725 D NuPlayerDriver: start(0xb21ee1e0), state is 6, eos is 0

12-19 17:33:36.423 29392 29594 W GLConsumer: [SurfaceTexture-75-29392-1] bindTextureImage: clearing GL error: 0x502

12-19 17:33:36.424 29392 29594 W Adreno-ES20: : GL_INVALID_OPERATION

12-19 17:33:36.430 29392 29411 D UE4 : FAndroidMedia::Tick - PlaybackEndReached - DidComplete true

I already have 4.18.2. one of the devices (here the texture works) has the snapdragon 808 and the other the snapdragon 801, I think they are both powerful enough.

That could be the problem. It’s hard to tell from that info. From a search, it looks like people have had problems with the media player causing this error. There isn’t much as far as solutions though.

Two suggestions: upgrade to 4.18.2 and see if you still have the problem, and/or try using a different phone to test on. Are you sure that this phone has good enough hardware for what you are trying to do?

Edit: make sure to back up your project before upgrading so you can go back to the old version if you have need.

So it works on one phone but not the other? You might want to verify that they have the same hardware. It might be that the Android package has to be different for each phone. When you build for Android you can choose a few options (like ASTC, ETC1). Try building for “Multi” if you haven’t already. I don’t have much experience with this but I always used Multi to be safe.

I’m really not an expert on this but I guess if it runs at all then it’s probably not the package. So it would have to be a GL instruction that the phone doesn’t support. There may be some option to use lesser GL settings, but other than that you may just not be able to use this feature on all the phones you had hoped to.

Side question: does “mediatexture” require the Media Player?

I usually use this format. is not it the best?

ETC1: Supported by all Android based devices but cannot compress alpha textures (they are stored uncompressed). Recommend using an RGB and a separate alpha texture if need alpha to get better compression.

they do not have the same hardware

working device:
CPU: Qualcomm Snapdragon 808 MSM8992
GPU: Adreno 418
RAM: 4GB

bad device:
CPU: Qualcomm Snapdragon 801 MSM8975AC
GPU: Adreno 330
RAM: 2GB

the game starts on both phones. I can play well. only mediatexture gives problems. (I applied this texture on an image of the widget I use in the mainmenu level)

Meanwhile, I try a different packaging

yes, it requires it.
(however I have not yet thanked you for the time you are dedicating me)

No problem. The more UE4 experts we have, the more help I will get in the future. OK so maybe there’s an GL version issue. Not sure how that makes sense, but if what made sense was all there was we’d be done – and Sherlock Holmes would have been out of a job.

What is set in (Project Settings)->(Platforms - Android)->(Build)?

support armv7

support openGL ES2

support openGL ES3.1

turning off the openGL ES2 support, the bad device stops the game.
and I noticed that it does so before running the startup movies (animated logo ue4).

in fact, before the video of the ue4 logo worked.

So I guess that one is using ES2, hehe. You imply that the phone which worked before still works without ES2 enabled. I suppose it’s able to use 3.1. That may be your difference. Perhaps we can figure out why that would matter.

Maybe that phone isn’t fully compatible with ES2 or UE4 is expecting “ES2 sub-version X” but the phone is a few sub-versions earlier. I’d try it on some other phones. Worst case you can’t support ES2 (or a subset of phones) and over time you can try to solve the problem. That way you’re not completely stuck.

can not I force it? I only have older and less perfermonated devices than the bad device.
is there another way to insert videos without mediatexture?

I’ve never used media player. I’m only trying to help you diagnose your problem.

My suggestion now is to determine if there is something specific about your game that doesn’t work or if it’s a general problem. To do that you need another game to test on that phone. There may be an example you can download or you may need to make a test yourself. If you make your own, the goal is to do as little as possible and see if it runs. Then add more and check again. When you get the invalid instruction error then you know what change is the problem. Or you could go the other way and strip things out of your game, but that isn’t my first suggestion. And it could be just that the phone won’t handle media player. I can’t say for sure.

Oh, it’s right in the cusp between 2.0 and 3.1. Maybe this is happening because 3.0 deprecated something from 2.0 that the media player is expecting. You should also really try to find other phones to test. Maybe a friend can come by. If it’s just this one model (or range) then you will be spending time for nothing. I was one of the first doing video on cellphones (before MPEG chips, BREW flip-phones) and it was incredibly hard to support lots of devices. Had to handle every phone individually. UE4 does a good job handling that but maybe it’s not going to handle everything.

then I will try this way. I would just like to add that I found this information on the snapdragon manufacturer’s website

GPU
GPU Name: Qualcomm® Adreno™ 330 GPU
API Support: OpenGL ES 3.0