x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

[Closed] (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?

Product Version: UE 4.18
Tags:
more ▼

asked Dec 17 '17 at 06:39 PM in Rendering

avatar image

IppolitoGermer
164 8 11 18

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

The question has been closed Jan 28 '18 at 12:53 PM by IppolitoGermer for the following reason:

The question is answered, right answer was accepted


1 answer: sort voted first

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.

more ▼

answered Dec 17 '17 at 06:51 PM

avatar image

Jin_VE
4.4k 32 77 42

avatar image IppolitoGermer Dec 17 '17 at 07:38 PM

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

avatar image IppolitoGermer Dec 18 '17 at 06:45 PM

how can I do it?

avatar image Jin_VE Dec 19 '17 at 01:57 AM
avatar image IppolitoGermer Dec 19 '17 at 04:38 PM

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

avatar image Jin_VE Dec 19 '17 at 08:03 PM

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.

avatar image IppolitoGermer Dec 19 '17 at 08:16 PM

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.

avatar image Jin_VE Dec 19 '17 at 08:24 PM

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.

avatar image IppolitoGermer Dec 19 '17 at 08:36 PM

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

avatar image Jin_VE Dec 19 '17 at 08:46 PM

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?

avatar image IppolitoGermer Dec 19 '17 at 09:07 PM

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

avatar image Jin_VE Dec 19 '17 at 09:23 PM

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)?

avatar image IppolitoGermer Dec 19 '17 at 09:28 PM

support armv7

support openGL ES2

support openGL ES3.1

avatar image IppolitoGermer Dec 19 '17 at 09:54 PM

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.

avatar image Jin_VE Dec 19 '17 at 10:52 PM

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.

avatar image IppolitoGermer Dec 19 '17 at 11:23 PM

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?

avatar image Jin_VE Dec 19 '17 at 11:52 PM

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.

avatar image IppolitoGermer Dec 19 '17 at 11:58 PM

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

avatar image Jin_VE Dec 20 '17 at 12:23 AM

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.

avatar image Chris Babcock STAFF Jan 08 '18 at 07:22 PM

There was an issue with some external texture support extension versions (like on Adreno 330) which was fixed in 4.18.2. Also make sure if you are using a UMG widget to show the external texture you make a Slate material to sample the mediatexture and connect that to the widget instead of directly using the mediatexture.

avatar image IppolitoGermer Jan 09 '18 at 06:12 PM

where am I wrong? alt text alt text alt text alt text

widget.png (48.2 kB)
widgetevent.png (81.2 kB)
material1.png (90.0 kB)
material2.png (70.3 kB)
avatar image Chris Babcock STAFF Jan 15 '18 at 07:49 PM

The one thing I notice is you try to rewind and play right after open; you have to wait for the OnMediaOpened event before doing this since we now use async prepare.

avatar image IppolitoGermer Jan 16 '18 at 05:21 PM

done this, will I be able to run the game on devices opengl es 3.0?

avatar image IppolitoGermer Jan 18 '18 at 07:06 PM

same problem with 4.18.3 and 4.19

avatar image IppolitoGermer Jan 24 '18 at 08:01 PM

is there an official sample that I can test?

avatar image IppolitoGermer Jan 26 '18 at 04:13 PM

work with 4.19.0 preview 2

avatar image Jin_VE Jan 26 '18 at 05:18 PM

Glad to hear it!

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question