React-three-fiber low framerate when using videotexture(even when video is paused)

I am trying to add 5 videotextures to my blender model. once i add single videotexture performance decreases, but once second one is added (doesn’t matter size or resolution of the video and texture) fps drops drastically, i saw someone just pausing videos fixed problem but in my case there is no change.
did anyone ever run into same problem? or knows how to debug/fix :slight_smile:

btw this is how i add videos

const [slides] = useState(() => {
  
  vids.src = urls;
  vids.crossOrigin = "Anonymous";
  vids.loop = true;
  vids.pause();
  return vids;
});
<mesh rotation={[0, -89.54 , 0]} position={[-0.699, 3.05, 0.02]} onClick={(e) => myfun3()}>
        <planeGeometry args={[0.6,0.3]} />
        <meshBasicMaterial  >
          <videoTexture attach="map"  args={[slides]} encoding={THREE.sRGBEncoding} />
        </meshBasicMaterial>
 </mesh>

maybe there is something wrong with my method…

i don’t think there’s anything wrong with your code. it has to be the resolution, perhaps you’re loading the wrong file.

does this cause a low framerate for you? Video textures - CodeSandbox if yes you can also check your browser settings, perhaps gpu acceleration is disabled or your drivers are broken.

given sandbox doesn’t lag, i will add this video to my model to check if video is the reason of lag, and let you know.

Same performance with the video form codesandbox, my next idea is to use jpg photo(thumbnail), once video is pressed than play the video. or try to import video same way from example maybe, my import of video is causing problem