Dataclay — Automating Digital Production
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Register
    • Login

    Export directly to GIFs?

    Scheduled Pinned Locked Moved
    Batch Output
    3
    3
    517
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • jasontcoxundefined
      jasontcox
      last edited by

      Is there an easy way to export directly to GIFs using Templater without leaving AE?

      1. Im trying to avoid sending to AME as I am going to be creating tens of thousands of short animations and that would greatly complicate and slow down the workflow.
      2. Ive installed both GIFGun and AE Juice Export GIF, but neither actually install the ability to export GIFs from the Render Queue, they only do it through their own panel, so therefore Templater can’t use their functionality.

      Am I missing an easy workflow? Thoughts?

      ariestavundefined Jonundefined 2 Replies Last reply Reply Quote 0
      • ariestavundefined
        ariestav @jasontcox
        last edited by

        @jasontcox Yes this is possible, but you would need to use Templater’s event scripts. The script would do the transcoding with ffmpeg. Some development work would need to be done to create this post-process transcode script that Templater could call each time it finished an output.

        On our github account, we have an open source example of this. Check out the following:

        If you have node and ffmpeg installed onto the machine you can register your transcode script in the “After Job” event in Templater preferences and it will run each time it finishes rendering. See documentation about Event Scripts.

        Via the standard support channels, Dataclay can help you integrate our open source transcode example into your system. Shoot an email to support@dataclay.com for any questions related to services that Dataclay can provide you.

        —Arie

        1 Reply Last reply Reply Quote 0
        • Jonundefined
          Jon @jasontcox
          last edited by Jon

          @jasontcox we’ve also used something called gifsicle, which is a command line tool for optimizing gifs (homepage). What you do in this case, you render a version from AE’s render queue, then you do a post-render action to transcode to gif with ffmpeg and then compress with gifsicle. These event scripts require Templater Bot. You’ll need to add gifsicle and ffmpeg to your SYSTEM PATH.

          Here’s an example of a script (Windows BAT file) that I’ve used. Feel free to use it as a baseline to remix for your own purposes. (No warranties implied)

          @ECHO ON
          SET RENDER="%~1"
          SET RPATH=%~dp1
          SET ID=%~n1
          SET FRAMERATE="15"
          SET SCALE="0"
          SET COLORS="256"
          SET PALETTE="%RPATH%palette.png"
          SET FILTERS=fps=%FRAMERATE%,scale=%SCALE%:-1:flags=lanczos
          SET GIFOUT="%RPATH%gifs\%ID%.gif"
          SET GIFCOMP="%RPATH%gifs-lossy\%ID%.gif"
          SET FULLRES="%RPATH%full-res"
          SET GIFFINAL="N:\email-campaigns\newsletter"
          
          ffmpeg -v warning -i %RENDER% -vf %FILTERS%,palettegen=stats_mode=diff:max_colors=%COLORS% -y %PALETTE%
          
          ffmpeg -i %RENDER% -i %PALETTE% -loop 0 -lavfi "%FILTERS% [x]; [x][1:v] paletteuse=dither=bayer:bayer_scale=3" -vcodec gif -y %GIFOUT%
          
          gifsicle %GIFOUT% -O3 --lossy=200 --output %GIFCOMP%
          
          move /Y %RENDER% %FULLRES%
          
          copy /Y %GIFCOMP% %GIFFINAL%
          
          1 Reply Last reply Reply Quote 0
          • First post
            Last post