Scirra / Construct-bugs

Public bug report submissions for Construct 3 and Construct Animate. Please read the guidelines then click the 'Issues' tab to get started.
https://www.construct.net
107 stars 83 forks source link

Video plugin problem (no video) in Chromium. #7488

Closed edgarblume closed 11 months ago

edgarblume commented 11 months ago

Problem description

The video plugin will not render video when used in Chromium under Ubuntu 22.04 LTE on a ARM CPU (Orange Pi 5) with browser full hardware acceleration enabled and supported.

Attach a .c3p

https://drive.google.com/file/d/1N8FwTZ2V-Gy8pZUJK0Zl2xaJ7HTi1TYH/view?usp=sharing

Steps to reproduce

1-Open C3 2-Open new project landscape 1920*1080 3-Insert video plugin 4-Define a video window size that is 16:9 5-Add videos in the video folder in the 3 supported extensions, .mp4, .webm and .ogv 6-Configure the video plugin so that the names of the videos are correct and set to “autoplay”. 7-Preview project

Observed result

The observed result is the screen is blank and no video plays.

Expected result

What was expected to happen is a video to start playing automatically and with no issues.

More details

System info:

Hardware: Orange Pi 5b - 4GB RAM / 16GB ROM - Mali G610 GPU OS: Ubuntu 22.04 LTS 64-bit Browser: Chromium Version 110.0.5481.4 (DEVELOPER BUILD) UBUNTU 22.04 (64-bit)

“chrome://gpu” results https://docs.google.com/document/d/1JeSVJ9kUGBXtH_XdkJXe75FCXBpcuNt6w01vvlvx8oQ/edit?usp=sharing

Construct 3 version: RELEASE r358 stable

Chromium terminal log during problem: https://docs.google.com/document/d/1uJh2-OAluAemJ0UQlWK7erZCpATHhPbcB3K4c8Jlf0Y/edit?usp=drive_link

Testing information:

The same c3p was tested without issues in:

Windows 10 - Chrome Version 117 Chrome OS - Chrome Version 114.0.5735.119 (Official Build) (64-bit) Android 12 - Chrome 103.0.5060.129 (Via remote preview)

System details

Platform information Product: Construct 3 r358 (stable) Browser: (unknown) (unknown) Browser engine: Chromium Context: browser Operating system: Linux 5.10.110 Device type: desktop Device pixel ratio: 1 Logical CPU cores: 8 Approx. device memory: 4 GB User agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/110.0.0.0 Safari/537.36 Language setting: en-US Local storage Storage quota (approx): 8.1 gb Storage usage (approx): 112 mb (1.3%) Persistant storage: No Browser support notes This list contains missing features that are not required, but could improve performance or user experience if supported. Nothing is missing. Everything is OK! WebGL information Version string: WebGL 2.0 (OpenGL ES 3.0 Chromium) Numeric version: 2 Supports NPOT textures: yes Supports GPU profiling: no Supports highp precision: yes Vendor: Panfrost Renderer: Mali-G610 (Panfrost) Major performance caveat: no Maximum texture size: 8192 Point size range: 1 to 2048 Extensions: EXT_color_buffer_float EXT_color_buffer_half_float EXT_float_blend EXT_texture_compression_bptc EXT_texture_compression_rgtc EXT_texture_filter_anisotropic EXT_texture_norm16 OES_texture_float_linear WEBGL_compressed_texture_astc WEBGL_compressed_texture_etc WEBGL_compressed_texture_etc1 WEBGL_compressed_texture_s3tc WEBGL_compressed_texture_s3tc_srgb WEBGL_debug_renderer_info WEBGL_debug_shaders WEBGL_lose_context WEBGL_multi_draw Audio information System sample rate: 44100 Hz Output channels: 2 Output interpretation: speakers Supported decode formats: WebM Opus (audio/webm; codecs=opus) Ogg Opus (audio/ogg; codecs=opus) WebM Vorbis (audio/webm; codecs=vorbis) Ogg Vorbis (audio/ogg; codecs=vorbis) MPEG-4 AAC (audio/mp4; codecs=mp4a.40.5) MP3 (audio/mpeg) FLAC (audio/flac) PCM WAV (audio/wav; codecs=1) Supported encode formats: WebM Opus (audio/webm; codecs=opus) Video information Supported decode formats: WebM AV1 (video/webm; codecs=av01.0.00M.08) MP4 AV1 (video/mp4; codecs=av01.0.00M.08) WebM VP9 (video/webm; codecs=vp9) WebM VP8 (video/webm; codecs=vp8) Ogg Theora (video/ogg; codecs=theora) H.265 (video/mp4; codecs=hev1.1.2.L93.B0) H.264 (video/mp4; codecs=avc1.42E01E) Supported encode formats: WebM VP9 (video/webm; codecs=vp9) WebM VP8 (video/webm; codecs=vp8)

View details ADDITIONAL INFORMATION AND FINDINGS. After further investigation on the possible causes and not being able to solve the issue from the OS, drivers or browser side (because Firefox for Ubuntu directly couldn't open C3 for some reason) I started to test other ways to open a video in C3. In doing so, I found out that if I open a video using the HTML plugin and adding a JS to play the video, in C3 preview the video plays with no problems and no frame drops. Also if I add JS code to the Event sheet so that it will play video it also works but behind the layout layer. See example c3p with HTML plugin and video PLAYBACK OK!: https://drive.google.com/file/d/1Y_PuRIaGC61mnTfEGsOMDvndlf2Z_ezq/view?usp=drive_link This in some ways proves that C3 is capable of playing the video in the described environment and that the HW/OS and browser combination are also capable of playing video inside the C3 Runtime. Partially I arrive at the conclusion that the incompatibility must be on how the video plugin solves the video playback
AshleyScirra commented 11 months ago

I'm afraid it's difficult to help with this issue as it uses a very specific software/hardware setup that we don't currently have available. Further, the fact video plays on all other platforms suggests to me that Construct is doing everything right; if Construct itself had some problem with video playback, usually that would show up on other platforms too. I suspect the real problem is broken graphics drivers or video support, which is especially common on Linux. The fact video can play normally shows the codec is supported, but Construct plays videos in the context of a WebGL renderer, which is a more complicated case than standard video playback, and the type of thing where browser/driver issues can cause problems. Unfortunately such issues are outside the scope of Construct.

I think the best thing to do is to do a web export and host the files online (which presumably will still reproduce the problem), then file an issue with Google at crbug.com describing the problem. If you post the issue link here I will follow it to answer any questions about Construct. Then hopefully Google can figure out what's going on and take it further (possibly going as far as to file a GPU driver issue with Ubuntu or the Orange Pi team, but they're still the best placed folk to do that, as they know what the driver needs to do to support what Chrome does).