How to get frame from video in js?

0 like 0 dislike
13 views
Actually the question is a little more complicated. You want to selectively decorate the frames from the video. That is, lower fps and display it in a canvas. For example of the mp4 file to take over 1 frame, decorate and display. I guess that can be solved with webgl?
by | 13 views

3 Answers

0 like 0 dislike
https://github.com/mbebenita/Broadway
but the project is dead and does not use wasmthat could significantly speed up the decoding.
by
0 like 0 dislike
let video = document.querySelector("video"); let canvas = document.querySelector("canvas"); let ctx = canvas.getContext("2d"); video.addEventListener('play', function() { ctx.drawImage(video, 0, 0, width, height); let frame = this.ctx1.getImageData(0, 0, this.the width of this.height); });


\rhttps://developer.mozilla.org/en-US/docs/Web/API/C...
by
0 like 0 dislike
the question is, is you want to do on the fly, and on whose side? If on the server side, there is no problem using that thread in ffmpeg , avconv or what You have on hand. but if on the client side, I don't know.....
by

Related questions

110,608 questions
257,186 answers
0 comments
33,910 users