grzybu

How to display real time video stream with VideoTexture?

Recommended Posts

Hi,

Is this possible to use video stream in videotexture?

I'm trying to use video stream as video texture but object with this material doesn't display in the browser at all.

This is how I'm creating the texture:
var videoTexture = new BABYLON.VideoTexture("video", ["http://localhost:8090/test.webm"], scene, false, false);

I can display the stream itself in browser without any problem and console says browser has loaded the file with OK status.

If I use video file from disk instead of stream url it displays fine.

 

Share this post


Link to post
Share on other sites

I'm trying this with Chrome and Firefox on Linux. I don't see any error in the console, just network monitor says test.webm resource was loaded OK but object with material using this texture is not showing. 

Share this post


Link to post
Share on other sites

I have ffserver+ffmpeg duo which is streaming part of the screen. I can display it in the browser, just by loading the url.

If I save ffmpeg output to the file and load this file into the video texture it works as expected.

The only problem is when I use URI with http protocol: "http://localhost:8090/test.webm"

I've tried to use exact scene you've lined, just replacing the texture URI and still the same. 

Meanwhile I've updated the system and now chrome displays such errors in console when loading the file:
 

[GroupMarkerNotSet(crbug.com/242999)!:C8A88BA6B11F0000]RENDER WARNING: texture bound to texture unit 0 is not renderable. It maybe non-power-of-2 and have incompatible texture filtering.
[GroupMarkerNotSet(crbug.com/242999)!:C8A88BA6B11F0000]RENDER WARNING: there is no texture bound to the unit 0

I've set resolution of the video stream to 512x512 but it didn't helped. Movie loaded from disk can have any resolution and still works fine. 

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.