How to fix HandBrake custom presets

From time to time I receive messages regarding problems with custom presets in HandBrake. I do not know the reason, but sometimes HandBrake saves the custom preset file in a slightly different format: HandBrake itself handles this correctly, but the parser script I use is unable to understand it.

The solution is actually quite simple, follow the instructions below to fix your file. The custom preset file is stored in your home folder: Library/Application Support/HandBrake/UserPresets.plist.

In this file (a regular XML file), an incorrect preset looks like this (to find these presets just to a search for Audio1):

[sourcecode language="xml" highlight="2"]

Audio1Bitrate
160
Audio1Encoder
AAC (faac)
Audio1Mixdown
Stereo
Audio1Samplerate
Auto
Audio1Track
1
Audio1TrackDRCSlider
1
Audio1TrackDescription
English (MPEG) (2.0 ch)
ChapterMarkers
1


[/sourcecode]

If you check the highlighted line, you see that the tag name has the figure "1" in the middle (sometime you might find Audio2 or some other number: that should not be there. Also, all the section should be enclosed in tags. A correct preset looks like so:

[sourcecode language="xml" highlight="2-5,19-20"]

AudioList


AudioBitrate
160
AudioEncoder
AAC (faac)
AudioMixdown
Stereo
AudioSamplerate
Auto
AudioTrack
1
AudioTrackDRCSlider
1
AudioTrackDescription
English (MPEG) (2.0 ch)


ChapterMarkers
1


[/sourcecode]

Correcting the format is simple:

  1. In your favorite text editor, search for Audio1;
  2. Copy and paste lines 2, 3, and 4 from the sample above (highlighted);
  3. Change all Audio1 to Audio in the block (cf. line 2 in the first sample with line 5 in the second);
  4. Close the tags (copy and paste lines 19 and 20 in the second sample);
  5. Repeat steps 1 to 4 for all presets containing Audio1.

After doing this and replacing your preset file with the corrected one, all should work fine.

If you have any trouble, just send me the file; I will fix it for you.