Blog

How to fix HandBrake custom presets

8

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):

<dict>
	<key>Audio1Bitrate</key>
	<string>160</string>
	<key>Audio1Encoder</key>
	<string>AAC (faac)</string>
	<key>Audio1Mixdown</key>
	<string>Stereo</string>
	<key>Audio1Samplerate</key>
	<string>Auto</string>
	<key>Audio1Track</key>
	<integer>1</integer>
	<key>Audio1TrackDRCSlider</key>
	<real>1</real>
	<key>Audio1TrackDescription</key>
	<string>English (MPEG) (2.0 ch)</string>
	<key>ChapterMarkers</key>
	<integer>1</integer>

	…

</dict>

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:

<dict>
	<key>AudioList</key>
	<array>
		<dict>
			<key>AudioBitrate</key>
			<string>160</string>
			<key>AudioEncoder</key>
			<string>AAC (faac)</string>
			<key>AudioMixdown</key>
			<string>Stereo</string>
			<key>AudioSamplerate</key>
			<string>Auto</string>
			<key>AudioTrack</key>
			<integer>1</integer>
			<key>AudioTrackDRCSlider</key>
			<real>1</real>
			<key>AudioTrackDescription</key>
			<string>English (MPEG) (2.0 ch)</string>
		</dict>
	</array>
	<key>ChapterMarkers</key>
	<integer>1</integer>
	
	…

</dict>

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.

  1. James Polentas
    James Polentas07-14-2012

    I need help with my custom preset as below


    ChildrenArray

    Audio1Bitrate
    160
    Audio1Encoder
    AAC (faac)
    Audio1Mixdown
    Dolby Pro Logic II
    Audio1Samplerate
    48
    Audio1Track
    1
    Audio1TrackDRCSlider
    1
    Audio2Bitrate
    160

    • Cesare Tagliaferri
      Cesare Tagliaferri07-24-2012

      Do not attach preset files to comments, most likely the XML tags will be stripped out, making it impossible for me to fix them.
      Please use the contact page and I’ll get back to you.

  2. Rikk
    Rikk08-23-2012

    Hi Cesare,

    The HandBrake version I have (Version 0.9.6 x86_64 (2012022800)) does not have custom presets within the Application Support/HandBrake/UserPreset.plist container.

    I downloaded the AVCHD rewrap for Quicktime with uncompressed audio from:
    http://media-converter.sourceforge.net/presets.html

    and the preset plist is stored in the Media Converter folder within the Application Support folder. When I want to use this on your application, it doesn’t appear on the drop down box. Could you please help me fix this.

    Much appreciated,
    Rikk

  3. Rikk
    Rikk08-23-2012

    OH GAWD. I’m so sorry! That was really stupid. Ignore my last question. That wasn’t meant for Handbrake. I got confused by two applications I was using.

  4. Thom Patterson
    Thom Patterson03-17-2013

    I have a lot of presets, many of which have the issue you describe above. Rather than fixing them all, I fixed the one I was interested in using for batch and copied its entire object above all the other presets. Handbrake still sees all the presets (just in a different order), and your batch app sees the preset I want it to see.

  5. Jürgen
    Jürgen11-25-2013

    Hey there!

    I actually have no custom presets in Handbrake but still keep getting the error message when starting HandBrakeBatch. So I just deleted the UserPreset.plist. That works great as long as I don’t open Handbrake itself – then a new UserPreset.plist is being created.

    Also there is no “Audio1*****” in this default UserPreset.plist.

    Andy ideas on how to solve this?

    Thanks and cheers,
    Jürgen

  6. Jürgen
    Jürgen11-25-2013

    Oh, I didn’t realize that. Thanks for the help!

    Leave a Reply

    Thanks for the visit, please come back again