@keitas (matteo) posted a new topic, subject "VideoTexture rendering but frozen". It read:

   Hello there. For learning purpose I'm working on a project where I decided to introduce a videoTexture as texture for my TV mesh, in order to render a video on it (thought it would be cool).  
    I'll start saying that I have been working with three.js for less than a month,so this could totally be a school boy error.  
    This being said, here it is my code:
    
    > 
    [code]
    >      videoTexture = new THREE.VideoTexture( video );
    >     
    >     videoTexture.minFilter = THREE.LinearFilter;
    >     
    >     videoTexture.magFilter = THREE.LinearFilter;
    >     
    >     videoTexture.format = THREE.RGBFormat;
    >     
    >     boundingBoxTV = new Physijs.BoxMesh( new THREE.BoxGeometry(1,1,1), new THREE.MeshBasicMaterial({map : videoTexture}), 0 );
    >     
    >     
    >     boundingBoxTV.material.visible = true;
    >     
    >     boundingBoxTV.receiveShadow = true;
    >     
    >     boundingBoxTV.castShadow = true;
    >     
    >     boundingBoxTV.position.set(-26.5,20.35,0.7);
    >     
    >     boundingBoxTV.scale.set(1,5.69,9.8);
    >     
    >     scene.add(boundingBoxTV);
    >     
    [/code]
    
    * * *
    
    While in my html file I have a simple:  
    < video id=“video”>  
    < source src=“MyVideo.mp4” type=“video/mp4”>  
    < /video>
    
    What I get is the following:  
    
    
    image1612×714 163 KB
    
    And it's frozen at the very first frame of the video.
    
    In the render video Im calling the following function(here I'm not totally sure of its correctness):  
    _videoTexture.update();_  
    (p.s. it says that this .update() method is deprecated but I'm getting no warning about it and searching through the web I couldn't really find a substitute so I decided to go with it)
    
    Is anyone able to help me? Have been stuck here for a while, I would really appreaciate a help! Thanks in advise:)

@hofk (Klaus Hoffmeister) replied

    Perhaps these examples from the Collection of examples from discourse.threejs.org will help.
    
    https://hofk.de/main/discourse.threejs/2018/index2018.html
    
    see  
    
    
    2020-06-20 18.41.53715×404 69.9 KB
    
    Links in source code

@hofk (Klaus Hoffmeister) replied

    Just noticed that the video in the **VideoProjection** example is no longer running. Neither in the fiddle @Mugen87 nor in my version. In my version the copied three.js version  
    …/js/three.min.93.js has not been changed. If you call the video directly with the address, both the .ogv and the .mp4 version will run.
    
    Are there any changes in the browsers since 2018? I do not usually deal with this topic.

So @Mugen87 (Michael Herzog) replied

    @hofk Um, the browser console is full of these warnings:
    
    > three.min.93.js:128 THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.
    
    Can you try to update the filter settings for the video texture?

To which @hofk (Klaus Hoffmeister) replied

    In different browsers I get different errors in my version.
    
    Firefox  
    
    
    Chrome 
    
    Opera 
    
    I never dealt with the videos and the filters, at that time I only took them from the fiddle. 
    
    I was interested in applying the video to a moving geometry.

Then @Mugen87 (Michael Herzog) said

    Any chances to share the original `VideoProjection` fiddle?

@keitas (matteo) replied

    first of all, thank you both for spending your time answering me,I appreciate that:)
    
    I have been looking the videoProjection example code,and it's confusing me even more because I'm doing exactly the same things done in that code.  
    I'm creating the texture,setting it to the material.  
    The only main difference is that in that example there is not .update() called anywhere… thought it was needed. I have tested it without that videotexture.update() in the render function,and nothing changed.  
    So my questions are the following:  
    -Do you confirm me that I don't need to call any update anywhere? I ask this because the freezing frame on the videoTexture makes me thing that I need to update it somehow.  
    -All this being said, do you have any clue on why the videotexture I'm using is freezing, considering how similar the code I wrote and the example are?
    
    Thank you all for your time!

Then @seanwasere said

    Try adding **autoplay** to your video html tag. Also you might need **loop**
    [code] 
        <video autoplay loop>
          <source src="movie.mp4" type="video/mp4">
          Your browser does not support the video tag.
        </video>
        
    [/code]
    
    I cant rule out though that your movie file is just to large to hold in memory.

After which, @keitas (matteo) added

    this is the error I just got adding the autoplay loop:
    
    image658×696 20.5 KB
    
    I specify that the video I'm trying to use as videotexture is not too big, being a 6 seconds video.
    
    Any idea on how to go further with this?
    
    UPDATE: removing the loop and leaving only the autoplay,the video starts! Huge steps    
    Though,right now, the problem is that once the video is finished, it just got stucked because it does not “loop” itself.  
    The loop makes pop those errors though. Any help? We are on the right path!
    
    2° UPDATE: trying to get some results I tried re-adding the loop word after the autoplay, and now the error has disappeared. I tried to recreate the error but I didn't managed to do it,sadly. It looked like a one-time-thing.
    
    We can consider this closed,and the solution will be considered the following(I'll rewrite what @seanwasere suggested) :
    
    Adding the autoplay loop in the html allowed the video been played.
    [code] 
        <video autoplay loop>
          <source src="movie.mp4" type="video/mp4">
          Your browser does not support the video tag.
        </video>
        
    [/code]
    
    Thanks to everyone!

So @hofk (Klaus Hoffmeister) replied

    see changes: Collection of examples from discourse.threejs.org


{'source': 'discourse', 'url': 'https://discourse.threejs.org/t/videotexture-rendering-but-frozen/16403', 'title': 'VideoTexture rendering but frozen', 'views': 1401, 'has_accepted_answer': True, 'word_count': 928, 'like_count': 1, 'reply_count': 4, 'participant_count': 4, 'posts': 10, 'tags': 'textures', 'author': '@keitas (matteo)', 'participants': '@keitas (matteo), @hofk (Klaus Hoffmeister), @Mugen87 (Michael Herzog), @seanwasere', 'image_url': ['https://global.discourse-cdn.com/standard17/uploads/threejs/optimized/2X/b/b444b27af66df8efcc299ffa2480ae48c8ac637e_2_1024x453.jpeg'], 'created_at': '2020-06-20T16:13:27.083Z', 'last_posted_at': '2020-06-22T13:45:52.967Z'}