Something about videotexture

I use VideoTexture to make a 360 video as a skybox’s texture,and it is good.But I found that video resolution was reduced,how to improve ?Or what factors affect video resolution. And I want to pause, fast-forward and rewind the video on skybox, how to do ?

Hey!
to control your video, you can directly control it using VideoTexture.video API:
https://doc.babylonjs.com/api/classes/babylon.videotexture#video

Example here: https://www.babylonjs-playground.com/#CHQ4T#1

For your resolution question, the videoTexture will use your video resolution so it should be something else. Do you want to try to repro the issue in the playground?

There are no functions in the babylon.js library to control video textures as this was already written in standardized HTML. I posted a similar question a few years ago, and learned allot. Here is the archived post:

Galen

Original video: https://yoda.blob.core.windows.net/videos/uptale360.mp4
On videotexture: https://www.babylonjs-playground.com/#SQ5UC1#22
you can find that the orginal video has a better resolution, and I found that It has nothing to do with the size of the skybox and the distance of camera.

thank you :smile::smile:

1 Like

Resolutions are the same :slight_smile:

It’s just that covering 360° in HD Video needs a lot of pixels.

By the way I’m wondering, we know that power of two textures are necessary, it is the same logic for video ? Here for example we have 3840*1920px, does this need to be scaled to 4096*2048px?

Yes, a video texture uses the GPU as any texture. Except far more memory usage. Only match your target resolution. In my opinion, your video is far too large for most devices. I would personally use 1024X1024 in my most high resolution scenes.

Galen

1 Like