yuccai

[SOLVED] FPS drop with VideoTexture

Recommended Posts

Hi,

I want to display my webcam content on my scene. In order to do this, I tried to create a layer set in background on which I apply a video texture. I passed a video DOM element to this texture. This video has a stream for source that is obtained from the getUserMedia promise.

It works but rapidly the FPS drop and I don't know why. Maybe the size of the video is too large, maybe I provided the wrong parameters to the texture. I don't have any idea but it causes an issue.

Here is a PG for testing : https://www.babylonjs-playground.com/#FF3BPV

Thanks,

Share this post


Link to post
Share on other sites

What do you mean by trying different settings on my webcam ? I only have one webcam on my computer and I can't change its property. Maybe I can change the dimensions of the video before passing it to the videoTexture.

I tried this and it increased a little bit my fps. My computer is 10yo. I tried this PG on other laptop and I didn't detect any FPS drop. 

I guess I can't do anything but I understood why, thanks

Share this post


Link to post
Share on other sites

Nice job !

The fact is that I wrote my piece of code a long time ago and I've never seen that you wrote this one in bjs. I will have a look on it ;).

BTW I still undergo FPS drop after a random time. Sometime I don't and sometime it increases back. This must be due to my computer and it doesn't matter since I know it is specific to me.

Thanks for your help, this topic can be closed.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.