![]() ![]() ![]() Open your favorite Terminal and move to the directory with your GIF. To convert a video file video.mov to an animated gif with 5 frames per second and sized to 450 by (whatever height is proportionally correct for that x value) ffmpeg -i video.mov -vf fps5,scale450:-1 animated.gif ffmpeg will detect your movie type so you should be able to use ‘.mpg’, ‘.mp4’ without changing the command. Now let’s transform our GIF to MPEG-4 and WebM formats at the below steps. So if the browser supports support WebM then WebM format will be used, otherwise MPEG-4. And will help us to do this for MPEG-4 and WebM formats. To replace our GIF image with, we need to resolve all supported formats for all browsers. ( For example, I found some GIF with weight 141kb ). Linux: Install via your package manager (apt-get or yum, e.g.) apt-get install ffmpeg Windows: Install via Choco.Ģ. Install ffmpeg OSX: Install via Homebrew $ brew install ffmpeg -with-libwpx.I think many of us know that in different cases size of GIF images can be massive and even if you use image-optimization solutions from npm it’s not enough in most cases. I think many of developers passionate about web performance, and here is a tip of how to do this with GIF images via. Simple steps to minimize your GIFs size for 80% and render them faster! ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |