grzybu Posted February 3, 2016 Share Posted February 3, 2016 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. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted February 3, 2016 Share Posted February 3, 2016 Hey! is there any error in the console? Quote Link to comment Share on other sites More sharing options...
RaananW Posted February 3, 2016 Share Posted February 3, 2016 Would also be great to know what browser you are using. Quote Link to comment Share on other sites More sharing options...
grzybu Posted February 3, 2016 Author Share Posted February 3, 2016 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. Quote Link to comment Share on other sites More sharing options...
RaananW Posted February 4, 2016 Share Posted February 4, 2016 Is a different video type working? What do you mean by "stream"? is it coming from a streaming server? did you try the materials demo (http://playground.babylonjs.com/#EKFLA#13) adam 1 Quote Link to comment Share on other sites More sharing options...
grzybu Posted February 4, 2016 Author Share Posted February 4, 2016 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. Quote Link to comment Share on other sites More sharing options...
grzybu Posted February 4, 2016 Author Share Posted February 4, 2016 I've just tried to modify URI in the playground materials demo (http://playground.babylonjs.com/#EKFLA#13) with my stream and I see also: Uncaught TypeError: Cannot read property 'createTexture' of nulla.createDynamicTexture @ babylon.js:4(anonymous function) @ babylon.js:12 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.