RenderHeads / UnityPlugin-AVProVideo

AVPro Video is a multi-platform Unity plugin for advanced video playback
https://www.renderheads.com/products/avpro-video/
236 stars 28 forks source link

OpenGLES renderer not working from Unity 2019.2.x #200

Closed CristinaRoF closed 4 years ago

CristinaRoF commented 4 years ago

We have two devices with the same set up to display a video using the DisplayUGUI component that you provide us. The first device iPad 2, supports Metal and works perfectly. The second one iPad 4th generation doesn't support Metal which means it is running with OpenGLES2, this one is not rendering the video however I can still hearing it. When I debug in Xcode I can see this error:

Failed to create texture cache, error -6661

Could you please help me out with this?

Thanks.

AndrewRH commented 4 years ago

Thanks, which version of Unity+AVPro Video are you using?

Also do you mean iPad2 or iPad Air 2?

Do you get the error when playing one of our sample videos? If not, could you give us the specs of your video or link to it?

Also, could we see most of the XCode log?

All of this will help us resolve the issue.

Thanks :)

CristinaRoF commented 4 years ago

Hi Andrew,

Thanks for the quick response. O am using unity 2019.2.8f1 (just in case you need this), the iPad model is A1458 (just so you can find. it quickly).

I have the error with both, the bunny sample video from the streaming assets and my video that is in hls format.

This is the log that I see in Xcode:

_2019-10-16 14:47:52.691142+0100 videotest[1595:285671] [DYMTLInitPlatform] platform initialization successful 2019-10-16 14:47:52.888162+0100 videotest[1595:285597] Built from '2019.2/staging' branch, Version '2019.2.8f1 (ff5b465c8d13)', Build type 'Release', Scripting Backend 'il2cpp' 2019-10-16 14:47:52.909228+0100 videotest[1595:285597] -> registered mono modules 0x1186a40 -> applicationDidFinishLaunching() 2019-10-16 14:47:53.332384+0100 videotest[1595:285597] Metal GPU Frame Capture Enabled -> applicationDidBecomeActive() [XR] Discovering subsystems at path /var/containers/Bundle/Application/F91CBFB4-54B3-480E-A67E-59AD1CA1CC16/videotest.app/Data/UnitySubsystems GfxDevice: creating device client; threaded=1 Renderer: PowerVR SGX 554 Vendor: Imagination Technologies Version: OpenGL ES 2.0 IMGSGX554-129 GLES: 2 GL_OES_depth_texture GL_OES_depth24 GL_OES_element_index_uint GL_OES_fbo_render_mipmap GL_OES_mapbuffer GL_OES_packed_depth_stencil GL_OES_rgb8_rgba8 GL_OES_standard_derivatives GL_OES_texture_float GL_OES_texture_half_float GL_OES_texture_half_float_linear GL_OES_vertex_array_object GL_EXT_blend_minmax GL_EXT_color_buffer_half_float GL_EXT_debug_label GL_EXT_debug_marker GL_EXT_discard_framebuffer GL_EXT_draw_instanced GL_EXT_instanced_arrays GL_EXT_map_buffer_range GL_EXT_occlusion_query_boolean GL_EXT_pvrtc_sRGB GL_EXT_read_format_bgra GL_EXT_separate_shader_objects GL_EXT_shader_framebuffer_fetch GL_EXT_shader_texture_lod GL_EXT_shadow_samplers GL_EXT_sRGB GL_EXT_texture_filter_anisotropic GL_EXT_texture_rg GL_EXT_texture_storage GL_APPLE_clip_distance GL_APPLE_color_buffer_packed_float GL_APPLE_copy_texture_levels GL_APPLE_framebuffer_multisample GL_APPLE_rgb_422 GL_APPLE_sync GL_APPLE_texture_format_BGRA8888 GL_APPLE_texture_max_level GL_APPLE_texture_packed_float GL_IMG_read_format GL_IMG_texture_com pression_pvrtc OPENGL LOG: Creating OpenGL ES 2.0 graphics device ; Context level <OpenGL ES 2.0> ; Context handle 359430912 Initialize engine version: 2019.2.8f1 (ff5b465c8d13) UnloadTime: 7.598000 ms [AVProVideo] Initialising AVPro Video (script v1.10.0 plugin v1.9.18) on PowerVR SGX 554/OpenGL ES 2.0 IMGSGX554-129 (MT True) on IPhonePlayer iOS 10.3.3 RenderHeads.Media.AVProVideo.MediaPlayer:Initialise()

(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)

[AVProVideo] Opening https://d16f3pai2k4ar9.cloudfront.net/VP003_New_Lessons_Liveboard_F_F_October11th_V3FINAL/VP003_New_Lessons_Liveboard_F_F_October11th_V3FINAL.m3u8 (offset 0) with API UnityEngine.Debug:Log(Object, Object) RenderHeads.Media.AVProVideo.MediaPlayer:OpenVideoFromFile()

(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)

Initialising for graphics device type OpenGLES 2.0 Failed to create texture cache, error -6661 [AVProVideo] Using playback path: AVFoundation (0x0@0.00) RenderHeads.Media.AVProVideo.OSXMediaPlayer:Update()

(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)_

Thanks :)

MorrisRH commented 4 years ago

Hi, we've been able to reproduce this with our iPad and are currently investigating. The issue is specific to Unity2019.2.8f1 (and possibly earlier versions of 2019.2). I recommend you downgrade to Unity 2019.1.14f1 as we found no issues with playback using this version during our testing.

CristinaRoF commented 4 years ago

We have tried in all versions of 2019.2 and it doesn't work in any of them, yes. Thanks for taking and a look to it and please fix it asp.

Thanks again

MorrisRH commented 4 years ago

We've tracked down the cause of the problem. Unity introduced multi-threaded rendering for OpenGLES2.0 with Unity2019.2. We're working on a fix but a workaround for now would be to disable multi-threaded rendering in the player settings.

CristinaRoF commented 4 years ago

Good morning,

Thanks for that, that workaround will do it for now for us :)

JakobJJ commented 4 years ago

Have this been fixed yet? I have tested on a older ipad ios 9.0 using your example project . And i have disabled multithreaded rendering and all i got now is sound and a pink screen. The unity version im testing with right now is 2019.2.13f1

The errors im getting in xcode is this. It seems to be something about shader variants but im not sure. Before i removed multithreaded it got the same error mentioned in above comments.

Initialize engine version: 2019.2.13f1 (e20f6c7e5017) Failed to find expected binary shader data in 'AVProVideo/BlendFrames'.

(Filename: ./Runtime/Shaders/SerializedShader.cpp Line: 595)

WARNING: Shader Unsupported: 'AVProVideo/BlendFrames' - Pass '' has no fragment shader WARNING: Shader Unsupported: 'AVProVideo/BlendFrames' - Setting to default shader. WARNING: Shader Unsupported: 'AVProVideo/Unlit/Opaque (texture+color support) - Android OES ONLY' - Pass '' has no fragment shader WARNING: Shader Unsupported: 'Hidden/Internal-GUITexture' - Pass '' has no vertex shader WARNING: Shader Unsupported: 'Hidden/Internal-GUITexture' - Pass '' has no vertex shader WARNING: Shader Unsupported: 'Hidden/Internal-GUITexture' - Setting to default shader. UnloadTime: 4.460417 ms [AVProVideo] Initialising AVPro Video (script v1.10.1 plugin v1.10.1) on PowerVR SGX 543/OpenGL ES 2.0 IMGSGX543-124.1 (MT False) on IPhonePlayer iPhone OS 9.3.5 RenderHeads.Media.AVProVideo.MediaPlayer:Initialise()

(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)

[AVProVideo] Opening /var/containers/Bundle/Application/AAA20A95-D817-4D97-953B-B1C657B7454D/VideoTest.app/Data/Raw/AVProVideoSamples/BigBuckBunny_720p30.mp4 (offset 0) with API UnityEngine.Debug:Log(Object, Object) RenderHeads.Media.AVProVideo.MediaPlayer:OpenVideoFromFile() RenderHeads.Media.AVProVideo.Demos.VCR:OnOpenVideoFile()

(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)

Initialising for graphics device type OpenGLES 2.0 WARNING: Shader Unsupported: 'Hidden/Internal-MotionVectors' - Pass '' has no vertex shader WARNING: Shader Unsupported: 'Hidden/Internal-MotionVectors' - Pass '' has no vertex shader WARNING: Shader Unsupported: 'Hidden/Internal-MotionVectors' - Setting to default shader. [AVProVideo] Using playback path: AVFoundation (1280x720@30,00) RenderHeads.Media.AVProVideo.OSXMediaPlayer:Update()

(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)

Event: MetaDataReady RenderHeads.Media.AVProVideo.Demos.VCR:OnVideoEvent(MediaPlayer, EventType, ErrorCode) RenderHeads.Media.AVProVideo.MediaPlayer:FireEventIfPossible(EventType, Boolean)

(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)

Event: FirstFrameReady RenderHeads.Media.AVProVideo.Demos.VCR:OnVideoEvent(MediaPlayer, EventType, ErrorCode) RenderHeads.Media.AVProVideo.MediaPlayer:FireEventIfPossible(EventType, Boolean)

(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)

Event: ResolutionChanged RenderHeads.Media.AVProVideo.Demos.VCR:OnVideoEvent(MediaPlayer, EventType, ErrorCode) RenderHeads.Media.AVProVideo.MediaPlayer:FireEventIfPossible(EventType, Boolean)

(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)

ERROR: 0:2: '' : extension 'GL_OES_EGL_image_external' is not supported WARNING: 0:3: extension 'GL_OES_EGL_image_external_essl3' is not supported

ERROR: 0:2: '' : extension 'GL_OES_EGL_image_external' is not supported WARNING: 0:3: extension 'GL_OES_EGL_image_external_essl3' is not supported ERROR: 0:96: '_MainTex' : syntax error: syntax error

Note: Creation of internal variant of shader 'AVProVideo/UI/Transparent Packed' failed. ERROR: 0:2: '' : extension 'GL_OES_EGL_image_external' is not supported WARNING: 0:3: extension 'GL_OES_EGL_image_external_essl3' is not supported

ERROR: 0:2: '' : extension 'GL_OES_EGL_image_external' is not supported WARNING: 0:3: extension 'GL_OES_EGL_image_external_essl3' is not supported ERROR: 0:96: '_MainTex' : syntax error: syntax error

Note: Creation of internal variant of shader 'AVProVideo/UI/Transparent Packed' failed. ERROR: 0:2: '' : extension 'GL_OES_EGL_image_external' is not supported WARNING: 0:3: extension 'GL_OES_EGL_image_external_essl3' is not supported

ERROR: 0:2: '' : extension 'GL_OES_EGL_image_external' is not supported WARNING: 0:3: extension 'GL_OES_EGL_image_external_essl3' is not supported ERROR: 0:96: '_MainTex' : syntax error: syntax error

Note: Creation of internal variant of shader 'AVProVideo/UI/Transparent Packed' failed. ERROR: 0:2: '' : extension 'GL_OES_EGL_image_external' is not supported WARNING: 0:3: extension 'GL_OES_EGL_image_external_essl3' is not supported

ERROR: 0:2: '' : extension 'GL_OES_EGL_image_external' is not supported WARNING: 0:3: extension 'GL_OES_EGL_image_external_essl3' is not supported ERROR: 0:96: '_MainTex' : syntax error: syntax error

Note: Creation of internal variant of shader 'AVProVideo/UI/Transparent Packed' failed. ERROR: 0:2: '' : extension 'GL_OES_EGL_image_external' is not supported WARNING: 0:3: extension 'GL_OES_EGL_image_external_essl3' is not supported

ERROR: 0:2: '' : extension 'GL_OES_EGL_image_external' is not supported WARNING: 0:3: extension 'GL_OES_EGL_image_external_essl3' is not supported ERROR: 0:96: '_MainTex' : syntax error: syntax error

Note: Creation of internal variant of shader 'AVProVideo/UI/Transparent Packed' failed. ERROR: 0:2: '' : extension 'GL_OES_EGL_image_external' is not supported WARNING: 0:3: extension 'GL_OES_EGL_image_external_essl3' is not supported

ERROR: 0:2: '' : extension 'GL_OES_EGL_image_external' is not supported WARNING: 0:3: extension 'GL_OES_EGL_image_external_essl3' is not supported ERROR: 0:96: '_MainTex' : syntax error: syntax error

Note: Creation of internal variant of shader 'AVProVideo/UI/Transparent Packed' failed. ERROR: 0:2: '' : extension 'GL_OES_EGL_image_external' is not supported WARNING: 0:3: extension 'GL_OES_EGL_image_external_essl3' is not supported

ERROR: 0:2: '' : extension 'GL_OES_EGL_image_external' is not supported WARNING: 0:3: extension 'GL_OES_EGL_image_external_essl3' is not supported ERROR: 0:96: '_MainTex' : syntax error: syntax error

Note: Creation of internal variant of shader 'AVProVideo/UI/Transparent Packed' failed. ERROR: 0:2: '' : extension 'GL_OES_EGL_image_external' is not supported WARNING: 0:3: extension 'GL_OES_EGL_image_external_essl3' is not supported

ERROR: 0:2: '' : extension 'GL_OES_EGL_image_external' is not supported WARNING: 0:3: extension 'GL_OES_EGL_image_external_essl3' is not supported ERROR: 0:96: '_MainTex' : syntax error: syntax error

Note: Creation of internal variant of shader 'AVProVideo/UI/Transparent Packed' failed. ERROR: 0:2: '' : extension 'GL_OES_EGL_image_external' is not supported WARNING: 0:3: extension 'GL_OES_EGL_image_external_essl3' is not supported

ERROR: 0:2: '' : extension 'GL_OES_EGL_image_external' is not supported WARNING: 0:3: extension 'GL_OES_EGL_image_external_essl3' is not supported ERROR: 0:96: '_MainTex' : syntax error: syntax error

Note: Creation of internal variant of shader 'AVProVideo/UI/Transparent Packed' failed. ERROR: 0:2: '' : extension 'GL_OES_EGL_image_external' is not supported WARNING: 0:3: extension 'GL_OES_EGL_image_external_essl3' is not supported

ERROR: 0:2: '' : extension 'GL_OES_EGL_image_external' is not supported WARNING: 0:3: extension 'GL_OES_EGL_image_external_essl3' is not supported ERROR: 0:96: '_MainTex' : syntax error: syntax error

Note: Creation of internal variant of shader 'AVProVideo/UI/Transparent Packed' failed. Event: MetaDataReady RenderHeads.Media.AVProVideo.Demos.VCR:OnVideoEvent(MediaPlayer, EventType, ErrorCode) RenderHeads.Media.AVProVideo.MediaPlayer:FireEventIfPossible(EventType, Boolean)

(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)

Event: Started RenderHeads.Media.AVProVideo.Demos.VCR:OnVideoEvent(MediaPlayer, EventType, ErrorCode) RenderHeads.Media.AVProVideo.MediaPlayer:FireEventIfPossible(EventType, Boolean)

(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)

ERROR: 0:2: '' : extension 'GL_OES_EGL_image_external' is not supported WARNING: 0:3: extension 'GL_OES_EGL_image_external_essl3' is not supported

ERROR: 0:2: '' : extension 'GL_OES_EGL_image_external' is not supported WARNING: 0:3: extension 'GL_OES_EGL_image_external_essl3' is not supported ERROR: 0:96: '_MainTex' : syntax error: syntax error

Note: Creation of internal variant of shader 'AVProVideo/UI/Transparent Packed' failed. ERROR: 0:2: '' : extension 'GL_OES_EGL_image_external' is not supported WARNING: 0:3: extension 'GL_OES_EGL_image_external_essl3' is not supported

ERROR: 0:2: '' : extension 'GL_OES_EGL_image_external' is not supported WARNING: 0:3: extension 'GL_OES_EGL_image_external_essl3' is not supported ERROR: 0:96: '_MainTex' : syntax error: syntax error

Note: Creation of internal variant of shader 'AVProVideo/UI/Transparent Packed' failed. ERROR: 0:2: '' : extension 'GL_OES_EGL_image_external' is not supported WARNING: 0:3: extension 'GL_OES_EGL_image_external_essl3' is not supported

ERROR: 0:2: '' : extension 'GL_OES_EGL_image_external' is not supported WARNING: 0:3: extension 'GL_OES_EGL_image_external_essl3' is not supported ERROR: 0:96: '_MainTex' : syntax error: syntax error

Note: Creation of internal variant of shader 'AVProVideo/UI/Transparent Packed' failed. ERROR: 0:2: '' : extension 'GL_OES_EGL_image_external' is not supported WARNING: 0:3: extension 'GL_OES_EGL_image_external_essl3' is not supported

ERROR: 0:2: '' : extension 'GL_OES_EGL_image_external' is not supported WARNING: 0:3: extension 'GL_OES_EGL_image_external_essl3' is not supported ERROR: 0:96: '_MainTex' : syntax error: syntax error

Note: Creation of internal variant of shader 'AVProVideo/UI/Transparent Packed' failed. ERROR: 0:2: '' : extension 'GL_OES_EGL_image_external' is not supported WARNING: 0:3: extension 'GL_OES_EGL_image_external_essl3' is not supported

ERROR: 0:2: '' : extension 'GL_OES_EGL_image_external' is not supported WARNING: 0:3: extension 'GL_OES_EGL_image_external_essl3' is not supported ERROR: 0:96: '_MainTex' : syntax error: syntax error

Note: Creation of internal variant of shader 'AVProVideo/UI/Transparent Packed' failed. ERROR: 0:2: '' : extension 'GL_OES_EGL_image_external' is not supported WARNING: 0:3: extension 'GL_OES_EGL_image_external_essl3' is not supported

ERROR: 0:2: '' : extension 'GL_OES_EGL_image_external' is not supported WARNING: 0:3: extension 'GL_OES_EGL_image_external_essl3' is not supported ERROR: 0:96: '_MainTex' : syntax error: syntax error

Note: Creation of internal variant of shader 'AVProVideo/UI/Transparent Packed' failed. ERROR: 0:2: '' : extension 'GL_OES_EGL_image_external' is not supported WARNING: 0:3: extension 'GL_OES_EGL_image_external_essl3' is not supported

ERROR: 0:2: '' : extension 'GL_OES_EGL_image_external' is not supported WARNING: 0:3: extension 'GL_OES_EGL_image_external_essl3' is not supported ERROR: 0:96: '_MainTex' : syntax error: syntax error

Note: Creation of internal variant of shader 'AVProVideo/UI/Transparent Packed' failed. ERROR: 0:2: '' : extension 'GL_OES_EGL_image_external' is not supported WARNING: 0:3: extension 'GL_OES_EGL_image_external_essl3' is not supported

ERROR: 0:2: '' : extension 'GL_OES_EGL_image_external' is not supported WARNING: 0:3: extension 'GL_OES_EGL_image_external_essl3' is not supported ERROR: 0:96: '_MainTex' : syntax error: syntax error

Note: Creation of internal variant of shader 'AVProVideo/UI/Transparent Packed' failed. ERROR: 0:2: '' : extension 'GL_OES_EGL_image_external' is not supported WARNING: 0:3: extension 'GL_OES_EGL_image_external_essl3' is not supported

ERROR: 0:2: '' : extension 'GL_OES_EGL_image_external' is not supported WARNING: 0:3: extension 'GL_OES_EGL_image_external_essl3' is not supported ERROR: 0:96: '_MainTex' : syntax error: syntax error

Note: Creation of internal variant of shader 'AVProVideo/UI/Transparent Packed' failed. ERROR: 0:2: '' : extension 'GL_OES_EGL_image_external' is not supported WARNING: 0:3: extension 'GL_OES_EGL_image_external_essl3' is not supported

ERROR: 0:2: '' : extension 'GL_OES_EGL_image_external' is not supported WARNING: 0:3: extension 'GL_OES_EGL_image_external_essl3' is not supported ERROR: 0:96: '_MainTex' : syntax error: syntax error

Note: Creation of internal variant of shader 'AVProVideo/UI/Transparent Packed' failed. ERROR: 0:2: '' : extension 'GL_OES_EGL_image_external' is not supported WARNING: 0:3: extension 'GL_OES_EGL_image_external_essl3' is not supported

ERROR: 0:2: '' : extension 'GL_OES_EGL_image_external' is not supported WARNING: 0:3: extension 'GL_OES_EGL_image_external_essl3' is not supported ERROR: 0:96: '_MainTex' : syntax error: syntax error

Note: Creation of internal variant of shader 'AVProVideo/UI/Transparent Packed' failed. ERROR: 0:2: '' : extension 'GL_OES_EGL_image_external' is not supported WARNING: 0:3: extension 'GL_OES_EGL_image_external_essl3' is not supported

ERROR: 0:2: '' : extension 'GL_OES_EGL_image_external' is not supported WARNING: 0:3: extension 'GL_OES_EGL_image_external_essl3' is not supported ERROR: 0:96: '_MainTex' : syntax error: syntax error

Note: Creation of internal variant of shader 'AVProVideo/UI/Transparent Packed' failed. ERROR: 0:2: '' : extension 'GL_OES_EGL_image_external' is not supported WARNING: 0:3: extension 'GL_OES_EGL_image_external_essl3' is not supported

ERROR: 0:2: '' : extension 'GL_OES_EGL_image_external' is not supported WARNING: 0:3: extension 'GL_OES_EGL_image_external_essl3' is not supported ERROR: 0:96: '_MainTex' : syntax error: syntax error

Note: Creation of internal variant of shader 'AVProVideo/UI/Transparent Packed' failed. ERROR: 0:2: '' : extension 'GL_OES_EGL_image_external' is not supported WARNING: 0:3: extension 'GL_OES_EGL_image_external_essl3' is not supported

ERROR: 0:2: '' : extension 'GL_OES_EGL_image_external' is not supported WARNING: 0:3: extension 'GL_OES_EGL_image_external_essl3' is not supported ERROR: 0:96: '_MainTex' : syntax error: syntax error

Note: Creation of internal variant of shader 'AVProVideo/UI/Transparent Packed' failed. [AVProVideo] Opening /var/containers/Bundle/Application/AAA20A95-D817-4D97-953B-B1C657B7454D/VideoTest.app/Data/Raw/AVProVideoSamples/SampleSphere.mp4 (offset 0) with API UnityEngine.Debug:Log(Object, Object) RenderHeads.Media.AVProVideo.MediaPlayer:OpenVideoFromFile() RenderHeads.Media.AVProVideo.Demos.VCR:OnOpenVideoFile() UnityEngine.EventSystems.StandaloneInputModule:ProcessTouchPress(PointerEventData, Boolean, Boolean) UnityEngine.EventSystems.StandaloneInputModule:DeactivateModule()

(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)

[AVProVideo] Using playback path: AVFoundation (1920x1080@29,93) RenderHeads.Media.AVProVideo.OSXMediaPlayer:Update()

(Filename: ./Runtime/Export/Debug/Debug.bindings.h Line: 35)

AndrewRH commented 4 years ago

Yeah, I've done so reading on other forums etc about this issue. It doesn't seem to be caused by our plugin AVPro Video, but rather it's an issue with Unity 2019.2.x/macOS Catalina...

Apparently there are a few known solutions: 1) Downgrade to Unity 2019.1.x 2) Upgrade to Unity 2019.3.x 3) Try go to Player Settings and change the colour space option (between Gamma/Linear) and UNTICK the "auto graphics API" option

Apparently it might also be fixed from 2019.2.17 onwards.

You can read more proposed solutions here: https://issuetracker.unity3d.com/issues/ios?_ga=2.42385061.1412129407.1572251278-1740351432.1547632638 https://forum.unity.com/threads/unity-2019-2-7-build-ios-crashes-in-shader-compile.757754/?_ga=2.195402021.885728255.1574686185-1314561810.1525514281

Do let us know if you're still having problems after trying these things.

Thanks,

MorrisRH commented 4 years ago

OpenGLES multithreaded rendering support has been implemented and will be in the next release.

AndrewRH commented 4 years ago

Version 1.11.0 containing this fix has been released today. Thanks,