![]() Run ffmpeg to convert the video file to a series of PNG files.filename and dir get me the name of the file and the files directory, respectively.This is to get access to the Homebrew installed utilities ffmpeg and gifsicle. Rm -r "/tmp/pngs" rm -r "/tmp/gifs"You’ll notice that the first line appends /usr/local/bin to $PATH. Gifsicle -optimize = 3 -delay = 10 -loopcount *.gif > $dir/$filename.gif Sips -s format gif /tmp/pngs/*.png -out /tmp/gifs Paste the following block into the contents of the script task:įilename = " $(basename - $1 ) " dir = " $(dirname - $1 ) " mkdir "/tmp/pngs" mkdir "/tmp/gifs" ffmpeg -i $1 -r 10 /tmp/pngs/out%04d.png.You’ll also want to set the “Pass input” value to as arguments. In the Script task, select your preferred shell environment. Add gifsicle to environemnt movie#Workflow receives current: movie files in Finder.app.Above the canvas, you’ll see a handful of settings you can configure.I used my Automator task to make this lol Welcome to the Automator canvas! In the “Library” on the left, search for Shell and drag the Run Shell Script item to the canvas on the right hand side.Select Quick Action for the document type and click Choose.You’ll be presented with a dialog to open an existing Automator file.Launch Automator - use Command + Space to search for Automator.gifsicle (via Homebrew: brew install gifsicle).ffmpeg (via Homebrew: brew install ffmpeg).It’s a few extra steps that I didn’t care to do so I wrapped them in an Automator script task and integrated it with Finder for some sweet right-click action. For obvious reasons a GIF would be a lot simpler for a blog post, but there was no straight forward mechanism to do what I needed.Ī quick Google returned this Medium article describing a couple of utilities that can get the job done. MacOS’ built-in screen capture was able to record a section of the screen for me as a Quicktime movie (.mov). While I was writing this post I had a step where I wanted to show a GIF of the operation. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |