bbc / VideoContext

An experimental HTML5 & WebGL video composition and rendering API.
http://bbc.github.io/VideoContext/
Apache License 2.0
1.33k stars 157 forks source link

webm videos with alpha transparency flickering #78

Closed Sacharified closed 5 years ago

Sacharified commented 6 years ago

When playing back .webm files with alpha transparency, the video flickers, rapidly appearing and disappearing constantly. You can reproduce with the code below in the Video Context code playground and the following webm files from Google Chrome':

These files appear to play back normally with alpha transparency in a video element.

webm files with no alpha transparency, such as this one, appear to play back normally.

var canvas = document.getElementById("canvas");
window.vc = new VideoContext(canvas);

var videoNode1 = vc.video("https://simpl.info/videoalpha/video/soccer1.webm", 0);

videoNode1.connect(vc.destination);

videoNode1.start(0);
videoNode1.stop(50);

vc.play();

Browsers: Can reproduce in Chrome(only tested v66.0.3359.139) Cannot reproduce in Firefox(only tested v59.0.2) - The video plays back normally. VideoContext does not seem to work at all in Safari Have not tested Edge

PTaylour commented 6 years ago

Hi Sacha, I just tried on chrome 65 and haven't managed to reproduce. Are you getting any errors / logs in 66?

Sacharified commented 6 years ago

Hi Pete, no there are no errors or logs. It also works correctly in the latest Chrome Canary (68.0.3427.0), so this issue may be specific to version 66.

PTaylour commented 6 years ago

Hi @Sacharified, do you see this issue in chrome 67?

Sacharified commented 6 years ago

@PTaylour Yes I still see the same issue in Chrome 67. I don't see the issue on 68 Beta or 69 in Canary.

Sacharified commented 6 years ago

I've tested this again and still see the same issue consistently in Chrome 68 and 69.

PTaylour commented 6 years ago

I'm still unable to reproduce. Just tried version 69.0.3497.81

👇chrome performance profiler with network and CPU throttling.

webm-profile-soccer.json.zip

We're both testing on Mac, using the playground and same code snippet 🤔

Have you reproduced on multiple machines / with a clean chrome profile?

Sacharified commented 5 years ago

@PTaylour I'm no longer seeing this issue on Chrome 72 or 73. There were some Chromium changes which caused issues with WebGL on MBPs with specific GPU versions recently, so it may be that case that we saw different results due to differences in the GPUs between our machines and the bug only affected a limited set of OpenGL GPU renderers.

I'm marking this as closed.