Convert videos to GIFs in your browser
This is an experiment in converting video files in the browser. It works by displaying a video frame by frame on a canvas and then append the canvas’ contents to a GIF.
- Convert video files to
.giffiles directly in your browser
.webmor any other video format that’s supported by the HTML5
- Trim the GIF to desired length
- Since everything is done in the browser, nothing is ever sent to a server and your privacy is protected
How it works
When I started, I wanted to find out what the capabilities of Web Assembly were. However, at that time, there wasn’t much support for it out there. I tried to compile FFMPEG with WASM in order to use it in the web, but while it worked, the performance just wasn’t there yet.
So, I decided to build this using a canvas based method. The way it works is that a video element’s frame is drawn onto a canvas. This gives us flexiblilty in what we render as a GIF and should enable us to resize, move, edit or rotate (all of which still has to be implemented tho).
That canvas is then taken frame-by-frame and rendered as a GIF by GIF.js which can then be exported.
0.1.0 – MVP released