Re:Twitter's GIF hack
by eph_unit on Thursday June 19, 2014 @02:01PM
(#7917393)
So, what is an easy way to convert gifs to mp4? How did they do this. I run a small gif-sharing site and should probably do this.
[ Parent
| on HN ]
I had a convoluted method using gifsicle to extract the frames and then encode as a stream of frames, but then sometime in the past year or so ffmpeg improved native gif support. This is what I use (the options are both for compatibility):
ffmpeg -i foo.gif -pix_fmt yuv420p -vf crop=floor (in_w/2)*2:floor(in_h/2)*2 foo.mp4
Works for WebM just by changing the extension, too.Check out http://www.gfycat.com/about
imagemagick + ffmpeg
https://stackoverflow.com/questions/3212821/animated-gif-to-...
I made a website that does this, and a lot more. It's also open source, and has been around for a while.