# Creating HandBrakeCli Profile with JSON input

**URL:** https://discussion.mcebuddy2x.com/t/creating-handbrakecli-profile-with-json-input/2620
**Category:** Profiles
**Created:** [February 18, 2019, 8:31pm UTC](https://discussion.mcebuddy2x.com/t/creating-handbrakecli-profile-with-json-input/2620 "2019-02-18T20:31:39Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![awill](https://discussion.mcebuddy2x.com/letter_avatar_proxy/v4/letter/a/9dc877/32.png) [@awill](https://discussion.mcebuddy2x.com/u/awill)
#### Post date: [February 18, 2019, 8:31pm UTC](https://discussion.mcebuddy2x.com/t/creating-handbrakecli-profile-with-json-input/2620/1 "2019-02-18T20:31:39Z")

</div>

Hey everybody, been toying around with setting up a MCEBuddy Profile relying on HandBrakeCli using a JSON preset configuration to setup the encoder with the specific settings I want.

The profile I have been testing with looks like this:

> [Handbrake Cli 1.2.0 JSON Testing]  
> Description=nVidia HEVC (H265) JSON Input Testing  
> order=handbrake  
> handbrake-general=–preset-import-file E:\Configuration\HandBrake\Handbrake\_H265\_Q17\_Yadif.json -Z “H265 DVD Convertion”

Alas this fails though it works when thrown into the regular command line for HandBrakeCli.exe with the -i -o parameters, anyone got any experience applying JSON’s as the source for the encoding in MCEBuddy?

---

<div class="post-metadata">

### Author: ![RBoy](https://discussion.mcebuddy2x.com/letter_avatar_proxy/v4/letter/r/2bfe46/32.png) [@RBoy](https://discussion.mcebuddy2x.com/u/RBoy)
#### Post date: [February 19, 2019, 1:59am UTC](https://discussion.mcebuddy2x.com/t/creating-handbrakecli-profile-with-json-input/2620/2 "2019-02-19T01:59:45Z")

</div>

MCEBuddy expects to see an encoder and bitrate in the video command line. If you want to use custom JSON profiles then you need to instruct MCEBuddy to not run any safety checks and automatic adjustments for the video and audio parameters.

You would probably need to use these in your profile:

> handbrake-VideoOptimized=true  
> handbrake-AudioOptimized=true  
> handbrake-HardwareEncodingOptimized=true

See this topic for more details on how it works.

> [@MCEBuddy - Advanced Settings, Commands and Tweaking](https://discussion.mcebuddy2x.com/t/mcebuddy-advanced-settings-commands-and-tweaking/30):
>
> Advanced concepts to use MCEBuddy Refer to the [MCEBuddy Profiles Basics](https://discussion.mcebuddy2x.com/t/27) page to learn about basic Profiles creation NOTE: Advanced Conversion Parameters apply to profiles.conf Do NOT edit mcebuddy.conf. As of v2.3.13 ALL Advanced Configuration Parameters (except FFmpegBackupRemux) in mcebuddy.conf can be accessed through the GUI, Settings → Expert Settings page DO NOT REPLACE THE NEW CONFIGURATION FILES WITH THE OLD FILES AS PARAMETERS IN THE NEW FILES ARE ADDED/UPDATED WITH EACH RELEASE. …

---

<div class="post-metadata">

### Author: ![zhulick](https://discussion.mcebuddy2x.com/letter_avatar_proxy/v4/letter/z/7bcc69/32.png) [@zhulick](https://discussion.mcebuddy2x.com/u/zhulick)
#### Post date: [June 1, 2019, 9:48pm UTC](https://discussion.mcebuddy2x.com/t/creating-handbrakecli-profile-with-json-input/2620/3 "2019-06-01T21:48:06Z")

</div>

I’m attempting to do the same thing, and am also struggling.

I’ve added the handbrake optimized entries, but mcebuddy still craps out.

---

<div class="post-metadata">

### Author: ![RBoy](https://discussion.mcebuddy2x.com/letter_avatar_proxy/v4/letter/r/2bfe46/32.png) [@RBoy](https://discussion.mcebuddy2x.com/u/RBoy)
#### Post date: [June 2, 2019, 1:57pm UTC](https://discussion.mcebuddy2x.com/t/creating-handbrakecli-profile-with-json-input/2620/4 "2019-06-02T13:57:38Z")

</div>

The optimized flag was the right way to go.

Can you attach the conversion log and also a copy of a JSON file. Is it working via the command line directly?

---

<div class="post-metadata">

### Author: ![zhulick](https://discussion.mcebuddy2x.com/letter_avatar_proxy/v4/letter/z/7bcc69/32.png) [@zhulick](https://discussion.mcebuddy2x.com/u/zhulick)
#### Post date: [June 7, 2019, 12:24pm UTC](https://discussion.mcebuddy2x.com/t/creating-handbrakecli-profile-with-json-input/2620/5 "2019-06-07T12:24:34Z")

</div>

not “log worthy”…

Wanted to play with some new settings that i already had a profile for in handbrake, so i figured i would take the easy way out. Ended up making a proper profile instead.

That said, it would be nice to see a clear copy/pasta example of what a profile like this would look like, mostly so i can double check the syntax etc. Can you post a sample when you get a chance ?

---

<div class="post-metadata">

### Author: ![mcbriggie](https://discussion.mcebuddy2x.com/user_avatar/discussion.mcebuddy2x.com/mcbriggie/32/2232_2.png) [@mcbriggie](https://discussion.mcebuddy2x.com/u/mcbriggie)
#### Post date: [September 9, 2020, 12:36pm UTC](https://discussion.mcebuddy2x.com/t/creating-handbrakecli-profile-with-json-input/2620/6 "2020-09-09T12:36:01Z")

</div>

Here is my code, just replace the presetname.json with your preset name (don’t forget to move the preset into the handbrake-cli folder!)

[Handbrake Preset]  
Description=Utilizes a Handbrake GUI built preset  
2pass=true  
order=handbrake  
handbrake-general=–preset-import-file PRESETNAME.json  
handbrake-audio=-E faac -R auto -B 128-D 0  
handbrake-audioac3=-E faac -R auto -B 384 -D 0  
handbrake-ext=.mp4  
handbrake-audiodelay=skip  
PreConversionCommercialRemover=true
