Hi,
I played a lot with video prefab and tried several combinations with framemarker and imagemarkers and at some point online videos stopped playing.
I thought I had a problem with encoding of the video so tried several formats. Was dealing with this for hours. Then I tried different phones and it just worked with no problems.
I swear that it worked on my phone at the beginning as well, now I cannot make it to work again. Can you help me to troubleshoot this issue? I wouldnt like to get in situation that users would face similar thing on live app.
this is what is happening.
My phone is runnign 4.0.3 and its HTC one S.
To get rid of all other possible problems in my project I started a plain project in unity 3.5.2, imported video prefab sample project package and vufori aandroid package both 1.5.10 versions.
Then in the scene where 2 imagemarkers with video prefab are I did nothing else but replaced video name to full URL to online mp4 video.
Running this on my htc one s shows video with play button on image target with original local file, but shows X button on the one I changed to online video.
When I click on the video texture with X it tries to open fullscreen play but after showing only black screen for like 2 second it comes back to unity scene again and there is clock icon on the target textue. This happens all the time when I click it again. so video does not play on texture nor fullscreen.
The same project ran on HTC one X and Samsung Galaxy tab2 10.1 with same android version works well with no issues with the same online video on texture and fullscreen as well.
On the One S phone I checked the logcat to see what's there but no errors apart fron these are there. Not sure if these are any interesting though.
Thanks for help
Stan
12-12 10:06:30.860: E/OMX-VDEC-1080P(19811): Extension: OMX.google.android.index.useAndroidNativeBuffer2 is not supported
12-12 10:06:30.860: E/OMX-VDEC-1080P(19811): Extension: OMX.google.android.index.useAndroidNativeBuffer is supported
12-12 10:06:30.860: I/QC_CORE(19811): OMXCORE: qc_omx_component_set_parameter 22850bc, 45afcb34 , 2130706456
12-12 10:06:30.860: E/OMX-VDEC-1080P(19811): use_android_native_buffer, handle is 0x2281cd8
12-12 10:06:30.860: E/OMX-VDEC-1080P(19811): setting .nativehandle to 0x2281cd8
12-12 10:06:30.860: D/OMX-VDEC-1080P(19811): Set the Output Buffer Idx: 17 Addr: 48cf2000, pmem_fd=5c00017b
12-12 10:06:30.860: E/OMX-VDEC-1080P(19811): Use Buffer: port 1, buffer 0x220e590, eRet 0
12-12 10:06:30.860: D/OMX-VDEC-1080P(19811): Allocate done for all i/p buffers
12-12 10:06:30.860: D/memalloc(114): ion: Allocated buffer base:0x423f0000 size:376832 fd:37
12-12 10:06:30.870: D/memalloc(10060): ion: Mapped buffer base:0x59b04000 size:376832 offset:0 fd:166
12-12 10:06:30.870: D/memalloc(114): ion: Freeing buffer base:0x423f0000 size:376832 fd:37
12-12 10:06:30.870: D/memalloc(114): ion: Unmapping buffer base:0x423f0000 size:376832
12-12 10:06:30.870: D/memalloc(19811): ion: Mapped buffer base:0x48dd4000 size:376832 offset:0 fd:387
12-12 10:06:30.870: E/OMX-VDEC-1080P(19811): Extension: OMX.google.android.index.useAndroidNativeBuffer2 is not supported
12-12 10:06:30.870: E/OMX-VDEC-1080P(19811): Extension: OMX.google.android.index.useAndroidNativeBuffer is supported
12-12 10:06:30.870: I/QC_CORE(19811): OMXCORE: qc_omx_component_set_parameter 22850bc, 45afcb34 , 2130706456
12-12 10:06:30.870: E/OMX-VDEC-1080P(19811): use_android_native_buffer, handle is 0x22a9148
12-12 10:06:30.870: E/OMX-VDEC-1080P(19811): setting .nativehandle to 0x22a9148
12-12 10:06:30.870: D/OMX-VDEC-1080P(19811): Set the Output Buffer Idx: 18 Addr: 48e6f000, pmem_fd=5c000183
12-12 10:06:30.870: E/OMX-VDEC-1080P(19811): Use Buffer: port 1, buffer 0x220e5e0, eRet 0
12-12 10:06:30.870: D/OMX-VDEC-1080P(19811): Allocate done for all i/p buffers
12-12 10:06:30.870: D/memalloc(114): ion: Allocated buffer base:0x423f0000 size:376832 fd:37
12-12 10:06:30.870: D/memalloc(10060): ion: Mapped buffer base:0x59bb1000 size:376832 offset:0 fd:169
12-12 10:06:30.870: D/memalloc(114): ion: Freeing buffer base:0x423f0000 size:376832 fd:37
12-12 10:06:30.870: D/memalloc(114): ion: Unmapping buffer base:0x423f0000 size:376832
12-12 10:06:30.870: D/memalloc(19811): ion: Mapped buffer base:0x48f5a000 size:376832 offset:0 fd:390
12-12 10:06:30.870: E/OMX-VDEC-1080P(19811): Extension: OMX.google.android.index.useAndroidNativeBuffer2 is not supported
12-12 10:06:30.870: E/OMX-VDEC-1080P(19811): Extension: OMX.google.android.index.useAndroidNativeBuffer is supported
12-12 10:06:30.870: I/QC_CORE(19811): OMXCORE: qc_omx_component_set_parameter 22850bc, 45afcb34 , 2130706456
12-12 10:06:30.870: E/OMX-VDEC-1080P(19811): use_android_native_buffer, handle is 0x2268f60
12-12 10:06:30.870: E/OMX-VDEC-1080P(19811): setting .nativehandle to 0x2268f60
12-12 10:06:30.870: D/OMX-VDEC-1080P(19811): Set the Output Buffer Idx: 19 Addr: 48ff0000, pmem_fd=5c000186
12-12 10:06:30.870: E/OMX-VDEC-1080P(19811): Use Buffer: port 1, buffer 0x220e630, eRet 0
12-12 10:06:30.870: D/OMX-VDEC-1080P(19811): Allocate done for all i/p buffers
12-12 10:06:30.870: D/OMX-VDEC-1080P(19811): Allocate done for all o/p buffers
12-12 10:06:30.870: D/OMX-VDEC-1080P(19811): OMX_CommandStateSet complete, m_state = 2
12-12 10:06:30.870: I/QC_CORE(19811): OMXCORE: qc_omx_component_send_command 22850bc, 0 , 3
I'm not sure what you mean by small resolution but I believe video is played in its native resolution.
Passing video frames to texture in unity is quite expensive operation on it own, I can't imaging anyting to resample video frames on the fly that be performace killer I guess.
So answer to your question is simple, use video with higher quality.
but be carefull in our tests when we used wideo above 720p it did fail to play even in some high end devides.
Question about fullscreen play, just doubletap and it will play fullscreen. if not its simle to implement vide playback has method to play fullscreen. Sometimes it may be helpfull though to use smaller video in unity and higher quality video in fullscreen play.