Hacker News new | past | comments | ask | show | jobs | submit login

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.



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.




I made a website that does this, and a lot more. It's also open source, and has been around for a while.

https://mediacru.sh




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: