Introduction
Automation is one of the most important ways you can minimize or eliminate boring tasks from your day — and it’s not hard to get started. In this article, I’ll show you how to use the Finder and Automator, a built-in app on your Mac, to perform several time-saving tricks useful in common video production workflows. At the end, I’ll also show you a few ways to use third-party apps to automate common tasks too. Let’s get into it.
Renaming files in the Finder
For several years now, the Finder has had the ability to rename a group of files, to find and replace some text, to add a prefix or suffix, or to replace the name entirely and add a counter. So, let’s say you’ve been provided with still images to use in a video project, but there’s a typo in every file name. Don’t let it slide! Just select all the files at once, right-click and choose “Rename…”.
In the next dialog, choose Replace Text, then type what you want to search for in the field on the left, and what you want to replace it with in the Replace with field on the right. If you don’t like underscores, replace them with spaces. If the client loves underscores, swap them in. Or replace either with hyphens — it’s all easy. Press “Rename” and you’ll be done in a flash.
A side note about the evils of underscores
While many people still use underscores between words to avoid some workflow issues, the vast majority of today’s apps can actually handle spaces just fine. It’s much quicker to type spaces than underscores, and correcting mistakes is far easier too. Why? When you edit with the keyboard, ⌥→ and ⌥← move between words, while ⌥-delete removes the last word. But underscores join words together into a single word, ruining the keyboard-based editing experience. If spaces do cause real problems, Photoshop has always used hyphens instead of underscores, and that’s a better way to go.
Besides the find/replace functionality, you have a couple of options. You can choose to Add Text before or after the existing name, handy for adding a prefix to label your work or to add a version number as a suffix. You can also choose Format, which replaces the existing names with a new name plus an index, a counter, or a date. You can choose to put the name first or last, and the only sensible date format will be used: YYYY-MM-DD at HH.MM.SS. It’s an ISO standard for good reason, and alphabetizes correctly where no other date format does.
But that’s just renaming. Let’s get into Automator for a whole lot more.
Understanding what Automator does
There are a few ways to use Automator to process files, but the easiest is probably Quick Actions. When you launch Automator (it’s in Applications > Utilities) and press ⌘N, you’ll see a few potential options. You can make a Workflow, which you can run manually with Automator itself, an Application, for dragging items to, a Folder Action, which runs automatically on a folder, or probably the best option, a Quick Action, which is just a right-click away in the Finder.
In fact, there’s a built-in “Convert Image” Quick Action which can convert images pretty quickly, but if you want to really speed things up, you can create a dedicated Quick Action to convert directly to JPEG, or PNG, or whatever you need. So let’s do it, step by step.
Converting image formats
After choosing to make a new Quick Action, click Photos in the leftmost column. This will reveal all the commands that work on images in the next column to the right — and note that third-party apps can populate this list too. In this next column, double-click “Change Type of Images” or drag it to the space on the right.
(Note: If you’ve installed Pixelmator Pro, you’ll see two options with this name — choose the one with the blue “Preview” icon if you want to use Apple’s built-in version, or Pixelmator Pro’s if you want a wider range of formats).
When you add this, an alert pops up telling you that as this command is destructive, you can add an action to duplicate the original files first. I choose “Don’t Add” here, because I don’t want the original files in the same folder as the new ones. If it’s important to keep the original files, then I always duplicate the entire enclosing folder before running one of these actions.
Type ⌘S to save, and call it “Convert to JPEG”. In the Finder, find some images you don’t care about, right-click, head to Quick Actions, and choose it from the list. It’s insanely fast, and even several hundred images can be converted very quickly indeed. If you need to convert to other formats too, head back to Automator. In your existing Quick Action, change the image format on the right, then hold ⌥ as you choose the File menu and choose Save As, giving a new name to match the new format.
Resizing images
As well as changing format, it’s common to need to quickly resize images, and Automator makes that easy too. You’ll follow the same basic steps, creating a new Quick Action, clicking Photos, then dragging Scale Images from the second column to the space on the right.
The settings in the Apple command are basic but effective. You can work with a fixed pixel dimension for the longest edge or a percentage, and I like to have a few options from 2000px to 1000px. (Note that Pixelmator Pro’s version of this command has a few more options.)
If you want to combine a resize with a format change, there’s nothing stopping you: “Convert to 2000px JPEG” and “Convert to 3840px PNG” are both handy.
Converting video formats
While the controls for manipulating videos aren’t as extensive, you can absolutely perform video encoding tasks in the Finder too. You’ll have somewhat limited controls, but if you need a small file quickly, it’s still a great option. In a new Quick Action, click Movies on the left, then drag Encode Media to the right.
The H.264 1080p option produced a 10Mbps file, at the lower end of Final Cut Pro’s defaults, but it still looks good, and it only took about 25 seconds to process a 2 minute 44 second 4K source file. And it’s not just H.264; you can convert to audio only, to ProRes 422 or HEVC, even while maintaining transparency.
There’s another built-in Quick Action you might find useful: Rotate Left. If you’ve shot with a traditional camera rotated 90° for a portrait output, or used a phone and started in portrait before changing, this command is what you need. Hold ⌥ as you choose it if you want to Rotate Right instead. Either way, be sure to use it to rotate your video clips before you bring them into your NLE.
Convert text to an audio file
Don’t like the sound of your own voice? Automator can create an audio file from selected text. If you’re using a word processor where you don’t see Services in the right-click menu, just copy the text and paste it to Pages or TextEdit.
As before, create a new Quick Action in Automator. (These used to be called Services system-wide, and they still work as Services in the context of text.) Choose Text on the left, then double-click Text to Audio File to add it to the right. There are many voices available these days, so preview a few and choose your favorite. Type a name for the output file and choose a place to save it, then save the Quick Action itself as “Text to Audio File”.
In any app that uses Apple’s text APIs, you can now select text, then right-click, choose Services > Text to Audio File, and you’ll get what you need.
Even fancier renaming
While the Finder’s built-in renaming functions are enough for most tasks, it’s possible to use Automator for other tasks. Choose Files & Folders, Rename Finder Items, and then pick your options on the right.
Change Case is a great way to make sure everything is lowercase (or UPPERCASE if you prefer to shout). Add Date or Time lets you customize the formats used, and Make Sequential gives you more options for adding numbers to files.
Hooking into scripts
While manipulating captions in Final Cut Pro, I frequently needed to join multiple captions together. There’s a built-in command for that, but it leaves you with a tedious task: changing blank lines into spaces, and the solution is obscure. In a new Quick Action, choose Utilities, then add Run JavaScript to the right. In that space, add:
function run(input, parameters) {
// Your script goes here
var text = input[0];
text = text.replace(/\n/g, " ");
return text;
}
This script performs some magic to turn return characters into spaces, and if you’re handy with JavaScript (or Google) you can find some more recipes. If you want to change two returns into one, repeat all these steps in a new Quick Action, but change the key line to:
text = text.replace(/\n\n/g, "\n");
That’s a handy one for sure, and there are other language options including AppleScript and shell scripting if you want to take this further.
There’s obviously a whole lot more you can do just with Automator, so if you explore a bit more, please leave your discoveries in the comments. But Automator is hardly the only solution here; other apps have enabled automation of one kind or another for years now. Let’s take a look at a few timesavers.
More ways to automate boring tasks…
If you edit with Final Cut Pro, you can create a Bundle to export to several formats with a single command.
Even handier, if you have the latest Compressor, you can create a watch folder, and any files placed within that folder will be processed using your choice of settings. Head to the new Watch Folders section at the top, next to Batch, then follow the prompts.
If you prefer a slightly more manual process but prefer working in the Finder, you can turn any settings into a Droplet using the gear menu underneath the custom settings. To use one, drag source video files onto the Droplet, then watch as the magic happens.
Watch folders are also present in the Vimeo menubar app, and I’ve found it very useful. Not only will it automatically upload everything I place in a certain folder, it’ll set it to “Those with the private link” (AKA “unlisted”) automatically.
Handbrake has long been a favorite app for conversion, especially to very small file sizes, and if you’re a frequent user, you should definitely be making your own presets. I like using “Same as Source” for frame rate, and it’s worth noting that Handbrake looks better at really low data rates (say, 3Mbps) than most other apps. The UI doesn’t make this obvious, but with a preset selected, you can choose an entire folder as the source, then Add All Titles to Queue from the menu next to the Add to Queue button.
Finally, if you need to do something more complex with images, you can’t beat Photoshop’s Actions. Any series of steps can be recorded, then played back manually with the Actions panel or against a whole folder with File > Automate > Batch. The extensive preset groups of Actions, available from the panel menu in the top right, are a great place to start exploring, and if you’re not against using Photoshop for video on principle, there are some intriguing video production and processing actions here.
What about Shortcuts?
There’s a whole world of people who really care about automation out there, and while Automator works perfectly for now, future development will be about its replacement, Shortcuts. For more on that app, check out Macstories, which recently ran several articles in their Automation April. There’s one for syncing timestamped notes with videos which could be especially useful.
Conclusion
If you’re doing everything by hand, you’re working too hard — always try to find a faster way. Automator is a great way to augment what you can do in the Finder already, and if you need to process text then JavaScript is a great way to take things even further. Between droplets, watch folders and versatile presets, automation will let you work more consistently and more quickly. Enjoy your new-found spare time, and please share any great finds in the comments.