I'm at a very long task at converting 800+ small files to mp4, and I'm using Handbrake at the moment. Its fast, but since there are many files, it takes a lot of time. I created a automator workflow for HandbrakeCLI so I can batch convert files in any folder. This works great, but I need it to work with a custom preset I have on the Handbrake GUI. Can I import the preset to CLI somehow? I'm not a Lunix or terminal wiz.


If you are working on the same machine and account as the GUI instance where you created the preset you can just select it with -z:

HandBrakeCLI -Z MyPreset -i inputfile.mpg -o outputfile.mp4

If you're trying to do it on another computer to where you set up the preset you will first need to export it from the GUI (in the presets menu) as a .plist file. Then you can import it (you need to do it every time, it doesn't save it) when you do the encode:

HandBrakeCLI --preset-import-file /path/to/preset.plist -Z "my preset" -i inputfile.mpg -o outputfile.mp4

It uses PresetName. The file name is only used for the purpose of opening the file, then it is forgotten and ignored.

If PresetName == "My Custom Preset" and file is "somepreset.json", the correct command line to use that preset is: HandBrakeCLI --preset-import-file somepreset.json -Z "My Custom Preset" ...

  • at least with OSX 20160707 nightly this doesnt behave quite as advertised - -Z is only for built-in presets. and the import options (--preset-import-file and --preset-import-gui) dont successfully work with an exported preset (.json) from the gui. and instead of failing, they default to x264/rf22.... – keen Jul 12 '16 at 2:53
  • HandBrakeCLI-20160707231111-0fc54d0 --preset-import-file ~/Library/Application\ Support/HandBrake/UserPresets.json -Z 'MY-CUSTOM-PRESET' -i input.mkv -o output.mkv however seems to be working - consuming the userpresets file from the gui, and specifying the specific preset in that. – keen Jul 12 '16 at 2:54
  • HandBrakeCLI-20160707231111-0fc54d0 --preset-import-file my-custom-preset-export.json -Z 'MY-CUSTOM-PRESET' -i input.mkv -o output.mkv - also works. note that I specified the file I exported the preset too AND the name of the preset. – keen Jul 12 '16 at 2:56

https://trac.handbrake.fr/roadmap lists this feature for a not yet completed release 1.0.

Maybe http://www.osomac.com/2011/05/05/handbrake-custom-presets/ could be of some help but seems to be OS X only.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.