Symptoms: dropped frames, video stuttering, no-smooth playback for more than a while at best, even for 30fps video (let alone 60fps).
Conditions:
My PC is old but I see this with a 15% CPU load and almost zero VGA load.
OS: Win7 x64.
Browsers: Chrome, FFox, Opera.
I’ve tried almost everything:
-different methods,
-different resolutions (even …stamp-size ones)
-different amount of lighting,
-reduced render loop to 30fps,
-standard loop, or WebXR-style loop,
-HTML variations,
-JS variations,
-fed as videoTexture or grabbing frames one-by-one,
ALL work poorly, that is, I never get smooth playback for more than a few seconds, when I feed the video with whatever method to a texture in order to post-process it, even if I don’t do anything more than simple 1x sampling before I render it to the screen.
At first, I thought it was an issue with my phone (which is not a weak one BTW), but it also happens on the PC , and it happens with playback of local video too, at whatever resolution.
Since it’s neither the CPU or GPU, I’m guessing that there is something really wrong with the getUserMedia() based API or other WEBGL API, or hopefully there is some critical bug in Three.js implementation.
So the question is: Why is that happening? Any ideas?
Have you ever seen perfectly smooth playback of webcam/mobile cam/local video when that video is processed via a shader (not just applied to a scene texture) with Three.js?
Note: in order to be able to notice the dropped frames, the video should be one with a constant motion, eg: POV Driving Scania R450 Xerta to Gandesa 🇪🇸 ,cockpit view 4K - YouTube look at the sides of the video.
Or, move your webcam/mobile camera with steady speed and see if it’s always smooth, with any example code.