"Custom Presets" in 'presets.json'

Discuss encoding for devices and presets.
Forum rules
An Activity Log is required for support requests. Please read How-to get an activity log? for details on how and why this should be provided.
Post Reply
markfilipak
Regular User
Posts: 116
Joined: Thu Aug 01, 2019 8:58 pm

"Custom Presets" in 'presets.json'

Post by markfilipak » Mon Sep 16, 2019 3:09 am

The structure of "Custom Presets" in 'presets.json' is at the end. I want to alpha-sort the "Custom Presets", "ChildrenArray"[] member objects, {}, based on "PresetName" value. 'presets.json' appears to be ANSI with CR+LF endings. I assume that if HB is not running, I'm free edit 'presets.json' at will (...with back-up of course).

I just thought I'd check in with you folks before I start mucking with 'presets.json'. Any advice is welcome. You needn't be very 'explanatory'.

Thanks!

Code: Select all

{
  "PresetList": [
    {
      "ChildrenArray": [
        {
          bla-bla-bla
          "PresetDescription": null,
          "PresetName": "p30 O.O.O.O.O 18.Q",
          bla-bla-bla
        },
        {
          bla-bla-bla
          "PresetDescription": null,
          "PresetName": "p30-to-p24 D.D.DD.O 23.B",
          bla-bla-bla
        },
        {
          bla-bla-bla
          "PresetDescription": null,
          "PresetName": "i30-to-p24 D.D.YD.O.O 18.Q",
          bla-bla-bla
        },
        {
          bla-bla-bla
          "PresetDescription": "for hard telecined sources from film",
          "PresetName": "i30-to-p24 D.L.DD.O.O 18.Q",
          bla-bla-bla
        },
        {
          bla-bla-bla
          "PresetDescription": null,
          "PresetName": "i30-to-p24 D.O.O.O.O 18.Q",
          bla-bla-bla
        },
        {
          bla-bla-bla
          "PresetDescription": "when all else fails -- very slow",
          "PresetName": "i30 O.D.DE.O.O 18.Q",
          bla-bla-bla
        },
        {
          bla-bla-bla
          "PresetDescription": "basic detelecine",
          "PresetName": "i30-to-p24 D.D.O.O.O 18.Q",
          bla-bla-bla
        },
        {
          bla-bla-bla
          "PresetDescription": "basic detelecine & decomb",
          "PresetName": "i30-to-p24 D.D.DD.O.O 18.Q",
          bla-bla-bla
        },
        {
          bla-bla-bla
          "PresetDescription": "BD movie",
          "PresetName": "p24 O.O.O.O.O 23.B",
          bla-bla-bla
        },
        {
          bla-bla-bla
          "PresetDescription": "TV show",
          "PresetName": "i30-to-p30 O.D.O.O.O 18.Q",
          bla-bla-bla
        }
      ],
      "Folder": true,
      "PresetName": "Custom Presets",
      "PresetDescription": null,
      "Type": 1
    }
  ],
  "VersionMajor": "34",
  "VersionMicro": "0",
  "VersionMinor": "0"
}

markfilipak
Regular User
Posts: 116
Joined: Thu Aug 01, 2019 8:58 pm

Re: "Custom Presets" in 'presets.json'

Post by markfilipak » Mon Sep 16, 2019 3:37 am

Oh... PS:
You guys have done an awsome job on the standard presets... but I'd like to delete those "ChildrenArray" object, "PresetList' array members (after backing them up, of course). The code apparently automatically expands the 'General' presets, so removing them may cause code problems ...I don't know. Any problems removing "PresetList" array members?

And in the topic starter, "I'm free edit..." should have been "I'm free to edit...". Sorry.

User avatar
s55
HandBrake Team
Posts: 9537
Joined: Sun Dec 24, 2006 1:05 pm

Re: "Custom Presets" in 'presets.json'

Post by s55 » Mon Sep 16, 2019 7:09 am

User editing of the file is not supported. You can perform the necessary management of presets in the UI.

If you choose to proceed, don’t be surprised if HandBrake overwrites any changes you make or has issues as a result of.

markfilipak
Regular User
Posts: 116
Joined: Thu Aug 01, 2019 8:58 pm

Re: "Custom Presets" in 'presets.json'

Post by markfilipak » Mon Sep 16, 2019 8:15 am

s55 wrote:
Mon Sep 16, 2019 7:09 am
User editing of the file is not supported. You can perform the necessary management of presets in the UI.

If you choose to proceed, don’t be surprised if HandBrake overwrites any changes you make or has issues as a result of.
I understand. Can you relay an enhancement request? Or should I make it a separate topic?

Enhancement Request, Main application, 'Presets' section, 'Custom Presets' list: Good: Automatically alpha-sort the list, Better: Implement drag-&-drop so users can sort the list.

mduell
Veteran User
Posts: 6671
Joined: Sat Apr 21, 2007 8:54 pm

Re: "Custom Presets" in 'presets.json'

Post by mduell » Mon Sep 16, 2019 3:54 pm

Enhancement requests go in github as issues.

Post Reply