TLDR: I’ve shipped a new NPM module called gif2vid that enabled video encoding of GIF files in the browser, in your terminal and in a web app backend. I’ve also created an uber simple website at https://gif2vid.com where you can use it.
My kids enjoy building cute (and sometimes downright weird) animations using Kidz Fun Art, and I upload the exported Gifs to Instagram as a way to keep them forever. However Instagram doesn’t allow the upload of Gifs, so in the past I bought an iOS app to convert each Gif to an MP4, then uploaded that. Well, that app stopped working, and all the replacement apps are horror shows of aggressive adverts and terrible user interfaces.
I figured I could fix that, …
TLDR: I’ve shipped a new NPM module called gif2vid that enabled video encoding of GIF files in the browser, in your terminal and in a web app backend. I’ve also created an uber simple website at https://gif2vid.com where you can use it.
My kids enjoy building cute (and sometimes downright weird) animations using Kidz Fun Art, and I upload the exported Gifs to Instagram as a way to keep them forever. However Instagram doesn’t allow the upload of Gifs, so in the past I bought an iOS app to convert each Gif to an MP4, then uploaded that. Well, that app stopped working, and all the replacement apps are horror shows of aggressive adverts and terrible user interfaces.
I figured I could fix that, so I did. I built gif2vid.com, then open sourced:
- The core code for video conversion as an NPM module called gif2vid, and it’s Github repo.
- The code for the website itself.
What can the gif2vid module do?
Well, it allows you to run a JavaScript only process (containing an inlined WASM file for ease of packaging) in:
-
The UI thread of a browser
-
A worker thread of a browser
-
A terminal on your computer with
-
npx gif2vid input.gif output.mp4 -
The backend of a web app, running on Node.
Check out the README.md file of the source code for instructions on how to do each of these, and the sample projects in the source repo for fully functional example projects of how to use it in an Express app, NextJS app on client and server, Web Worker, and with a simple <script> drop in to a page.
Enjoy!
Published by Shane O’Sullivan
I am a software engineer and manager from Ireland. I spent 7 years working in Ireland from 2003 – 2010, then ten years in Silicon Valley from 2010 to 2020. In California I spent about 6.5 years at Facebook Engineering, the last three of which I was an engineering manager in the Ads organisation focusing on customer facing products for creating and managing ads. At Stripe I built the Developer Productivity organisation, with teams that were responsible for the use of the Ruby language, testing infrastructure, documentation, developer tooling (e.g. IDE integrations) and more. At Promise, I was Head of Engineering from 2018 – 2020, responsible for building the first few iterations of our products, hiring for all product roles, meeting with clients and investors, and anything else needed to get a tiny startup bootstrapped and successful. Now I’m back in Ireland, working various projects while advising the great people at Stainless (stainless.com). This blog contains my various musings on all things technical/interesting on the interweb and beyond. View all posts by Shane O’Sullivan
Published November 6, 2025