Hello everyone,
I apologize for my bad English. And I also apologize if I come to ask others to do the work for me. I am satisfied with even just a few indications.
I would like to integrate Keyboard Maestro with Handbrake if it were possible.
I have a folder full of .mov files. I would like to select them and - with a trigger button - make sure that they are all compressed with a specific Handbrake setting, and saved in .mp4 in this same folder.
It's something I can do?
I am not a skilled programmer and I usually use simple macros or something ready-made by others, but in this specific case, I could not find anything that could be adapted to my need.
It might be possible to somehow completely automate this. Maybe Handbrake can work with AppleScript...
But in the meantime, you can achieve almost what you want without any automation, just using Handbrake itself.
It took me ages to discover that if instead of opening single files in Handbrake, I opened a folder (just by dragging the folder of files onto Handbrake itself) all the files in the folder get listed in Handbrake. Then choosing File>Add all Titles to Queue will add all those files into Handbrake's Queue all at same output settings and same output folder. Clicking "Start Queue" will batch process those files.
Just make sure you set your compression settings and output folder before you drag the folder of files into Handbrake.
But in the meantime, you can achieve almost what you want without any automation, just using Handbrake itself.
Thank you for the suggestion. However, it is the procedure I am currently doing
That's fine already, but since I work across multiple monitors and use keyboard shortcuts a lot, a keyboard trigger on a selection would speed me up quite a lot.
You can use Keyboard Maestro to replace as much of the manual process as you can and then set a hotkey to run that.
The example below uses Keyboard Maestro to remove having to drag the folder onto Handbrake and having to manually click add all items to queue.
To use it, you would select the Folder in Finder and press the hotkey.
This example Macro does not set the settings or output folder (I couldn't see menu options for those things in Handbrake) but at least it means you don't have to drag the folder from one monitor to another and manually add the items to the queue.
(Make sure you select the Folder in Finder. It won't work if you select the files.)
Not really. There's a bare-minimum AppleScript dictionary, but nothing useful.
But Handbrake is meant to be scripted via the command line -- see https://handbrake.fr/docs/en/1.3.0/cli/command-line-reference.html. @stirner, you should be able to find what you need there, using KM to control the process and fire off the appropriate commands with "Execute Shell Script" actions.
I haven't used handbrake in a long time, but I would wager much of this work could be accomplished with ffmpeg, which is available through homebrew (among other places). It can seem daunting at first but google can take you most of the way there by searching "ffmpeg mov to mp4 compression" etc.