It’s hard to argue that animations are much more fun than static images. When it comes to where clients are scouting for professionals and designers are seeking inspiration, the way we present our work really matters.

So, you’ve spent countless hours crafting animation in After Effects, Principle or any other software, it looks amazing and everything seems to be alright… The only step left is making a GIF file. Sounds like the easiest part, right? But this is where all the fun begins.

Photoshop

Did you know that Photoshop allows you to work with video layers, render video files and export to the GIF format? (yeah, Photoshop is capable of almost anything you ever imagined) If you did, these are your typical 4 steps:

  • open the rendered video file (.mov or .mp4) in Photoshop
  • go to File → Export → Save for Web (Legacy)…
  • choose GIF for the preset, make it loop forever, etc
  • save!

And this process works well, but there is an ugly limitation of 500 frames! So, if you’re GIF is long, and it’s critical to keep the frame rate high to retain smoothness, you’re screwed.

Online converters

I just want to mention EZGIF.com here since you can google its alternatives in a second. This website is amazing, since you don’t need to worry about anything at all. Upload your file, tell the converter what you need, and it’s done. However, this solution only works well for short clips and low frame rates. So, if you have a 15+ animation with smooth transitions and rich colors, forget about EZGIF. What you’ll get is a crappy and laggy file nobody’s gonna like:

FFMPEG

Let’s get to the real business. FFMPEG is a command line tool that lets you do whatever the heck you want with almost all types of media files. If the words “command line” and “terminal” sound scary to you, don’t worry. I’ve got you covered — just follow along, and we’ll be fine, I promise 🙂

  1. Install Homebrew from brew.sh
  2. Once done, open Terminal on your Mac
  3. Install FFMPEG
brew install ffmpeg

4. Navigate to the folder your video file is located

cd path/to/your/file

5. Create a color palette file

  • input.mp4 is the video file you want to convert
  • fps is the frame rate you need in your GIF
  • scale explicitly asks FFMPEG to resize the video to the Dribbble aspect ratio if necessary
  • palette.png is your output palette file
ffmpeg -i input.mp4 -vf  fps=25,scale=800:600:flags=lanczos,palettegen palette.png

After running the script, you’ll get something like this:

palette.png

6. Convert the video to GIF!

  • input.mp4 is the same input file we used for color palette generation
  • palette.png is the result of the previous step
  • fps should stay the same
  • scale also stays the same
  • output.gif is your output file
ffmpeg -i input.mp4 -i palette.png -filter_complex fps=25,scale=800:600:flags=lanczos[x],[x][1:v]paletteuse output.gif

The result looks like this:

Optimised high-quality GIF with FFMPEG

7. Check the file size.

If it’s more than 10 MB, you need to decrease the fps and repeat steps 5 and 6 to get the result.

We are done!

Extra Stuff

Maybe you’re asking what do we need that color palette file for?

Briefly, GIF supports 256 colors, and if the converter selects the wrong palette, the result will look weird. You can easily notice small dots in the following example:

No color palette is used

Conclusion

As you can see, making is not difficult, but there are certain things you don’t want to learn the hard way and waste hours of your time. Don’t be afraid to use FFMPEG — trust me, it pays off.



Source link https://uxplanet.org/how-to--perfect-gifs-for-dribbble-in-seconds-c683a44deae3?source=rss—-819cc2aaeee0—4

LEAVE A REPLY

Please enter your comment!
Please enter your name here