• Content Count

  • Joined

  • Last visited

Everything posted by askerpro

  1. is there a way to extract images without playing a source in realtime? I'm sure, that GPU can process video faster than 30 fps.
  2. Finally, some progress with work. Code is 100% working, but on video load, extracting images from video takes as much time as video length in this version. Optimization time has come Example here
  3. I still don't fully understand the structure of PIXI's backend. I'm working with next code. What am I trying to do: 1) load video; 2) play it on background and extract rendered image from each step to a texture 3)push every texture to array and then use it as argument for animated sprite constructor. where am I going wrong? var renderer = new PIXI.WebGLRenderer(width, height); animationContainer.append(renderer.view); var stage = new PIXI.Stage(); var baseTexture = PIXI.VideoBaseTexture.fromVideo(video); baseTexture.autoPlay=false; var texture = new PIXI.Texture(baseTexture); var sprite = new PIXI.Sprite(texture); baseTexture.on('loaded', function(){ stage.addChild(sprite ) renderer.render(stage); requestAnimationFrame(extractFrames); var rt = PIXI.RenderTexture.create(width, height); function extractFrames(){ if(video.currentTime<(video.duration-0.0001)){ video.currentTime+=(1/24); renderer.render(stage); rt=renderer.extract.pixels(renderer._lastObjectRendered); extractFrames(); } }
  4. I have an mp4 video file (H264 encoded). I want to create a PIXI.extras.AnimatedSprite from this video to be able not lagging reversed animation play; If I splice this video to image sequence the size becoming huge (about 8Mb vs 500kb of mp4). I want to load low size mp4 file and extract image array from it to create an Animated Sprite. Reverse playing directly from <video> by changing video.currentTime is lagging. I want to create something like hover/unhover animation.