Sybaris Posted November 30, 2018 Share Posted November 30, 2018 Hello I would like to know if it's possible to make a texturing mapping of a video stream in rmtps ? I saw some example to use mp4 file, or webcam, but not to use an online stream using rmtps. Thanks for advance Sybaris Quote Link to comment Share on other sites More sharing options...
Sebavan Posted November 30, 2018 Share Posted November 30, 2018 As long as it is supported by a video tag or by another canvas it would in theory works out quite well ? Babylon does not decode the video on its own. It relies on the browser Video tag to consume each decoded frame of the video as textures. Quote Link to comment Share on other sites More sharing options...
Sybaris Posted December 11, 2018 Author Share Posted December 11, 2018 Hi, Thanks. I agree. I have my video using an HTML5 video tag with the visibility hidden. Then I am able to use it in Babylon.js <div width='0px' height='0px' style='visibility:hidden' id="viewport"> <video id="videoHidden" autoplay="autoplay" poster="asset/poster.jpg" /> </div> var myVideoTexture; var videoHidden = document.getElementById("videoHidden"); videoHidden.srcObject = myStream; myVideoTexture = new BABYLON.VideoTexture("myVideoTexture", videoHidden, scene, true, false); myMesh.material.diffuseTexture = myVideoTexture; myVideoTexture.video.play(); Thanks Jean-Pierre GameMonetize 1 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.