diff options
author | jstebbins <[email protected]> | 2008-10-15 18:39:45 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2008-10-15 18:39:45 +0000 |
commit | 8079d10b0c22f7a7270828829286cb9947b8a99d (patch) | |
tree | e03881798433f18d5903bc102c13d48102d7eafa /gtk/src | |
parent | 5aab68603cb6b50a0a08c48497174f53ad771caf (diff) |
LinGui: nested presets
new nested builtins.
user can create custom folders and drag n drop custom presets.
updated mac to linux presets plist translation tool to handle new format
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1835 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src')
-rw-r--r-- | gtk/src/Makefile.am | 13 | ||||
-rw-r--r-- | gtk/src/audiohandler.c | 23 | ||||
-rw-r--r-- | gtk/src/callbacks.c | 17 | ||||
-rw-r--r-- | gtk/src/hb-backend.c | 17 | ||||
-rw-r--r-- | gtk/src/internal_defaults.xml | 22 | ||||
-rw-r--r-- | gtk/src/main.c | 18 | ||||
-rw-r--r-- | gtk/src/preset_xlat.c | 1212 | ||||
-rw-r--r-- | gtk/src/presets.c | 1757 | ||||
-rw-r--r-- | gtk/src/presets.h | 11 | ||||
-rw-r--r-- | gtk/src/queuehandler.c | 4 | ||||
-rw-r--r-- | gtk/src/resource_data.h | 2446 | ||||
-rw-r--r-- | gtk/src/resources.plist | 2374 | ||||
-rw-r--r-- | gtk/src/settings.c | 12 | ||||
-rw-r--r-- | gtk/src/standard_presets.xml | 2356 | ||||
-rw-r--r-- | gtk/src/values.c | 22 | ||||
-rw-r--r-- | gtk/src/values.h | 1 |
16 files changed, 5279 insertions, 5026 deletions
diff --git a/gtk/src/Makefile.am b/gtk/src/Makefile.am index 7d4d1d3ba..41881d090 100644 --- a/gtk/src/Makefile.am +++ b/gtk/src/Makefile.am @@ -73,7 +73,7 @@ AM_CFLAGS =\ -g bin_PROGRAMS = ghb -noinst_PROGRAMS = makewidgetdeps quotestring create_resources +noinst_PROGRAMS = makewidgetdeps quotestring create_resources preset_xlat BUILT_SOURCES = HandBrakeCLI @@ -145,8 +145,19 @@ create_resources_SOURCES = \ create_resources_LDADD = $(GHBTOOLS_LIBS) +preset_xlat_SOURCES = \ + preset_xlat.c \ + plist.c \ + plist.h \ + values.c \ + values.h + +preset_xlat_LDADD = $(GHBTOOLS_LIBS) + quotestring_SOURCES = quotestring.c +dumbell: preset_xlat + resources.c: resource_data.h resource_data.h: quotestring resources.plist diff --git a/gtk/src/audiohandler.c b/gtk/src/audiohandler.c index 82d0f6000..6c29a874f 100644 --- a/gtk/src/audiohandler.c +++ b/gtk/src/audiohandler.c @@ -25,17 +25,24 @@ ghb_adjust_audio_rate_combos(signal_user_data_t *ud) gint titleindex, audioindex, acodec, mix; ghb_audio_info_t ainfo; GtkWidget *widget; + GValue *gval; g_debug("ghb_adjust_audio_rate_combos ()"); titleindex = ghb_settings_combo_int(ud->settings, "title"); widget = GHB_WIDGET(ud->builder, "audio_track"); - audioindex = ghb_lookup_combo_int("audio_track", ghb_widget_value(widget)); + gval = ghb_widget_value(widget); + audioindex = ghb_lookup_combo_int("audio_track", gval); + ghb_value_free(gval); widget = GHB_WIDGET(ud->builder, "audio_codec"); - acodec = ghb_lookup_combo_int("audio_codec", ghb_widget_value(widget)); + gval = ghb_widget_value(widget); + acodec = ghb_lookup_combo_int("audio_codec", gval); + ghb_value_free(gval); widget = GHB_WIDGET(ud->builder, "audio_mix"); - mix = ghb_lookup_combo_int("audio_mix", ghb_widget_value(widget)); + gval = ghb_widget_value(widget); + mix = ghb_lookup_combo_int("audio_mix", gval); + ghb_value_free(gval); if (ghb_audio_is_passthru (acodec)) { @@ -61,7 +68,9 @@ ghb_adjust_audio_rate_combos(signal_user_data_t *ud) gint br; widget = GHB_WIDGET(ud->builder, "audio_bitrate"); - br = ghb_lookup_combo_int("audio_bitrate", ghb_widget_value(widget)); + gval = ghb_widget_value(widget); + br = ghb_lookup_combo_int("audio_bitrate", gval); + ghb_value_free(gval); if (br > 160) ghb_ui_update(ud, "audio_bitrate", ghb_int64_value(160)); ghb_set_default_bitrate_opts (ud->builder, 160); @@ -275,10 +284,12 @@ audio_codec_changed_cb(GtkWidget *widget, signal_user_data_t *ud) { static gint prev_acodec = 0; gint acodec_code, mix_code; - GValue *asettings; + GValue *asettings, *gval; g_debug("audio_codec_changed_cb ()"); - acodec_code = ghb_lookup_combo_int("audio_codec", ghb_widget_value(widget)); + gval = ghb_widget_value(widget); + acodec_code = ghb_lookup_combo_int("audio_codec", gval); + ghb_value_free(gval); if (ghb_audio_is_passthru (prev_acodec) && !ghb_audio_is_passthru (acodec_code)) { diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c index e634e0a28..516f33aab 100644 --- a/gtk/src/callbacks.c +++ b/gtk/src/callbacks.c @@ -976,6 +976,13 @@ show_title_info(signal_user_data_t *ud, ghb_title_info_t *tinfo) ghb_ui_update(ud, "crop_left", ghb_int64_value(tinfo->crop[2])); ghb_ui_update(ud, "crop_right", ghb_int64_value(tinfo->crop[3])); } + else + { + ghb_ui_update(ud, "crop_top", ghb_int64_value(0)); + ghb_ui_update(ud, "crop_bottom", ghb_int64_value(0)); + ghb_ui_update(ud, "crop_left", ghb_int64_value(0)); + ghb_ui_update(ud, "crop_right", ghb_int64_value(0)); + } g_debug("setting max end chapter %d", tinfo->num_chapters); widget = GHB_WIDGET (ud->builder, "end_chapter"); gtk_spin_button_set_range (GTK_SPIN_BUTTON(widget), 1, tinfo->num_chapters); @@ -1038,8 +1045,7 @@ title_changed_cb(GtkWidget *widget, signal_user_data_t *ud) { ghb_title_info_t tinfo; gint titleindex; - gchar *preset; - gchar *folder; + GValue *preset; g_debug("title_changed_cb ()"); ghb_widget_to_setting(ud->settings, widget); @@ -1049,11 +1055,8 @@ title_changed_cb(GtkWidget *widget, signal_user_data_t *ud) ghb_update_ui_combo_box (ud->builder, "audio_track", titleindex, FALSE); ghb_update_ui_combo_box (ud->builder, "subtitle_lang", titleindex, FALSE); - preset = ghb_settings_get_string (ud->settings, "preset"); - folder = ghb_settings_get_string (ud->settings, "folder"); - ghb_update_from_preset(ud, folder, preset, "subtitle_lang"); - g_free(preset); - g_free(folder); + preset = ghb_settings_get_value (ud->settings, "preset"); + ghb_update_from_preset(ud, preset, "subtitle_lang"); if (ghb_get_title_info (&tinfo, titleindex)) { show_title_info(ud, &tinfo); diff --git a/gtk/src/hb-backend.c b/gtk/src/hb-backend.c index 9eea5a60b..e82473e90 100644 --- a/gtk/src/hb-backend.c +++ b/gtk/src/hb-backend.c @@ -919,14 +919,21 @@ ghb_grey_combo_options(GtkBuilder *builder) gint container, track, titleindex, acodec; gboolean httpopt; hb_audio_config_t *audio = NULL; + GValue *gval; widget = GHB_WIDGET (builder, "title"); - titleindex = ghb_lookup_combo_int("title", ghb_widget_value(widget)); + gval = ghb_widget_value(widget); + titleindex = ghb_lookup_combo_int("title", gval); + ghb_value_free(gval); widget = GHB_WIDGET (builder, "audio_track"); - track = ghb_lookup_combo_int("audio_track", ghb_widget_value(widget)); + gval = ghb_widget_value(widget); + track = ghb_lookup_combo_int("audio_track", gval); + ghb_value_free(gval); audio = get_hb_audio(titleindex, track); widget = GHB_WIDGET (builder, "container"); - container = ghb_lookup_combo_int("container", ghb_widget_value(widget)); + gval = ghb_widget_value(widget); + container = ghb_lookup_combo_int("container", gval); + ghb_value_free(gval); widget = GHB_WIDGET (builder, "http_optimize_mp4"); httpopt = ghb_widget_boolean(widget); @@ -954,7 +961,9 @@ ghb_grey_combo_options(GtkBuilder *builder) grey_combo_box_item(builder, "video_codec", HB_VCODEC_THEORA, FALSE); widget = GHB_WIDGET (builder, "audio_codec"); - acodec = ghb_lookup_combo_int("audio_codec", ghb_widget_value(widget)); + gval = ghb_widget_value(widget); + acodec = ghb_lookup_combo_int("audio_codec", gval); + ghb_value_free(gval); if (acodec != HB_ACODEC_AC3) { grey_combo_box_item(builder, "audio_mix", 0, TRUE); diff --git a/gtk/src/internal_defaults.xml b/gtk/src/internal_defaults.xml index 38593e7f7..bd5ea7441 100644 --- a/gtk/src/internal_defaults.xml +++ b/gtk/src/internal_defaults.xml @@ -17,7 +17,13 @@ <key>folder</key> <string></string> <key>preset</key> - <string>Normal</string> + <array> + <string>Normal</string> + </array> + <key>preset_selection</key> + <array> + <string>Normal</string> + </array> <key>preset_type_folder</key> <false /> <key>preset_type_normal</key> @@ -76,10 +82,6 @@ <false /> <key>chapters_in_destination</key> <false /> - <key>default_folder</key> - <string></string> - <key>default_preset</key> - <string>Normal</string> <key>default_source</key> <string>/dev/dvd</string> <key>destination_dir</key> @@ -108,7 +110,7 @@ <key>autocrop</key> <true /> <key>autoscale</key> - <true /> + <false /> <key>chapter_markers</key> <true /> <key>constant_rate_factor</key> @@ -116,9 +118,11 @@ <key>container</key> <string>mp4</string> <key>deblock</key> - <real>0</real> + <integer>0</integer> <key>decomb</key> - <true /> + <false /> + <key>Default</key> + <false /> <key>deinterlace</key> <string>none</string> <key>denoise</key> @@ -162,6 +166,8 @@ </array> <key>preset_description</key> <string></string> + <key>preset_name</key> + <string></string> <key>preset_type</key> <integer>1</integer> <key>round_dimensions</key> diff --git a/gtk/src/main.c b/gtk/src/main.c index 705bc2281..d20de0e52 100644 --- a/gtk/src/main.c +++ b/gtk/src/main.c @@ -486,8 +486,7 @@ main (int argc, char *argv[]) { GtkWidget *window; signal_user_data_t *ud; - gchar *preset; - gchar *folder; + GValue *preset; GError *error = NULL; GOptionContext *context; @@ -589,19 +588,20 @@ main (int argc, char *argv[]) ghb_x264_parse_options(ud, ""); // Populate the presets tree view - ghb_presets_list_init(ud, NULL, NULL, NULL); + ghb_presets_list_init(ud, NULL, 0); // Get the first preset name if (arg_preset != NULL) { - ghb_select_preset(ud->builder, NULL, arg_preset); + preset = ghb_parse_preset_path(arg_preset); + if (preset) + { + ghb_select_preset(ud->builder, preset); + ghb_value_free(preset); + } } else { - preset = ghb_settings_get_string (ud->settings, "default_preset"); - folder = ghb_settings_get_string (ud->settings, "default_folder"); - ghb_select_preset(ud->builder, folder, preset); - g_free(preset); - g_free(folder); + ghb_select_default_preset(ud->builder); } // Grey out widgets that are dependent on a disabled feature diff --git a/gtk/src/preset_xlat.c b/gtk/src/preset_xlat.c index c3cd8b993..b19d009bc 100644 --- a/gtk/src/preset_xlat.c +++ b/gtk/src/preset_xlat.c @@ -1,691 +1,721 @@ #include <stdio.h> -#include <stdlib.h> +#include <string.h> #include <glib.h> -#include <fcntl.h> +#include <glib/gstdio.h> +#include "plist.h" +#include "values.h" -#define BUF_SIZ (128*1024) -#define IS_TAG(a,b) (strcmp((a),(b)) == 0) -#define IS_KEY(a,b) (strcmp((a),(b)) == 0) -#define IS_VAL(a,b) (strcmp((a),(b)) == 0) +static GValue *defaults; -enum +typedef struct { - NONE, - START, - ARRAY, - DICT, - KEY, - INT, - STR, - REAL, -}; + gchar *mac_val; + gchar *lin_val; +} value_map_t; -typedef struct +static value_map_t vcodec_xlat[] = { - gint state; - gchar *preset; - gchar *key; - gchar *value; - GHashTable *settings; - GHashTable *xlat_key; - GHashTable *xlat_value; -} parse_data_t; + {"MPEG-4 (FFmpeg)", "ffmpeg"}, + {"MPEG-4 (XviD)", "xvid"}, + {"H.264 (x264)", "x264"}, + {"VP3 (Theora)", "theora"}, + {NULL,NULL} +}; -static void -start_element( - GMarkupParseContext *ctx, - const gchar *name, - const gchar **attr_names, - const gchar **attr_values, - gpointer ud, - GError **error) +static value_map_t acodec_xlat[] = { - parse_data_t *pd = (parse_data_t*)ud; + {"AAC (faac)", "faac"}, + {"AC3 Passthru", "ac3"}, + {"MP3 (lame)", "lame"}, + {"Vorbis (vorbis)", "vorbis"}, + {NULL,NULL} +}; - if (IS_TAG(name, "array")) - { - pd->state = ARRAY; - } - else if (IS_TAG(name, "dict")) - { - g_hash_table_remove_all(pd->settings); - pd->state = DICT; - } - else if (IS_TAG(name, "key")) - { - pd->state = KEY; - } - else if (IS_TAG(name, "string")) - { - pd->state = STR; - } - else if (IS_TAG(name, "integer")) - { - pd->state = INT; - } - else if (IS_TAG(name, "real")) - { - pd->state = REAL; - } - else - { - g_debug("start unrecognized (%s)", name); - } -} +static value_map_t subtitle_xlat[] = +{ + { "None", "none" }, + { "Auto", "auto" }, + { "Any", "und" }, + { "Afar", "aar" }, + { "Abkhazian", "abk" }, + { "Afrikaans", "afr" }, + { "Akan", "aka" }, + { "Albanian", "sqi" }, + { "Amharic", "amh" }, + { "Arabic", "ara" }, + { "Aragonese", "arg" }, + { "Armenian", "hye" }, + { "Assamese", "asm" }, + { "Avaric", "ava" }, + { "Avestan", "ave" }, + { "Aymara", "aym" }, + { "Azerbaijani", "aze" }, + { "Bashkir", "bak" }, + { "Bambara", "bam" }, + { "Basque", "eus" }, + { "Belarusian", "bel" }, + { "Bengali", "ben" }, + { "Bihari", "bih" }, + { "Bislama", "bis" }, + { "Bosnian", "bos" }, + { "Breton", "bre" }, + { "Bulgarian", "bul" }, + { "Burmese", "mya" }, + { "Catalan", "cat" }, + { "Chamorro", "cha" }, + { "Chechen", "che" }, + { "Chinese", "zho" }, + { "Church Slavic", "chu" }, + { "Chuvash", "chv" }, + { "Cornish", "cor" }, + { "Corsican", "cos" }, + { "Cree", "cre" }, + { "Czech", "ces" }, + { "Danish", "dan" }, + { "Divehi", "div" }, + { "Dutch", "nld" }, + { "Dzongkha", "dzo" }, + { "English", "eng" }, + { "Esperanto", "epo" }, + { "Estonian", "est" }, + { "Ewe", "ewe" }, + { "Faroese", "fao" }, + { "Fijian", "fij" }, + { "Finnish", "fin" }, + { "French", "fra" }, + { "Western Frisian", "fry" }, + { "Fulah", "ful" }, + { "Georgian", "kat" }, + { "German", "deu" }, + { "Gaelic (Scots)", "gla" }, + { "Irish", "gle" }, + { "Galician", "glg" }, + { "Manx", "glv" }, + { "Greek, Modern", "ell" }, + { "Guarani", "grn" }, + { "Gujarati", "guj" }, + { "Haitian", "hat" }, + { "Hausa", "hau" }, + { "Hebrew", "heb" }, + { "Herero", "her" }, + { "Hindi", "hin" }, + { "Hiri Motu", "hmo" }, + { "Hungarian", "hun" }, + { "Igbo", "ibo" }, + { "Icelandic", "isl" }, + { "Ido", "ido" }, + { "Sichuan Yi", "iii" }, + { "Inuktitut", "iku" }, + { "Interlingue", "ile" }, + { "Interlingua", "ina" }, + { "Indonesian", "ind" }, + { "Inupiaq", "ipk" }, + { "Italian", "ita" }, + { "Javanese", "jav" }, + { "Japanese", "jpn" }, + { "Kalaallisut", "kal" }, + { "Kannada", "kan" }, + { "Kashmiri", "kas" }, + { "Kanuri", "kau" }, + { "Kazakh", "kaz" }, + { "Central Khmer", "khm" }, + { "Kikuyu", "kik" }, + { "Kinyarwanda", "kin" }, + { "Kirghiz", "kir" }, + { "Komi", "kom" }, + { "Kongo", "kon" }, + { "Korean", "kor" }, + { "Kuanyama", "kua" }, + { "Kurdish", "kur" }, + { "Lao", "lao" }, + { "Latin", "lat" }, + { "Latvian", "lav" }, + { "Limburgan", "lim" }, + { "Lingala", "lin" }, + { "Lithuanian", "lit" }, + { "Luxembourgish", "ltz" }, + { "Luba-Katanga", "lub" }, + { "Ganda", "lug" }, + { "Macedonian", "mkd" }, + { "Marshallese", "mah" }, + { "Malayalam", "mal" }, + { "Maori", "mri" }, + { "Marathi", "mar" }, + { "Malay", "msa" }, + { "Malagasy", "mlg" }, + { "Maltese", "mlt" }, + { "Moldavian", "mol" }, + { "Mongolian", "mon" }, + { "Nauru", "nau" }, + { "Navajo", "nav" }, + { "Ndebele, South", "nbl" }, + { "Ndebele, North", "nde" }, + { "Ndonga", "ndo" }, + { "Nepali", "nep" }, + { "Norwegian Nynorsk", "nno" }, + { "Norwegian Bokmål", "nob" }, + { "Norwegian", "nor" }, + { "Chichewa; Nyanja", "nya" }, + { "Occitan", "oci" }, + { "Ojibwa", "oji" }, + { "Oriya", "ori" }, + { "Oromo", "orm" }, + { "Ossetian", "oss" }, + { "Panjabi", "pan" }, + { "Persian", "fas" }, + { "Pali", "pli" }, + { "Polish", "pol" }, + { "Portuguese", "por" }, + { "Pushto", "pus" }, + { "Quechua", "que" }, + { "Romansh", "roh" }, + { "Romanian", "ron" }, + { "Rundi", "run" }, + { "Russian", "rus" }, + { "Sango", "sag" }, + { "Sanskrit", "san" }, + { "Serbian", "srp" }, + { "Croatian", "hrv" }, + { "Sinhala", "sin" }, + { "Slovak", "slk" }, + { "Slovenian", "slv" }, + { "Northern Sami", "sme" }, + { "Samoan", "smo" }, + { "Shona", "sna" }, + { "Sindhi", "snd" }, + { "Somali", "som" }, + { "Sotho, Southern", "sot" }, + { "Spanish", "spa" }, + { "Sardinian", "srd" }, + { "Swati", "ssw" }, + { "Sundanese", "sun" }, + { "Swahili", "swa" }, + { "Swedish", "swe" }, + { "Tahitian", "tah" }, + { "Tamil", "tam" }, + { "Tatar", "tat" }, + { "Telugu", "tel" }, + { "Tajik", "tgk" }, + { "Tagalog", "tgl" }, + { "Thai", "tha" }, + { "Tibetan", "bod" }, + { "Tigrinya", "tir" }, + { "Tonga", "ton" }, + { "Tswana", "tsn" }, + { "Tsonga", "tso" }, + { "Turkmen", "tuk" }, + { "Turkish", "tur" }, + { "Twi", "twi" }, + { "Uighur", "uig" }, + { "Ukrainian", "ukr" }, + { "Urdu", "urd" }, + { "Uzbek", "uzb" }, + { "Venda", "ven" }, + { "Vietnamese", "vie" }, + { "Volapük", "vol" }, + { "Welsh", "cym" }, + { "Walloon", "wln" }, + { "Wolof", "wol" }, + { "Xhosa", "xho" }, + { "Yiddish", "yid" }, + { "Yoruba", "yor" }, + { "Zhuang", "zha" }, + { "Zulu", "zul" }, + {NULL, NULL} +}; -gchar *settings[] = +value_map_t container_xlat[] = { - "preset_description", - "preset_type", - "subtitle_lang", - "forced_subtitles", - "source_audio_lang", - "pref_audio_codec", - "pref_audio_bitrate", - "pref_audio_rate", - "pref_audio_mix", - "pref_audio_drc", - "chapter_markers", - "container", - "ipod_file", - "large_mp4", - "autocrop", - "autoscale", - "max_width", - "max_height", - "anamorphic", - "round_dimensions", - "keep_aspect", - "detelecine", - "decomb", - "deinterlace", - "denoise", - "grayscale", - "deblock", - "video_codec", - "two_pass", - "turbo", - "constant_rate_factor", - "variable_frame_rate", - "framerate", - "vquality_type_constant", - "vquality_type_bitrate", - "vquality_type_target", - "video_bitrate", - "video_target_size", - "video_quality", - "x264_options", - "directqp", - NULL + {"MP4 file", "mp4"}, + {"M4V file", "m4v"}, + {"MKV file", "mkv"}, + {"AVI file", "avi"}, + {"OGM file", "ogm"}, + {NULL, NULL} }; -static void -verify_keys(parse_data_t *pd) +value_map_t framerate_xlat[] = { - GList *keys, *link; - - link = keys = g_hash_table_get_keys(pd->settings); - while (link) - { - gboolean found = FALSE; - gchar *key = (gchar*)link->data; - gint ii; - for (ii = 0; settings[ii] != NULL; ii++) - { - if (IS_KEY(settings[ii], key)) - { - found = TRUE; - } - } - if (!found) - { - g_message("bad key (%s)", key); - } - link = link->next; - } - g_list_free(keys); -} - -GKeyFile *presets; + {"Same as source", "source"}, + {"5", "5"}, + {"10", "10"}, + {"12", "12"}, + {"15", "15"}, + {"23.976", "23.976"}, + {"24", "24"}, + {"25", "25"}, + {"29.97", "29.97"}, + {NULL, NULL} +}; -static void -save_preset(parse_data_t *pd) +value_map_t samplerate_xlat[] = { - gint ii; - if (pd->preset == NULL) - { - g_message("failed to save preset"); - return; - } - for (ii = 0; settings[ii] != NULL; ii++) - { - const gchar *value; - value = (const gchar*)g_hash_table_lookup( pd->settings, settings[ii]); - if (value) - { - g_key_file_set_value(presets, pd->preset, settings[ii], value); - } - } - verify_keys(pd); -} + {"Auto", "source"}, + {"22.05", "22.05"}, + {"24", "24"}, + {"32", "32"}, + {"44.1", "44.1"}, + {"48", "48"}, + {NULL, NULL} +}; -gchar *audio_track[2]; -gchar *audio_enc[2]; -gchar *audio_bitrate[2]; -gchar *audio_rate[2]; -gchar *audio_mix[2]; -gchar *audio_drc[2]; +value_map_t mix_xlat[] = +{ + {"Mono", "mono"}, + {"Stereo", "stereo"}, + {"Dolby Surround", "dpl1"}, + {"Dolby Pro Logic II", "dpl2"}, + {"6-channel discrete", "6ch"}, + {"AC3 Passthru", "none"}, + {NULL, NULL} +}; -static void -add_keys(parse_data_t *pd) +value_map_t deint_xlat[] = { - // These are needed to override default values that - // are not set in the xml file (yet) - const gchar *val; - // Check to see if its really not set. Future xml versions will set it. - val = (const gchar*)g_hash_table_lookup(pd->settings, "decomb"); - if (!val) - g_hash_table_insert(pd->settings, g_strdup("decomb"), g_strdup("0")); -} + {"0", "none"}, + {"1", "fast"}, + {"2", "slow"}, + {"3", "slower"}, + {NULL, NULL} +}; -static void -do_one(gchar **strs, GString *res) +value_map_t denoise_xlat[] = { - gint ii; - for (ii = 0; ii < 2 && strs[ii]; ii++) - { - if (audio_track[ii] == NULL) break; - if (ii) - g_string_append_c(res, ','); - g_string_append_printf(res, "%s", strs[ii]); - } -} + {"0", "none"}, + {"1", "weak"}, + {"2", "medium"}, + {"3", "strong"}, + {NULL, NULL} +}; -static void -do_audio(parse_data_t *pd) +typedef struct { - gint ii; - GString *enc, *br, *rate, *mix, *drc; - gchar *res; - - enc = g_string_new(""); - br = g_string_new(""); - rate = g_string_new(""); - mix = g_string_new(""); - drc = g_string_new(""); - do_one(audio_enc, enc); - do_one(audio_bitrate, br); - do_one(audio_rate, rate); - do_one(audio_mix, mix); - do_one(audio_drc, drc); - res = g_string_free(enc, FALSE); - g_hash_table_insert(pd->settings, g_strdup("pref_audio_codec"), res); - res = g_string_free(br, FALSE); - g_hash_table_insert(pd->settings, g_strdup("pref_audio_bitrate"), res); - res = g_string_free(rate, FALSE); - g_hash_table_insert(pd->settings, g_strdup("pref_audio_rate"), res); - res = g_string_free(mix, FALSE); - g_hash_table_insert(pd->settings, g_strdup("pref_audio_mix"), res); - res = g_string_free(drc, FALSE); - g_hash_table_insert(pd->settings, g_strdup("pref_audio_drc"), res); -} + gchar *mac_key; + gchar *lin_key; + value_map_t *value_map; + gboolean ignore; +} key_map_t; -static void -null_audio() +key_map_t key_map[] = { - gint ii; - for (ii = 0; ii < 2; ii++) - { - audio_track[ii] = NULL; - audio_enc[ii] = NULL; - audio_bitrate[ii] = NULL; - audio_rate[ii] = NULL; - audio_mix[ii] = NULL; - audio_drc[ii] = NULL; - } -} + {"Audio1Bitrate", NULL, NULL, FALSE}, + {"Audio1Encoder", NULL, NULL, FALSE}, + {"Audio1Mixdown", NULL, NULL, FALSE}, + {"Audio1Samplerate", NULL, NULL, FALSE}, + {"Audio1Track", NULL, NULL, FALSE}, + {"Audio1TrackDescription", NULL, NULL, FALSE}, + {"Audio1TrackDRCSlider", NULL, NULL, FALSE}, + {"Audio2Bitrate", NULL, NULL, FALSE}, + {"Audio2Encoder", NULL, NULL, FALSE}, + {"Audio2Mixdown", NULL, NULL, FALSE}, + {"Audio2Samplerate", NULL, NULL, FALSE}, + {"Audio2Track", NULL, NULL, FALSE}, + {"Audio2TrackDescription", NULL, NULL, FALSE}, + {"Audio2TrackDRCSlider", NULL, NULL, FALSE}, + {"ChapterMarkers", "chapter_markers", NULL, FALSE}, + {"Default", "Default", NULL, FALSE}, + {"FileFormat", "container", container_xlat, FALSE}, + {"Folder", NULL, NULL, TRUE}, + {"Mp4HttpOptimize", "http_optimize_mp4", NULL, FALSE}, + {"Mp4iPodCompatible", "ipod_file", NULL, FALSE}, + {"Mp4LargeFile", "large_mp4", NULL, FALSE}, + {"PictureAutoCrop", "autocrop", NULL, FALSE}, + {"PictureBottomCrop", NULL, NULL, TRUE}, + {"PictureDeblock", "deblock", NULL, FALSE}, + {"PictureDecomb", "decomb", NULL, FALSE}, + {"PictureDeinterlace", "deinterlace", deint_xlat, FALSE}, + {"PictureDenoise", "denoise", denoise_xlat, FALSE}, + {"PictureDetelecine", "detelecine", NULL, FALSE}, + {"PictureHeight", "max_height", NULL, FALSE}, + {"PictureKeepRatio", "keep_aspect", NULL, FALSE}, + {"PictureLeftCrop", NULL, NULL, TRUE}, + {"PicturePAR", NULL, NULL, FALSE}, + {"PictureRightCrop", NULL, NULL, TRUE}, + {"PictureTopCrop", NULL, NULL, TRUE}, + {"PictureWidth", "max_width", NULL, FALSE}, + {"PresetDescription", "preset_description", NULL, FALSE}, + {"PresetName", "preset_name", NULL, FALSE}, + {"Subtitles", "subtitle_lang", subtitle_xlat, FALSE}, + {"SubtitlesForced", "forced_subtitles", NULL, FALSE}, + {"Type", NULL, NULL, TRUE}, + {"UsesMaxPictureSettings", NULL, NULL, FALSE}, + {"UsesPictureFilters", NULL, NULL, TRUE}, + {"UsesPictureSettings", NULL, NULL, FALSE}, + {"VFR", NULL, NULL, TRUE}, + {"VideoAvgBitrate", "video_bitrate", NULL, FALSE}, + {"VideoEncoder", "video_codec", vcodec_xlat, FALSE}, + {"VideoFramerate", "framerate", framerate_xlat, FALSE}, + {"VideoGrayScale", "grayscale", NULL, FALSE}, + {"VideoQualitySlider", NULL, NULL, FALSE}, + {"VideoQualityType", NULL, NULL, FALSE}, + {"VideoTargetSize", "video_target_size", NULL, FALSE}, + {"VideoTwoPass", "two_pass", NULL, FALSE}, + {"VideoTurboTwoPass", "turbo", NULL, FALSE}, + {"x264Option", "x264_options", NULL, FALSE}, + {NULL, NULL} +}; -static void -clear_audio() +const gint +key_xlat(key_map_t *key_map, const gchar *mac_key) { gint ii; - for (ii = 0; ii < 2; ii++) + + for (ii = 0; key_map[ii].mac_key; ii++) { - if (audio_track[ii]) g_free(audio_track[ii]); - if (audio_enc[ii]) g_free(audio_enc[ii]); - if (audio_bitrate[ii]) g_free(audio_bitrate[ii]); - if (audio_rate[ii]) g_free(audio_rate[ii]); - if (audio_mix[ii]) g_free(audio_mix[ii]); - if (audio_drc[ii]) g_free(audio_drc[ii]); - audio_track[ii] = NULL; - audio_enc[ii] = NULL; - audio_bitrate[ii] = NULL; - audio_rate[ii] = NULL; - audio_mix[ii] = NULL; - audio_drc[ii] = NULL; + if (strcmp(mac_key, key_map[ii].mac_key) == 0) + { + if (key_map[ii].ignore) + return -1; + return ii; + } } + g_warning("Unrecognized key: (%s)", mac_key); + return -1; } -static void -end_element( - GMarkupParseContext *ctx, - const gchar *name, - gpointer ud, - GError **error) +static GValue* +value_xlat( + GValue *defaults, + key_map_t *key_map, + gint key_index, + GValue *mac_val) { - parse_data_t *pd = (parse_data_t*)ud; + GValue *gval, *def_val; + const gchar *lin_key = key_map[key_index].lin_key; + value_map_t *value_map = key_map[key_index].value_map; - if (IS_TAG(name, "string") || - IS_TAG(name, "integer") || - IS_TAG(name, "real")) + def_val = ghb_dict_lookup(defaults, lin_key); + if (def_val) { - if (IS_KEY(pd->key, "PresetName")) + if (value_map) { - if (pd->preset) - { - g_message("Preset named twice"); - } - else - pd->preset = g_strdup(pd->value); - pd->state = NONE; - return; - } - const gchar *my_key; - my_key = (const gchar*)g_hash_table_lookup(pd->xlat_key, pd->key); - if (my_key != NULL) - { // Do something with it - if (my_key[0] != 0) // intentionally ignored keys + gint ii; + gchar *str; + GValue *sval; + + str = ghb_value_string(mac_val); + for (ii = 0; value_map[ii].mac_val; ii++) { - if (pd->value != NULL) - { - g_hash_table_insert(pd->settings, - g_strdup(my_key), g_strdup(pd->value)); - } - else + if (strcmp(str, value_map[ii].mac_val) == 0) { - g_message("NULL value"); + sval = ghb_string_value_new(value_map[ii].lin_val); + g_free(str); + gval = ghb_value_new(G_VALUE_TYPE(def_val)); + if (!g_value_transform(sval, gval)) + { + g_warning("1 can't transform"); + ghb_value_free(gval); + ghb_value_free(sval); + return NULL; + } + ghb_value_free(sval); + return gval; } } + g_warning("Can't map value: (%s)", str); + g_free(str); } - else if (IS_KEY(pd->key, "Audio1Encoder")) - { - if (audio_enc[0]) g_free(audio_enc[0]); - audio_enc[0] = g_strdup(pd->value); - } - else if (IS_KEY(pd->key, "Audio1Bitrate")) - { - if (audio_bitrate[0]) g_free(audio_bitrate[0]); - audio_bitrate[0] = g_strdup(pd->value); - } - else if (IS_KEY(pd->key, "Audio1Samplerate")) - { - if (audio_rate[0]) g_free(audio_rate[0]); - audio_rate[0] = g_strdup(pd->value); - } - else if (IS_KEY(pd->key, "Audio1Mixdown")) - { - if (audio_mix[0]) g_free(audio_mix[0]); - audio_mix[0] = g_strdup(pd->value); - } - else if (IS_KEY(pd->key, "Audio1TrackDRCSlider")) - { - if (audio_drc[0]) g_free(audio_drc[0]); - audio_drc[0] = g_strdup(pd->value); - } - else if (IS_KEY(pd->key, "Audio1Track")) - { - if (audio_track[0]) g_free(audio_track[0]); - audio_track[0] = g_strdup(pd->value); - } - else if (IS_KEY(pd->key, "Audio2Encoder")) - { - if (audio_enc[1]) g_free(audio_enc[1]); - audio_enc[1] = g_strdup(pd->value); - } - else if (IS_KEY(pd->key, "Audio2Bitrate")) - { - if (audio_bitrate[1]) g_free(audio_bitrate[1]); - audio_bitrate[1] = g_strdup(pd->value); - } - else if (IS_KEY(pd->key, "Audio2Samplerate")) - { - if (audio_rate[1]) g_free(audio_rate[1]); - audio_rate[1] = g_strdup(pd->value); - } - else if (IS_KEY(pd->key, "Audio2Mixdown")) - { - if (audio_mix[1]) g_free(audio_mix[1]); - audio_mix[1] = g_strdup(pd->value); - } - else if (IS_KEY(pd->key, "Audio2TrackDRCSlider")) - { - if (audio_drc[1]) g_free(audio_drc[1]); - audio_drc[1] = g_strdup(pd->value); - } - else if (IS_KEY(pd->key, "Audio2Track")) - { - if (audio_track[1]) g_free(audio_track[1]); - audio_track[1] = g_strdup(pd->value); - } - else if (IS_KEY(pd->key, "VideoQualityType")) + else { - // VideoQualityType/0/1/2 - vquality_type_/target/bitrate/constant - if (IS_VAL(pd->value, "0")) - { - g_hash_table_insert(pd->settings, - g_strdup("vquality_type_target"), - g_strdup("1")); - g_hash_table_remove(pd->settings, "vquality_type_bitrate"); - g_hash_table_remove(pd->settings, "vquality_type_constant"); - } - else if (IS_VAL(pd->value, "1")) + gval = ghb_value_new(G_VALUE_TYPE(def_val)); + if (!g_value_transform(mac_val, gval)) { - g_hash_table_remove(pd->settings, "vquality_type_target"); - g_hash_table_insert(pd->settings, - g_strdup("vquality_type_bitrate"), - g_strdup("1")); - g_hash_table_remove(pd->settings, "vquality_type_constant"); + g_warning("2 can't transform"); + ghb_value_free(gval); + return NULL; } - else if (IS_VAL(pd->value, "2")) - { - g_hash_table_remove(pd->settings, "vquality_type_target"); - g_hash_table_remove(pd->settings, "vquality_type_bitrate"); - g_hash_table_insert(pd->settings, - g_strdup("vquality_type_constant"), - g_strdup("1")); - } - } - else - { - g_message("Key not found (%s)", pd->key); + return gval; } } - else if (IS_TAG(name, "dict")) + else { - gint ii; - add_keys(pd); - do_audio(pd); - clear_audio(); - save_preset(pd); - - if (pd->preset) - { - g_free(pd->preset); - pd->preset = NULL; - } - else - g_message("Preset has no name"); - g_hash_table_remove_all(pd->settings); + g_warning("Bad key: (%s)", lin_key); + return NULL; } - pd->state = NONE; + return NULL; } -static gboolean -is_number(const gchar *str) +key_map_t audio_key_map[] = { - gboolean result = TRUE; - gint ii; - for (ii = 0; str[ii] != 0; ii++) - { - if (!g_ascii_isdigit(str[ii]) && str[ii] != '.') - result = FALSE; - } - return result; -} + {"Audio1Bitrate", "audio_bitrate", NULL, FALSE}, + {"Audio1Encoder", "audio_codec", acodec_xlat, FALSE}, + {"Audio1Mixdown", "audio_mix", mix_xlat, FALSE}, + {"Audio1Samplerate", "audio_rate", samplerate_xlat, FALSE}, + {"Audio1Track", NULL, NULL, TRUE}, + {"Audio1TrackDescription", NULL, NULL, TRUE}, + {"Audio1TrackDRCSlider", "audio_drc", NULL, FALSE}, + {"Audio2Bitrate", "audio_bitrate", NULL, FALSE}, + {"Audio2Encoder", "audio_codec", acodec_xlat, FALSE}, + {"Audio2Mixdown", "audio_mix", mix_xlat, FALSE}, + {"Audio2Samplerate", "audio_rate", samplerate_xlat, FALSE}, + {"Audio2Track", NULL, NULL, TRUE}, + {"Audio2TrackDescription", NULL, NULL, TRUE}, + {"Audio2TrackDRCSlider", "audio_drc", NULL, FALSE}, + {NULL, NULL} +}; static void -text_data( - GMarkupParseContext *ctx, - const gchar *text, - gsize len, - gpointer ud, - GError **error) +hard_value_xlat(GValue *lin_dict, const gchar *mac_key, GValue *mac_val) { - gboolean is_value = FALSE; - parse_data_t *pd = (parse_data_t*)ud; - const gchar *val = NULL; - - if (pd->state == KEY) + if (strcmp(mac_key, "VideoQualitySlider") == 0) { - if (pd->key) g_free(pd->key); - pd->key = g_strdup(text); - return; + gint vquality; + + vquality = (ghb_value_double(mac_val) + 0.005) * 100.0; + ghb_dict_insert(lin_dict, "video_quality", + ghb_int_value_new(vquality)); } - if (pd->state == STR) + else if (strcmp(mac_key, "UsesMaxPictureSettings") == 0) { - val = (gchar*)g_hash_table_lookup(pd->xlat_value, text); - if (val != NULL) - { // Do something with it - } - else if (IS_KEY(pd->key, "PresetName") || - IS_KEY(pd->key, "PresetDescription") || - IS_KEY(pd->key, "x264Option") || - is_number(text)) + GValue *gval; + + gval = ghb_dict_lookup(lin_dict, "autoscale"); + if (gval == NULL && ghb_value_boolean(mac_val)) { - val = text; + ghb_dict_insert(lin_dict, "autoscale", ghb_boolean_value_new(TRUE)); } - else + } + else if (strcmp(mac_key, "UsesPictureSettings") == 0) + { + GValue *gval; + + gval = ghb_dict_lookup(lin_dict, "autoscale"); + if (gval == NULL && ghb_value_int(mac_val) == 2) { - g_message("Unrecognized val (%s)", text); + ghb_dict_insert(lin_dict, "autoscale", ghb_boolean_value_new(TRUE)); } } - if (pd->state == INT || pd->state == REAL) + else if (strcmp(mac_key, "PicturePAR") == 0) { - val = text; - } + gint ana; - // Some keys need further translation of their values - if (val) - { - if (IS_KEY(pd->key, "PictureDeinterlace")) + ana = ghb_value_int(mac_val); + switch (ana) { - if (IS_VAL(val, "0")) - { - val = "none"; - } - else if (IS_VAL(val, "1")) - { - val = "fast"; - } - else if (IS_VAL(val, "2")) - { - val = "slow"; - } - else if (IS_VAL(val, "3")) - { - val = "slower"; - } + case 0: + { + ghb_dict_insert(lin_dict, "anamorphic", + ghb_boolean_value_new(FALSE)); + ghb_dict_insert(lin_dict, "round_dimensions", + ghb_boolean_value_new(TRUE)); + } break; + case 1: + { + ghb_dict_insert(lin_dict, "anamorphic", + ghb_boolean_value_new(TRUE)); + ghb_dict_insert(lin_dict, "round_dimensions", + ghb_boolean_value_new(FALSE)); + } break; + case 2: + { + ghb_dict_insert(lin_dict, "anamorphic", + ghb_boolean_value_new(TRUE)); + ghb_dict_insert(lin_dict, "round_dimensions", + ghb_boolean_value_new(TRUE)); + } break; + default: + { + ghb_dict_insert(lin_dict, "anamorphic", + ghb_boolean_value_new(TRUE)); + ghb_dict_insert(lin_dict, "round_dimensions", + ghb_boolean_value_new(TRUE)); + } break; } - else if (IS_KEY(pd->key, "VideoQualitySlider")) + } + else if (strcmp(mac_key, "VideoQualityType") == 0) + { + // VideoQualityType/0/1/2 - vquality_type_/target/bitrate/constant + gint vqtype; + + vqtype = ghb_value_int(mac_val); + switch (vqtype) + { + case 0: + { + ghb_dict_insert(lin_dict, "vquality_type_target", + ghb_boolean_value_new(TRUE)); + ghb_dict_insert(lin_dict, "vquality_type_bitrate", + ghb_boolean_value_new(FALSE)); + ghb_dict_insert(lin_dict, "vquality_type_constant", + ghb_boolean_value_new(FALSE)); + } break; + case 1: { - gdouble dval; - dval = g_strtod(val, NULL); - dval *= 100; - if (pd->value) g_free(pd->value); - pd->value = g_strdup_printf("%d", (gint)dval); - return; + ghb_dict_insert(lin_dict, "vquality_type_target", + ghb_boolean_value_new(FALSE)); + ghb_dict_insert(lin_dict, "vquality_type_bitrate", + ghb_boolean_value_new(TRUE)); + ghb_dict_insert(lin_dict, "vquality_type_constant", + ghb_boolean_value_new(FALSE)); + } break; + case 2: + { + ghb_dict_insert(lin_dict, "vquality_type_target", + ghb_boolean_value_new(FALSE)); + ghb_dict_insert(lin_dict, "vquality_type_bitrate", + ghb_boolean_value_new(FALSE)); + ghb_dict_insert(lin_dict, "vquality_type_constant", + ghb_boolean_value_new(TRUE)); + } break; + default: + { + ghb_dict_insert(lin_dict, "vquality_type_target", + ghb_boolean_value_new(FALSE)); + ghb_dict_insert(lin_dict, "vquality_type_bitrate", + ghb_boolean_value_new(FALSE)); + ghb_dict_insert(lin_dict, "vquality_type_constant", + ghb_boolean_value_new(TRUE)); + } break; } - else if (IS_KEY(pd->key, "Audio1Samplerate") || - IS_KEY(pd->key, "Audio2Samplerate")) + } + else + { + gint key_index; + GValue *audio_defaults; + + audio_defaults = ghb_array_get_nth( + ghb_dict_lookup(defaults, "pref_audio_list"), 0); + key_index = key_xlat(audio_key_map, mac_key); + if (key_index >= 0) { - if (IS_VAL(val, "auto")) + gint audio_index, count, ii; + GValue *alist, *adict, *val; + + audio_index = mac_key[5] - '1'; + alist = ghb_dict_lookup(lin_dict, "pref_audio_list"); + if (alist == NULL) { - val = "source"; + alist = ghb_array_value_new(8); + ghb_dict_insert(lin_dict, "pref_audio_list", alist); } - } - else if (IS_KEY(pd->key, "Audio1Mixdown") || - IS_KEY(pd->key, "Audio2Mixdown")) - { - if (IS_VAL(val, "ac3")) + count = ghb_array_len(alist); + for (ii = count; ii <= audio_index; ii++) + { + adict = ghb_value_dup(audio_defaults); + ghb_array_append(alist, adict); + } + adict = ghb_array_get_nth(alist, audio_index); + val = value_xlat(audio_defaults, audio_key_map, key_index, mac_val); + if (val) { - val = "none"; + ghb_dict_insert(adict, + g_strdup(audio_key_map[key_index].lin_key), val); } } - if (pd->value) g_free(pd->value); - pd->value = g_strdup(val); } } static void -passthrough( - GMarkupParseContext *ctx, - const gchar *text, - gsize len, - gpointer ud, - GError **error) +parse_preset_dict(GValue *mac_dict, GValue *lin_dict) { - parse_data_t *pd = (parse_data_t*)ud; - - g_debug("passthrough %s", text); -} + GHashTableIter iter; + gchar *key; + GValue *mac_val, *val; + + ghb_dict_iter_init(&iter, mac_dict); + // middle (void*) cast prevents gcc warning "defreferencing type-punned + // pointer will break strict-aliasing rules" + while (g_hash_table_iter_next( + &iter, (gpointer*)(void*)&key, (gpointer*)(void*)&mac_val)) + { + gint key_index; -static void -delete_key(gpointer str) -{ - g_free(str); + key_index = key_xlat(key_map, key); + if (key_index >= 0) + { // The simple translations + if (key_map[key_index].lin_key) + { + val = value_xlat(defaults, key_map, key_index, mac_val); + if (val) + { + ghb_dict_insert(lin_dict, + g_strdup(key_map[key_index].lin_key), val); + } + } + else + { + hard_value_xlat(lin_dict, key, mac_val); + } + } + } } static void -delete_value(gpointer str) -{ - g_free(str); -} - -typedef struct +parse_preset_array(GValue *mac_array, GValue *lin_array) { - gchar *from; - gchar *to; -} xlat_t; + gint count, ii; + GValue *mac_dict, *lin_dict, *gval; -static xlat_t keys[] = -{ - {"VFR", "variable_frame_rate"}, - {"ChapterMarkers", "chapter_markers"}, - {"Default", ""}, - {"FileFormat", "container"}, - {"PictureAutoCrop", "autocrop"}, - {"PictureBottomCrop", ""}, - {"PictureTopCrop", ""}, - {"PictureLeftCrop", ""}, - {"PictureRightCrop", ""}, - {"PictureDeblock", "deblock"}, - {"PictureDeinterlace", "deinterlace"}, // v - {"PictureDenoise", "denoise"}, // v - {"PictureDetelecine", "detelecine"}, - {"PictureHeight", "max_height"}, - {"PictureWidth", "max_width"}, - {"PictureKeepRatio", "keep_aspect"}, - {"PicturePAR", "anamorphic"}, // v - {"PresetDescription", "preset_description"}, - {"Subtitles", "subtitle_lang"}, - {"Subtitles", "subtitle_lang"}, - {"Type", "preset_type"}, // preset type builtin/custom - {"UsesMaxPictureSettings", "autoscale"}, - {"UsesPictureFilters", ""}, - {"UsesPictureSettings", ""}, - {"VideoAvgBitrate", "video_bitrate"}, - {"VideoEncoder", "video_codec"}, - {"VideoFramerate", "framerate"}, - {"VideoGrayScale", "grayscale"}, - {"VideoQualitySlider", "video_quality"}, - {"VideoTargetSize", "video_target_size"}, - {"VideoTurboTwoPass", "turbo"}, - {"VideoTwoPass", "two_pass"}, - {"x264Option", "x264_options"}, - {"Mp4LargeFile", "large_mp4"}, - {"Mp4iPodCompatible", "ipod_file"}, - {NULL, NULL} -}; - -// VideoQualityType/0/1/2 - vquality_type_/target/bitrate/constant -// Audio1Bitrate - pref_audio_bitrate -// Audio1Encoder - pref_audio_codec -// Audio1Mixdown - pref_audio_mix -// Audio1Samplerate - pref_audio_rate -// Audio1Track - na -// Audio1DRCSlider - pref_audio_drc - -static xlat_t values[] = -{ - {"AAC (faac)", "faac"}, - {"AC3 Passthru", "ac3"}, - {"H.264 (x264)", "x264"}, - {"MPEG-4 (FFmpeg)", "ffmpeg"}, - {"Dolby Pro Logic II", "dpl2"}, - {"Auto", "auto"}, - {"MKV file", "mkv"}, - {"MP4 file", "mp4"}, - {"None", "none"}, - {"Same as source", "source"}, - {"160", "160"}, - {NULL, NULL} -}; - -static void -store_key_file(GKeyFile *key_file, const gchar *name) -{ - gchar *settingsString; - gsize length; - gint fd; - - settingsString = g_key_file_to_data(key_file, &length, NULL); - - fd = g_open(name, O_RDWR|O_CREAT|O_TRUNC, 0777); - write(fd, settingsString, length); - close(fd); - g_free(settingsString); + count = ghb_array_len(mac_array); + for (ii = 0; ii < count; ii++) + { + mac_dict = ghb_array_get_nth(mac_array, ii); + + // Only process builtin types + if (ghb_value_int(ghb_dict_lookup(mac_dict, "Type")) != 0) + continue; + + lin_dict = ghb_dict_value_new(); + ghb_array_append(lin_array, lin_dict); + gval = ghb_dict_lookup(mac_dict, "PresetName"); + if (gval) + { + ghb_dict_insert(lin_dict, g_strdup("preset_name"), + ghb_value_dup(gval)); + } + gval = ghb_dict_lookup(mac_dict, "PresetDescription"); + if (gval) + { + ghb_dict_insert(lin_dict, g_strdup("preset_description"), + ghb_value_dup(gval)); + } + gval = ghb_dict_lookup(mac_dict, "Folder"); + if (gval && ghb_value_boolean(gval)) + { // Folder + GValue *mval, *lval; + + mval = ghb_dict_lookup(mac_dict, "ChildrenArray"); + lval = ghb_array_value_new(32); + ghb_dict_insert(lin_dict, g_strdup("preset_folder"), lval); + ghb_dict_insert(lin_dict, g_strdup("preset_type"), + ghb_int_value_new(2)); + parse_preset_array(mval, lval); + } + else + { // Normal preset + ghb_dict_insert(lin_dict, g_strdup("preset_type"), + ghb_int_value_new(0)); + parse_preset_dict(mac_dict, lin_dict); + } + } } static void -parse_it(gchar *buf, gssize len) +xlat(GValue *mac, GValue *lin) { - GMarkupParseContext *ctx; - GMarkupParser parser; - parse_data_t pd; - - null_audio(); - presets = g_key_file_new(); - pd.state = START; - pd.key = NULL; - pd.value = NULL; - pd.preset = NULL; - pd.settings = g_hash_table_new_full(g_str_hash, g_str_equal, - delete_key, delete_value); - pd.xlat_key = g_hash_table_new(g_str_hash, g_str_equal); - gint ii; - for (ii = 0; keys[ii].from != NULL; ii++) - { - g_hash_table_insert(pd.xlat_key, keys[ii].from, keys[ii].to); - } - pd.xlat_value = g_hash_table_new(g_str_hash, g_str_equal); - for (ii = 0; values[ii].from != NULL; ii++) - { - g_hash_table_insert(pd.xlat_value, values[ii].from, values[ii].to); - } - parser.start_element = start_element; - parser.end_element = end_element; - parser.text = text_data; - parser.passthrough = passthrough; - ctx = g_markup_parse_context_new(&parser, 0, &pd, NULL); - g_markup_parse_context_parse(ctx, buf, len, NULL); - store_key_file(presets, "xlat_presets"); + return parse_preset_array(mac, lin); } gint main(gint argc, gchar *argv[]) { - FILE *fd; - gchar buffer[BUF_SIZ]; - size_t size; + GValue *mac_plist, *lin_plist; + GValue *internal; - fd = fopen(argv[1], "r"); - size = fread(buffer, 1, BUF_SIZ, fd); - if (size >= BUF_SIZ) + if (argc < 3) { - g_error("buffer too small"); - exit(1); + fprintf(stderr, "Usage: <mac plist> <lin plist>\n"); + return 1; } - buffer[size] = 0; - parse_it(buffer, (gssize)size); + g_type_init(); + + ghb_register_transforms(); + internal = ghb_plist_parse_file("internal_defaults.xml"); + defaults = ghb_dict_lookup(internal, "Presets"); + mac_plist = ghb_plist_parse_file(argv[1]); + lin_plist = ghb_array_value_new(32); + xlat(mac_plist, lin_plist); + ghb_plist_write_file(argv[2], lin_plist); + return 0; } diff --git a/gtk/src/presets.c b/gtk/src/presets.c index 08ac7b3a2..5f120e5b7 100644 --- a/gtk/src/presets.c +++ b/gtk/src/presets.c @@ -25,6 +25,8 @@ #include "presets.h" #include "values.h" +#define MAX_NESTED_PRESET 3 + // These are flags. One bit for each feature enum { @@ -37,6 +39,235 @@ static GValue *internalPlist = NULL; static GValue *prefsPlist = NULL; static const GValue* preset_dict_get_value(GValue *dict, const gchar *key); +static void store_plist(GValue *plist, const gchar *name); + +// This only handle limited depth +GtkTreePath* +ghb_tree_path_new_from_indices(gint *indices, gint len) +{ + switch (len) + { + case 1: + return gtk_tree_path_new_from_indices( + indices[0], -1); + case 2: + return gtk_tree_path_new_from_indices( + indices[0], indices[1], -1); + case 3: + return gtk_tree_path_new_from_indices( + indices[0], indices[1], indices[2], -1); + case 4: + return gtk_tree_path_new_from_indices( + indices[0], indices[1], indices[2], indices[3], -1); + case 5: + return gtk_tree_path_new_from_indices( + indices[0], indices[1], indices[2], indices[3], indices[4], -1); + default: + return NULL; + } +} + +GValue* +ghb_parse_preset_path(const gchar *path) +{ + gchar **split; + GValue *preset; + gint ii; + + preset = ghb_array_value_new(MAX_NESTED_PRESET); + split = g_strsplit(path, "#", MAX_NESTED_PRESET); + for (ii = 0; split[ii] != NULL; ii++) + { + ghb_array_append(preset, ghb_string_value_new(split[ii])); + } + g_strfreev(split); + return preset; +} + +static GValue* +preset_path_from_indices(GValue *presets, gint *indices, gint len) +{ + gint ii; + GValue *path; + + g_debug("preset_path_from_indices"); + path = ghb_array_value_new(MAX_NESTED_PRESET); + for (ii = 0; ii < len; ii++) + { + GValue *dict; + gint count, ptype; + const GValue *name; + + count = ghb_array_len(presets); + if (indices[ii] >= count) break; + dict = ghb_array_get_nth(presets, indices[ii]); + name = ghb_dict_lookup(dict, "preset_name"); + ghb_array_append(path, ghb_value_dup(name)); + ptype = ghb_value_int(preset_dict_get_value(dict, "preset_type")); + if (!(ptype & PRESETS_FOLDER)) + break; + presets = ghb_dict_lookup(dict, "preset_folder"); + } + return path; +} + +gchar* +ghb_preset_path_string(const GValue *path) +{ + gint count, ii; + GString *gstr; + GValue *val; + gchar *str; + + gstr = g_string_new(""); + if (path != NULL) + { + count = ghb_array_len(path); + for (ii = 0; ii < count; ii++) + { + val = ghb_array_get_nth(path, ii); + str = ghb_value_string(val); + g_string_append(gstr, str); + if (ii < count-1) + g_string_append(gstr, "->"); + g_free(str); + } + } + str = g_string_free(gstr, FALSE); + return str; +} + +static void +debug_show_type(GType tp) +{ + const gchar *str = "unknown"; + if (tp == G_TYPE_STRING) + { + str ="string"; + } + else if (tp == G_TYPE_INT) + { + str ="int"; + } + else if (tp == G_TYPE_INT64) + { + str ="int64"; + } + else if (tp == G_TYPE_BOOLEAN) + { + str ="bool"; + } + else if (tp == ghb_array_get_type()) + { + str ="array"; + } + else if (tp == ghb_dict_get_type()) + { + str ="dict"; + } + g_message("Type: %s", str); +} + +void +dump_preset_path(const gchar *msg, const GValue *path) +{ + gchar *str; + + if (path) + debug_show_type (G_VALUE_TYPE(path)); + str = ghb_preset_path_string(path); + g_message("%s path: (%s)", msg, str); + g_free(str); +} + +void +dump_preset_indices(const gchar *msg, gint *indices, gint len) +{ + gint ii; + + g_message("%s indices: len %d", msg, len); + for (ii = 0; ii < len; ii++) + { + printf("%d ", indices[ii]); + } + printf("\n"); +} + +#if 0 +static gint +preset_path_cmp(const GValue *path1, const GValue *path2) +{ + gint count, ii; + GValue *val; + gchar *str1, *str2; + gint result; + + count = ghb_array_len(path1); + ii = ghb_array_len(path2); + if (ii != count) + return ii - count; + for (ii = 0; ii < count; ii++) + { + val = ghb_array_get_nth(path1, ii); + str1 = ghb_value_string(val); + val = ghb_array_get_nth(path2, ii); + str2 = ghb_value_string(val); + result = strcmp(str1, str2); + if (result != 0) + return result; + g_free(str1); + g_free(str2); + } + return 0; +} +#endif + +static GValue* +presets_get_dict(GValue *presets, gint *indices, gint len) +{ + gint ii, count, ptype; + GValue *dict = NULL; + + g_debug("presets_get_dict ()"); + for (ii = 0; ii < len; ii++) + { + count = ghb_array_len(presets); + if (indices[ii] >= count) return NULL; + dict = ghb_array_get_nth(presets, indices[ii]); + if (ii < len-1) + { + ptype = ghb_value_int(preset_dict_get_value(dict, "preset_type")); + if (!(ptype & PRESETS_FOLDER)) + return NULL; + presets = ghb_dict_lookup(dict, "preset_folder"); + } + } + if (ii < len) + return NULL; + return dict; +} + +static GValue* +presets_get_folder(GValue *presets, gint *indices, gint len) +{ + gint ii, count, ptype; + GValue *dict; + + g_debug("presets_get_folder ()"); + for (ii = 0; ii < len; ii++) + { + count = ghb_array_len(presets); + if (indices[ii] >= count) return NULL; + dict = ghb_array_get_nth(presets, indices[ii]); + ptype = ghb_value_int(preset_dict_get_value(dict, "preset_type")); + if (!(ptype & PRESETS_FOLDER)) + break; + presets = ghb_dict_lookup(dict, "preset_folder"); + } + if (ii < len) + return NULL; + return presets; +} static GValue* plist_get_dict(GValue *presets, const gchar *name) @@ -65,18 +296,6 @@ ghb_preset_flags(GValue *dict) return ptype; } -static GValue* -presets_get_first_dict(GValue *presets) -{ - gint count; - - g_debug("presets_get_first_dict ()"); - if (presets == NULL) return NULL; - count = ghb_array_len(presets); - if (count <= 0) return NULL; - return ghb_array_get_nth(presets, 0); -} - static void presets_remove_nth(GValue *presets, gint pos) { @@ -94,36 +313,18 @@ presets_remove_nth(GValue *presets, gint pos) gboolean ghb_presets_remove( GValue *presets, - gint folder_pos, - gint pos) + gint *indices, + gint len) { - GValue *nested; - gint ii; + GValue *folder = NULL; - if (folder_pos >= 0) - { - if (pos >= 0) - { - ii = pos; - nested = ghb_array_get_nth(presets, folder_pos); - nested = ghb_dict_lookup(nested, "preset_folder"); - } - else - { - ii = folder_pos; - nested = presets; - } - } + folder = presets_get_folder(presets, indices, len-1); + if (folder) + presets_remove_nth(folder, indices[len-1]); else { - ii = pos; - nested = presets; - } - if (ii >= 0) - presets_remove_nth(nested, ii); - else - { - g_warning("internal preset lookup error (%d/%d)", folder_pos, pos); + g_warning("ghb_presets_remove ()"); + g_warning("internal preset lookup error"); return FALSE; } return TRUE; @@ -133,248 +334,305 @@ static void ghb_presets_replace( GValue *presets, GValue *dict, - gint folder_pos, - gint pos) + gint *indices, + gint len) { - GValue *nested; - gint ii; + GValue *folder = NULL; - if (folder_pos >= 0) - { - if (pos >= 0) - { - ii = pos; - nested = ghb_array_get_nth(presets, folder_pos); - nested = ghb_dict_lookup(nested, "preset_folder"); - } - else - { - ii = folder_pos; - nested = presets; - } - } + folder = presets_get_folder(presets, indices, len-1); + if (folder) + ghb_array_replace(folder, indices[len-1], dict); else { - ii = pos; - nested = presets; + g_warning("ghb_presets_replace ()"); + g_warning("internal preset lookup error"); } - if (ii >= 0) - ghb_array_replace(nested, ii, dict); +} + +static void +ghb_presets_insert( + GValue *presets, + GValue *dict, + gint *indices, + gint len) +{ + GValue *folder = NULL; + + folder = presets_get_folder(presets, indices, len-1); + if (folder) + ghb_array_insert(folder, indices[len-1], dict); else { - g_warning("internal preset lookup error (%d/%d)", folder_pos, pos); + g_warning("ghb_presets_insert ()"); + g_warning("internal preset lookup error"); } } static gint -presets_find_pos(GValue *presets, const gchar *name, gint type) +presets_find_element(GValue *presets, const gchar *name) { GValue *dict; - gint count, ii, ptype, last; + gint count, ii; + g_debug("presets_find_element () (%s)", name); if (presets == NULL || name == NULL) return -1; - last = count = ghb_array_len(presets); + count = ghb_array_len(presets); for (ii = 0; ii < count; ii++) { const gchar *str; dict = ghb_array_get_nth(presets, ii); str = preset_get_name(dict); - ptype = ghb_value_int(preset_dict_get_value(dict, "preset_type")); - if (strcasecmp(name, str) <= 0 && ptype == type) + if (strcmp(name, str) == 0) { return ii; } - if (ptype == type) - last = ii+1; } - return last; + return -1; } static gint -presets_find_folder(GValue *presets, const gchar *name) +single_find_pos(GValue *presets, const gchar *name, gint type) { GValue *dict; - gint count, ii, ptype; + gint count, ii, ptype, last; if (presets == NULL || name == NULL) return -1; - count = ghb_array_len(presets); + last = count = ghb_array_len(presets); for (ii = 0; ii < count; ii++) { const gchar *str; dict = ghb_array_get_nth(presets, ii); str = preset_get_name(dict); ptype = ghb_value_int(preset_dict_get_value(dict, "preset_type")); - if ((ptype & PRESETS_FOLDER) && strcasecmp(name, str) == 0) + if (strcasecmp(name, str) <= 0 && ptype == type) { return ii; } + if (ptype == type) + last = ii+1; } - return -1; + return last; } -static gint -presets_find_preset(GValue *presets, const gchar *name) +static gint* +presets_find_pos(const GValue *path, gint type, gint *len) { - GValue *dict; + GValue *nested; + GValue *val; gint count, ii, ptype; - - g_debug("presets_find_preset () (%s)", name); - if (presets == NULL || name == NULL) return -1; - count = ghb_array_len(presets); - for (ii = 0; ii < count; ii++) - { - const gchar *str; - dict = ghb_array_get_nth(presets, ii); - str = preset_get_name(dict); + gint *indices = NULL; + const gchar *name; + GValue *dict; + + g_debug("presets_find_pos () "); + nested = presetsPlist; + count = ghb_array_len(path); + indices = g_malloc(MAX_NESTED_PRESET * sizeof(gint)); + for (ii = 0; ii < count-1; ii++) + { + val = ghb_array_get_nth(path, ii); + name = g_value_get_string(val); + indices[ii] = presets_find_element(nested, name); + if (indices[ii] == -1) return NULL; + dict = ghb_array_get_nth(nested, indices[ii]); ptype = ghb_value_int(preset_dict_get_value(dict, "preset_type")); - if (!(ptype & PRESETS_FOLDER) && strcasecmp(name, str) == 0) - { - return ii; - } + nested = NULL; + if (!(ptype & PRESETS_FOLDER)) + break; + nested = ghb_dict_lookup(dict, "preset_folder"); } - return -1; + if (nested) + { + const gchar *name; + + name = g_value_get_string(ghb_array_get_nth(path, count-1)); + indices[ii] = single_find_pos(nested, name, type); + ii++; + } + *len = ii; + return indices; } -gboolean -ghb_presets_find( - GValue *presets, - const gchar *folder, - const gchar *name, - gint *folder_pos, - gint *pos) +static gint +preset_tree_depth(GValue *dict) { - GValue *nested; + gint ptype; - *pos = -1; - *folder_pos = -1; - g_debug("ghb_presets_find () (%s) (%s)", folder, name); - if (folder == NULL || folder[0] == 0) + ptype = ghb_value_int(preset_dict_get_value(dict, "preset_type")); + if (ptype & PRESETS_FOLDER) { - // name could be a folder or a regular preset - *folder_pos = presets_find_folder(presets, name); - if (*folder_pos < 0) + gint depth = 0; + gint count, ii; + GValue *presets; + + presets = ghb_dict_lookup(dict, "preset_folder"); + count = ghb_array_len(presets); + for (ii = 0; ii < count; ii++) { - *pos = presets_find_preset(presets, name); - if (*pos < 0) - { - g_debug("No presets/folder (%s)", name); - return FALSE; - } + gint tmp; + + dict = ghb_array_get_nth(presets, ii); + tmp = preset_tree_depth(dict); + depth = MAX(depth, tmp); } + return depth + 1; } else { - *folder_pos = presets_find_folder(presets, folder); - if (*folder_pos < 0) + return 1; + } +} + +static gboolean +preset_is_default(GValue *dict) +{ + const GValue *val; + + val = preset_dict_get_value(dict, "Default"); + return g_value_get_boolean(val); +} + +static gint* +presets_find_default2(GValue *presets, gint *len) +{ + gint count, ii; + gint *indices; + + count = ghb_array_len(presets); + for (ii = 0; ii < count; ii++) + { + GValue *dict; + gint ptype; + + dict = ghb_array_get_nth(presets, ii); + ptype = ghb_value_int(preset_dict_get_value(dict, "preset_type")); + if (ptype & PRESETS_FOLDER) { - g_debug("No presets folder (%s)", folder); - return FALSE; + GValue *nested; + gint pos = *len; + + nested = ghb_dict_lookup(dict, "preset_folder"); + (*len)++; + indices = presets_find_default2(nested, len); + if (indices) + { + indices[pos] = ii; + return indices; + } + else + *len = pos; } - nested = ghb_array_get_nth(presets, *folder_pos); - nested = ghb_dict_lookup(nested, "preset_folder"); - if (name != NULL) + else { - *pos = presets_find_preset(nested, name); - if (*pos < 0) + if (preset_is_default(dict)) { - g_debug("No preset (%s/%s)", folder, name); - return FALSE; + indices = malloc(MAX_NESTED_PRESET * sizeof(gint)); + indices[*len] = ii; + (*len)++; + return indices; } } } - return TRUE; + return NULL; } -static GValue* -presets_get_dict(GValue *presets, gint folder_pos, gint pos) +static gint* +presets_find_default(gint *len) +{ + *len = 0; + return presets_find_default2(presetsPlist, len); +} + +gint* +ghb_preset_indices_from_path( + GValue *presets, + const GValue *path, + gint *len) { - g_debug("presets_get_dict () (%d) (%d)", folder_pos, pos); - if (presets == NULL) return NULL; GValue *nested; - gint ii; + GValue *val; + gint count, ii, ptype; + gint *indices = NULL; + const gchar *name; + GValue *dict; - if (folder_pos >= 0) + g_debug("ghb_preset_indices_from_path () "); + nested = presets; + count = ghb_array_len(path); + if (count) + indices = g_malloc(MAX_NESTED_PRESET * sizeof(gint)); + *len = 0; + for (ii = 0; ii < count; ii++) { - if (pos >= 0) + val = ghb_array_get_nth(path, ii); + name = g_value_get_string(val); + indices[ii] = presets_find_element(nested, name); + if (indices[ii] == -1) { - ii = pos; - nested = ghb_array_get_nth(presets, folder_pos); - nested = ghb_dict_lookup(nested, "preset_folder"); + g_free(indices); + return NULL; } - else + if (ii < count-1) { - ii = folder_pos; - nested = presets; + dict = ghb_array_get_nth(nested, indices[ii]); + ptype = ghb_value_int(preset_dict_get_value(dict, "preset_type")); + if (!(ptype & PRESETS_FOLDER)) + { + g_free(indices); + return NULL; + } + nested = ghb_dict_lookup(dict, "preset_folder"); } } - else - { - ii = pos; - nested = presets; - } - if (ii >= 0) - return ghb_array_get_nth(nested, ii); - else - { - g_warning("internal preset lookup error (%d/%d)", folder_pos, pos); - return NULL; - } + *len = ii; + return indices; } static gint ghb_presets_get_type( GValue *presets, - gint folder_pos, - gint pos) + gint *indices, + gint len) { - GValue *nested; GValue *dict; - gint ii; gint flags = 0; - if (folder_pos >= 0) - { - if (pos >= 0) - { - ii = pos; - nested = ghb_array_get_nth(presets, folder_pos); - nested = ghb_dict_lookup(nested, "preset_folder"); - } - else - { - ii = folder_pos; - nested = presets; - } - } - else - { - ii = pos; - nested = presets; - } - if (ii >= 0) + dict = presets_get_dict(presets, indices, len); + if (dict) { - dict = ghb_array_get_nth(nested, ii); flags = ghb_preset_flags(dict); } else { - g_warning("internal preset lookup error (%d/%d)", folder_pos, pos); + g_warning("ghb_presets_get_type ()"); + g_warning("internal preset lookup error"); } return flags; } void -ghb_set_preset_default(GValue *settings) +presets_set_default(gint *indices, gint len) { - gchar *preset, *folder; + GValue *dict; + gint *curr_indices, curr_len; - preset = ghb_settings_get_string (settings, "preset"); - folder = ghb_settings_get_string (settings, "folder"); - ghb_settings_set_string(settings, "default_preset", preset); - ghb_settings_set_string(settings, "default_folder", folder); - ghb_prefs_save(settings); - g_free(preset); - g_free(folder); + g_debug("presets_set_default ()"); + curr_indices = presets_find_default(&curr_len); + if (curr_indices) + { + dict = presets_get_dict(presetsPlist, curr_indices, curr_len); + if (dict) + { + ghb_dict_insert(dict, g_strdup("Default"), + ghb_boolean_value_new(FALSE)); + } + } + dict = presets_get_dict(presetsPlist, indices, len); + if (dict) + { + ghb_dict_insert(dict, g_strdup("Default"), ghb_boolean_value_new(TRUE)); + } + store_plist(presetsPlist, "presets"); } // Used for sorting dictionaries. @@ -409,21 +667,28 @@ preset_dict_get_value(GValue *dict, const gchar *key) const gchar* ghb_presets_get_description(GValue *pdict) { - if (pdict == NULL) return g_strdup(""); - return g_value_get_string( - preset_dict_get_value(pdict, "preset_description")); + const gchar *desc; + + if (pdict == NULL) return NULL; + desc = g_value_get_string( + preset_dict_get_value(pdict, "preset_description")); + if (desc[0] == 0) return NULL; + return desc; } static const GValue* -preset_get_value(const gchar *folder, const gchar *name, const gchar *key) +preset_get_value(const GValue *preset, const gchar *key) { GValue *dict = NULL; - gint folder_pos, pos; + gint *indices, len; - if (ghb_presets_find(presetsPlist, folder, name, &folder_pos, &pos)) + + indices = ghb_preset_indices_from_path(presetsPlist, preset, &len); + if (indices) { - dict = presets_get_dict(presetsPlist, folder_pos, pos); + dict = presets_get_dict(presetsPlist, indices, len); + g_free(indices); } return preset_dict_get_value(dict, key); } @@ -593,53 +858,61 @@ ghb_settings_to_ui(signal_user_data_t *ud, GValue *dict) } void -ghb_set_preset(signal_user_data_t *ud, const gchar *folder, const gchar *name) +ghb_set_preset_from_indices(signal_user_data_t *ud, gint *indices, gint len) { GValue *dict = NULL; - gint folder_pos, pos, ptype; - - g_debug("ghb_set_preset() %s %s\n", folder, name); - if (ghb_presets_find(presetsPlist, folder, name, &folder_pos, &pos)) - dict = presets_get_dict(presetsPlist, folder_pos, pos); + gint fallback[2] = {0, -1}; + if (indices) + dict = presets_get_dict(presetsPlist, indices, len); if (dict == NULL) { - dict = presets_get_first_dict(presetsPlist); - folder = NULL; - if (dict) - name = preset_get_name(dict); - else - name = NULL; - folder = ""; + indices = fallback; + len = 1; + dict = presets_get_dict(presetsPlist, indices, len); } - if (dict == NULL || name == NULL) + if (dict == NULL) { preset_to_ui(ud, NULL); } else { + gint ptype; + GValue *path; + ptype = ghb_value_int(preset_dict_get_value(dict, "preset_type")); if (ptype & PRESETS_FOLDER) preset_to_ui(ud, NULL); else preset_to_ui(ud, dict); - ghb_settings_set_string(ud->settings, "preset", name); - ghb_settings_set_string(ud->settings, "folder", folder); + path = preset_path_from_indices(presetsPlist, indices, len); + ghb_settings_set_value(ud->settings, "preset", path); + ghb_value_free(path); } } void +ghb_set_preset(signal_user_data_t *ud, const GValue *path) +{ + gint *indices, len; + + g_debug("ghb_set_preset()"); + indices = ghb_preset_indices_from_path(presetsPlist, path, &len); + ghb_set_preset_from_indices(ud, indices, len); + if (indices) g_free(indices); +} + +void ghb_update_from_preset( signal_user_data_t *ud, - const gchar *folder, - const gchar *name, + const GValue *preset, const gchar *key) { const GValue *gval; - g_debug("ghb_update_from_preset() %s %s", name, key); - if (name == NULL) return; - gval = preset_get_value(folder, name, key); + g_debug("ghb_update_from_preset() %s", key); + if (preset == NULL) return; + gval = preset_get_value(preset, key); if (gval != NULL) { ghb_ui_update(ud, key, gval); @@ -728,6 +1001,7 @@ ghb_prefs_to_ui(signal_user_data_t *ud) GHashTableIter iter; + g_debug("ghb_prefs_to_ui"); prefs_initializing = TRUE; // Setting a ui widget will cause the corresponding setting @@ -914,7 +1188,7 @@ ghb_prefs_load(signal_user_data_t *ud) GValue *dict, *internal; GHashTableIter iter; gchar *key; - GValue *gval; + GValue *gval, *path; g_debug("ghb_prefs_load"); prefsPlist = load_plist("preferences"); @@ -945,239 +1219,295 @@ ghb_prefs_load(signal_user_data_t *ud) g_strdup("destination_dir"), ghb_value_dup(ghb_string_value(dir))); store_plist(prefsPlist, "preferences"); } + // Read legacy default_preset preference and update accordingly + path = ghb_dict_lookup(dict, "default_preset"); + if (path) + { + gint *indices, len; + + if (G_VALUE_TYPE(path) == G_TYPE_STRING) + { + GValue *str = path; + + path = ghb_array_value_new(1); + ghb_array_append(path, ghb_value_dup(str)); + indices = ghb_preset_indices_from_path(presetsPlist, path, &len); + ghb_value_free(path); + } + else + indices = ghb_preset_indices_from_path(presetsPlist, path, &len); + + if (indices) + { + presets_set_default(indices, len); + g_free(indices); + } + ghb_dict_remove(dict, "default_preset"); + store_plist(prefsPlist, "preferences"); + } +} + +static const gchar* +get_preset_color(gint flags) +{ + const gchar *color; + + if (flags & PRESETS_CUST) + { + color = "DimGray"; + if (flags & PRESETS_FOLDER) + { + color = "black"; + } + } + else + { + color = "blue"; + if (flags & PRESETS_FOLDER) + { + color = "Navy"; + } + } + return color; } void ghb_presets_list_init( signal_user_data_t *ud, - GValue *presets, - const gchar *parent_name, - GtkTreeIter *parent) + gint *indices, + gint len) { GtkTreeView *treeview; - GtkTreeIter iter; + GtkTreeIter iter, titer, *piter; + GtkTreeStore *store; const gchar *preset; - gchar *def_preset, *def_folder; + GtkTreePath *parent_path; const gchar *description; - gint flags, custom; + gint flags; gboolean def; - gint count, ii, ptype; + gint count, ii; GValue *dict; + gint *more_indices; + GValue *presets = NULL; g_debug("ghb_presets_list_init ()"); + more_indices = g_malloc((len+1)*sizeof(gint)); + memcpy(more_indices, indices, len*sizeof(gint)); + presets = presets_get_folder(presetsPlist, indices, len); if (presets == NULL) - presets = presetsPlist; - def_folder = ghb_settings_get_string(ud->settings, "default_folder"); - def_preset = ghb_settings_get_string(ud->settings, "default_preset"); + { + g_warning("Failed to find parent folder when adding child."); + return; + } count = ghb_array_len(presets); treeview = GTK_TREE_VIEW(GHB_WIDGET(ud->builder, "presets_list")); store = GTK_TREE_STORE(gtk_tree_view_get_model(treeview)); - ii = 0; - while (ii < count) + parent_path = ghb_tree_path_new_from_indices(indices, len); + if (parent_path) + { + gtk_tree_model_get_iter(GTK_TREE_MODEL(store), &titer, parent_path); + piter = &titer; + gtk_tree_path_free(parent_path); + } + else + { + piter = NULL; + } + for (ii = 0; ii < count; ii++) { + const gchar *color; + // Additional settings, add row - g_debug("Adding rows"); dict = ghb_array_get_nth(presets, ii); preset = preset_get_name(dict); - def = FALSE; - if (strcmp(preset, def_preset) == 0) - { - if (parent_name && strcmp(parent_name, def_folder) == 0) - def = TRUE; - else if (parent_name == NULL && def_folder[0] == 0) - def = TRUE; - } + more_indices[len] = ii; + def = preset_is_default(dict); description = ghb_presets_get_description(dict); - gtk_tree_store_append(store, &iter, parent); + gtk_tree_store_append(store, &iter, piter); flags = ghb_preset_flags(dict); - custom = flags & PRESETS_CUST; + color = get_preset_color(flags); gtk_tree_store_set(store, &iter, 0, preset, 1, def ? 800 : 400, 2, def ? 2 : 0, - 3, custom ? "black" : "blue", + 3, color, 4, description, -1); - if (def && parent) + if (def && piter) { GtkTreePath *path; + GtkTreeIter ppiter; - path = gtk_tree_model_get_path(GTK_TREE_MODEL(store), parent); + if (gtk_tree_model_iter_parent( + GTK_TREE_MODEL(store), &ppiter, piter)) + { + path = gtk_tree_model_get_path(GTK_TREE_MODEL(store), &ppiter); + gtk_tree_view_expand_row(treeview, path, FALSE); + gtk_tree_path_free(path); + } + path = gtk_tree_model_get_path(GTK_TREE_MODEL(store), piter); gtk_tree_view_expand_row(treeview, path, FALSE); gtk_tree_path_free(path); } - ptype = ghb_value_int(preset_dict_get_value(dict, "preset_type")); - if (ptype & PRESETS_FOLDER) + if (flags & PRESETS_FOLDER) { - GValue *nested; - nested = ghb_dict_lookup(dict, "preset_folder"); - if (nested != NULL) - ghb_presets_list_init(ud, nested, preset, &iter); + ghb_presets_list_init(ud, more_indices, len+1); } - ii++; } - g_free(def_preset); - g_free(def_folder); + g_free(more_indices); } static void presets_list_update_item( signal_user_data_t *ud, - GValue *presets, - GtkTreeIter *iter, - gint folder_pos, - gint pos) + gint *indices, + gint len) { GtkTreeView *treeview; GtkTreeStore *store; - const gchar *preset; - gchar *def_preset, *def_folder; + GtkTreeIter iter; + GtkTreePath *treepath; + const gchar *name; const gchar *description; - gint flags, custom; + gint flags; gboolean def; GValue *dict; - const gchar *parent_name; + const gchar *color; g_debug("presets_list_update_item ()"); - dict = presets_get_dict(presets, folder_pos, pos); + dict = presets_get_dict(presetsPlist, indices, len); if (dict == NULL) return; - def_folder = ghb_settings_get_string(ud->settings, "default_folder"); - def_preset = ghb_settings_get_string(ud->settings, "default_preset"); treeview = GTK_TREE_VIEW(GHB_WIDGET(ud->builder, "presets_list")); store = GTK_TREE_STORE(gtk_tree_view_get_model(treeview)); + treepath = ghb_tree_path_new_from_indices(indices, len); + gtk_tree_model_get_iter(GTK_TREE_MODEL(store), &iter, treepath); // Additional settings, add row - preset = preset_get_name(dict); - if (pos >= 0) - { - GValue *parent_dict; - parent_dict = presets_get_dict(presets, folder_pos, -1); - parent_name = preset_get_name(parent_dict); - } - else - parent_name = NULL; - def = FALSE; - if (strcmp(preset, def_preset) == 0) - { - if (parent_name && strcmp(parent_name, def_folder) == 0) - def = TRUE; - else if (parent_name == NULL && def_folder[0] == 0) - def = TRUE; - } + name = preset_get_name(dict); + def = preset_is_default(dict); description = ghb_presets_get_description(dict); flags = ghb_preset_flags(dict); - custom = flags & PRESETS_CUST; - gtk_tree_store_set(store, iter, 0, preset, + color = get_preset_color(flags); + gtk_tree_store_set(store, &iter, 0, name, 1, def ? 800 : 400, 2, def ? 2 : 0, - 3, custom ? "black" : "blue", + 3, color, 4, description, -1); if (flags & PRESETS_FOLDER) { - presets = ghb_dict_lookup(dict, "preset_folder"); - ghb_presets_list_init(ud, presets, preset, iter); + ghb_presets_list_init(ud, indices, len); } - g_free(def_preset); } static void presets_list_insert( signal_user_data_t *ud, - GValue *presets, - const gchar *parent_name, - GtkTreeIter *parent, - gint pos) + gint *indices, + gint len) { GtkTreeView *treeview; - GtkTreeIter iter; + GtkTreeIter iter, titer, *piter; GtkTreeStore *store; const gchar *preset; - gchar *def_preset, *def_folder; const gchar *description; - gint flags, custom; + gint flags; gboolean def; gint count; + GValue *presets; + GtkTreePath *parent_path; GValue *dict; + const gchar *color; g_debug("presets_list_insert ()"); - count = ghb_array_len(presets); - if (pos >= count) - return; - def_folder = ghb_settings_get_string(ud->settings, "default_folder"); - def_preset = ghb_settings_get_string(ud->settings, "default_preset"); treeview = GTK_TREE_VIEW(GHB_WIDGET(ud->builder, "presets_list")); store = GTK_TREE_STORE(gtk_tree_view_get_model(treeview)); - // Additional settings, add row - dict = ghb_array_get_nth(presets, pos); - preset = preset_get_name(dict); - def = FALSE; - if (strcmp(preset, def_preset) == 0) + presets = presets_get_folder(presetsPlist, indices, len-1); + if (presets == NULL) + { + g_warning("Failed to find parent folder while adding child."); + return; + } + parent_path = ghb_tree_path_new_from_indices(indices, len-1); + if (parent_path) { - if (parent_name && strcmp(parent_name, def_folder) == 0) - def = TRUE; - else if (parent_name == NULL && def_folder[0] == 0) - def = TRUE; + gtk_tree_model_get_iter(GTK_TREE_MODEL(store), &titer, parent_path); + piter = &titer; + gtk_tree_path_free(parent_path); } + else + { + piter = NULL; + } + count = ghb_array_len(presets); + if (indices[len-1] >= count) + return; + // Additional settings, add row + dict = ghb_array_get_nth(presets, indices[len-1]); + preset = preset_get_name(dict); + def = preset_is_default(dict); description = ghb_presets_get_description(dict); - gtk_tree_store_insert(store, &iter, parent, pos); + gtk_tree_store_insert(store, &iter, piter, indices[len-1]); flags = ghb_preset_flags(dict); - custom = flags & PRESETS_CUST; + color = get_preset_color(flags); gtk_tree_store_set(store, &iter, 0, preset, 1, def ? 800 : 400, 2, def ? 2 : 0, - 3, custom ? "black" : "blue", + 3, color, 4, description, -1); if (flags & PRESETS_FOLDER) { - presets = ghb_dict_lookup(dict, "preset_folder"); - ghb_presets_list_init(ud, presets, preset, &iter); + ghb_presets_list_init(ud, indices, len); } - g_free(def_preset); } static void presets_list_remove( signal_user_data_t *ud, - gint folder_pos, - gint pos) + gint *indices, + gint len) { GtkTreeView *treeview; - GtkTreeIter iter, piter; + GtkTreePath *treepath; + GtkTreeIter iter; GtkTreeStore *store; g_debug("presets_list_remove ()"); treeview = GTK_TREE_VIEW(GHB_WIDGET(ud->builder, "presets_list")); store = GTK_TREE_STORE(gtk_tree_view_get_model(treeview)); - if (folder_pos >= 0) + treepath = ghb_tree_path_new_from_indices(indices, len); + if (treepath) { - if (gtk_tree_model_iter_nth_child(GTK_TREE_MODEL(store), &piter, - NULL, folder_pos)) - { - if (pos >= 0) - { - if (gtk_tree_model_iter_nth_child(GTK_TREE_MODEL(store), &iter, - &piter, pos)) - { - gtk_tree_store_remove(store, &iter); - } - } - else - { - gtk_tree_store_remove(store, &piter); - } - } + if (gtk_tree_model_get_iter(GTK_TREE_MODEL(store), &iter, treepath)) + gtk_tree_store_remove(store, &iter); + gtk_tree_path_free(treepath); } - else if (pos >= 0) +} + +static void +remove_std_presets(signal_user_data_t *ud) +{ + gint count, ii; + gint indices = 0; + + count = ghb_array_len(presetsPlist); + for (ii = count-1; ii >= 0; ii--) { - if (gtk_tree_model_iter_nth_child(GTK_TREE_MODEL(store), &iter, - NULL, pos)) + GValue *dict; + gint ptype; + + dict = ghb_array_get_nth(presetsPlist, ii); + ptype = ghb_value_int(preset_dict_get_value(dict, "preset_type")); + if (!(ptype & PRESETS_CUST)) { - gtk_tree_store_remove(store, &iter); + if (ghb_presets_remove(presetsPlist, &indices, 1)) + { + presets_list_remove(ud, &indices, 1); + } } } } @@ -1192,39 +1522,30 @@ ghb_presets_reload(signal_user_data_t *ud) std_presets = ghb_resource_get("standard-presets"); if (std_presets == NULL) return; + remove_std_presets(ud); // Merge the keyfile contents into our presets count = ghb_array_len(std_presets); - for (ii = 0; ii < count; ii++) + for (ii = count-1; ii >= 0; ii--) { - const gchar *name; GValue *std_dict; GValue *copy_dict; GHashTableIter iter; gchar *key; GValue *value; - gint folder_pos, pos; + gint indices = 0; std_dict = ghb_array_get_nth(std_presets, ii); - name = preset_get_name(std_dict); - if (ghb_presets_find(presetsPlist, NULL, name, &folder_pos, &pos)) - { - if (ghb_presets_remove(presetsPlist, folder_pos, pos)) - { - presets_list_remove(ud, folder_pos, pos); - } - } copy_dict = ghb_dict_value_new(); - pos = presets_find_pos(presetsPlist, name, 0); - ghb_array_insert(presetsPlist, pos, copy_dict); + ghb_presets_insert(presetsPlist, copy_dict, &indices, 1); ghb_dict_iter_init(&iter, std_dict); - // middle (void*) cast prevents gcc warning "defreferencing type-punned - // pointer will break strict-aliasing rules" + // middle (void*) cast prevents gcc warning "defreferencing + // type-punned pointer will break strict-aliasing rules" while (g_hash_table_iter_next( - &iter, (gpointer*)(void*)&key, (gpointer*)(void*)&value)) + &iter, (gpointer*)(void*)&key, (gpointer*)(void*)&value)) { ghb_dict_insert(copy_dict, g_strdup(key), ghb_value_dup(value)); } - presets_list_insert(ud, presetsPlist, NULL, NULL, pos); + presets_list_insert(ud, &indices, 1); } store_plist(presetsPlist, "presets"); } @@ -1294,16 +1615,56 @@ ghb_presets_load() } static void -settings_save(signal_user_data_t *ud, const gchar *folder, const gchar *name) +settings_save(signal_user_data_t *ud, const GValue *path) { GValue *dict, *internal; GHashTableIter iter; gchar *key; GValue *value; gboolean autoscale; - gint folder_pos, pos; + gint *indices, len, count; + const gchar *name; + gboolean replace = FALSE; + g_debug("settings_save"); if (internalPlist == NULL) return; + count = ghb_array_len(path); + name = g_value_get_string(ghb_array_get_nth(path, count-1)); + indices = ghb_preset_indices_from_path(presetsPlist, path, &len); + if (indices) + { + if (ghb_presets_get_type(presetsPlist, indices, len) & + PRESETS_FOLDER) + { + gchar *message; + message = g_strdup_printf( + "%s: Folder already exists.\n" + "You can not replace it with a preset.", + name); + ghb_message_dialog(GTK_MESSAGE_ERROR, message, "Cancel", NULL); + g_free(message); + return; + } + dict = ghb_dict_value_new(); + ghb_presets_replace(presetsPlist, dict, indices, len); + replace = TRUE; + } + else + { + indices = presets_find_pos(path, PRESETS_CUST, &len); + if (indices) + { + dict = ghb_dict_value_new(); + ghb_presets_insert(presetsPlist, dict, indices, len); + } + else + { + g_warning("failed to find insert path"); + return; + } + } + ghb_dict_insert(dict, g_strdup("preset_name"), ghb_string_value_new(name)); + if (ghb_settings_get_boolean(ud->settings, "allow_tweaks")) { gchar *str; @@ -1323,31 +1684,6 @@ settings_save(signal_user_data_t *ud, const gchar *folder, const gchar *name) autoscale = ghb_settings_get_boolean(ud->settings, "autoscale"); ghb_settings_set_int64(ud->settings, "preset_type", PRESETS_CUST); - dict = ghb_dict_value_new(); - if (ghb_presets_find(presetsPlist, folder, name, &folder_pos, &pos)) - { - if (ghb_presets_get_type(presetsPlist, folder_pos, pos) & - PRESETS_FOLDER) - { - gchar *message; - message = g_strdup_printf( - "%s: Folder already exists.\n" - "You can not replace it with a preset.", - name); - ghb_message_dialog(GTK_MESSAGE_ERROR, message, "Cancel", NULL); - g_free(message); - return; - } - ghb_presets_replace(presetsPlist, dict, folder_pos, pos); - pos = -1; - } - else - { - pos = presets_find_pos(presetsPlist, name, 1); - ghb_array_insert(presetsPlist, pos, dict); - } - ghb_dict_insert(dict, g_strdup("preset_name"), ghb_string_value_new(name)); - internal = plist_get_dict(internalPlist, "Presets"); ghb_dict_iter_init(&iter, internal); // middle (void*) cast prevents gcc warning "defreferencing type-punned @@ -1382,25 +1718,35 @@ settings_save(signal_user_data_t *ud, const gchar *folder, const gchar *name) ghb_dict_insert(dict, g_strdup(key), ghb_value_dup(gval)); } } - if (pos >= 0) - presets_list_insert(ud, presetsPlist, NULL, NULL, pos); + if (replace) + presets_list_update_item(ud, indices, len); + else + { + ghb_dict_insert(dict, g_strdup("Default"), + ghb_boolean_value_new(FALSE)); + presets_list_insert(ud, indices, len); + } + g_free(indices); store_plist(presetsPlist, "presets"); ud->dont_clear_presets = TRUE; - ghb_set_preset (ud, NULL, name); + ghb_set_preset(ud, path); ud->dont_clear_presets = FALSE; return; } static void -folder_save(signal_user_data_t *ud, const gchar *name) +folder_save(signal_user_data_t *ud, const GValue *path) { GValue *dict, *folder; - gint folder_pos, pos; + gint *indices, len, count; + const gchar *name; - - if (ghb_presets_find(presetsPlist, name, NULL, &folder_pos, &pos)) + count = ghb_array_len(path); + name = g_value_get_string(ghb_array_get_nth(path, count-1)); + indices = ghb_preset_indices_from_path(presetsPlist, path, &len); + if (indices) { - if (!(ghb_presets_get_type(presetsPlist, folder_pos, pos) & + if (!(ghb_presets_get_type(presetsPlist, indices, len) & PRESETS_FOLDER)) { gchar *message; @@ -1410,20 +1756,30 @@ folder_save(signal_user_data_t *ud, const gchar *name) name); ghb_message_dialog(GTK_MESSAGE_ERROR, message, "Cancel", NULL); g_free(message); + g_free(indices); return; } // Already exists, update its description - dict = presets_get_dict(presetsPlist, folder_pos, pos); + dict = presets_get_dict(presetsPlist, indices, len); ghb_dict_insert(dict, g_strdup("preset_description"), ghb_value_dup(preset_dict_get_value( ud->settings, "preset_description"))); + g_free(indices); return; } else { - dict = ghb_dict_value_new(); - pos = presets_find_pos(presetsPlist, name, 1); - ghb_array_insert(presetsPlist, pos, dict); + indices = presets_find_pos(path, PRESETS_CUST, &len); + if (indices) + { + dict = ghb_dict_value_new(); + ghb_presets_insert(presetsPlist, dict, indices, len); + } + else + { + g_warning("failed to find insert path"); + return; + } } ghb_dict_insert(dict, g_strdup("preset_description"), ghb_value_dup(preset_dict_get_value( @@ -1434,10 +1790,11 @@ folder_save(signal_user_data_t *ud, const gchar *name) ghb_dict_insert(dict, g_strdup("preset_type"), ghb_int64_value_new(PRESETS_FOLDER|PRESETS_CUST)); - presets_list_insert(ud, presetsPlist, NULL, NULL, pos); + presets_list_insert(ud, indices, len); + g_free(indices); store_plist(presetsPlist, "presets"); ud->dont_clear_presets = TRUE; - ghb_set_preset (ud, NULL, name); + ghb_set_preset(ud, path); ud->dont_clear_presets = FALSE; return; } @@ -1446,129 +1803,65 @@ void ghb_presets_list_default(signal_user_data_t *ud) { GtkTreeView *treeview; - GtkTreeIter iter, citer; + GtkTreePath *treepath; + GtkTreeIter iter; GtkTreeStore *store; - gboolean done; - gchar *preset; - gchar *def_preset, *def_folder; - gint def, weight; + gint *indices, len; g_debug("ghb_presets_list_default ()"); - def_folder = ghb_settings_get_string(ud->settings, "default_folder"); - def_preset = ghb_settings_get_string(ud->settings, "default_preset"); treeview = GTK_TREE_VIEW(GHB_WIDGET(ud->builder, "presets_list")); store = GTK_TREE_STORE(gtk_tree_view_get_model(treeview)); - if (gtk_tree_model_get_iter_first(GTK_TREE_MODEL(store), &iter)) + indices = presets_find_default(&len); + if (indices == NULL) return; + treepath = ghb_tree_path_new_from_indices(indices, len); + if (treepath) { - if (def_folder[0] != 0) + if (gtk_tree_model_get_iter(GTK_TREE_MODEL(store), &iter, treepath)) { - gboolean found = FALSE; - do - { - gtk_tree_model_get(GTK_TREE_MODEL(store), &iter, - 0, &preset, 1, &weight, -1); - if (strcmp(preset, def_folder) == 0) - { - if (gtk_tree_model_iter_children( - GTK_TREE_MODEL(store), &citer, &iter)) - { - iter = citer; - found = TRUE; - } - g_free(preset); - break; - } - g_free(preset); - done = !gtk_tree_model_iter_next(GTK_TREE_MODEL(store), &iter); - } while (!done); - if (!found) return; + gtk_tree_store_set(store, &iter, + 1, 800, + 2, 2 , + -1); } - do - { - def = FALSE; - gtk_tree_model_get(GTK_TREE_MODEL(store), &iter, - 0, &preset, 1, &weight, -1); - if (strcmp(preset, def_preset) == 0) - def = TRUE; - if ((!def && weight == 800) || def) - { - gtk_tree_store_set(store, &iter, - 1, def ? 800 : 400, - 2, def ? 2 : 0, - -1); - } - g_free(preset); - done = !gtk_tree_model_iter_next(GTK_TREE_MODEL(store), &iter); - } while (!done); + gtk_tree_path_free(treepath); } - g_free(def_folder); - g_free(def_preset); + g_free(indices); } void ghb_presets_list_clear_default(signal_user_data_t *ud) { GtkTreeView *treeview; - GtkTreeIter iter, piter; + GtkTreePath *treepath; + GtkTreeIter iter; GtkTreeStore *store; - gchar *def_preset, *def_folder; - gint folder_pos, pos; - gboolean found = FALSE; + gint *indices, len; - g_debug("ghb_presets_list_default ()"); - def_folder = ghb_settings_get_string(ud->settings, "default_folder"); - def_preset = ghb_settings_get_string(ud->settings, "default_preset"); + g_debug("ghb_presets_list_clear_default ()"); treeview = GTK_TREE_VIEW(GHB_WIDGET(ud->builder, "presets_list")); store = GTK_TREE_STORE(gtk_tree_view_get_model(treeview)); - if (!ghb_presets_find(presetsPlist, def_folder, def_preset, - &folder_pos, &pos)) - { - return; - } - // de-emphasize the current default - if (folder_pos >= 0) - { - if (gtk_tree_model_iter_nth_child(GTK_TREE_MODEL(store), &piter, - NULL, folder_pos)) - { - if (pos >= 0) - { - if (gtk_tree_model_iter_nth_child(GTK_TREE_MODEL(store), &iter, - &piter, pos)) - { - found = TRUE; - } - } - else - { - found = TRUE; - } - } - } - else if (pos >= 0) + indices = presets_find_default(&len); + if (indices == NULL) return; + treepath = ghb_tree_path_new_from_indices(indices, len); + if (treepath) { - if (gtk_tree_model_iter_nth_child(GTK_TREE_MODEL(store), &iter, - NULL, pos)) + if (gtk_tree_model_get_iter(GTK_TREE_MODEL(store), &iter, treepath)) { - found = TRUE; + gtk_tree_store_set(store, &iter, + 1, 400, + 2, 0 , + -1); } + gtk_tree_path_free(treepath); } - if (found) - { - gtk_tree_store_set(store, &iter, - 1, 400, - 2, 0, - -1); - } - g_free(def_folder); - g_free(def_preset); + g_free(indices); } static void ghb_select_preset2( GtkBuilder *builder, - gint folder_pos, - gint pos) + gint *indices, + gint len) { GtkTreeView *treeview; GtkTreeSelection *selection; @@ -1576,37 +1869,51 @@ ghb_select_preset2( GtkTreeIter iter; GtkTreePath *path; - g_debug("ghb_select_preset2() (%d) (%d)", folder_pos, pos); + g_debug("ghb_select_preset2()"); treeview = GTK_TREE_VIEW(GHB_WIDGET(builder, "presets_list")); selection = gtk_tree_view_get_selection (treeview); store = gtk_tree_view_get_model (treeview); - if (folder_pos == -1) - { - folder_pos = pos; - pos = -1; - } - path = gtk_tree_path_new_from_indices(folder_pos, pos, -1); - if (gtk_tree_model_get_iter(store, &iter, path)) + path = ghb_tree_path_new_from_indices(indices, len); + if (path) { - gtk_tree_selection_select_iter (selection, &iter); + if (gtk_tree_model_get_iter(store, &iter, path)) + { + gtk_tree_selection_select_iter (selection, &iter); + } + else + { + if (gtk_tree_model_get_iter_first(store, &iter)) + gtk_tree_selection_select_iter (selection, &iter); + } + gtk_tree_path_free(path); } - else +} + +void +ghb_select_preset(GtkBuilder *builder, const GValue *path) +{ + gint *indices, len; + + g_debug("ghb_select_preset()"); + indices = ghb_preset_indices_from_path(presetsPlist, path, &len); + if (indices) { - gtk_tree_model_get_iter_first(store, &iter); - gtk_tree_selection_select_iter (selection, &iter); + ghb_select_preset2(builder, indices, len); + g_free(indices); } - gtk_tree_path_free(path); } void -ghb_select_preset(GtkBuilder *builder, const gchar *folder, const gchar *preset) +ghb_select_default_preset(GtkBuilder *builder) { - gint folder_pos, pos; + gint *indices, len; - g_debug("ghb_select_preset() (%s) (%s)", folder, preset); - if (ghb_presets_find(presetsPlist, folder, preset, &folder_pos, &pos)) + g_debug("ghb_select_default_preset()"); + indices = presets_find_default(&len); + if (indices) { - ghb_select_preset2(builder, folder_pos, pos); + ghb_select_preset2(builder, indices, len); + g_free(indices); } } @@ -1621,17 +1928,18 @@ update_audio_presets(signal_user_data_t *ud) } void -enforce_preset_type(const gchar *name, signal_user_data_t *ud) +enforce_preset_type(signal_user_data_t *ud, const GValue *path) { - gint folder_pos, pos; + gint *indices, len; GtkWidget *normal, *folder; gint ptype; normal = GHB_WIDGET(ud->builder, "preset_type_normal"); folder = GHB_WIDGET(ud->builder, "preset_type_folder"); - if (ghb_presets_find(presetsPlist, NULL, name, &folder_pos, &pos)) + indices = ghb_preset_indices_from_path(presetsPlist, path, &len); + if (indices) { - ptype = ghb_presets_get_type(presetsPlist, folder_pos, pos); + ptype = ghb_presets_get_type(presetsPlist, indices, len); if (ptype & PRESETS_FOLDER) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(folder), TRUE); @@ -1640,6 +1948,7 @@ enforce_preset_type(const gchar *name, signal_user_data_t *ud) TRUE); gtk_widget_set_sensitive(folder, ptype & PRESETS_FOLDER); gtk_widget_set_sensitive(normal, !(ptype & PRESETS_FOLDER)); + g_free(indices); } else { @@ -1655,37 +1964,67 @@ presets_save_clicked_cb(GtkWidget *xwidget, signal_user_data_t *ud) GtkEntry *entry; GtkTextView *desc; GtkResponseType response; - gchar *preset; + GValue *preset; + const gchar *name = ""; + gint count, *indices, len; g_debug("presets_save_clicked_cb ()"); - preset = ghb_settings_get_string (ud->settings, "preset"); + preset = ghb_settings_get_value (ud->settings, "preset_selection"); + + count = ghb_array_len(preset); + if (count > 0) + name = g_value_get_string(ghb_array_get_nth(preset, count-1)); + else + count = 1; // Clear the description desc = GTK_TEXT_VIEW(GHB_WIDGET(ud->builder, "preset_description")); dialog = GHB_WIDGET(ud->builder, "preset_save_dialog"); entry = GTK_ENTRY(GHB_WIDGET(ud->builder, "preset_name")); - gtk_entry_set_text(entry, preset); - enforce_preset_type(preset, ud); - g_free(preset); + gtk_entry_set_text(entry, name); + enforce_preset_type(ud, preset); response = gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_hide(dialog); if (response == GTK_RESPONSE_OK) { // save the preset const gchar *name = gtk_entry_get_text(entry); - g_debug("description to settings"); + GValue *dest; + + if (ghb_settings_get_boolean(ud->settings, "preset_type_folder")) + { + if (count > MAX_NESTED_PRESET-1) + { + count = MAX_NESTED_PRESET-1; + } + } + dest = ghb_array_value_new(MAX_NESTED_PRESET); + indices = ghb_preset_indices_from_path(presetsPlist, preset, &len); + if (indices) + { + gint ptype; + + ptype = ghb_presets_get_type(presetsPlist, indices, len); + if (ptype & PRESETS_CUST) + { + ghb_array_copy(dest, preset, count-1); + } + } + ghb_array_append(dest, ghb_string_value_new(name)); + ghb_widget_to_setting(ud->settings, GTK_WIDGET(desc)); if (ghb_settings_get_boolean(ud->settings, "preset_type_folder")) { - folder_save(ud, name); + folder_save(ud, dest); } else { // Construct the audio settings presets from the current audio list update_audio_presets(ud); - settings_save(ud, NULL, name); + settings_save(ud, dest); } // Make the new preset the selected item - ghb_select_preset(ud->builder, NULL, name); + ghb_select_preset(ud->builder, dest); + ghb_value_free(dest); } } @@ -1699,23 +2038,30 @@ void preset_name_changed_cb(GtkWidget *entry, signal_user_data_t *ud) { gchar *name; + GValue *preset, *dest; + gint count; + preset = ghb_settings_get_value (ud->settings, "preset_selection"); name = ghb_widget_string(entry); - enforce_preset_type(name, ud); + dest = ghb_value_dup(preset); + count = ghb_array_len(dest); + ghb_array_replace(dest, count-1, ghb_string_value_new(name)); + enforce_preset_type(ud, dest); + ghb_value_free(dest); } void presets_restore_clicked_cb(GtkWidget *xwidget, signal_user_data_t *ud) { + GValue *preset; + g_debug("presets_restore_clicked_cb ()"); // Reload only the standard presets ghb_presets_reload(ud); // Updating the presets list shuffles things around // need to make sure the proper preset is selected - gchar *folder = ghb_settings_get_string (ud->settings, "folder"); - gchar *preset = ghb_settings_get_string (ud->settings, "preset"); - ghb_select_preset(ud->builder, folder, preset); - g_free(preset); + preset = ghb_settings_get_value (ud->settings, "preset"); + ghb_select_preset(ud->builder, preset); } void @@ -1735,18 +2081,15 @@ presets_remove_clicked_cb(GtkWidget *xwidget, signal_user_data_t *ud) { GtkWidget *dialog; GtkTreePath *path; - gint *indices; - gint folder_pos, pos, ptype; + gint *indices, len; + gint ptype; gtk_tree_model_get(store, &iter, 0, &preset, -1); path = gtk_tree_model_get_path(store, &iter); indices = gtk_tree_path_get_indices(path); - folder_pos = indices[0]; - pos = -1; - if (gtk_tree_path_get_depth(path) > 1) - pos = indices[1]; - gtk_tree_path_free(path); - ptype = ghb_presets_get_type(presetsPlist, folder_pos, pos); + len = gtk_tree_path_get_depth(path); + + ptype = ghb_presets_get_type(presetsPlist, indices, len); dialog = gtk_message_dialog_new(NULL, GTK_DIALOG_MODAL, GTK_MESSAGE_QUESTION, GTK_BUTTONS_YES_NO, "Confirm deletion of %s:\n\n%s", @@ -1768,26 +2111,24 @@ presets_remove_clicked_cb(GtkWidget *xwidget, signal_user_data_t *ud) // Remove the selected item // First unselect it so that selecting the new item works properly gtk_tree_selection_unselect_iter (selection, &iter); - if (ghb_presets_remove(presetsPlist, folder_pos, pos)) + if (ghb_presets_remove(presetsPlist, indices, len)) { store_plist(presetsPlist, "presets"); - presets_list_remove(ud, folder_pos, pos); + presets_list_remove(ud, indices, len); } if (!valid) valid = gtk_tree_model_get_iter_first(store, &nextIter); if (valid) { + gtk_tree_path_free(path); path = gtk_tree_model_get_path(store, &nextIter); indices = gtk_tree_path_get_indices(path); - folder_pos = indices[0]; - pos = -1; - if (gtk_tree_path_get_depth(path) > 1) - pos = indices[1]; - gtk_tree_path_free(path); - ghb_select_preset2(ud->builder, folder_pos, pos); + len = gtk_tree_path_get_depth(path); + ghb_select_preset2(ud->builder, indices, len); } } g_free(preset); + gtk_tree_path_free(path); } } @@ -1803,12 +2144,14 @@ presets_drag_motion_cb( { GtkTreePath *path = NULL; GtkTreeViewDropPosition drop_pos; - gint *indices, folder_pos, pos; + gint *indices, len; GtkTreeIter iter; GtkTreeView *srctv; GtkTreeModel *model; GtkTreeSelection *select; gint src_ptype, dst_ptype; + GValue *preset; + gint tree_depth, ii; // Get the type of the object being dragged srctv = GTK_TREE_VIEW(gtk_drag_get_source_widget(ctx)); @@ -1816,41 +2159,62 @@ presets_drag_motion_cb( gtk_tree_selection_get_selected (select, &model, &iter); path = gtk_tree_model_get_path (model, &iter); indices = gtk_tree_path_get_indices(path); - folder_pos = indices[0]; - pos = -1; - if (gtk_tree_path_get_depth(path) > 1) - pos = indices[1]; + len = gtk_tree_path_get_depth(path); + + preset = presets_get_dict(presetsPlist, indices, len); + tree_depth = preset_tree_depth(preset); + + src_ptype = ghb_presets_get_type(presetsPlist, indices, len); gtk_tree_path_free(path); - src_ptype = ghb_presets_get_type(presetsPlist, folder_pos, pos); + + if ((src_ptype & PRESETS_FOLDER) && tree_depth == 1) + tree_depth = 2; // The rest checks that the destination is a valid position // in the list. gtk_tree_view_get_dest_row_at_pos (tv, x, y, &path, &drop_pos); if (path == NULL) { - gdk_drag_status(ctx, GDK_ACTION_MOVE, time); + gdk_drag_status(ctx, 0, time); return TRUE; } - indices = gtk_tree_path_get_indices(path); - folder_pos = indices[0]; - pos = -1; - if (gtk_tree_path_get_depth(path) > 1) - pos = indices[1]; - dst_ptype = ghb_presets_get_type(presetsPlist, folder_pos, pos); - - // Don't allow *drop into* if the source is a folder - if (((src_ptype & PRESETS_FOLDER) || (!(dst_ptype & PRESETS_FOLDER))) && - drop_pos == GTK_TREE_VIEW_DROP_INTO_OR_BEFORE) - drop_pos = GTK_TREE_VIEW_DROP_BEFORE; - if (((src_ptype & PRESETS_FOLDER) || (!(dst_ptype & PRESETS_FOLDER))) && - drop_pos == GTK_TREE_VIEW_DROP_INTO_OR_AFTER) - drop_pos = GTK_TREE_VIEW_DROP_AFTER; - // Don't allow droping folders into child items - if ((src_ptype & PRESETS_FOLDER) && gtk_tree_path_get_depth(path) > 1) + // Don't allow repositioning of builtin presets + if (!(src_ptype & PRESETS_CUST)) { + gdk_drag_status(ctx, 0, time); + return TRUE; + } + + len = gtk_tree_path_get_depth(path); + if (len+tree_depth-1 >= MAX_NESTED_PRESET) + { + if (drop_pos == GTK_TREE_VIEW_DROP_INTO_OR_BEFORE) + drop_pos = GTK_TREE_VIEW_DROP_BEFORE; + if (drop_pos == GTK_TREE_VIEW_DROP_INTO_OR_AFTER) + drop_pos = GTK_TREE_VIEW_DROP_AFTER; + } + for (ii = len+tree_depth-1; ii > MAX_NESTED_PRESET; ii--) gtk_tree_path_up(path); - drop_pos = GTK_TREE_VIEW_DROP_AFTER; + indices = gtk_tree_path_get_indices(path); + len = gtk_tree_path_get_depth(path); + dst_ptype = ghb_presets_get_type(presetsPlist, indices, len); + // Don't allow mixing custom presets in the builtins + if (!(dst_ptype & PRESETS_CUST)) + { + gdk_drag_status(ctx, 0, time); + return TRUE; + } + + // Only allow *drop into* for folders + if (!(dst_ptype & PRESETS_FOLDER)) + { + if (drop_pos == GTK_TREE_VIEW_DROP_INTO_OR_BEFORE) + drop_pos = GTK_TREE_VIEW_DROP_BEFORE; + if (drop_pos == GTK_TREE_VIEW_DROP_INTO_OR_AFTER) + drop_pos = GTK_TREE_VIEW_DROP_AFTER; } + + len = gtk_tree_path_get_depth(path); gtk_tree_view_set_drag_dest_row(tv, path, drop_pos); gtk_tree_path_free(path); gdk_drag_status(ctx, GDK_ACTION_MOVE, time); @@ -1869,8 +2233,7 @@ presets_drag_cb( GtkTreePath *path = NULL; GtkTreeViewDropPosition drop_pos; GtkTreeIter dstiter, srciter; - gint *indices; - gint dst_folder_pos, dst_pos, src_folder_pos, src_pos; + gint *dst_indices, dst_len, *src_indices, src_len; gint src_ptype, dst_ptype; GtkTreeModel *dstmodel = gtk_tree_view_get_model(dstwidget); @@ -1903,126 +2266,102 @@ presets_drag_cb( GtkTreeModel *srcmodel; GtkTreeSelection *select; GtkTreePath *srcpath = NULL; - GValue *dict, *presets; GValue *preset; + gint tree_depth, ii; srcwidget = GTK_TREE_VIEW(gtk_drag_get_source_widget(dc)); select = gtk_tree_view_get_selection (srcwidget); gtk_tree_selection_get_selected (select, &srcmodel, &srciter); srcpath = gtk_tree_model_get_path (srcmodel, &srciter); - indices = gtk_tree_path_get_indices(srcpath); - src_folder_pos = indices[0]; - src_pos = -1; - if (gtk_tree_path_get_depth(srcpath) > 1) - src_pos = indices[1]; - src_ptype = ghb_presets_get_type(presetsPlist, src_folder_pos, src_pos); - preset = presets_get_dict(presetsPlist, src_folder_pos, src_pos); + src_indices = gtk_tree_path_get_indices(srcpath); + src_len = gtk_tree_path_get_depth(srcpath); + src_ptype = ghb_presets_get_type(presetsPlist, src_indices, src_len); + preset = ghb_value_dup( + presets_get_dict(presetsPlist, src_indices, src_len)); gtk_tree_path_free(srcpath); - indices = gtk_tree_path_get_indices(path); - dst_folder_pos = indices[0]; - dst_pos = -1; - if (gtk_tree_path_get_depth(path) > 1) - dst_pos = indices[1]; - dst_ptype = ghb_presets_get_type(presetsPlist, dst_folder_pos, dst_pos); + // Don't allow repositioning of builtin presets + if (!(src_ptype & PRESETS_CUST)) + return; - if ((src_ptype & PRESETS_FOLDER) && gtk_tree_path_get_depth(path) > 1) - gtk_tree_path_up(path); + tree_depth = preset_tree_depth(preset); + if ((src_ptype & PRESETS_FOLDER) && tree_depth == 1) + tree_depth = 2; + dst_len = gtk_tree_path_get_depth(path); + if (dst_len+tree_depth-1 >= MAX_NESTED_PRESET) + { + if (drop_pos == GTK_TREE_VIEW_DROP_INTO_OR_BEFORE) + drop_pos = GTK_TREE_VIEW_DROP_BEFORE; + if (drop_pos == GTK_TREE_VIEW_DROP_INTO_OR_AFTER) + drop_pos = GTK_TREE_VIEW_DROP_AFTER; + } + + for (ii = dst_len+tree_depth-1; ii > MAX_NESTED_PRESET; ii--) + gtk_tree_path_up(path); + dst_indices = gtk_tree_path_get_indices(path); + dst_len = gtk_tree_path_get_depth(path); + dst_ptype = ghb_presets_get_type(presetsPlist, dst_indices, dst_len); + // Only allow *drop into* for folders + if (!(dst_ptype & PRESETS_FOLDER)) + { + if (drop_pos == GTK_TREE_VIEW_DROP_INTO_OR_BEFORE) + drop_pos = GTK_TREE_VIEW_DROP_BEFORE; + if (drop_pos == GTK_TREE_VIEW_DROP_INTO_OR_AFTER) + drop_pos = GTK_TREE_VIEW_DROP_AFTER; + } if (gtk_tree_model_get_iter (dstmodel, &dstiter, path)) { GtkTreeIter iter; GtkTreePath *dstpath = NULL; - if ((src_ptype & PRESETS_FOLDER) || - gtk_tree_path_get_depth(path) > 1) - { - switch (drop_pos) - { - case GTK_TREE_VIEW_DROP_BEFORE: - case GTK_TREE_VIEW_DROP_INTO_OR_BEFORE: - gtk_tree_store_insert_before(GTK_TREE_STORE (dstmodel), - &iter, NULL, &dstiter); - break; - - case GTK_TREE_VIEW_DROP_AFTER: - case GTK_TREE_VIEW_DROP_INTO_OR_AFTER: - gtk_tree_store_insert_after(GTK_TREE_STORE (dstmodel), - &iter, NULL, &dstiter); - break; - - default: - break; - } - } - else + switch (drop_pos) { - switch (drop_pos) - { - case GTK_TREE_VIEW_DROP_BEFORE: - gtk_tree_store_insert_before(GTK_TREE_STORE (dstmodel), - &iter, NULL, &dstiter); - break; - - case GTK_TREE_VIEW_DROP_INTO_OR_BEFORE: - gtk_tree_store_insert(GTK_TREE_STORE (dstmodel), - &iter, &dstiter, 0); - break; - - case GTK_TREE_VIEW_DROP_AFTER: - gtk_tree_store_insert_after(GTK_TREE_STORE (dstmodel), - &iter, NULL, &dstiter); - break; - - case GTK_TREE_VIEW_DROP_INTO_OR_AFTER: - gtk_tree_store_insert_after(GTK_TREE_STORE (dstmodel), - &iter, &dstiter, 0); - break; - - default: - break; - } + case GTK_TREE_VIEW_DROP_BEFORE: + gtk_tree_store_insert_before(GTK_TREE_STORE (dstmodel), + &iter, NULL, &dstiter); + break; + + case GTK_TREE_VIEW_DROP_INTO_OR_BEFORE: + gtk_tree_store_insert(GTK_TREE_STORE (dstmodel), + &iter, &dstiter, 0); + break; + + case GTK_TREE_VIEW_DROP_AFTER: + gtk_tree_store_insert_after(GTK_TREE_STORE (dstmodel), + &iter, NULL, &dstiter); + break; + + case GTK_TREE_VIEW_DROP_INTO_OR_AFTER: + gtk_tree_store_insert_after(GTK_TREE_STORE (dstmodel), + &iter, &dstiter, 0); + break; + + default: + break; } - presets_list_update_item(ud, presetsPlist, &iter, - src_folder_pos, src_pos); dstpath = gtk_tree_model_get_path (dstmodel, &iter); - indices = gtk_tree_path_get_indices(dstpath); - dst_folder_pos = indices[0]; - dst_pos = -1; - if (gtk_tree_path_get_depth(dstpath) > 1) - dst_pos = indices[1]; + dst_indices = gtk_tree_path_get_indices(dstpath); + dst_len = gtk_tree_path_get_depth(dstpath); + ghb_presets_insert(presetsPlist, preset, dst_indices, dst_len); gtk_tree_path_free(dstpath); - if (dst_pos != -1) - { - dict = presets_get_dict(presetsPlist, dst_folder_pos, -1); - presets = ghb_dict_lookup(dict, "preset_folder"); - ghb_array_insert(presets, dst_pos, preset); - } - else - { - ghb_array_insert(presetsPlist, dst_folder_pos, preset); - } srcpath = gtk_tree_model_get_path (srcmodel, &srciter); - indices = gtk_tree_path_get_indices(srcpath); - src_folder_pos = indices[0]; - src_pos = -1; - if (gtk_tree_path_get_depth(srcpath) > 1) - src_pos = indices[1]; + src_indices = gtk_tree_path_get_indices(srcpath); + src_len = gtk_tree_path_get_depth(srcpath); + ghb_presets_remove(presetsPlist, src_indices, src_len); gtk_tree_path_free(srcpath); - if (src_pos != -1) - { - dict = presets_get_dict(presetsPlist, src_folder_pos, -1); - presets = ghb_dict_lookup(dict, "preset_folder"); - ghb_array_remove(presets, src_pos); - } - else - { - ghb_array_remove(presetsPlist, src_folder_pos); - } + gtk_tree_store_remove (GTK_TREE_STORE (srcmodel), &srciter); + + dstpath = gtk_tree_model_get_path (dstmodel, &iter); + dst_indices = gtk_tree_path_get_indices(dstpath); + dst_len = gtk_tree_path_get_depth(dstpath); + presets_list_update_item(ud, dst_indices, dst_len); + gtk_tree_path_free(dstpath); + store_plist(presetsPlist, "presets"); } gtk_tree_path_free(path); @@ -2066,15 +2405,20 @@ preset_update_title_deps(signal_user_data_t *ud, ghb_title_info_t *tinfo) ghb_ui_update(ud, "crop_left", ghb_int64_value(tinfo->crop[2])); ghb_ui_update(ud, "crop_right", ghb_int64_value(tinfo->crop[3])); } + else + { + ghb_ui_update(ud, "crop_top", ghb_int64_value(0)); + ghb_ui_update(ud, "crop_bottom", ghb_int64_value(0)); + ghb_ui_update(ud, "crop_left", ghb_int64_value(0)); + ghb_ui_update(ud, "crop_right", ghb_int64_value(0)); + } } void presets_list_selection_changed_cb(GtkTreeSelection *selection, signal_user_data_t *ud) { GtkTreeModel *store; - GtkTreeIter iter, piter; - gchar *preset; - gchar *folder = NULL; + GtkTreeIter iter; ghb_title_info_t tinfo; GtkWidget *widget; @@ -2082,39 +2426,48 @@ presets_list_selection_changed_cb(GtkTreeSelection *selection, signal_user_data_ widget = GHB_WIDGET (ud->builder, "presets_remove"); if (gtk_tree_selection_get_selected(selection, &store, &iter)) { - gtk_tree_model_get(store, &iter, 0, &preset, -1); - if (gtk_tree_model_iter_parent(store, &piter, &iter)) - { - gtk_tree_model_get(store, &piter, 0, &folder, -1); - } - ud->dont_clear_presets = TRUE; - // Temporarily set the video_quality range to (0,100) - // This is needed so the video_quality value does not get - // truncated when set. The range will be readjusted below - GtkWidget *qp = GHB_WIDGET(ud->builder, "video_quality"); - gtk_range_set_range (GTK_RANGE(qp), 0, 100); - // Clear the audio list prior to changing the preset. Existing audio - // can cause the container extension to be automatically changed when - // it shouldn't be - ghb_clear_audio_list(ud); - ghb_set_preset(ud, folder, preset); - gint titleindex; - titleindex = ghb_settings_combo_int(ud->settings, "title"); - ghb_set_pref_audio(titleindex, ud); - ghb_settings_set_boolean(ud->settings, "preset_modified", FALSE); - ud->dont_clear_presets = FALSE; - if (ghb_get_title_info (&tinfo, titleindex)) + GtkTreePath *treepath; + gint *indices, len, ptype; + GValue *path; + + treepath = gtk_tree_model_get_path(store, &iter); + indices = gtk_tree_path_get_indices(treepath); + len = gtk_tree_path_get_depth(treepath); + + path = preset_path_from_indices(presetsPlist, indices, len); + ghb_settings_take_value(ud->settings, "preset_selection", path); + + ptype = ghb_presets_get_type(presetsPlist, indices, len); + if (!(ptype & PRESETS_FOLDER)) { - preset_update_title_deps(ud, &tinfo); - } - ghb_set_scale (ud, GHB_SCALE_KEEP_NONE); + ud->dont_clear_presets = TRUE; + // Temporarily set the video_quality range to (0,100) + // This is needed so the video_quality value does not get + // truncated when set. The range will be readjusted below + GtkWidget *qp = GHB_WIDGET(ud->builder, "video_quality"); + gtk_range_set_range (GTK_RANGE(qp), 0, 100); + // Clear the audio list prior to changing the preset. Existing + // audio can cause the container extension to be automatically + // changed when it shouldn't be + ghb_clear_audio_list(ud); + ghb_set_preset_from_indices(ud, indices, len); + gtk_tree_path_free(treepath); + gint titleindex; + titleindex = ghb_settings_combo_int(ud->settings, "title"); + ghb_set_pref_audio(titleindex, ud); + ghb_settings_set_boolean(ud->settings, "preset_modified", FALSE); + ud->dont_clear_presets = FALSE; + if (ghb_get_title_info (&tinfo, titleindex)) + { + preset_update_title_deps(ud, &tinfo); + } + ghb_set_scale (ud, GHB_SCALE_KEEP_NONE); - gint vqmin, vqmax; - ghb_vquality_range(ud, &vqmin, &vqmax); - gtk_range_set_range (GTK_RANGE(qp), vqmin, vqmax); - gtk_widget_set_sensitive(widget, TRUE); - g_free(preset); - if (folder) g_free(folder); + gint vqmin, vqmax; + ghb_vquality_range(ud, &vqmin, &vqmax); + gtk_range_set_range (GTK_RANGE(qp), vqmin, vqmax); + gtk_widget_set_sensitive(widget, TRUE); + } } else { @@ -2160,22 +2513,22 @@ presets_frame_size_allocate_cb(GtkWidget *widget, GtkAllocation *allocation, sig void presets_default_clicked_cb(GtkWidget *xwidget, signal_user_data_t *ud) { - gchar *folder, *preset; - gint folder_pos, pos; + GValue *preset; + gint *indices, len; - folder = ghb_settings_get_string(ud->settings, "folder"); - preset = ghb_settings_get_string(ud->settings, "preset"); - if (ghb_presets_find(presetsPlist, folder, preset, &folder_pos, &pos)) + g_debug("presets_default_clicked_cb ()"); + preset = ghb_settings_get_value(ud->settings, "preset_selection"); + indices = ghb_preset_indices_from_path(presetsPlist, preset, &len); + if (indices) { - if (!(ghb_presets_get_type(presetsPlist, folder_pos, pos) & + if (!(ghb_presets_get_type(presetsPlist, indices, len) & PRESETS_FOLDER)) { ghb_presets_list_clear_default(ud); - ghb_set_preset_default(ud->settings); + presets_set_default(indices, len); ghb_presets_list_default(ud); } + g_free(indices); } - g_free(folder); - g_free(preset); } diff --git a/gtk/src/presets.h b/gtk/src/presets.h index ff11e3f92..3b2f572b1 100644 --- a/gtk/src/presets.h +++ b/gtk/src/presets.h @@ -19,14 +19,13 @@ void ghb_settings_save(signal_user_data_t *ud, const gchar *name); void ghb_presets_load(void); void ghb_update_from_preset(signal_user_data_t *ud, - const gchar *folder, const gchar *name, const gchar *key); + const GValue *preset, const gchar *key); void ghb_prefs_load(signal_user_data_t *ud); void ghb_settings_init(signal_user_data_t *ud); void ghb_settings_close(); void ghb_prefs_to_ui(signal_user_data_t *ud); void ghb_prefs_save(GValue *settings); void ghb_pref_save(GValue *settings, const gchar *key); -void ghb_set_preset_default(GValue *settings); void ghb_save_queue(GValue *queue); GValue* ghb_load_queue(); void ghb_remove_queue_file(void);; @@ -34,8 +33,10 @@ gchar* ghb_get_user_config_dir(); void ghb_settings_to_ui(signal_user_data_t *ud, GValue *dict); void ghb_clear_presets_selection(signal_user_data_t *ud); void ghb_select_preset(GtkBuilder *builder, - const gchar *folder, const gchar *preset); -void ghb_presets_list_init( signal_user_data_t *ud, - GValue *presets, const gchar *parent_name, GtkTreeIter *parent); + const GValue *preset); +void ghb_select_default_preset(GtkBuilder *builder); +void ghb_presets_list_init(signal_user_data_t *ud, gint *indices, gint len); +GValue* ghb_parse_preset_path(const gchar *path); +gchar* ghb_preset_path_string(const GValue *path); #endif // _GHB_PRESETS_H_ diff --git a/gtk/src/queuehandler.c b/gtk/src/queuehandler.c index dd3db01c4..6d56af7a3 100644 --- a/gtk/src/queuehandler.c +++ b/gtk/src/queuehandler.c @@ -128,11 +128,13 @@ add_to_queue_list(signal_user_data_t *ud, GValue *settings, GtkTreeIter *piter) gboolean markers; gboolean preset_modified; gint mux; + const GValue *path; container = ghb_settings_combo_option(settings, "container"); mux = ghb_settings_combo_int(settings, "container"); preset_modified = ghb_settings_get_boolean(settings, "preset_modified"); - preset = ghb_settings_get_string(settings, "preset"); + path = ghb_settings_get_value(settings, "preset"); + preset = ghb_preset_path_string(path); markers = ghb_settings_get_boolean(settings, "chapter_markers"); if (preset_modified) diff --git a/gtk/src/resource_data.h b/gtk/src/resource_data.h index cde3769a4..2ba6d786f 100644 --- a/gtk/src/resource_data.h +++ b/gtk/src/resource_data.h @@ -10057,7 +10057,13 @@ " <key>folder</key>\n" " <string></string>\n" " <key>preset</key>\n" -" <string>Normal</string>\n" +" <array>\n" +" <string>Normal</string>\n" +" </array>\n" +" <key>preset_selection</key>\n" +" <array>\n" +" <string>Normal</string>\n" +" </array>\n" " <key>preset_type_folder</key>\n" " <false />\n" " <key>preset_type_normal</key>\n" @@ -10113,10 +10119,6 @@ " <false />\n" " <key>chapters_in_destination</key>\n" " <false />\n" -" <key>default_folder</key>\n" -" <string></string>\n" -" <key>default_preset</key>\n" -" <string>Normal</string>\n" " <key>default_source</key>\n" " <string>/dev/dvd</string>\n" " <key>destination_dir</key>\n" @@ -10140,12 +10142,14 @@ " </dict>\n" " <key>Presets</key>\n" " <dict>\n" +" <key>Default</key>\n" +" <false />\n" " <key>anamorphic</key>\n" " <true />\n" " <key>autocrop</key>\n" " <true />\n" " <key>autoscale</key>\n" -" <true />\n" +" <false />\n" " <key>chapter_markers</key>\n" " <true />\n" " <key>constant_rate_factor</key>\n" @@ -10153,9 +10157,9 @@ " <key>container</key>\n" " <string>mp4</string>\n" " <key>deblock</key>\n" -" <real>0</real>\n" +" <integer>0</integer>\n" " <key>decomb</key>\n" -" <true />\n" +" <false />\n" " <key>deinterlace</key>\n" " <string>none</string>\n" " <key>denoise</key>\n" @@ -10199,6 +10203,8 @@ " </array>\n" " <key>preset_description</key>\n" " <string></string>\n" +" <key>preset_name</key>\n" +" <string></string>\n" " <key>preset_type</key>\n" " <integer>1</integer>\n" " <key>round_dimensions</key>\n" @@ -10236,1319 +10242,1243 @@ " <key>standard-presets</key>\n" " <array>\n" " <dict>\n" -" <key>anamorphic</key>\n" -" <true />\n" -" <key>autocrop</key>\n" -" <true />\n" -" <key>autoscale</key>\n" -" <true />\n" -" <key>chapter_markers</key>\n" -" <true />\n" -" <key>container</key>\n" -" <string>mkv</string>\n" -" <key>deblock</key>\n" -" <real>0</real>\n" -" <key>decomb</key>\n" -" <false />\n" -" <key>deinterlace</key>\n" -" <string>slower</string>\n" -" <key>denoise</key>\n" -" <integer>0</integer>\n" -" <key>detelecine</key>\n" -" <false />\n" -" <key>framerate</key>\n" -" <string>source</string>\n" -" <key>grayscale</key>\n" -" <false />\n" -" <key>keep_aspect</key>\n" -" <false />\n" -" <key>max_height</key>\n" -" <integer>0</integer>\n" -" <key>max_width</key>\n" -" <integer>0</integer>\n" -" <key>pref_audio_list</key>\n" +" <key>preset_folder</key>\n" " <array>\n" " <dict>\n" -" <key>audio_bitrate</key>\n" -" <string>160</string>\n" -" <key>audio_codec</key>\n" -" <string>faac</string>\n" -" <key>audio_drc</key>\n" -" <real>1</real>\n" -" <key>audio_mix</key>\n" -" <string>dpl2</string>\n" -" <key>audio_rate</key>\n" -" <string>source</string>\n" -" </dict>\n" -" </array>\n" -" <key>preset_description</key>\n" -" <string>HandBrake's settings for cartoons, anime, and CGI.</str" -"ing>\n" -" <key>preset_name</key>\n" -" <string>Animation</string>\n" -" <key>preset_type</key>\n" -" <integer>0</integer>\n" -" <key>subtitle_lang</key>\n" -" <string>none</string>\n" -" <key>turbo</key>\n" -" <true />\n" -" <key>two_pass</key>\n" -" <true />\n" -" <key>video_bitrate</key>\n" -" <integer>1000</integer>\n" -" <key>video_codec</key>\n" -" <string>x264</string>\n" -" <key>video_quality</key>\n" -" <integer>64</integer>\n" -" <key>video_target_size</key>\n" -" <integer>700</integer>\n" -" <key>vquality_type_bitrate</key>\n" -" <true />\n" -" <key>x264_options</key>\n" -" <string>ref=5:mixed-refs:bframes=6:weightb:direct=auto:b-pyramid:me=" -"umh:analyse=all:8x8dct:trellis=1:nr=150:no-fast-pskip:filter=2,2</strin" -"g>\n" -" </dict>\n" -" <dict>\n" -" <key>anamorphic</key>\n" -" <true />\n" -" <key>autoscale</key>\n" -" <true />\n" -" <key>chapter_markers</key>\n" -" <true />\n" -" <key>container</key>\n" -" <string>mp4</string>\n" -" <key>deblock</key>\n" -" <real>0</real>\n" -" <key>decomb</key>\n" -" <false />\n" -" <key>deinterlace</key>\n" -" <string>none</string>\n" -" <key>denoise</key>\n" -" <integer>0</integer>\n" -" <key>detelecine</key>\n" -" <false />\n" -" <key>framerate</key>\n" -" <string>source</string>\n" -" <key>grayscale</key>\n" -" <false />\n" -" <key>keep_aspect</key>\n" -" <false />\n" -" <key>large_mp4</key>\n" -" <true />\n" -" <key>max_height</key>\n" -" <integer>0</integer>\n" -" <key>max_width</key>\n" -" <integer>0</integer>\n" -" <key>pref_audio_list</key>\n" -" <array>\n" -" <dict>\n" -" <key>audio_bitrate</key>\n" -" <string>160</string>\n" -" <key>audio_codec</key>\n" -" <string>faac</string>\n" -" <key>audio_drc</key>\n" -" <real>1</real>\n" -" <key>audio_mix</key>\n" -" <string>dpl2</string>\n" -" <key>audio_rate</key>\n" -" <string>48</string>\n" -" </dict>\n" -" <dict>\n" -" <key>audio_bitrate</key>\n" -" <string>160</string>\n" -" <key>audio_codec</key>\n" -" <string>ac3</string>\n" -" <key>audio_drc</key>\n" -" <real>1</real>\n" -" <key>audio_mix</key>\n" +" <key>Default</key>\n" +" <false />\n" +" <key>anamorphic</key>\n" +" <true />\n" +" <key>autocrop</key>\n" +" <true />\n" +" <key>chapter_markers</key>\n" +" <true />\n" +" <key>container</key>\n" +" <string>mp4</string>\n" +" <key>deblock</key>\n" +" <integer>0</integer>\n" +" <key>deinterlace</key>\n" " <string>none</string>\n" -" <key>audio_rate</key>\n" +" <key>denoise</key>\n" +" <string>none</string>\n" +" <key>detelecine</key>\n" +" <false />\n" +" <key>framerate</key>\n" " <string>source</string>\n" +" <key>grayscale</key>\n" +" <false />\n" +" <key>keep_aspect</key>\n" +" <false />\n" +" <key>large_mp4</key>\n" +" <true />\n" +" <key>max_height</key>\n" +" <integer>0</integer>\n" +" <key>max_width</key>\n" +" <integer>720</integer>\n" +" <key>pref_audio_list</key>\n" +" <array>\n" +" <dict>\n" +" <key>audio_bitrate</key>\n" +" <string>160</string>\n" +" <key>audio_codec</key>\n" +" <string>faac</string>\n" +" <key>audio_drc</key>\n" +" <real>1</real>\n" +" <key>audio_mix</key>\n" +" <string>dpl2</string>\n" +" <key>audio_rate</key>\n" +" <string>48</string>\n" +" </dict>\n" +" <dict>\n" +" <key>audio_bitrate</key>\n" +" <string>160</string>\n" +" <key>audio_codec</key>\n" +" <string>ac3</string>\n" +" <key>audio_drc</key>\n" +" <real>1</real>\n" +" <key>audio_mix</key>\n" +" <string>none</string>\n" +" <key>audio_rate</key>\n" +" <string>source</string>\n" +" </dict>\n" +" </array>\n" +" <key>preset_description</key>\n" +" <string>HandBrake's universally compatible, full resolution s" +"ettings for all current Apple devices: iPod, iPhone, AppleTV, and Macs<" +"/string>\n" +" <key>preset_name</key>\n" +" <string>Universal</string>\n" +" <key>preset_type</key>\n" +" <integer>0</integer>\n" +" <key>round_dimensions</key>\n" +" <true />\n" +" <key>subtitle_lang</key>\n" +" <string>none</string>\n" +" <key>two_pass</key>\n" +" <false />\n" +" <key>video_bitrate</key>\n" +" <integer>2500</integer>\n" +" <key>video_codec</key>\n" +" <string>x264</string>\n" +" <key>video_quality</key>\n" +" <integer>59</integer>\n" +" <key>video_target_size</key>\n" +" <integer>700</integer>\n" +" <key>vquality_type_bitrate</key>\n" +" <false />\n" +" <key>vquality_type_constant</key>\n" +" <true />\n" +" <key>vquality_type_target</key>\n" +" <false />\n" +" <key>x264_options</key>\n" +" <string>level=30:cabac=0:ref=3:mixed-refs=1:analyse=all:me=umh:no-" +"fast-pskip=1:subme=8</string>\n" " </dict>\n" -" </array>\n" -" <key>preset_description</key>\n" -" <string>HandBrake's settings for the AppleTV, including Dolby D" -"igital 5.1 AC3 sound. Provides a good balance between quality and file " -"size, and optimizes performance.</string>\n" -" <key>preset_name</key>\n" -" <string>AppleTV</string>\n" -" <key>preset_type</key>\n" -" <integer>0</integer>\n" -" <key>subtitle_lang</key>\n" -" <string>none</string>\n" -" <key>two_pass</key>\n" -" <false />\n" -" <key>video_bitrate</key>\n" -" <integer>2500</integer>\n" -" <key>video_codec</key>\n" -" <string>x264</string>\n" -" <key>video_quality</key>\n" -" <integer>64</integer>\n" -" <key>video_target_size</key>\n" -" <integer>700</integer>\n" -" <key>vquality_type_bitrate</key>\n" -" <true />\n" -" <key>x264_options</key>\n" -" <string>bframes=3:ref=1:me=umh:no-fast-pskip=1:trellis=1:cabac=0</st" -"ring>\n" -" </dict>\n" -" <dict>\n" -" <key>anamorphic</key>\n" -" <true />\n" -" <key>autocrop</key>\n" -" <true />\n" -" <key>autoscale</key>\n" -" <true />\n" -" <key>chapter_markers</key>\n" -" <true />\n" -" <key>container</key>\n" -" <string>mkv</string>\n" -" <key>deblock</key>\n" -" <real>0</real>\n" -" <key>decomb</key>\n" -" <false />\n" -" <key>deinterlace</key>\n" -" <string>none</string>\n" -" <key>denoise</key>\n" -" <integer>0</integer>\n" -" <key>detelecine</key>\n" -" <false />\n" -" <key>framerate</key>\n" -" <string>source</string>\n" -" <key>grayscale</key>\n" -" <false />\n" -" <key>keep_aspect</key>\n" -" <false />\n" -" <key>max_height</key>\n" -" <integer>0</integer>\n" -" <key>max_width</key>\n" -" <integer>0</integer>\n" -" <key>pref_audio_list</key>\n" -" <array>\n" " <dict>\n" -" <key>audio_bitrate</key>\n" -" <string>160</string>\n" -" <key>audio_codec</key>\n" -" <string>ac3</string>\n" -" <key>audio_drc</key>\n" -" <real>1</real>\n" -" <key>audio_mix</key>\n" +" <key>Default</key>\n" +" <false />\n" +" <key>anamorphic</key>\n" +" <true />\n" +" <key>autocrop</key>\n" +" <true />\n" +" <key>chapter_markers</key>\n" +" <true />\n" +" <key>container</key>\n" +" <string>mp4</string>\n" +" <key>deblock</key>\n" +" <integer>0</integer>\n" +" <key>deinterlace</key>\n" " <string>none</string>\n" -" <key>audio_rate</key>\n" +" <key>denoise</key>\n" +" <string>none</string>\n" +" <key>detelecine</key>\n" +" <false />\n" +" <key>framerate</key>\n" " <string>source</string>\n" +" <key>grayscale</key>\n" +" <false />\n" +" <key>keep_aspect</key>\n" +" <false />\n" +" <key>large_mp4</key>\n" +" <true />\n" +" <key>max_height</key>\n" +" <integer>0</integer>\n" +" <key>max_width</key>\n" +" <integer>960</integer>\n" +" <key>pref_audio_list</key>\n" +" <array>\n" +" <dict>\n" +" <key>audio_bitrate</key>\n" +" <string>160</string>\n" +" <key>audio_codec</key>\n" +" <string>faac</string>\n" +" <key>audio_drc</key>\n" +" <real>1</real>\n" +" <key>audio_mix</key>\n" +" <string>dpl2</string>\n" +" <key>audio_rate</key>\n" +" <string>48</string>\n" +" </dict>\n" +" <dict>\n" +" <key>audio_bitrate</key>\n" +" <string>160</string>\n" +" <key>audio_codec</key>\n" +" <string>ac3</string>\n" +" <key>audio_drc</key>\n" +" <real>1</real>\n" +" <key>audio_mix</key>\n" +" <string>none</string>\n" +" <key>audio_rate</key>\n" +" <string>source</string>\n" +" </dict>\n" +" </array>\n" +" <key>preset_description</key>\n" +" <string>HandBrake's settings for the AppleTV, including Dolby" +" Digital 5.1 AC3 sound. Provides a good balance between quality and fil" +"e size, and optimizes performance.</string>\n" +" <key>preset_name</key>\n" +" <string>AppleTV</string>\n" +" <key>preset_type</key>\n" +" <integer>0</integer>\n" +" <key>round_dimensions</key>\n" +" <true />\n" +" <key>subtitle_lang</key>\n" +" <string>none</string>\n" +" <key>two_pass</key>\n" +" <false />\n" +" <key>video_bitrate</key>\n" +" <integer>2500</integer>\n" +" <key>video_codec</key>\n" +" <string>x264</string>\n" +" <key>video_quality</key>\n" +" <integer>59</integer>\n" +" <key>video_target_size</key>\n" +" <integer>700</integer>\n" +" <key>vquality_type_bitrate</key>\n" +" <false />\n" +" <key>vquality_type_constant</key>\n" +" <true />\n" +" <key>vquality_type_target</key>\n" +" <false />\n" +" <key>x264_options</key>\n" +" <string>level=30:cabac=0:ref=3:mixed-refs=1:bframes=6:weightb=1:di" +"rect=auto:no-fast-pskip=1:me=umh:subq=9:analyse=all</string>\n" " </dict>\n" -" </array>\n" -" <key>preset_description</key>\n" -" <string>HandBrake's settings maxed out for slowest encoding and" -" highest quality. Use at your own risk. So slow it's not just insa" -"ne...it's a trip to the looney bin.</string>\n" -" <key>preset_name</key>\n" -" <string>Bedlam</string>\n" -" <key>preset_type</key>\n" -" <integer>0</integer>\n" -" <key>subtitle_lang</key>\n" -" <string>none</string>\n" -" <key>turbo</key>\n" -" <true />\n" -" <key>two_pass</key>\n" -" <true />\n" -" <key>video_bitrate</key>\n" -" <integer>1800</integer>\n" -" <key>video_codec</key>\n" -" <string>x264</string>\n" -" <key>video_quality</key>\n" -" <integer>64</integer>\n" -" <key>video_target_size</key>\n" -" <integer>700</integer>\n" -" <key>vquality_type_bitrate</key>\n" -" <true />\n" -" <key>x264_options</key>\n" -" <string>ref=16:mixed-refs:bframes=16:weightb:direct=auto:b-pyramid:m" -"e=esa:subme=7:me-range=64:analyse=all:8x8dct:trellis=1:no-fast-pskip:no" -"-dct-decimate:filter=-2,-1</string>\n" -" </dict>\n" -" <dict>\n" -" <key>anamorphic</key>\n" -" <false />\n" -" <key>autocrop</key>\n" -" <true />\n" -" <key>autoscale</key>\n" -" <false />\n" -" <key>chapter_markers</key>\n" -" <true />\n" -" <key>container</key>\n" -" <string>mp4</string>\n" -" <key>deblock</key>\n" -" <real>0</real>\n" -" <key>decomb</key>\n" -" <false />\n" -" <key>deinterlace</key>\n" -" <string>none</string>\n" -" <key>denoise</key>\n" -" <integer>0</integer>\n" -" <key>detelecine</key>\n" -" <false />\n" -" <key>framerate</key>\n" -" <string>source</string>\n" -" <key>grayscale</key>\n" -" <false />\n" -" <key>keep_aspect</key>\n" -" <true />\n" -" <key>max_height</key>\n" -" <integer>0</integer>\n" -" <key>max_width</key>\n" -" <integer>512</integer>\n" -" <key>pref_audio_list</key>\n" -" <array>\n" " <dict>\n" -" <key>audio_bitrate</key>\n" -" <string>128</string>\n" -" <key>audio_codec</key>\n" -" <string>faac</string>\n" -" <key>audio_drc</key>\n" -" <real>1</real>\n" -" <key>audio_mix</key>\n" -" <string>dpl2</string>\n" -" <key>audio_rate</key>\n" -" <string>source</string>\n" +" <key>preset_folder</key>\n" +" <array>\n" +" <dict>\n" +" <key>Default</key>\n" +" <false />\n" +" <key>anamorphic</key>\n" +" <false />\n" +" <key>autocrop</key>\n" +" <true />\n" +" <key>chapter_markers</key>\n" +" <true />\n" +" <key>container</key>\n" +" <string>mp4</string>\n" +" <key>deblock</key>\n" +" <integer>0</integer>\n" +" <key>deinterlace</key>\n" +" <string>none</string>\n" +" <key>denoise</key>\n" +" <string>none</string>\n" +" <key>detelecine</key>\n" +" <false />\n" +" <key>framerate</key>\n" +" <string>source</string>\n" +" <key>grayscale</key>\n" +" <false />\n" +" <key>ipod_file</key>\n" +" <true />\n" +" <key>keep_aspect</key>\n" +" <true />\n" +" <key>max_height</key>\n" +" <integer>0</integer>\n" +" <key>max_width</key>\n" +" <integer>320</integer>\n" +" <key>pref_audio_list</key>\n" +" <array>\n" +" <dict>\n" +" <key>audio_bitrate</key>\n" +" <string>160</string>\n" +" <key>audio_codec</key>\n" +" <string>faac</string>\n" +" <key>audio_drc</key>\n" +" <real>1</real>\n" +" <key>audio_mix</key>\n" +" <string>dpl2</string>\n" +" <key>audio_rate</key>\n" +" <string>48</string>\n" +" </dict>\n" +" </array>\n" +" <key>preset_description</key>\n" +" <string>HandBrake's low resolution settings for the iPod. O" +"ptimized for great playback on the iPod screen, with smaller file size." +"</string>\n" +" <key>preset_name</key>\n" +" <string>iPod Classic & iPod Nano</string>\n" +" <key>preset_type</key>\n" +" <integer>0</integer>\n" +" <key>round_dimensions</key>\n" +" <true />\n" +" <key>subtitle_lang</key>\n" +" <string>none</string>\n" +" <key>two_pass</key>\n" +" <false />\n" +" <key>video_bitrate</key>\n" +" <integer>700</integer>\n" +" <key>video_codec</key>\n" +" <string>x264</string>\n" +" <key>video_quality</key>\n" +" <integer>65</integer>\n" +" <key>video_target_size</key>\n" +" <integer>700</integer>\n" +" <key>vquality_type_bitrate</key>\n" +" <true />\n" +" <key>vquality_type_constant</key>\n" +" <false />\n" +" <key>vquality_type_target</key>\n" +" <false />\n" +" <key>x264_options</key>\n" +" <string>level=30:bframes=0:cabac=0:ref=1:vbv-maxrate=768:vbv-buf" +"size=2000:analyse=all:me=umh:no-fast-pskip=1</string>\n" +" </dict>\n" +" <dict>\n" +" <key>Default</key>\n" +" <false />\n" +" <key>anamorphic</key>\n" +" <false />\n" +" <key>autocrop</key>\n" +" <true />\n" +" <key>chapter_markers</key>\n" +" <true />\n" +" <key>container</key>\n" +" <string>mp4</string>\n" +" <key>deblock</key>\n" +" <integer>0</integer>\n" +" <key>deinterlace</key>\n" +" <string>none</string>\n" +" <key>denoise</key>\n" +" <string>none</string>\n" +" <key>detelecine</key>\n" +" <false />\n" +" <key>framerate</key>\n" +" <string>source</string>\n" +" <key>grayscale</key>\n" +" <false />\n" +" <key>ipod_file</key>\n" +" <true />\n" +" <key>keep_aspect</key>\n" +" <true />\n" +" <key>max_height</key>\n" +" <integer>0</integer>\n" +" <key>max_width</key>\n" +" <integer>480</integer>\n" +" <key>pref_audio_list</key>\n" +" <array>\n" +" <dict>\n" +" <key>audio_bitrate</key>\n" +" <string>128</string>\n" +" <key>audio_codec</key>\n" +" <string>faac</string>\n" +" <key>audio_drc</key>\n" +" <real>1</real>\n" +" <key>audio_mix</key>\n" +" <string>dpl2</string>\n" +" <key>audio_rate</key>\n" +" <string>48</string>\n" +" </dict>\n" +" </array>\n" +" <key>preset_description</key>\n" +" <string>HandBrake's settings for the iPhone and iPod Touch." +"</string>\n" +" <key>preset_name</key>\n" +" <string>iPhone & iPod Touch</string>\n" +" <key>preset_type</key>\n" +" <integer>0</integer>\n" +" <key>round_dimensions</key>\n" +" <true />\n" +" <key>subtitle_lang</key>\n" +" <string>none</string>\n" +" <key>two_pass</key>\n" +" <false />\n" +" <key>video_bitrate</key>\n" +" <integer>960</integer>\n" +" <key>video_codec</key>\n" +" <string>x264</string>\n" +" <key>video_quality</key>\n" +" <integer>65</integer>\n" +" <key>video_target_size</key>\n" +" <integer>700</integer>\n" +" <key>vquality_type_bitrate</key>\n" +" <true />\n" +" <key>vquality_type_constant</key>\n" +" <false />\n" +" <key>vquality_type_target</key>\n" +" <false />\n" +" <key>x264_options</key>\n" +" <string>level=30:cabac=0:ref=1:analyse=all:me=umh:no-fast-pskip=" +"1:trellis=1</string>\n" +" </dict>\n" +" <dict>\n" +" <key>Default</key>\n" +" <false />\n" +" <key>anamorphic</key>\n" +" <false />\n" +" <key>autocrop</key>\n" +" <true />\n" +" <key>chapter_markers</key>\n" +" <true />\n" +" <key>container</key>\n" +" <string>mp4</string>\n" +" <key>deblock</key>\n" +" <integer>0</integer>\n" +" <key>deinterlace</key>\n" +" <string>none</string>\n" +" <key>denoise</key>\n" +" <string>none</string>\n" +" <key>detelecine</key>\n" +" <false />\n" +" <key>framerate</key>\n" +" <string>source</string>\n" +" <key>grayscale</key>\n" +" <false />\n" +" <key>ipod_file</key>\n" +" <true />\n" +" <key>keep_aspect</key>\n" +" <true />\n" +" <key>max_height</key>\n" +" <integer>0</integer>\n" +" <key>max_width</key>\n" +" <integer>640</integer>\n" +" <key>pref_audio_list</key>\n" +" <array>\n" +" <dict>\n" +" <key>audio_bitrate</key>\n" +" <string>160</string>\n" +" <key>audio_codec</key>\n" +" <string>faac</string>\n" +" <key>audio_drc</key>\n" +" <real>1</real>\n" +" <key>audio_mix</key>\n" +" <string>dpl2</string>\n" +" <key>audio_rate</key>\n" +" <string>48</string>\n" +" </dict>\n" +" </array>\n" +" <key>preset_description</key>\n" +" <string>HandBrake's high resolution settings for older 5 an" +"d 5.5G iPods. Good video quality, great for viewing on a TV using your " +"iPod</string>\n" +" <key>preset_name</key>\n" +" <string>iPod Legacy</string>\n" +" <key>preset_type</key>\n" +" <integer>0</integer>\n" +" <key>round_dimensions</key>\n" +" <true />\n" +" <key>subtitle_lang</key>\n" +" <string>none</string>\n" +" <key>two_pass</key>\n" +" <false />\n" +" <key>video_bitrate</key>\n" +" <integer>1500</integer>\n" +" <key>video_codec</key>\n" +" <string>x264</string>\n" +" <key>video_quality</key>\n" +" <integer>65</integer>\n" +" <key>video_target_size</key>\n" +" <integer>700</integer>\n" +" <key>vquality_type_bitrate</key>\n" +" <true />\n" +" <key>vquality_type_constant</key>\n" +" <false />\n" +" <key>vquality_type_target</key>\n" +" <false />\n" +" <key>x264_options</key>\n" +" <string>level=30:bframes=0:cabac=0:ref=1:vbv-maxrate=1500:vbv-bu" +"fsize=2000:analyse=all:me=umh:no-fast-pskip=1</string>\n" +" </dict>\n" +" </array>\n" +" <key>preset_name</key>\n" +" <string>iPod & iPhone</string>\n" +" <key>preset_type</key>\n" +" <integer>2</integer>\n" " </dict>\n" -" </array>\n" -" <key>preset_description</key>\n" -" <string>HandBrake's preset for impatient people who don't " -"care about picture quality.</string>\n" -" <key>preset_name</key>\n" -" <string>Blind</string>\n" -" <key>preset_type</key>\n" -" <integer>0</integer>\n" -" <key>subtitle_lang</key>\n" -" <string>none</string>\n" -" <key>turbo</key>\n" -" <false />\n" -" <key>two_pass</key>\n" -" <false />\n" -" <key>video_bitrate</key>\n" -" <integer>512</integer>\n" -" <key>video_codec</key>\n" -" <string>ffmpeg</string>\n" -" <key>video_quality</key>\n" -" <integer>64</integer>\n" -" <key>video_target_size</key>\n" -" <integer>700</integer>\n" -" <key>vquality_type_bitrate</key>\n" -" <true />\n" -" <key>x264_options</key>\n" -" <string></string>\n" -" </dict>\n" -" <dict>\n" -" <key>anamorphic</key>\n" -" <false />\n" -" <key>autocrop</key>\n" -" <true />\n" -" <key>autoscale</key>\n" -" <false />\n" -" <key>chapter_markers</key>\n" -" <true />\n" -" <key>container</key>\n" -" <string>mp4</string>\n" -" <key>deblock</key>\n" -" <real>0</real>\n" -" <key>decomb</key>\n" -" <false />\n" -" <key>deinterlace</key>\n" -" <string>none</string>\n" -" <key>denoise</key>\n" -" <integer>0</integer>\n" -" <key>detelecine</key>\n" -" <false />\n" -" <key>framerate</key>\n" -" <string>source</string>\n" -" <key>grayscale</key>\n" -" <false />\n" -" <key>keep_aspect</key>\n" -" <true />\n" -" <key>max_height</key>\n" -" <integer>0</integer>\n" -" <key>max_width</key>\n" -" <integer>640</integer>\n" -" <key>pref_audio_list</key>\n" -" <array>\n" " <dict>\n" -" <key>audio_bitrate</key>\n" -" <string>128</string>\n" -" <key>audio_codec</key>\n" -" <string>faac</string>\n" -" <key>audio_drc</key>\n" -" <real>1</real>\n" -" <key>audio_mix</key>\n" -" <string>dpl2</string>\n" -" <key>audio_rate</key>\n" +" <key>Default</key>\n" +" <false />\n" +" <key>anamorphic</key>\n" +" <true />\n" +" <key>autocrop</key>\n" +" <true />\n" +" <key>autoscale</key>\n" +" <true />\n" +" <key>chapter_markers</key>\n" +" <true />\n" +" <key>container</key>\n" +" <string>mp4</string>\n" +" <key>deblock</key>\n" +" <integer>0</integer>\n" +" <key>deinterlace</key>\n" +" <string>none</string>\n" +" <key>denoise</key>\n" +" <string>none</string>\n" +" <key>detelecine</key>\n" +" <false />\n" +" <key>framerate</key>\n" " <string>source</string>\n" +" <key>grayscale</key>\n" +" <false />\n" +" <key>keep_aspect</key>\n" +" <false />\n" +" <key>max_height</key>\n" +" <integer>0</integer>\n" +" <key>max_width</key>\n" +" <integer>0</integer>\n" +" <key>pref_audio_list</key>\n" +" <array>\n" +" <dict>\n" +" <key>audio_bitrate</key>\n" +" <string>160</string>\n" +" <key>audio_codec</key>\n" +" <string>faac</string>\n" +" <key>audio_drc</key>\n" +" <real>1</real>\n" +" <key>audio_mix</key>\n" +" <string>dpl2</string>\n" +" <key>audio_rate</key>\n" +" <string>source</string>\n" +" </dict>\n" +" </array>\n" +" <key>preset_description</key>\n" +" <string>HandBrake's high profile settings for use with QuickT" +"ime. It can be slow, so use it when the Normal preset doesn't look" +" good enough.</string>\n" +" <key>preset_name</key>\n" +" <string>QuickTime</string>\n" +" <key>preset_type</key>\n" +" <integer>0</integer>\n" +" <key>round_dimensions</key>\n" +" <false />\n" +" <key>subtitle_lang</key>\n" +" <string>none</string>\n" +" <key>turbo</key>\n" +" <true />\n" +" <key>two_pass</key>\n" +" <true />\n" +" <key>video_bitrate</key>\n" +" <integer>1800</integer>\n" +" <key>video_codec</key>\n" +" <string>x264</string>\n" +" <key>video_quality</key>\n" +" <integer>65</integer>\n" +" <key>video_target_size</key>\n" +" <integer>700</integer>\n" +" <key>vquality_type_bitrate</key>\n" +" <true />\n" +" <key>vquality_type_constant</key>\n" +" <false />\n" +" <key>vquality_type_target</key>\n" +" <false />\n" +" <key>x264_options</key>\n" +" <string>ref=3:mixed-refs:bframes=3:weightb:direct=auto:me=umh:subm" +"e=7:analyse=all:8x8dct:trellis=1:no-fast-pskip=1:psy-rd=1,1</string>\n" " </dict>\n" " </array>\n" -" <key>preset_description</key>\n" -" <string>HandBrake's preset for people without a lot of money to" -" waste on hard drives. Tries to maximize quality for burning to CDs, so" -" you can party like it's 1999.</string>\n" " <key>preset_name</key>\n" -" <string>Broke</string>\n" +" <string>Apple</string>\n" " <key>preset_type</key>\n" -" <integer>0</integer>\n" -" <key>subtitle_lang</key>\n" -" <string>none</string>\n" -" <key>turbo</key>\n" -" <true />\n" -" <key>two_pass</key>\n" -" <true />\n" -" <key>video_bitrate</key>\n" -" <integer>1600</integer>\n" -" <key>video_codec</key>\n" -" <string>x264</string>\n" -" <key>video_quality</key>\n" -" <integer>64</integer>\n" -" <key>video_target_size</key>\n" -" <integer>695</integer>\n" -" <key>vquality_type_target</key>\n" -" <true />\n" -" <key>x264_options</key>\n" -" <string>ref=3:mixed-refs:bframes=16:weightb:b-pyramid:direct=auto:me" -"=umh:trellis=1:analyse=all:8x8dct:no-fast-pskip</string>\n" +" <integer>2</integer>\n" " </dict>\n" " <dict>\n" -" <key>anamorphic</key>\n" -" <false />\n" -" <key>autocrop</key>\n" -" <true />\n" -" <key>autoscale</key>\n" -" <true />\n" -" <key>chapter_markers</key>\n" -" <false />\n" -" <key>container</key>\n" -" <string>mp4</string>\n" -" <key>deblock</key>\n" -" <real>0</real>\n" -" <key>decomb</key>\n" -" <false />\n" -" <key>deinterlace</key>\n" -" <string>none</string>\n" -" <key>denoise</key>\n" -" <integer>0</integer>\n" -" <key>detelecine</key>\n" -" <false />\n" -" <key>framerate</key>\n" -" <string>source</string>\n" -" <key>grayscale</key>\n" -" <false />\n" -" <key>keep_aspect</key>\n" -" <true />\n" -" <key>max_height</key>\n" -" <integer>0</integer>\n" -" <key>max_width</key>\n" -" <integer>0</integer>\n" -" <key>pref_audio_list</key>\n" +" <key>preset_folder</key>\n" " <array>\n" " <dict>\n" -" <key>audio_bitrate</key>\n" -" <string>160</string>\n" -" <key>audio_codec</key>\n" -" <string>faac</string>\n" -" <key>audio_drc</key>\n" -" <real>1</real>\n" -" <key>audio_mix</key>\n" -" <string>dpl2</string>\n" -" <key>audio_rate</key>\n" +" <key>Default</key>\n" +" <true />\n" +" <key>anamorphic</key>\n" +" <true />\n" +" <key>autocrop</key>\n" +" <true />\n" +" <key>autoscale</key>\n" +" <true />\n" +" <key>chapter_markers</key>\n" +" <true />\n" +" <key>container</key>\n" +" <string>mp4</string>\n" +" <key>deblock</key>\n" +" <integer>0</integer>\n" +" <key>deinterlace</key>\n" +" <string>none</string>\n" +" <key>denoise</key>\n" +" <string>none</string>\n" +" <key>detelecine</key>\n" +" <false />\n" +" <key>framerate</key>\n" " <string>source</string>\n" +" <key>grayscale</key>\n" +" <false />\n" +" <key>keep_aspect</key>\n" +" <false />\n" +" <key>max_height</key>\n" +" <integer>0</integer>\n" +" <key>max_width</key>\n" +" <integer>0</integer>\n" +" <key>pref_audio_list</key>\n" +" <array>\n" +" <dict>\n" +" <key>audio_bitrate</key>\n" +" <string>160</string>\n" +" <key>audio_codec</key>\n" +" <string>faac</string>\n" +" <key>audio_drc</key>\n" +" <real>1</real>\n" +" <key>audio_mix</key>\n" +" <string>dpl2</string>\n" +" <key>audio_rate</key>\n" +" <string>source</string>\n" +" </dict>\n" +" </array>\n" +" <key>preset_description</key>\n" +" <string>HandBrake's normal, default settings.</string>\n" +" <key>preset_name</key>\n" +" <string>Normal</string>\n" +" <key>preset_type</key>\n" +" <integer>0</integer>\n" +" <key>round_dimensions</key>\n" +" <false />\n" +" <key>subtitle_lang</key>\n" +" <string>none</string>\n" +" <key>turbo</key>\n" +" <true />\n" +" <key>two_pass</key>\n" +" <true />\n" +" <key>video_bitrate</key>\n" +" <integer>1500</integer>\n" +" <key>video_codec</key>\n" +" <string>x264</string>\n" +" <key>video_quality</key>\n" +" <integer>65</integer>\n" +" <key>video_target_size</key>\n" +" <integer>700</integer>\n" +" <key>vquality_type_bitrate</key>\n" +" <true />\n" +" <key>vquality_type_constant</key>\n" +" <false />\n" +" <key>vquality_type_target</key>\n" +" <false />\n" +" <key>x264_options</key>\n" +" <string>ref=2:bframes=2:me=umh</string>\n" " </dict>\n" -" </array>\n" -" <key>preset_description</key>\n" -" <string>HandBrake's traditional, faster, lower-quality settings" -".</string>\n" -" <key>preset_name</key>\n" -" <string>Classic</string>\n" -" <key>preset_type</key>\n" -" <integer>0</integer>\n" -" <key>subtitle_lang</key>\n" -" <string>none</string>\n" -" <key>two_pass</key>\n" -" <false />\n" -" <key>video_bitrate</key>\n" -" <integer>1000</integer>\n" -" <key>video_codec</key>\n" -" <string>ffmpeg</string>\n" -" <key>video_quality</key>\n" -" <integer>64</integer>\n" -" <key>video_target_size</key>\n" -" <integer>700</integer>\n" -" <key>vquality_type_bitrate</key>\n" -" <true />\n" -" <key>x264_options</key>\n" -" <string></string>\n" -" </dict>\n" -" <dict>\n" -" <key>anamorphic</key>\n" -" <true />\n" -" <key>autocrop</key>\n" -" <true />\n" -" <key>autoscale</key>\n" -" <true />\n" -" <key>chapter_markers</key>\n" -" <true />\n" -" <key>container</key>\n" -" <string>mkv</string>\n" -" <key>deblock</key>\n" -" <real>0</real>\n" -" <key>decomb</key>\n" -" <false />\n" -" <key>deinterlace</key>\n" -" <string>none</string>\n" -" <key>denoise</key>\n" -" <integer>0</integer>\n" -" <key>detelecine</key>\n" -" <false />\n" -" <key>framerate</key>\n" -" <string>source</string>\n" -" <key>grayscale</key>\n" -" <false />\n" -" <key>keep_aspect</key>\n" -" <false />\n" -" <key>max_height</key>\n" -" <integer>0</integer>\n" -" <key>max_width</key>\n" -" <integer>0</integer>\n" -" <key>pref_audio_list</key>\n" -" <array>\n" " <dict>\n" -" <key>audio_bitrate</key>\n" -" <string>160</string>\n" -" <key>audio_codec</key>\n" -" <string>ac3</string>\n" -" <key>audio_drc</key>\n" -" <real>1</real>\n" -" <key>audio_mix</key>\n" +" <key>Default</key>\n" +" <false />\n" +" <key>anamorphic</key>\n" +" <false />\n" +" <key>autocrop</key>\n" +" <true />\n" +" <key>autoscale</key>\n" +" <true />\n" +" <key>chapter_markers</key>\n" +" <false />\n" +" <key>container</key>\n" +" <string>mp4</string>\n" +" <key>deblock</key>\n" +" <integer>0</integer>\n" +" <key>deinterlace</key>\n" " <string>none</string>\n" -" <key>audio_rate</key>\n" +" <key>denoise</key>\n" +" <string>none</string>\n" +" <key>detelecine</key>\n" +" <false />\n" +" <key>framerate</key>\n" " <string>source</string>\n" +" <key>grayscale</key>\n" +" <false />\n" +" <key>keep_aspect</key>\n" +" <true />\n" +" <key>max_height</key>\n" +" <integer>0</integer>\n" +" <key>max_width</key>\n" +" <integer>0</integer>\n" +" <key>pref_audio_list</key>\n" +" <array>\n" +" <dict>\n" +" <key>audio_bitrate</key>\n" +" <string>160</string>\n" +" <key>audio_codec</key>\n" +" <string>faac</string>\n" +" <key>audio_drc</key>\n" +" <real>1</real>\n" +" <key>audio_mix</key>\n" +" <string>dpl2</string>\n" +" <key>audio_rate</key>\n" +" <string>source</string>\n" +" </dict>\n" +" </array>\n" +" <key>preset_description</key>\n" +" <string>HandBrake's traditional, faster, lower-quality settin" +"gs.</string>\n" +" <key>preset_name</key>\n" +" <string>Classic</string>\n" +" <key>preset_type</key>\n" +" <integer>0</integer>\n" +" <key>round_dimensions</key>\n" +" <true />\n" +" <key>subtitle_lang</key>\n" +" <string>none</string>\n" +" <key>two_pass</key>\n" +" <false />\n" +" <key>video_bitrate</key>\n" +" <integer>1000</integer>\n" +" <key>video_codec</key>\n" +" <string>ffmpeg</string>\n" +" <key>video_quality</key>\n" +" <integer>65</integer>\n" +" <key>video_target_size</key>\n" +" <integer>700</integer>\n" +" <key>vquality_type_bitrate</key>\n" +" <true />\n" +" <key>vquality_type_constant</key>\n" +" <false />\n" +" <key>vquality_type_target</key>\n" +" <false />\n" +" <key>x264_options</key>\n" +" <string></string>\n" " </dict>\n" " </array>\n" -" <key>preset_description</key>\n" -" <string>HandBrake's preset for consistently excellent quality i" -"n one pass, with the downside of entirely unpredictable file sizes and " -"bitrates.</string>\n" " <key>preset_name</key>\n" -" <string>Constant Quality Rate</string>\n" +" <string>Basic</string>\n" " <key>preset_type</key>\n" -" <integer>0</integer>\n" -" <key>subtitle_lang</key>\n" -" <string>none</string>\n" -" <key>turbo</key>\n" -" <false />\n" -" <key>two_pass</key>\n" -" <false />\n" -" <key>video_bitrate</key>\n" -" <integer>2000</integer>\n" -" <key>video_codec</key>\n" -" <string>x264</string>\n" -" <key>video_quality</key>\n" -" <integer>64</integer>\n" -" <key>video_target_size</key>\n" -" <integer>700</integer>\n" -" <key>vquality_type_constant</key>\n" -" <true />\n" -" <key>x264_options</key>\n" -" <string>ref=3:mixed-refs:bframes=3:b-pyramid:weightb:filter=-2,-1:tr" -"ellis=1:analyse=all:8x8dct:me=umh</string>\n" +" <integer>2</integer>\n" " </dict>\n" " <dict>\n" -" <key>anamorphic</key>\n" -" <true />\n" -" <key>autocrop</key>\n" -" <true />\n" -" <key>autoscale</key>\n" -" <true />\n" -" <key>chapter_markers</key>\n" -" <true />\n" -" <key>container</key>\n" -" <string>mkv</string>\n" -" <key>deblock</key>\n" -" <real>0</real>\n" -" <key>decomb</key>\n" -" <false />\n" -" <key>deinterlace</key>\n" -" <string>none</string>\n" -" <key>denoise</key>\n" -" <integer>0</integer>\n" -" <key>detelecine</key>\n" -" <false />\n" -" <key>framerate</key>\n" -" <string>source</string>\n" -" <key>grayscale</key>\n" -" <false />\n" -" <key>keep_aspect</key>\n" -" <false />\n" -" <key>max_height</key>\n" -" <integer>0</integer>\n" -" <key>max_width</key>\n" -" <integer>0</integer>\n" -" <key>pref_audio_list</key>\n" +" <key>preset_folder</key>\n" " <array>\n" " <dict>\n" -" <key>audio_bitrate</key>\n" -" <string>160</string>\n" -" <key>audio_codec</key>\n" -" <string>ac3</string>\n" -" <key>audio_drc</key>\n" -" <real>1</real>\n" -" <key>audio_mix</key>\n" +" <key>Default</key>\n" +" <false />\n" +" <key>anamorphic</key>\n" +" <true />\n" +" <key>autocrop</key>\n" +" <true />\n" +" <key>autoscale</key>\n" +" <true />\n" +" <key>chapter_markers</key>\n" +" <true />\n" +" <key>container</key>\n" +" <string>mkv</string>\n" +" <key>deblock</key>\n" +" <integer>0</integer>\n" +" <key>decomb</key>\n" +" <true />\n" +" <key>deinterlace</key>\n" " <string>none</string>\n" -" <key>audio_rate</key>\n" +" <key>denoise</key>\n" +" <string>none</string>\n" +" <key>detelecine</key>\n" +" <true />\n" +" <key>framerate</key>\n" " <string>source</string>\n" +" <key>grayscale</key>\n" +" <false />\n" +" <key>keep_aspect</key>\n" +" <false />\n" +" <key>max_height</key>\n" +" <integer>0</integer>\n" +" <key>max_width</key>\n" +" <integer>0</integer>\n" +" <key>pref_audio_list</key>\n" +" <array>\n" +" <dict>\n" +" <key>audio_bitrate</key>\n" +" <string>160</string>\n" +" <key>audio_codec</key>\n" +" <string>faac</string>\n" +" <key>audio_drc</key>\n" +" <real>1</real>\n" +" <key>audio_mix</key>\n" +" <string>dpl2</string>\n" +" <key>audio_rate</key>\n" +" <string>source</string>\n" +" </dict>\n" +" </array>\n" +" <key>preset_description</key>\n" +" <string>HandBrake's settings for cartoons, anime, and CGI.</s" +"tring>\n" +" <key>preset_name</key>\n" +" <string>Animation</string>\n" +" <key>preset_type</key>\n" +" <integer>0</integer>\n" +" <key>round_dimensions</key>\n" +" <false />\n" +" <key>subtitle_lang</key>\n" +" <string>none</string>\n" +" <key>turbo</key>\n" +" <true />\n" +" <key>two_pass</key>\n" +" <true />\n" +" <key>video_bitrate</key>\n" +" <integer>1000</integer>\n" +" <key>video_codec</key>\n" +" <string>x264</string>\n" +" <key>video_quality</key>\n" +" <integer>65</integer>\n" +" <key>video_target_size</key>\n" +" <integer>700</integer>\n" +" <key>vquality_type_bitrate</key>\n" +" <true />\n" +" <key>vquality_type_constant</key>\n" +" <false />\n" +" <key>vquality_type_target</key>\n" +" <false />\n" +" <key>x264_options</key>\n" +" <string>ref=5:mixed-refs:bframes=6:weightb:direct=auto:b-pyramid:m" +"e=umh:analyse=all:8x8dct:trellis=1:nr=150:no-fast-pskip:filter=2,2:psy-" +"rd=1,1:subme=9</string>\n" " </dict>\n" -" </array>\n" -" <key>preset_description</key>\n" -" <string>HandBrake's preset for true high profile x264 quality. " -"A good balance of quality and speed, based on community standards found" -" in the wild. This preset will give you a much better sense of x264&apo" -"s;s capabilities than vanilla main profile.</string>\n" -" <key>preset_name</key>\n" -" <string>Deux Six Quatre</string>\n" -" <key>preset_type</key>\n" -" <integer>0</integer>\n" -" <key>subtitle_lang</key>\n" -" <string>none</string>\n" -" <key>turbo</key>\n" -" <true />\n" -" <key>two_pass</key>\n" -" <true />\n" -" <key>video_bitrate</key>\n" -" <integer>1600</integer>\n" -" <key>video_codec</key>\n" -" <string>x264</string>\n" -" <key>video_quality</key>\n" -" <integer>64</integer>\n" -" <key>video_target_size</key>\n" -" <integer>700</integer>\n" -" <key>vquality_type_bitrate</key>\n" -" <true />\n" -" <key>x264_options</key>\n" -" <string>ref=5:mixed-refs:bframes=3:weightb:b-pyramid:me=umh:subme=7:" -"trellis=1:analyse=all:8x8dct:no-fast-pskip</string>\n" -" </dict>\n" -" <dict>\n" -" <key>anamorphic</key>\n" -" <true />\n" -" <key>autocrop</key>\n" -" <true />\n" -" <key>autoscale</key>\n" -" <true />\n" -" <key>chapter_markers</key>\n" -" <true />\n" -" <key>container</key>\n" -" <string>mkv</string>\n" -" <key>deblock</key>\n" -" <real>0</real>\n" -" <key>decomb</key>\n" -" <false />\n" -" <key>deinterlace</key>\n" -" <string>none</string>\n" -" <key>denoise</key>\n" -" <integer>0</integer>\n" -" <key>detelecine</key>\n" -" <false />\n" -" <key>framerate</key>\n" -" <string>source</string>\n" -" <key>grayscale</key>\n" -" <false />\n" -" <key>keep_aspect</key>\n" -" <false />\n" -" <key>max_height</key>\n" -" <integer>0</integer>\n" -" <key>max_width</key>\n" -" <integer>0</integer>\n" -" <key>pref_audio_list</key>\n" -" <array>\n" " <dict>\n" -" <key>audio_bitrate</key>\n" -" <string>160</string>\n" -" <key>audio_codec</key>\n" -" <string>ac3</string>\n" -" <key>audio_drc</key>\n" -" <real>1</real>\n" -" <key>audio_mix</key>\n" +" <key>Default</key>\n" +" <false />\n" +" <key>anamorphic</key>\n" +" <true />\n" +" <key>autocrop</key>\n" +" <true />\n" +" <key>autoscale</key>\n" +" <true />\n" +" <key>chapter_markers</key>\n" +" <true />\n" +" <key>container</key>\n" +" <string>mkv</string>\n" +" <key>deblock</key>\n" +" <integer>0</integer>\n" +" <key>deinterlace</key>\n" " <string>none</string>\n" -" <key>audio_rate</key>\n" +" <key>denoise</key>\n" +" <string>none</string>\n" +" <key>detelecine</key>\n" +" <false />\n" +" <key>framerate</key>\n" " <string>source</string>\n" +" <key>grayscale</key>\n" +" <false />\n" +" <key>keep_aspect</key>\n" +" <false />\n" +" <key>max_height</key>\n" +" <integer>0</integer>\n" +" <key>max_width</key>\n" +" <integer>0</integer>\n" +" <key>pref_audio_list</key>\n" +" <array>\n" +" <dict>\n" +" <key>audio_bitrate</key>\n" +" <string>160</string>\n" +" <key>audio_codec</key>\n" +" <string>ac3</string>\n" +" <key>audio_drc</key>\n" +" <real>1</real>\n" +" <key>audio_mix</key>\n" +" <string>none</string>\n" +" <key>audio_rate</key>\n" +" <string>source</string>\n" +" </dict>\n" +" </array>\n" +" <key>preset_description</key>\n" +" <string>HandBrake's preset for consistently excellent quality" +" in one pass, with the downside of entirely unpredictable file sizes an" +"d bitrates.</string>\n" +" <key>preset_name</key>\n" +" <string>Constant Quality Rate</string>\n" +" <key>preset_type</key>\n" +" <integer>0</integer>\n" +" <key>round_dimensions</key>\n" +" <false />\n" +" <key>subtitle_lang</key>\n" +" <string>none</string>\n" +" <key>turbo</key>\n" +" <false />\n" +" <key>two_pass</key>\n" +" <false />\n" +" <key>video_bitrate</key>\n" +" <integer>2000</integer>\n" +" <key>video_codec</key>\n" +" <string>x264</string>\n" +" <key>video_quality</key>\n" +" <integer>60</integer>\n" +" <key>video_target_size</key>\n" +" <integer>700</integer>\n" +" <key>vquality_type_bitrate</key>\n" +" <false />\n" +" <key>vquality_type_constant</key>\n" +" <true />\n" +" <key>vquality_type_target</key>\n" +" <false />\n" +" <key>x264_options</key>\n" +" <string>ref=3:mixed-refs:bframes=3:b-pyramid:weightb:filter=-2,-1:" +"trellis=1:analyse=all:8x8dct:me=umh:subme=9:psy-rd=1,1</string>\n" " </dict>\n" -" </array>\n" -" <key>preset_description</key>\n" -" <string>HandBrake's preset for feature films.</string>\n" -" <key>preset_name</key>\n" -" <string>Film</string>\n" -" <key>preset_type</key>\n" -" <integer>0</integer>\n" -" <key>subtitle_lang</key>\n" -" <string>none</string>\n" -" <key>turbo</key>\n" -" <true />\n" -" <key>two_pass</key>\n" -" <true />\n" -" <key>video_bitrate</key>\n" -" <integer>1800</integer>\n" -" <key>video_codec</key>\n" -" <string>x264</string>\n" -" <key>video_quality</key>\n" -" <integer>64</integer>\n" -" <key>video_target_size</key>\n" -" <integer>700</integer>\n" -" <key>vquality_type_bitrate</key>\n" -" <true />\n" -" <key>x264_options</key>\n" -" <string>ref=3:mixed-refs:bframes=6:weightb:direct=auto:b-pyramid:me=" -"umh:subme=7:analyse=all:8x8dct:trellis=1:no-fast-pskip</string>\n" -" </dict>\n" -" <dict>\n" -" <key>anamorphic</key>\n" -" <true />\n" -" <key>autocrop</key>\n" -" <true />\n" -" <key>autoscale</key>\n" -" <true />\n" -" <key>chapter_markers</key>\n" -" <true />\n" -" <key>container</key>\n" -" <string>mp4</string>\n" -" <key>deblock</key>\n" -" <real>0</real>\n" -" <key>decomb</key>\n" -" <false />\n" -" <key>deinterlace</key>\n" -" <string>none</string>\n" -" <key>denoise</key>\n" -" <integer>0</integer>\n" -" <key>detelecine</key>\n" -" <false />\n" -" <key>framerate</key>\n" -" <string>source</string>\n" -" <key>grayscale</key>\n" -" <false />\n" -" <key>keep_aspect</key>\n" -" <false />\n" -" <key>max_height</key>\n" -" <integer>0</integer>\n" -" <key>max_width</key>\n" -" <integer>0</integer>\n" -" <key>pref_audio_list</key>\n" -" <array>\n" " <dict>\n" -" <key>audio_bitrate</key>\n" -" <string>160</string>\n" -" <key>audio_codec</key>\n" -" <string>faac</string>\n" -" <key>audio_drc</key>\n" -" <real>1</real>\n" -" <key>audio_mix</key>\n" -" <string>dpl2</string>\n" -" <key>audio_rate</key>\n" +" <key>Default</key>\n" +" <false />\n" +" <key>anamorphic</key>\n" +" <true />\n" +" <key>autocrop</key>\n" +" <true />\n" +" <key>autoscale</key>\n" +" <true />\n" +" <key>chapter_markers</key>\n" +" <true />\n" +" <key>container</key>\n" +" <string>mkv</string>\n" +" <key>deblock</key>\n" +" <integer>0</integer>\n" +" <key>deinterlace</key>\n" +" <string>none</string>\n" +" <key>denoise</key>\n" +" <string>none</string>\n" +" <key>detelecine</key>\n" +" <false />\n" +" <key>framerate</key>\n" " <string>source</string>\n" +" <key>grayscale</key>\n" +" <false />\n" +" <key>keep_aspect</key>\n" +" <false />\n" +" <key>max_height</key>\n" +" <integer>0</integer>\n" +" <key>max_width</key>\n" +" <integer>0</integer>\n" +" <key>pref_audio_list</key>\n" +" <array>\n" +" <dict>\n" +" <key>audio_bitrate</key>\n" +" <string>160</string>\n" +" <key>audio_codec</key>\n" +" <string>ac3</string>\n" +" <key>audio_drc</key>\n" +" <real>1</real>\n" +" <key>audio_mix</key>\n" +" <string>none</string>\n" +" <key>audio_rate</key>\n" +" <string>source</string>\n" +" </dict>\n" +" </array>\n" +" <key>preset_description</key>\n" +" <string>HandBrake's preset for feature films.</string>\n" +" <key>preset_name</key>\n" +" <string>Film</string>\n" +" <key>preset_type</key>\n" +" <integer>0</integer>\n" +" <key>round_dimensions</key>\n" +" <false />\n" +" <key>subtitle_lang</key>\n" +" <string>none</string>\n" +" <key>turbo</key>\n" +" <true />\n" +" <key>two_pass</key>\n" +" <true />\n" +" <key>video_bitrate</key>\n" +" <integer>1800</integer>\n" +" <key>video_codec</key>\n" +" <string>x264</string>\n" +" <key>video_quality</key>\n" +" <integer>65</integer>\n" +" <key>video_target_size</key>\n" +" <integer>700</integer>\n" +" <key>vquality_type_bitrate</key>\n" +" <true />\n" +" <key>vquality_type_constant</key>\n" +" <false />\n" +" <key>vquality_type_target</key>\n" +" <false />\n" +" <key>x264_options</key>\n" +" <string>ref=3:mixed-refs:bframes=6:weightb:direct=auto:b-pyramid:m" +"e=umh:subme=9:analyse=all:8x8dct:trellis=1:no-fast-pskip:psy-rd=1,1</st" +"ring>\n" " </dict>\n" -" </array>\n" -" <key>preset_description</key>\n" -" <string>HandBrake's normal, default settings.</string>\n" -" <key>preset_name</key>\n" -" <string>Normal</string>\n" -" <key>preset_type</key>\n" -" <integer>0</integer>\n" -" <key>subtitle_lang</key>\n" -" <string>none</string>\n" -" <key>turbo</key>\n" -" <true />\n" -" <key>two_pass</key>\n" -" <true />\n" -" <key>video_bitrate</key>\n" -" <integer>1500</integer>\n" -" <key>video_codec</key>\n" -" <string>x264</string>\n" -" <key>video_quality</key>\n" -" <integer>64</integer>\n" -" <key>video_target_size</key>\n" -" <integer>700</integer>\n" -" <key>vquality_type_bitrate</key>\n" -" <true />\n" -" <key>x264_options</key>\n" -" <string>ref=2:bframes=2:me=umh</string>\n" -" </dict>\n" -" <dict>\n" -" <key>anamorphic</key>\n" -" <true />\n" -" <key>autoscale</key>\n" -" <true />\n" -" <key>chapter_markers</key>\n" -" <false />\n" -" <key>container</key>\n" -" <string>mp4</string>\n" -" <key>deblock</key>\n" -" <real>0</real>\n" -" <key>decomb</key>\n" -" <false />\n" -" <key>deinterlace</key>\n" -" <string>none</string>\n" -" <key>denoise</key>\n" -" <integer>0</integer>\n" -" <key>detelecine</key>\n" -" <false />\n" -" <key>framerate</key>\n" -" <string>source</string>\n" -" <key>grayscale</key>\n" -" <false />\n" -" <key>keep_aspect</key>\n" -" <false />\n" -" <key>max_height</key>\n" -" <integer>0</integer>\n" -" <key>max_width</key>\n" -" <integer>0</integer>\n" -" <key>pref_audio_list</key>\n" -" <array>\n" -" <dict>\n" -" <key>audio_bitrate</key>\n" -" <string>160</string>\n" -" <key>audio_codec</key>\n" -" <string>faac</string>\n" -" <key>audio_drc</key>\n" -" <real>1</real>\n" -" <key>audio_mix</key>\n" -" <string>dpl2</string>\n" -" <key>audio_rate</key>\n" -" <string>48</string>\n" -" </dict>\n" -" </array>\n" -" <key>preset_description</key>\n" -" <string>HandBrake's settings for the Sony PlayStation 3.</strin" -"g>\n" -" <key>preset_name</key>\n" -" <string>PS3</string>\n" -" <key>preset_type</key>\n" -" <integer>0</integer>\n" -" <key>subtitle_lang</key>\n" -" <string>none</string>\n" -" <key>two_pass</key>\n" -" <false />\n" -" <key>video_bitrate</key>\n" -" <integer>2500</integer>\n" -" <key>video_codec</key>\n" -" <string>x264</string>\n" -" <key>video_quality</key>\n" -" <integer>64</integer>\n" -" <key>video_target_size</key>\n" -" <integer>700</integer>\n" -" <key>vquality_type_bitrate</key>\n" -" <true />\n" -" <key>x264_options</key>\n" -" <string>level=41:me=umh</string>\n" -" </dict>\n" -" <dict>\n" -" <key>anamorphic</key>\n" -" <false />\n" -" <key>autocrop</key>\n" -" <true />\n" -" <key>autoscale</key>\n" -" <false />\n" -" <key>chapter_markers</key>\n" -" <true />\n" -" <key>container</key>\n" -" <string>mp4</string>\n" -" <key>deblock</key>\n" -" <real>0</real>\n" -" <key>decomb</key>\n" -" <false />\n" -" <key>deinterlace</key>\n" -" <string>none</string>\n" -" <key>denoise</key>\n" -" <integer>0</integer>\n" -" <key>detelecine</key>\n" -" <false />\n" -" <key>framerate</key>\n" -" <string>source</string>\n" -" <key>grayscale</key>\n" -" <false />\n" -" <key>keep_aspect</key>\n" -" <true />\n" -" <key>max_height</key>\n" -" <integer>208</integer>\n" -" <key>max_width</key>\n" -" <integer>368</integer>\n" -" <key>pref_audio_list</key>\n" -" <array>\n" -" <dict>\n" -" <key>audio_bitrate</key>\n" -" <string>128</string>\n" -" <key>audio_codec</key>\n" -" <string>faac</string>\n" -" <key>audio_drc</key>\n" -" <real>1</real>\n" -" <key>audio_mix</key>\n" -" <string>dpl2</string>\n" -" <key>audio_rate</key>\n" -" <string>48</string>\n" -" </dict>\n" -" </array>\n" -" <key>preset_description</key>\n" -" <string>HandBrake's settings for the Sony PlayStation Portable." -"</string>\n" -" <key>preset_name</key>\n" -" <string>PSP</string>\n" -" <key>preset_type</key>\n" -" <integer>0</integer>\n" -" <key>subtitle_lang</key>\n" -" <string>none</string>\n" -" <key>two_pass</key>\n" -" <false />\n" -" <key>video_bitrate</key>\n" -" <integer>1024</integer>\n" -" <key>video_codec</key>\n" -" <string>ffmpeg</string>\n" -" <key>video_quality</key>\n" -" <integer>64</integer>\n" -" <key>video_target_size</key>\n" -" <integer>700</integer>\n" -" <key>vquality_type_bitrate</key>\n" -" <true />\n" -" <key>x264_options</key>\n" -" <string></string>\n" -" </dict>\n" -" <dict>\n" -" <key>anamorphic</key>\n" -" <true />\n" -" <key>autocrop</key>\n" -" <true />\n" -" <key>autoscale</key>\n" -" <true />\n" -" <key>chapter_markers</key>\n" -" <true />\n" -" <key>container</key>\n" -" <string>mp4</string>\n" -" <key>deblock</key>\n" -" <real>0</real>\n" -" <key>decomb</key>\n" -" <false />\n" -" <key>deinterlace</key>\n" -" <string>none</string>\n" -" <key>denoise</key>\n" -" <integer>0</integer>\n" -" <key>detelecine</key>\n" -" <false />\n" -" <key>framerate</key>\n" -" <string>source</string>\n" -" <key>grayscale</key>\n" -" <false />\n" -" <key>keep_aspect</key>\n" -" <false />\n" -" <key>max_height</key>\n" -" <integer>0</integer>\n" -" <key>max_width</key>\n" -" <integer>0</integer>\n" -" <key>pref_audio_list</key>\n" -" <array>\n" " <dict>\n" -" <key>audio_bitrate</key>\n" -" <string>160</string>\n" -" <key>audio_codec</key>\n" -" <string>faac</string>\n" -" <key>audio_drc</key>\n" -" <real>1</real>\n" -" <key>audio_mix</key>\n" -" <string>dpl2</string>\n" -" <key>audio_rate</key>\n" +" <key>Default</key>\n" +" <false />\n" +" <key>anamorphic</key>\n" +" <true />\n" +" <key>autocrop</key>\n" +" <true />\n" +" <key>autoscale</key>\n" +" <true />\n" +" <key>chapter_markers</key>\n" +" <true />\n" +" <key>container</key>\n" +" <string>mkv</string>\n" +" <key>deblock</key>\n" +" <integer>0</integer>\n" +" <key>decomb</key>\n" +" <true />\n" +" <key>deinterlace</key>\n" +" <string>none</string>\n" +" <key>denoise</key>\n" +" <string>none</string>\n" +" <key>detelecine</key>\n" +" <true />\n" +" <key>framerate</key>\n" " <string>source</string>\n" +" <key>grayscale</key>\n" +" <false />\n" +" <key>keep_aspect</key>\n" +" <false />\n" +" <key>max_height</key>\n" +" <integer>0</integer>\n" +" <key>max_width</key>\n" +" <integer>0</integer>\n" +" <key>pref_audio_list</key>\n" +" <array>\n" +" <dict>\n" +" <key>audio_bitrate</key>\n" +" <string>160</string>\n" +" <key>audio_codec</key>\n" +" <string>faac</string>\n" +" <key>audio_drc</key>\n" +" <real>1</real>\n" +" <key>audio_mix</key>\n" +" <string>dpl2</string>\n" +" <key>audio_rate</key>\n" +" <string>source</string>\n" +" </dict>\n" +" </array>\n" +" <key>preset_description</key>\n" +" <string>HandBrake's settings for video from television.</stri" +"ng>\n" +" <key>preset_name</key>\n" +" <string>Television</string>\n" +" <key>preset_type</key>\n" +" <integer>0</integer>\n" +" <key>round_dimensions</key>\n" +" <false />\n" +" <key>subtitle_lang</key>\n" +" <string>none</string>\n" +" <key>turbo</key>\n" +" <true />\n" +" <key>two_pass</key>\n" +" <true />\n" +" <key>video_bitrate</key>\n" +" <integer>1300</integer>\n" +" <key>video_codec</key>\n" +" <string>x264</string>\n" +" <key>video_quality</key>\n" +" <integer>65</integer>\n" +" <key>video_target_size</key>\n" +" <integer>700</integer>\n" +" <key>vquality_type_bitrate</key>\n" +" <true />\n" +" <key>vquality_type_constant</key>\n" +" <false />\n" +" <key>vquality_type_target</key>\n" +" <false />\n" +" <key>x264_options</key>\n" +" <string>ref=3:mixed-refs:bframes=6:weightb:direct=auto:b-pyramid:m" +"e=umh:subme=9:analyse=all:8x8dct:trellis=1:nr=150:no-fast-pskip=1:psy-r" +"d=1,1</string>\n" " </dict>\n" " </array>\n" -" <key>preset_description</key>\n" -" <string>HandBrake's high quality settings for use with QuickTim" -"e. It can be slow, so use it when the Normal preset doesn't look g" -"ood enough.</string>\n" " <key>preset_name</key>\n" -" <string>QuickTime</string>\n" +" <string>High Profile</string>\n" " <key>preset_type</key>\n" -" <integer>0</integer>\n" -" <key>subtitle_lang</key>\n" -" <string>none</string>\n" -" <key>turbo</key>\n" -" <true />\n" -" <key>two_pass</key>\n" -" <true />\n" -" <key>video_bitrate</key>\n" -" <integer>2000</integer>\n" -" <key>video_codec</key>\n" -" <string>x264</string>\n" -" <key>video_quality</key>\n" -" <integer>64</integer>\n" -" <key>video_target_size</key>\n" -" <integer>700</integer>\n" -" <key>vquality_type_bitrate</key>\n" -" <true />\n" -" <key>x264_options</key>\n" -" <string>ref=3:mixed-refs:bframes=3:weightb:direct=auto:me=umh:analys" -"e=all:trellis=1:no-fast-pskip</string>\n" +" <integer>2</integer>\n" " </dict>\n" " <dict>\n" -" <key>anamorphic</key>\n" -" <false />\n" -" <key>autocrop</key>\n" -" <true />\n" -" <key>autoscale</key>\n" -" <true />\n" -" <key>chapter_markers</key>\n" -" <true />\n" -" <key>container</key>\n" -" <string>mkv</string>\n" -" <key>deblock</key>\n" -" <real>0</real>\n" -" <key>decomb</key>\n" -" <false />\n" -" <key>deinterlace</key>\n" -" <string>slower</string>\n" -" <key>denoise</key>\n" -" <integer>1</integer>\n" -" <key>detelecine</key>\n" -" <false />\n" -" <key>framerate</key>\n" -" <string>source</string>\n" -" <key>grayscale</key>\n" -" <false />\n" -" <key>keep_aspect</key>\n" -" <true />\n" -" <key>max_height</key>\n" -" <integer>0</integer>\n" -" <key>max_width</key>\n" -" <integer>0</integer>\n" -" <key>pref_audio_list</key>\n" +" <key>preset_folder</key>\n" " <array>\n" " <dict>\n" -" <key>audio_bitrate</key>\n" -" <string>160</string>\n" -" <key>audio_codec</key>\n" -" <string>faac</string>\n" -" <key>audio_drc</key>\n" -" <real>1</real>\n" -" <key>audio_mix</key>\n" -" <string>dpl2</string>\n" -" <key>audio_rate</key>\n" +" <key>Default</key>\n" +" <false />\n" +" <key>anamorphic</key>\n" +" <false />\n" +" <key>autocrop</key>\n" +" <true />\n" +" <key>chapter_markers</key>\n" +" <true />\n" +" <key>container</key>\n" +" <string>mp4</string>\n" +" <key>deblock</key>\n" +" <integer>0</integer>\n" +" <key>deinterlace</key>\n" +" <string>none</string>\n" +" <key>denoise</key>\n" +" <string>none</string>\n" +" <key>detelecine</key>\n" +" <false />\n" +" <key>framerate</key>\n" " <string>source</string>\n" +" <key>grayscale</key>\n" +" <false />\n" +" <key>keep_aspect</key>\n" +" <true />\n" +" <key>max_height</key>\n" +" <integer>208</integer>\n" +" <key>max_width</key>\n" +" <integer>368</integer>\n" +" <key>pref_audio_list</key>\n" +" <array>\n" +" <dict>\n" +" <key>audio_bitrate</key>\n" +" <string>128</string>\n" +" <key>audio_codec</key>\n" +" <string>faac</string>\n" +" <key>audio_drc</key>\n" +" <real>1</real>\n" +" <key>audio_mix</key>\n" +" <string>dpl2</string>\n" +" <key>audio_rate</key>\n" +" <string>48</string>\n" +" </dict>\n" +" </array>\n" +" <key>preset_description</key>\n" +" <string>HandBrake's settings for the Sony PlayStation Portabl" +"e.</string>\n" +" <key>preset_name</key>\n" +" <string>PSP</string>\n" +" <key>preset_type</key>\n" +" <integer>0</integer>\n" +" <key>round_dimensions</key>\n" +" <true />\n" +" <key>subtitle_lang</key>\n" +" <string>none</string>\n" +" <key>two_pass</key>\n" +" <false />\n" +" <key>video_bitrate</key>\n" +" <integer>1024</integer>\n" +" <key>video_codec</key>\n" +" <string>ffmpeg</string>\n" +" <key>video_quality</key>\n" +" <integer>65</integer>\n" +" <key>video_target_size</key>\n" +" <integer>700</integer>\n" +" <key>vquality_type_bitrate</key>\n" +" <true />\n" +" <key>vquality_type_constant</key>\n" +" <false />\n" +" <key>vquality_type_target</key>\n" +" <false />\n" +" <key>x264_options</key>\n" +" <string></string>\n" " </dict>\n" -" </array>\n" -" <key>preset_description</key>\n" -" <string>HandBrake's settings for video from television.</string" -">\n" -" <key>preset_name</key>\n" -" <string>Television</string>\n" -" <key>preset_type</key>\n" -" <integer>0</integer>\n" -" <key>subtitle_lang</key>\n" -" <string>none</string>\n" -" <key>turbo</key>\n" -" <true />\n" -" <key>two_pass</key>\n" -" <true />\n" -" <key>video_bitrate</key>\n" -" <integer>1300</integer>\n" -" <key>video_codec</key>\n" -" <string>x264</string>\n" -" <key>video_quality</key>\n" -" <integer>64</integer>\n" -" <key>video_target_size</key>\n" -" <integer>700</integer>\n" -" <key>vquality_type_bitrate</key>\n" -" <true />\n" -" <key>x264_options</key>\n" -" <string>ref=3:mixed-refs:bframes=6:weightb:direct=auto:b-pyramid:me=" -"umh:analyse=all:8x8dct:trellis=1:nr=150:no-fast-pskip</string>\n" -" </dict>\n" -" <dict>\n" -" <key>anamorphic</key>\n" -" <true />\n" -" <key>autoscale</key>\n" -" <true />\n" -" <key>chapter_markers</key>\n" -" <false />\n" -" <key>container</key>\n" -" <string>mp4</string>\n" -" <key>deblock</key>\n" -" <real>0</real>\n" -" <key>decomb</key>\n" -" <false />\n" -" <key>deinterlace</key>\n" -" <string>none</string>\n" -" <key>denoise</key>\n" -" <integer>0</integer>\n" -" <key>detelecine</key>\n" -" <false />\n" -" <key>framerate</key>\n" -" <string>source</string>\n" -" <key>grayscale</key>\n" -" <false />\n" -" <key>keep_aspect</key>\n" -" <false />\n" -" <key>max_height</key>\n" -" <integer>0</integer>\n" -" <key>max_width</key>\n" -" <integer>0</integer>\n" -" <key>pref_audio_list</key>\n" -" <array>\n" " <dict>\n" -" <key>audio_bitrate</key>\n" -" <string>160</string>\n" -" <key>audio_codec</key>\n" -" <string>faac</string>\n" -" <key>audio_drc</key>\n" -" <real>1</real>\n" -" <key>audio_mix</key>\n" -" <string>dpl2</string>\n" -" <key>audio_rate</key>\n" -" <string>48</string>\n" -" </dict>\n" -" </array>\n" -" <key>preset_description</key>\n" -" <string>HandBrake's settings for the Microsoft Xbox 360.</strin" -"g>\n" -" <key>preset_name</key>\n" -" <string>Xbox 360</string>\n" -" <key>preset_type</key>\n" -" <integer>0</integer>\n" -" <key>subtitle_lang</key>\n" -" <string>none</string>\n" -" <key>two_pass</key>\n" -" <false />\n" -" <key>video_bitrate</key>\n" -" <integer>2000</integer>\n" -" <key>video_codec</key>\n" -" <string>x264</string>\n" -" <key>video_quality</key>\n" -" <integer>64</integer>\n" -" <key>video_target_size</key>\n" -" <integer>700</integer>\n" -" <key>vquality_type_bitrate</key>\n" -" <true />\n" -" <key>x264_options</key>\n" -" <string>level=40:ref=2:mixed-refs:bframes=3:weightb:direct=auto:b-py" -"ramid:me=umh:analyse=all:no-fast-pskip:filter=-2,-1</string>\n" -" </dict>\n" -" <dict>\n" -" <key>anamorphic</key>\n" -" <false />\n" -" <key>autocrop</key>\n" -" <true />\n" -" <key>autoscale</key>\n" -" <false />\n" -" <key>chapter_markers</key>\n" -" <true />\n" -" <key>container</key>\n" -" <string>mp4</string>\n" -" <key>deblock</key>\n" -" <real>0</real>\n" -" <key>decomb</key>\n" -" <false />\n" -" <key>deinterlace</key>\n" -" <string>none</string>\n" -" <key>denoise</key>\n" -" <integer>0</integer>\n" -" <key>detelecine</key>\n" -" <false />\n" -" <key>framerate</key>\n" -" <string>source</string>\n" -" <key>grayscale</key>\n" -" <false />\n" -" <key>ipod_file</key>\n" -" <true />\n" -" <key>keep_aspect</key>\n" -" <true />\n" -" <key>max_height</key>\n" -" <integer>0</integer>\n" -" <key>max_width</key>\n" -" <integer>480</integer>\n" -" <key>pref_audio_list</key>\n" -" <array>\n" -" <dict>\n" -" <key>audio_bitrate</key>\n" -" <string>128</string>\n" -" <key>audio_codec</key>\n" -" <string>faac</string>\n" -" <key>audio_drc</key>\n" -" <real>1</real>\n" -" <key>audio_mix</key>\n" -" <string>dpl2</string>\n" -" <key>audio_rate</key>\n" -" <string>48</string>\n" -" </dict>\n" -" </array>\n" -" <key>preset_description</key>\n" -" <string>HandBrake's settings for the iPhone and iPod Touch.</st" -"ring>\n" -" <key>preset_name</key>\n" -" <string>iPhone / iPod Touch</string>\n" -" <key>preset_type</key>\n" -" <integer>0</integer>\n" -" <key>subtitle_lang</key>\n" -" <string>none</string>\n" -" <key>two_pass</key>\n" -" <false />\n" -" <key>video_bitrate</key>\n" -" <integer>960</integer>\n" -" <key>video_codec</key>\n" -" <string>x264</string>\n" -" <key>video_quality</key>\n" -" <integer>64</integer>\n" -" <key>video_target_size</key>\n" -" <integer>700</integer>\n" -" <key>vquality_type_bitrate</key>\n" -" <true />\n" -" <key>x264_options</key>\n" -" <string>level=30:cabac=0:ref=1:analyse=all:me=umh:no-fast-pskip=1:tr" -"ellis=1</string>\n" -" </dict>\n" -" <dict>\n" -" <key>anamorphic</key>\n" -" <false />\n" -" <key>autocrop</key>\n" -" <true />\n" -" <key>autoscale</key>\n" -" <false />\n" -" <key>chapter_markers</key>\n" -" <true />\n" -" <key>container</key>\n" -" <string>mp4</string>\n" -" <key>deblock</key>\n" -" <real>0</real>\n" -" <key>decomb</key>\n" -" <false />\n" -" <key>deinterlace</key>\n" -" <string>none</string>\n" -" <key>denoise</key>\n" -" <integer>0</integer>\n" -" <key>detelecine</key>\n" -" <false />\n" -" <key>framerate</key>\n" -" <string>source</string>\n" -" <key>grayscale</key>\n" -" <false />\n" -" <key>ipod_file</key>\n" -" <true />\n" -" <key>keep_aspect</key>\n" -" <true />\n" -" <key>max_height</key>\n" -" <integer>0</integer>\n" -" <key>max_width</key>\n" -" <integer>640</integer>\n" -" <key>pref_audio_list</key>\n" -" <array>\n" -" <dict>\n" -" <key>audio_bitrate</key>\n" -" <string>160</string>\n" -" <key>audio_codec</key>\n" -" <string>faac</string>\n" -" <key>audio_drc</key>\n" -" <real>1</real>\n" -" <key>audio_mix</key>\n" -" <string>dpl2</string>\n" -" <key>audio_rate</key>\n" -" <string>48</string>\n" +" <key>Default</key>\n" +" <false />\n" +" <key>anamorphic</key>\n" +" <true />\n" +" <key>autocrop</key>\n" +" <false />\n" +" <key>autoscale</key>\n" +" <true />\n" +" <key>chapter_markers</key>\n" +" <false />\n" +" <key>container</key>\n" +" <string>mp4</string>\n" +" <key>deblock</key>\n" +" <integer>0</integer>\n" +" <key>deinterlace</key>\n" +" <string>none</string>\n" +" <key>denoise</key>\n" +" <string>none</string>\n" +" <key>detelecine</key>\n" +" <false />\n" +" <key>framerate</key>\n" +" <string>source</string>\n" +" <key>grayscale</key>\n" +" <false />\n" +" <key>keep_aspect</key>\n" +" <false />\n" +" <key>max_height</key>\n" +" <integer>0</integer>\n" +" <key>max_width</key>\n" +" <integer>0</integer>\n" +" <key>pref_audio_list</key>\n" +" <array>\n" +" <dict>\n" +" <key>audio_bitrate</key>\n" +" <string>160</string>\n" +" <key>audio_codec</key>\n" +" <string>faac</string>\n" +" <key>audio_drc</key>\n" +" <real>1</real>\n" +" <key>audio_mix</key>\n" +" <string>dpl2</string>\n" +" <key>audio_rate</key>\n" +" <string>48</string>\n" +" </dict>\n" +" </array>\n" +" <key>preset_description</key>\n" +" <string>HandBrake's settings for the Sony PlayStation 3.</str" +"ing>\n" +" <key>preset_name</key>\n" +" <string>PS3</string>\n" +" <key>preset_type</key>\n" +" <integer>0</integer>\n" +" <key>round_dimensions</key>\n" +" <false />\n" +" <key>subtitle_lang</key>\n" +" <string>none</string>\n" +" <key>two_pass</key>\n" +" <false />\n" +" <key>video_bitrate</key>\n" +" <integer>2500</integer>\n" +" <key>video_codec</key>\n" +" <string>x264</string>\n" +" <key>video_quality</key>\n" +" <integer>65</integer>\n" +" <key>video_target_size</key>\n" +" <integer>700</integer>\n" +" <key>vquality_type_bitrate</key>\n" +" <true />\n" +" <key>vquality_type_constant</key>\n" +" <false />\n" +" <key>vquality_type_target</key>\n" +" <false />\n" +" <key>x264_options</key>\n" +" <string>level=41:me=umh</string>\n" " </dict>\n" -" </array>\n" -" <key>preset_description</key>\n" -" <string>HandBrake's high resolution settings for the iPod. Good" -" video quality, great for viewing on a TV using your iPod</string>\n" -" <key>preset_name</key>\n" -" <string>iPod High-Rez</string>\n" -" <key>preset_type</key>\n" -" <integer>0</integer>\n" -" <key>subtitle_lang</key>\n" -" <string>none</string>\n" -" <key>two_pass</key>\n" -" <false />\n" -" <key>video_bitrate</key>\n" -" <integer>1500</integer>\n" -" <key>video_codec</key>\n" -" <string>x264</string>\n" -" <key>video_quality</key>\n" -" <integer>64</integer>\n" -" <key>video_target_size</key>\n" -" <integer>700</integer>\n" -" <key>vquality_type_bitrate</key>\n" -" <true />\n" -" <key>x264_options</key>\n" -" <string>level=30:bframes=0:cabac=0:ref=1:vbv-maxrate=1500:vbv-bufsiz" -"e=2000:analyse=all:me=umh:no-fast-pskip=1</string>\n" -" </dict>\n" -" <dict>\n" -" <key>anamorphic</key>\n" -" <false />\n" -" <key>autocrop</key>\n" -" <true />\n" -" <key>autoscale</key>\n" -" <false />\n" -" <key>chapter_markers</key>\n" -" <true />\n" -" <key>container</key>\n" -" <string>mp4</string>\n" -" <key>deblock</key>\n" -" <real>0</real>\n" -" <key>decomb</key>\n" -" <false />\n" -" <key>deinterlace</key>\n" -" <string>none</string>\n" -" <key>denoise</key>\n" -" <integer>0</integer>\n" -" <key>detelecine</key>\n" -" <false />\n" -" <key>framerate</key>\n" -" <string>source</string>\n" -" <key>grayscale</key>\n" -" <false />\n" -" <key>ipod_file</key>\n" -" <true />\n" -" <key>keep_aspect</key>\n" -" <true />\n" -" <key>max_height</key>\n" -" <integer>0</integer>\n" -" <key>max_width</key>\n" -" <integer>320</integer>\n" -" <key>pref_audio_list</key>\n" -" <array>\n" " <dict>\n" -" <key>audio_bitrate</key>\n" -" <string>160</string>\n" -" <key>audio_codec</key>\n" -" <string>faac</string>\n" -" <key>audio_drc</key>\n" -" <real>1</real>\n" -" <key>audio_mix</key>\n" -" <string>dpl2</string>\n" -" <key>audio_rate</key>\n" -" <string>48</string>\n" +" <key>Default</key>\n" +" <false />\n" +" <key>anamorphic</key>\n" +" <true />\n" +" <key>autoscale</key>\n" +" <true />\n" +" <key>chapter_markers</key>\n" +" <false />\n" +" <key>container</key>\n" +" <string>mp4</string>\n" +" <key>deblock</key>\n" +" <integer>0</integer>\n" +" <key>deinterlace</key>\n" +" <string>none</string>\n" +" <key>denoise</key>\n" +" <string>none</string>\n" +" <key>detelecine</key>\n" +" <false />\n" +" <key>framerate</key>\n" +" <string>source</string>\n" +" <key>grayscale</key>\n" +" <false />\n" +" <key>keep_aspect</key>\n" +" <false />\n" +" <key>max_height</key>\n" +" <integer>0</integer>\n" +" <key>max_width</key>\n" +" <integer>0</integer>\n" +" <key>pref_audio_list</key>\n" +" <array>\n" +" <dict>\n" +" <key>audio_bitrate</key>\n" +" <string>160</string>\n" +" <key>audio_codec</key>\n" +" <string>faac</string>\n" +" <key>audio_drc</key>\n" +" <real>1</real>\n" +" <key>audio_mix</key>\n" +" <string>dpl2</string>\n" +" <key>audio_rate</key>\n" +" <string>48</string>\n" +" </dict>\n" +" </array>\n" +" <key>preset_description</key>\n" +" <string>HandBrake's settings for the Microsoft Xbox 360.</str" +"ing>\n" +" <key>preset_name</key>\n" +" <string>Xbox 360</string>\n" +" <key>preset_type</key>\n" +" <integer>0</integer>\n" +" <key>round_dimensions</key>\n" +" <false />\n" +" <key>subtitle_lang</key>\n" +" <string>none</string>\n" +" <key>two_pass</key>\n" +" <false />\n" +" <key>video_bitrate</key>\n" +" <integer>2000</integer>\n" +" <key>video_codec</key>\n" +" <string>x264</string>\n" +" <key>video_quality</key>\n" +" <integer>65</integer>\n" +" <key>video_target_size</key>\n" +" <integer>700</integer>\n" +" <key>vquality_type_bitrate</key>\n" +" <true />\n" +" <key>vquality_type_constant</key>\n" +" <false />\n" +" <key>vquality_type_target</key>\n" +" <false />\n" +" <key>x264_options</key>\n" +" <string>level=40:ref=2:mixed-refs:bframes=3:weightb:subme=7:direct" +"=auto:b-pyramid:me=umh:analyse=all:no-fast-pskip:filter=-2,-1</string>\n" " </dict>\n" " </array>\n" -" <key>preset_description</key>\n" -" <string>HandBrake's low resolution settings for the iPod. Optim" -"ized for great playback on the iPod screen, with smaller file size.</st" -"ring>\n" " <key>preset_name</key>\n" -" <string>iPod Low-Rez</string>\n" +" <string>Gaming Consoles</string>\n" " <key>preset_type</key>\n" -" <integer>0</integer>\n" -" <key>subtitle_lang</key>\n" -" <string>none</string>\n" -" <key>two_pass</key>\n" -" <false />\n" -" <key>video_bitrate</key>\n" -" <integer>700</integer>\n" -" <key>video_codec</key>\n" -" <string>x264</string>\n" -" <key>video_quality</key>\n" -" <integer>64</integer>\n" -" <key>video_target_size</key>\n" -" <integer>700</integer>\n" -" <key>vquality_type_bitrate</key>\n" -" <true />\n" -" <key>x264_options</key>\n" -" <string>level=30:bframes=0:cabac=0:ref=1:vbv-maxrate=768:vbv-bufsize" -"=2000:analyse=all:me=umh:no-fast-pskip=1</string>\n" +" <integer>2</integer>\n" " </dict>\n" " </array>\n" " <key>widget-deps</key>\n" diff --git a/gtk/src/resources.plist b/gtk/src/resources.plist index bc7496a0f..282dced3b 100644 --- a/gtk/src/resources.plist +++ b/gtk/src/resources.plist @@ -4866,7 +4866,13 @@ R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A <key>folder</key> <string></string> <key>preset</key> - <string>Normal</string> + <array> + <string>Normal</string> + </array> + <key>preset_selection</key> + <array> + <string>Normal</string> + </array> <key>preset_type_folder</key> <false /> <key>preset_type_normal</key> @@ -4922,10 +4928,6 @@ R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A <false /> <key>chapters_in_destination</key> <false /> - <key>default_folder</key> - <string></string> - <key>default_preset</key> - <string>Normal</string> <key>default_source</key> <string>/dev/dvd</string> <key>destination_dir</key> @@ -4949,12 +4951,14 @@ R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A </dict> <key>Presets</key> <dict> + <key>Default</key> + <false /> <key>anamorphic</key> <true /> <key>autocrop</key> <true /> <key>autoscale</key> - <true /> + <false /> <key>chapter_markers</key> <true /> <key>constant_rate_factor</key> @@ -4962,9 +4966,9 @@ R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A <key>container</key> <string>mp4</string> <key>deblock</key> - <real>0</real> + <integer>0</integer> <key>decomb</key> - <true /> + <false /> <key>deinterlace</key> <string>none</string> <key>denoise</key> @@ -5008,6 +5012,8 @@ R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A </array> <key>preset_description</key> <string></string> + <key>preset_name</key> + <string></string> <key>preset_type</key> <integer>1</integer> <key>round_dimensions</key> @@ -5045,1280 +5051,1210 @@ R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A <key>standard-presets</key> <array> <dict> - <key>anamorphic</key> - <true /> - <key>autocrop</key> - <true /> - <key>autoscale</key> - <true /> - <key>chapter_markers</key> - <true /> - <key>container</key> - <string>mkv</string> - <key>deblock</key> - <real>0</real> - <key>decomb</key> - <false /> - <key>deinterlace</key> - <string>slower</string> - <key>denoise</key> - <integer>0</integer> - <key>detelecine</key> - <false /> - <key>framerate</key> - <string>source</string> - <key>grayscale</key> - <false /> - <key>keep_aspect</key> - <false /> - <key>max_height</key> - <integer>0</integer> - <key>max_width</key> - <integer>0</integer> - <key>pref_audio_list</key> - <array> - <dict> - <key>audio_bitrate</key> - <string>160</string> - <key>audio_codec</key> - <string>faac</string> - <key>audio_drc</key> - <real>1</real> - <key>audio_mix</key> - <string>dpl2</string> - <key>audio_rate</key> - <string>source</string> - </dict> - </array> - <key>preset_description</key> - <string>HandBrake's settings for cartoons, anime, and CGI.</string> - <key>preset_name</key> - <string>Animation</string> - <key>preset_type</key> - <integer>0</integer> - <key>subtitle_lang</key> - <string>none</string> - <key>turbo</key> - <true /> - <key>two_pass</key> - <true /> - <key>video_bitrate</key> - <integer>1000</integer> - <key>video_codec</key> - <string>x264</string> - <key>video_quality</key> - <integer>64</integer> - <key>video_target_size</key> - <integer>700</integer> - <key>vquality_type_bitrate</key> - <true /> - <key>x264_options</key> - <string>ref=5:mixed-refs:bframes=6:weightb:direct=auto:b-pyramid:me=umh:analyse=all:8x8dct:trellis=1:nr=150:no-fast-pskip:filter=2,2</string> - </dict> - <dict> - <key>anamorphic</key> - <true /> - <key>autoscale</key> - <true /> - <key>chapter_markers</key> - <true /> - <key>container</key> - <string>mp4</string> - <key>deblock</key> - <real>0</real> - <key>decomb</key> - <false /> - <key>deinterlace</key> - <string>none</string> - <key>denoise</key> - <integer>0</integer> - <key>detelecine</key> - <false /> - <key>framerate</key> - <string>source</string> - <key>grayscale</key> - <false /> - <key>keep_aspect</key> - <false /> - <key>large_mp4</key> - <true /> - <key>max_height</key> - <integer>0</integer> - <key>max_width</key> - <integer>0</integer> - <key>pref_audio_list</key> + <key>preset_folder</key> <array> <dict> - <key>audio_bitrate</key> - <string>160</string> - <key>audio_codec</key> - <string>faac</string> - <key>audio_drc</key> - <real>1</real> - <key>audio_mix</key> - <string>dpl2</string> - <key>audio_rate</key> - <string>48</string> - </dict> - <dict> - <key>audio_bitrate</key> - <string>160</string> - <key>audio_codec</key> - <string>ac3</string> - <key>audio_drc</key> - <real>1</real> - <key>audio_mix</key> + <key>Default</key> + <false /> + <key>anamorphic</key> + <true /> + <key>autocrop</key> + <true /> + <key>chapter_markers</key> + <true /> + <key>container</key> + <string>mp4</string> + <key>deblock</key> + <integer>0</integer> + <key>deinterlace</key> <string>none</string> - <key>audio_rate</key> + <key>denoise</key> + <string>none</string> + <key>detelecine</key> + <false /> + <key>framerate</key> <string>source</string> + <key>grayscale</key> + <false /> + <key>keep_aspect</key> + <false /> + <key>large_mp4</key> + <true /> + <key>max_height</key> + <integer>0</integer> + <key>max_width</key> + <integer>720</integer> + <key>pref_audio_list</key> + <array> + <dict> + <key>audio_bitrate</key> + <string>160</string> + <key>audio_codec</key> + <string>faac</string> + <key>audio_drc</key> + <real>1</real> + <key>audio_mix</key> + <string>dpl2</string> + <key>audio_rate</key> + <string>48</string> + </dict> + <dict> + <key>audio_bitrate</key> + <string>160</string> + <key>audio_codec</key> + <string>ac3</string> + <key>audio_drc</key> + <real>1</real> + <key>audio_mix</key> + <string>none</string> + <key>audio_rate</key> + <string>source</string> + </dict> + </array> + <key>preset_description</key> + <string>HandBrake's universally compatible, full resolution settings for all current Apple devices: iPod, iPhone, AppleTV, and Macs</string> + <key>preset_name</key> + <string>Universal</string> + <key>preset_type</key> + <integer>0</integer> + <key>round_dimensions</key> + <true /> + <key>subtitle_lang</key> + <string>none</string> + <key>two_pass</key> + <false /> + <key>video_bitrate</key> + <integer>2500</integer> + <key>video_codec</key> + <string>x264</string> + <key>video_quality</key> + <integer>59</integer> + <key>video_target_size</key> + <integer>700</integer> + <key>vquality_type_bitrate</key> + <false /> + <key>vquality_type_constant</key> + <true /> + <key>vquality_type_target</key> + <false /> + <key>x264_options</key> + <string>level=30:cabac=0:ref=3:mixed-refs=1:analyse=all:me=umh:no-fast-pskip=1:subme=8</string> </dict> - </array> - <key>preset_description</key> - <string>HandBrake's settings for the AppleTV, including Dolby Digital 5.1 AC3 sound. Provides a good balance between quality and file size, and optimizes performance.</string> - <key>preset_name</key> - <string>AppleTV</string> - <key>preset_type</key> - <integer>0</integer> - <key>subtitle_lang</key> - <string>none</string> - <key>two_pass</key> - <false /> - <key>video_bitrate</key> - <integer>2500</integer> - <key>video_codec</key> - <string>x264</string> - <key>video_quality</key> - <integer>64</integer> - <key>video_target_size</key> - <integer>700</integer> - <key>vquality_type_bitrate</key> - <true /> - <key>x264_options</key> - <string>bframes=3:ref=1:me=umh:no-fast-pskip=1:trellis=1:cabac=0</string> - </dict> - <dict> - <key>anamorphic</key> - <true /> - <key>autocrop</key> - <true /> - <key>autoscale</key> - <true /> - <key>chapter_markers</key> - <true /> - <key>container</key> - <string>mkv</string> - <key>deblock</key> - <real>0</real> - <key>decomb</key> - <false /> - <key>deinterlace</key> - <string>none</string> - <key>denoise</key> - <integer>0</integer> - <key>detelecine</key> - <false /> - <key>framerate</key> - <string>source</string> - <key>grayscale</key> - <false /> - <key>keep_aspect</key> - <false /> - <key>max_height</key> - <integer>0</integer> - <key>max_width</key> - <integer>0</integer> - <key>pref_audio_list</key> - <array> <dict> - <key>audio_bitrate</key> - <string>160</string> - <key>audio_codec</key> - <string>ac3</string> - <key>audio_drc</key> - <real>1</real> - <key>audio_mix</key> + <key>Default</key> + <false /> + <key>anamorphic</key> + <true /> + <key>autocrop</key> + <true /> + <key>chapter_markers</key> + <true /> + <key>container</key> + <string>mp4</string> + <key>deblock</key> + <integer>0</integer> + <key>deinterlace</key> <string>none</string> - <key>audio_rate</key> + <key>denoise</key> + <string>none</string> + <key>detelecine</key> + <false /> + <key>framerate</key> <string>source</string> + <key>grayscale</key> + <false /> + <key>keep_aspect</key> + <false /> + <key>large_mp4</key> + <true /> + <key>max_height</key> + <integer>0</integer> + <key>max_width</key> + <integer>960</integer> + <key>pref_audio_list</key> + <array> + <dict> + <key>audio_bitrate</key> + <string>160</string> + <key>audio_codec</key> + <string>faac</string> + <key>audio_drc</key> + <real>1</real> + <key>audio_mix</key> + <string>dpl2</string> + <key>audio_rate</key> + <string>48</string> + </dict> + <dict> + <key>audio_bitrate</key> + <string>160</string> + <key>audio_codec</key> + <string>ac3</string> + <key>audio_drc</key> + <real>1</real> + <key>audio_mix</key> + <string>none</string> + <key>audio_rate</key> + <string>source</string> + </dict> + </array> + <key>preset_description</key> + <string>HandBrake's settings for the AppleTV, including Dolby Digital 5.1 AC3 sound. Provides a good balance between quality and file size, and optimizes performance.</string> + <key>preset_name</key> + <string>AppleTV</string> + <key>preset_type</key> + <integer>0</integer> + <key>round_dimensions</key> + <true /> + <key>subtitle_lang</key> + <string>none</string> + <key>two_pass</key> + <false /> + <key>video_bitrate</key> + <integer>2500</integer> + <key>video_codec</key> + <string>x264</string> + <key>video_quality</key> + <integer>59</integer> + <key>video_target_size</key> + <integer>700</integer> + <key>vquality_type_bitrate</key> + <false /> + <key>vquality_type_constant</key> + <true /> + <key>vquality_type_target</key> + <false /> + <key>x264_options</key> + <string>level=30:cabac=0:ref=3:mixed-refs=1:bframes=6:weightb=1:direct=auto:no-fast-pskip=1:me=umh:subq=9:analyse=all</string> </dict> - </array> - <key>preset_description</key> - <string>HandBrake's settings maxed out for slowest encoding and highest quality. Use at your own risk. So slow it's not just insane...it's a trip to the looney bin.</string> - <key>preset_name</key> - <string>Bedlam</string> - <key>preset_type</key> - <integer>0</integer> - <key>subtitle_lang</key> - <string>none</string> - <key>turbo</key> - <true /> - <key>two_pass</key> - <true /> - <key>video_bitrate</key> - <integer>1800</integer> - <key>video_codec</key> - <string>x264</string> - <key>video_quality</key> - <integer>64</integer> - <key>video_target_size</key> - <integer>700</integer> - <key>vquality_type_bitrate</key> - <true /> - <key>x264_options</key> - <string>ref=16:mixed-refs:bframes=16:weightb:direct=auto:b-pyramid:me=esa:subme=7:me-range=64:analyse=all:8x8dct:trellis=1:no-fast-pskip:no-dct-decimate:filter=-2,-1</string> - </dict> - <dict> - <key>anamorphic</key> - <false /> - <key>autocrop</key> - <true /> - <key>autoscale</key> - <false /> - <key>chapter_markers</key> - <true /> - <key>container</key> - <string>mp4</string> - <key>deblock</key> - <real>0</real> - <key>decomb</key> - <false /> - <key>deinterlace</key> - <string>none</string> - <key>denoise</key> - <integer>0</integer> - <key>detelecine</key> - <false /> - <key>framerate</key> - <string>source</string> - <key>grayscale</key> - <false /> - <key>keep_aspect</key> - <true /> - <key>max_height</key> - <integer>0</integer> - <key>max_width</key> - <integer>512</integer> - <key>pref_audio_list</key> - <array> <dict> - <key>audio_bitrate</key> - <string>128</string> - <key>audio_codec</key> - <string>faac</string> - <key>audio_drc</key> - <real>1</real> - <key>audio_mix</key> - <string>dpl2</string> - <key>audio_rate</key> - <string>source</string> + <key>preset_folder</key> + <array> + <dict> + <key>Default</key> + <false /> + <key>anamorphic</key> + <false /> + <key>autocrop</key> + <true /> + <key>chapter_markers</key> + <true /> + <key>container</key> + <string>mp4</string> + <key>deblock</key> + <integer>0</integer> + <key>deinterlace</key> + <string>none</string> + <key>denoise</key> + <string>none</string> + <key>detelecine</key> + <false /> + <key>framerate</key> + <string>source</string> + <key>grayscale</key> + <false /> + <key>ipod_file</key> + <true /> + <key>keep_aspect</key> + <true /> + <key>max_height</key> + <integer>0</integer> + <key>max_width</key> + <integer>320</integer> + <key>pref_audio_list</key> + <array> + <dict> + <key>audio_bitrate</key> + <string>160</string> + <key>audio_codec</key> + <string>faac</string> + <key>audio_drc</key> + <real>1</real> + <key>audio_mix</key> + <string>dpl2</string> + <key>audio_rate</key> + <string>48</string> + </dict> + </array> + <key>preset_description</key> + <string>HandBrake's low resolution settings for the iPod. Optimized for great playback on the iPod screen, with smaller file size.</string> + <key>preset_name</key> + <string>iPod Classic & iPod Nano</string> + <key>preset_type</key> + <integer>0</integer> + <key>round_dimensions</key> + <true /> + <key>subtitle_lang</key> + <string>none</string> + <key>two_pass</key> + <false /> + <key>video_bitrate</key> + <integer>700</integer> + <key>video_codec</key> + <string>x264</string> + <key>video_quality</key> + <integer>65</integer> + <key>video_target_size</key> + <integer>700</integer> + <key>vquality_type_bitrate</key> + <true /> + <key>vquality_type_constant</key> + <false /> + <key>vquality_type_target</key> + <false /> + <key>x264_options</key> + <string>level=30:bframes=0:cabac=0:ref=1:vbv-maxrate=768:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1</string> + </dict> + <dict> + <key>Default</key> + <false /> + <key>anamorphic</key> + <false /> + <key>autocrop</key> + <true /> + <key>chapter_markers</key> + <true /> + <key>container</key> + <string>mp4</string> + <key>deblock</key> + <integer>0</integer> + <key>deinterlace</key> + <string>none</string> + <key>denoise</key> + <string>none</string> + <key>detelecine</key> + <false /> + <key>framerate</key> + <string>source</string> + <key>grayscale</key> + <false /> + <key>ipod_file</key> + <true /> + <key>keep_aspect</key> + <true /> + <key>max_height</key> + <integer>0</integer> + <key>max_width</key> + <integer>480</integer> + <key>pref_audio_list</key> + <array> + <dict> + <key>audio_bitrate</key> + <string>128</string> + <key>audio_codec</key> + <string>faac</string> + <key>audio_drc</key> + <real>1</real> + <key>audio_mix</key> + <string>dpl2</string> + <key>audio_rate</key> + <string>48</string> + </dict> + </array> + <key>preset_description</key> + <string>HandBrake's settings for the iPhone and iPod Touch.</string> + <key>preset_name</key> + <string>iPhone & iPod Touch</string> + <key>preset_type</key> + <integer>0</integer> + <key>round_dimensions</key> + <true /> + <key>subtitle_lang</key> + <string>none</string> + <key>two_pass</key> + <false /> + <key>video_bitrate</key> + <integer>960</integer> + <key>video_codec</key> + <string>x264</string> + <key>video_quality</key> + <integer>65</integer> + <key>video_target_size</key> + <integer>700</integer> + <key>vquality_type_bitrate</key> + <true /> + <key>vquality_type_constant</key> + <false /> + <key>vquality_type_target</key> + <false /> + <key>x264_options</key> + <string>level=30:cabac=0:ref=1:analyse=all:me=umh:no-fast-pskip=1:trellis=1</string> + </dict> + <dict> + <key>Default</key> + <false /> + <key>anamorphic</key> + <false /> + <key>autocrop</key> + <true /> + <key>chapter_markers</key> + <true /> + <key>container</key> + <string>mp4</string> + <key>deblock</key> + <integer>0</integer> + <key>deinterlace</key> + <string>none</string> + <key>denoise</key> + <string>none</string> + <key>detelecine</key> + <false /> + <key>framerate</key> + <string>source</string> + <key>grayscale</key> + <false /> + <key>ipod_file</key> + <true /> + <key>keep_aspect</key> + <true /> + <key>max_height</key> + <integer>0</integer> + <key>max_width</key> + <integer>640</integer> + <key>pref_audio_list</key> + <array> + <dict> + <key>audio_bitrate</key> + <string>160</string> + <key>audio_codec</key> + <string>faac</string> + <key>audio_drc</key> + <real>1</real> + <key>audio_mix</key> + <string>dpl2</string> + <key>audio_rate</key> + <string>48</string> + </dict> + </array> + <key>preset_description</key> + <string>HandBrake's high resolution settings for older 5 and 5.5G iPods. Good video quality, great for viewing on a TV using your iPod</string> + <key>preset_name</key> + <string>iPod Legacy</string> + <key>preset_type</key> + <integer>0</integer> + <key>round_dimensions</key> + <true /> + <key>subtitle_lang</key> + <string>none</string> + <key>two_pass</key> + <false /> + <key>video_bitrate</key> + <integer>1500</integer> + <key>video_codec</key> + <string>x264</string> + <key>video_quality</key> + <integer>65</integer> + <key>video_target_size</key> + <integer>700</integer> + <key>vquality_type_bitrate</key> + <true /> + <key>vquality_type_constant</key> + <false /> + <key>vquality_type_target</key> + <false /> + <key>x264_options</key> + <string>level=30:bframes=0:cabac=0:ref=1:vbv-maxrate=1500:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1</string> + </dict> + </array> + <key>preset_name</key> + <string>iPod & iPhone</string> + <key>preset_type</key> + <integer>2</integer> </dict> - </array> - <key>preset_description</key> - <string>HandBrake's preset for impatient people who don't care about picture quality.</string> - <key>preset_name</key> - <string>Blind</string> - <key>preset_type</key> - <integer>0</integer> - <key>subtitle_lang</key> - <string>none</string> - <key>turbo</key> - <false /> - <key>two_pass</key> - <false /> - <key>video_bitrate</key> - <integer>512</integer> - <key>video_codec</key> - <string>ffmpeg</string> - <key>video_quality</key> - <integer>64</integer> - <key>video_target_size</key> - <integer>700</integer> - <key>vquality_type_bitrate</key> - <true /> - <key>x264_options</key> - <string></string> - </dict> - <dict> - <key>anamorphic</key> - <false /> - <key>autocrop</key> - <true /> - <key>autoscale</key> - <false /> - <key>chapter_markers</key> - <true /> - <key>container</key> - <string>mp4</string> - <key>deblock</key> - <real>0</real> - <key>decomb</key> - <false /> - <key>deinterlace</key> - <string>none</string> - <key>denoise</key> - <integer>0</integer> - <key>detelecine</key> - <false /> - <key>framerate</key> - <string>source</string> - <key>grayscale</key> - <false /> - <key>keep_aspect</key> - <true /> - <key>max_height</key> - <integer>0</integer> - <key>max_width</key> - <integer>640</integer> - <key>pref_audio_list</key> - <array> <dict> - <key>audio_bitrate</key> - <string>128</string> - <key>audio_codec</key> - <string>faac</string> - <key>audio_drc</key> - <real>1</real> - <key>audio_mix</key> - <string>dpl2</string> - <key>audio_rate</key> + <key>Default</key> + <false /> + <key>anamorphic</key> + <true /> + <key>autocrop</key> + <true /> + <key>autoscale</key> + <true /> + <key>chapter_markers</key> + <true /> + <key>container</key> + <string>mp4</string> + <key>deblock</key> + <integer>0</integer> + <key>deinterlace</key> + <string>none</string> + <key>denoise</key> + <string>none</string> + <key>detelecine</key> + <false /> + <key>framerate</key> <string>source</string> + <key>grayscale</key> + <false /> + <key>keep_aspect</key> + <false /> + <key>max_height</key> + <integer>0</integer> + <key>max_width</key> + <integer>0</integer> + <key>pref_audio_list</key> + <array> + <dict> + <key>audio_bitrate</key> + <string>160</string> + <key>audio_codec</key> + <string>faac</string> + <key>audio_drc</key> + <real>1</real> + <key>audio_mix</key> + <string>dpl2</string> + <key>audio_rate</key> + <string>source</string> + </dict> + </array> + <key>preset_description</key> + <string>HandBrake's high profile settings for use with QuickTime. It can be slow, so use it when the Normal preset doesn't look good enough.</string> + <key>preset_name</key> + <string>QuickTime</string> + <key>preset_type</key> + <integer>0</integer> + <key>round_dimensions</key> + <false /> + <key>subtitle_lang</key> + <string>none</string> + <key>turbo</key> + <true /> + <key>two_pass</key> + <true /> + <key>video_bitrate</key> + <integer>1800</integer> + <key>video_codec</key> + <string>x264</string> + <key>video_quality</key> + <integer>65</integer> + <key>video_target_size</key> + <integer>700</integer> + <key>vquality_type_bitrate</key> + <true /> + <key>vquality_type_constant</key> + <false /> + <key>vquality_type_target</key> + <false /> + <key>x264_options</key> + <string>ref=3:mixed-refs:bframes=3:weightb:direct=auto:me=umh:subme=7:analyse=all:8x8dct:trellis=1:no-fast-pskip=1:psy-rd=1,1</string> </dict> </array> - <key>preset_description</key> - <string>HandBrake's preset for people without a lot of money to waste on hard drives. Tries to maximize quality for burning to CDs, so you can party like it's 1999.</string> <key>preset_name</key> - <string>Broke</string> + <string>Apple</string> <key>preset_type</key> - <integer>0</integer> - <key>subtitle_lang</key> - <string>none</string> - <key>turbo</key> - <true /> - <key>two_pass</key> - <true /> - <key>video_bitrate</key> - <integer>1600</integer> - <key>video_codec</key> - <string>x264</string> - <key>video_quality</key> - <integer>64</integer> - <key>video_target_size</key> - <integer>695</integer> - <key>vquality_type_target</key> - <true /> - <key>x264_options</key> - <string>ref=3:mixed-refs:bframes=16:weightb:b-pyramid:direct=auto:me=umh:trellis=1:analyse=all:8x8dct:no-fast-pskip</string> + <integer>2</integer> </dict> <dict> - <key>anamorphic</key> - <false /> - <key>autocrop</key> - <true /> - <key>autoscale</key> - <true /> - <key>chapter_markers</key> - <false /> - <key>container</key> - <string>mp4</string> - <key>deblock</key> - <real>0</real> - <key>decomb</key> - <false /> - <key>deinterlace</key> - <string>none</string> - <key>denoise</key> - <integer>0</integer> - <key>detelecine</key> - <false /> - <key>framerate</key> - <string>source</string> - <key>grayscale</key> - <false /> - <key>keep_aspect</key> - <true /> - <key>max_height</key> - <integer>0</integer> - <key>max_width</key> - <integer>0</integer> - <key>pref_audio_list</key> + <key>preset_folder</key> <array> <dict> - <key>audio_bitrate</key> - <string>160</string> - <key>audio_codec</key> - <string>faac</string> - <key>audio_drc</key> - <real>1</real> - <key>audio_mix</key> - <string>dpl2</string> - <key>audio_rate</key> + <key>Default</key> + <true /> + <key>anamorphic</key> + <true /> + <key>autocrop</key> + <true /> + <key>autoscale</key> + <true /> + <key>chapter_markers</key> + <true /> + <key>container</key> + <string>mp4</string> + <key>deblock</key> + <integer>0</integer> + <key>deinterlace</key> + <string>none</string> + <key>denoise</key> + <string>none</string> + <key>detelecine</key> + <false /> + <key>framerate</key> <string>source</string> + <key>grayscale</key> + <false /> + <key>keep_aspect</key> + <false /> + <key>max_height</key> + <integer>0</integer> + <key>max_width</key> + <integer>0</integer> + <key>pref_audio_list</key> + <array> + <dict> + <key>audio_bitrate</key> + <string>160</string> + <key>audio_codec</key> + <string>faac</string> + <key>audio_drc</key> + <real>1</real> + <key>audio_mix</key> + <string>dpl2</string> + <key>audio_rate</key> + <string>source</string> + </dict> + </array> + <key>preset_description</key> + <string>HandBrake's normal, default settings.</string> + <key>preset_name</key> + <string>Normal</string> + <key>preset_type</key> + <integer>0</integer> + <key>round_dimensions</key> + <false /> + <key>subtitle_lang</key> + <string>none</string> + <key>turbo</key> + <true /> + <key>two_pass</key> + <true /> + <key>video_bitrate</key> + <integer>1500</integer> + <key>video_codec</key> + <string>x264</string> + <key>video_quality</key> + <integer>65</integer> + <key>video_target_size</key> + <integer>700</integer> + <key>vquality_type_bitrate</key> + <true /> + <key>vquality_type_constant</key> + <false /> + <key>vquality_type_target</key> + <false /> + <key>x264_options</key> + <string>ref=2:bframes=2:me=umh</string> </dict> - </array> - <key>preset_description</key> - <string>HandBrake's traditional, faster, lower-quality settings.</string> - <key>preset_name</key> - <string>Classic</string> - <key>preset_type</key> - <integer>0</integer> - <key>subtitle_lang</key> - <string>none</string> - <key>two_pass</key> - <false /> - <key>video_bitrate</key> - <integer>1000</integer> - <key>video_codec</key> - <string>ffmpeg</string> - <key>video_quality</key> - <integer>64</integer> - <key>video_target_size</key> - <integer>700</integer> - <key>vquality_type_bitrate</key> - <true /> - <key>x264_options</key> - <string></string> - </dict> - <dict> - <key>anamorphic</key> - <true /> - <key>autocrop</key> - <true /> - <key>autoscale</key> - <true /> - <key>chapter_markers</key> - <true /> - <key>container</key> - <string>mkv</string> - <key>deblock</key> - <real>0</real> - <key>decomb</key> - <false /> - <key>deinterlace</key> - <string>none</string> - <key>denoise</key> - <integer>0</integer> - <key>detelecine</key> - <false /> - <key>framerate</key> - <string>source</string> - <key>grayscale</key> - <false /> - <key>keep_aspect</key> - <false /> - <key>max_height</key> - <integer>0</integer> - <key>max_width</key> - <integer>0</integer> - <key>pref_audio_list</key> - <array> <dict> - <key>audio_bitrate</key> - <string>160</string> - <key>audio_codec</key> - <string>ac3</string> - <key>audio_drc</key> - <real>1</real> - <key>audio_mix</key> + <key>Default</key> + <false /> + <key>anamorphic</key> + <false /> + <key>autocrop</key> + <true /> + <key>autoscale</key> + <true /> + <key>chapter_markers</key> + <false /> + <key>container</key> + <string>mp4</string> + <key>deblock</key> + <integer>0</integer> + <key>deinterlace</key> <string>none</string> - <key>audio_rate</key> + <key>denoise</key> + <string>none</string> + <key>detelecine</key> + <false /> + <key>framerate</key> <string>source</string> + <key>grayscale</key> + <false /> + <key>keep_aspect</key> + <true /> + <key>max_height</key> + <integer>0</integer> + <key>max_width</key> + <integer>0</integer> + <key>pref_audio_list</key> + <array> + <dict> + <key>audio_bitrate</key> + <string>160</string> + <key>audio_codec</key> + <string>faac</string> + <key>audio_drc</key> + <real>1</real> + <key>audio_mix</key> + <string>dpl2</string> + <key>audio_rate</key> + <string>source</string> + </dict> + </array> + <key>preset_description</key> + <string>HandBrake's traditional, faster, lower-quality settings.</string> + <key>preset_name</key> + <string>Classic</string> + <key>preset_type</key> + <integer>0</integer> + <key>round_dimensions</key> + <true /> + <key>subtitle_lang</key> + <string>none</string> + <key>two_pass</key> + <false /> + <key>video_bitrate</key> + <integer>1000</integer> + <key>video_codec</key> + <string>ffmpeg</string> + <key>video_quality</key> + <integer>65</integer> + <key>video_target_size</key> + <integer>700</integer> + <key>vquality_type_bitrate</key> + <true /> + <key>vquality_type_constant</key> + <false /> + <key>vquality_type_target</key> + <false /> + <key>x264_options</key> + <string></string> </dict> </array> - <key>preset_description</key> - <string>HandBrake's preset for consistently excellent quality in one pass, with the downside of entirely unpredictable file sizes and bitrates.</string> <key>preset_name</key> - <string>Constant Quality Rate</string> + <string>Basic</string> <key>preset_type</key> - <integer>0</integer> - <key>subtitle_lang</key> - <string>none</string> - <key>turbo</key> - <false /> - <key>two_pass</key> - <false /> - <key>video_bitrate</key> - <integer>2000</integer> - <key>video_codec</key> - <string>x264</string> - <key>video_quality</key> - <integer>64</integer> - <key>video_target_size</key> - <integer>700</integer> - <key>vquality_type_constant</key> - <true /> - <key>x264_options</key> - <string>ref=3:mixed-refs:bframes=3:b-pyramid:weightb:filter=-2,-1:trellis=1:analyse=all:8x8dct:me=umh</string> + <integer>2</integer> </dict> <dict> - <key>anamorphic</key> - <true /> - <key>autocrop</key> - <true /> - <key>autoscale</key> - <true /> - <key>chapter_markers</key> - <true /> - <key>container</key> - <string>mkv</string> - <key>deblock</key> - <real>0</real> - <key>decomb</key> - <false /> - <key>deinterlace</key> - <string>none</string> - <key>denoise</key> - <integer>0</integer> - <key>detelecine</key> - <false /> - <key>framerate</key> - <string>source</string> - <key>grayscale</key> - <false /> - <key>keep_aspect</key> - <false /> - <key>max_height</key> - <integer>0</integer> - <key>max_width</key> - <integer>0</integer> - <key>pref_audio_list</key> + <key>preset_folder</key> <array> <dict> - <key>audio_bitrate</key> - <string>160</string> - <key>audio_codec</key> - <string>ac3</string> - <key>audio_drc</key> - <real>1</real> - <key>audio_mix</key> + <key>Default</key> + <false /> + <key>anamorphic</key> + <true /> + <key>autocrop</key> + <true /> + <key>autoscale</key> + <true /> + <key>chapter_markers</key> + <true /> + <key>container</key> + <string>mkv</string> + <key>deblock</key> + <integer>0</integer> + <key>decomb</key> + <true /> + <key>deinterlace</key> <string>none</string> - <key>audio_rate</key> + <key>denoise</key> + <string>none</string> + <key>detelecine</key> + <true /> + <key>framerate</key> <string>source</string> + <key>grayscale</key> + <false /> + <key>keep_aspect</key> + <false /> + <key>max_height</key> + <integer>0</integer> + <key>max_width</key> + <integer>0</integer> + <key>pref_audio_list</key> + <array> + <dict> + <key>audio_bitrate</key> + <string>160</string> + <key>audio_codec</key> + <string>faac</string> + <key>audio_drc</key> + <real>1</real> + <key>audio_mix</key> + <string>dpl2</string> + <key>audio_rate</key> + <string>source</string> + </dict> + </array> + <key>preset_description</key> + <string>HandBrake's settings for cartoons, anime, and CGI.</string> + <key>preset_name</key> + <string>Animation</string> + <key>preset_type</key> + <integer>0</integer> + <key>round_dimensions</key> + <false /> + <key>subtitle_lang</key> + <string>none</string> + <key>turbo</key> + <true /> + <key>two_pass</key> + <true /> + <key>video_bitrate</key> + <integer>1000</integer> + <key>video_codec</key> + <string>x264</string> + <key>video_quality</key> + <integer>65</integer> + <key>video_target_size</key> + <integer>700</integer> + <key>vquality_type_bitrate</key> + <true /> + <key>vquality_type_constant</key> + <false /> + <key>vquality_type_target</key> + <false /> + <key>x264_options</key> + <string>ref=5:mixed-refs:bframes=6:weightb:direct=auto:b-pyramid:me=umh:analyse=all:8x8dct:trellis=1:nr=150:no-fast-pskip:filter=2,2:psy-rd=1,1:subme=9</string> </dict> - </array> - <key>preset_description</key> - <string>HandBrake's preset for true high profile x264 quality. A good balance of quality and speed, based on community standards found in the wild. This preset will give you a much better sense of x264's capabilities than vanilla main profile.</string> - <key>preset_name</key> - <string>Deux Six Quatre</string> - <key>preset_type</key> - <integer>0</integer> - <key>subtitle_lang</key> - <string>none</string> - <key>turbo</key> - <true /> - <key>two_pass</key> - <true /> - <key>video_bitrate</key> - <integer>1600</integer> - <key>video_codec</key> - <string>x264</string> - <key>video_quality</key> - <integer>64</integer> - <key>video_target_size</key> - <integer>700</integer> - <key>vquality_type_bitrate</key> - <true /> - <key>x264_options</key> - <string>ref=5:mixed-refs:bframes=3:weightb:b-pyramid:me=umh:subme=7:trellis=1:analyse=all:8x8dct:no-fast-pskip</string> - </dict> - <dict> - <key>anamorphic</key> - <true /> - <key>autocrop</key> - <true /> - <key>autoscale</key> - <true /> - <key>chapter_markers</key> - <true /> - <key>container</key> - <string>mkv</string> - <key>deblock</key> - <real>0</real> - <key>decomb</key> - <false /> - <key>deinterlace</key> - <string>none</string> - <key>denoise</key> - <integer>0</integer> - <key>detelecine</key> - <false /> - <key>framerate</key> - <string>source</string> - <key>grayscale</key> - <false /> - <key>keep_aspect</key> - <false /> - <key>max_height</key> - <integer>0</integer> - <key>max_width</key> - <integer>0</integer> - <key>pref_audio_list</key> - <array> <dict> - <key>audio_bitrate</key> - <string>160</string> - <key>audio_codec</key> - <string>ac3</string> - <key>audio_drc</key> - <real>1</real> - <key>audio_mix</key> + <key>Default</key> + <false /> + <key>anamorphic</key> + <true /> + <key>autocrop</key> + <true /> + <key>autoscale</key> + <true /> + <key>chapter_markers</key> + <true /> + <key>container</key> + <string>mkv</string> + <key>deblock</key> + <integer>0</integer> + <key>deinterlace</key> <string>none</string> - <key>audio_rate</key> + <key>denoise</key> + <string>none</string> + <key>detelecine</key> + <false /> + <key>framerate</key> <string>source</string> + <key>grayscale</key> + <false /> + <key>keep_aspect</key> + <false /> + <key>max_height</key> + <integer>0</integer> + <key>max_width</key> + <integer>0</integer> + <key>pref_audio_list</key> + <array> + <dict> + <key>audio_bitrate</key> + <string>160</string> + <key>audio_codec</key> + <string>ac3</string> + <key>audio_drc</key> + <real>1</real> + <key>audio_mix</key> + <string>none</string> + <key>audio_rate</key> + <string>source</string> + </dict> + </array> + <key>preset_description</key> + <string>HandBrake's preset for consistently excellent quality in one pass, with the downside of entirely unpredictable file sizes and bitrates.</string> + <key>preset_name</key> + <string>Constant Quality Rate</string> + <key>preset_type</key> + <integer>0</integer> + <key>round_dimensions</key> + <false /> + <key>subtitle_lang</key> + <string>none</string> + <key>turbo</key> + <false /> + <key>two_pass</key> + <false /> + <key>video_bitrate</key> + <integer>2000</integer> + <key>video_codec</key> + <string>x264</string> + <key>video_quality</key> + <integer>60</integer> + <key>video_target_size</key> + <integer>700</integer> + <key>vquality_type_bitrate</key> + <false /> + <key>vquality_type_constant</key> + <true /> + <key>vquality_type_target</key> + <false /> + <key>x264_options</key> + <string>ref=3:mixed-refs:bframes=3:b-pyramid:weightb:filter=-2,-1:trellis=1:analyse=all:8x8dct:me=umh:subme=9:psy-rd=1,1</string> </dict> - </array> - <key>preset_description</key> - <string>HandBrake's preset for feature films.</string> - <key>preset_name</key> - <string>Film</string> - <key>preset_type</key> - <integer>0</integer> - <key>subtitle_lang</key> - <string>none</string> - <key>turbo</key> - <true /> - <key>two_pass</key> - <true /> - <key>video_bitrate</key> - <integer>1800</integer> - <key>video_codec</key> - <string>x264</string> - <key>video_quality</key> - <integer>64</integer> - <key>video_target_size</key> - <integer>700</integer> - <key>vquality_type_bitrate</key> - <true /> - <key>x264_options</key> - <string>ref=3:mixed-refs:bframes=6:weightb:direct=auto:b-pyramid:me=umh:subme=7:analyse=all:8x8dct:trellis=1:no-fast-pskip</string> - </dict> - <dict> - <key>anamorphic</key> - <true /> - <key>autocrop</key> - <true /> - <key>autoscale</key> - <true /> - <key>chapter_markers</key> - <true /> - <key>container</key> - <string>mp4</string> - <key>deblock</key> - <real>0</real> - <key>decomb</key> - <false /> - <key>deinterlace</key> - <string>none</string> - <key>denoise</key> - <integer>0</integer> - <key>detelecine</key> - <false /> - <key>framerate</key> - <string>source</string> - <key>grayscale</key> - <false /> - <key>keep_aspect</key> - <false /> - <key>max_height</key> - <integer>0</integer> - <key>max_width</key> - <integer>0</integer> - <key>pref_audio_list</key> - <array> <dict> - <key>audio_bitrate</key> - <string>160</string> - <key>audio_codec</key> - <string>faac</string> - <key>audio_drc</key> - <real>1</real> - <key>audio_mix</key> - <string>dpl2</string> - <key>audio_rate</key> + <key>Default</key> + <false /> + <key>anamorphic</key> + <true /> + <key>autocrop</key> + <true /> + <key>autoscale</key> + <true /> + <key>chapter_markers</key> + <true /> + <key>container</key> + <string>mkv</string> + <key>deblock</key> + <integer>0</integer> + <key>deinterlace</key> + <string>none</string> + <key>denoise</key> + <string>none</string> + <key>detelecine</key> + <false /> + <key>framerate</key> <string>source</string> + <key>grayscale</key> + <false /> + <key>keep_aspect</key> + <false /> + <key>max_height</key> + <integer>0</integer> + <key>max_width</key> + <integer>0</integer> + <key>pref_audio_list</key> + <array> + <dict> + <key>audio_bitrate</key> + <string>160</string> + <key>audio_codec</key> + <string>ac3</string> + <key>audio_drc</key> + <real>1</real> + <key>audio_mix</key> + <string>none</string> + <key>audio_rate</key> + <string>source</string> + </dict> + </array> + <key>preset_description</key> + <string>HandBrake's preset for feature films.</string> + <key>preset_name</key> + <string>Film</string> + <key>preset_type</key> + <integer>0</integer> + <key>round_dimensions</key> + <false /> + <key>subtitle_lang</key> + <string>none</string> + <key>turbo</key> + <true /> + <key>two_pass</key> + <true /> + <key>video_bitrate</key> + <integer>1800</integer> + <key>video_codec</key> + <string>x264</string> + <key>video_quality</key> + <integer>65</integer> + <key>video_target_size</key> + <integer>700</integer> + <key>vquality_type_bitrate</key> + <true /> + <key>vquality_type_constant</key> + <false /> + <key>vquality_type_target</key> + <false /> + <key>x264_options</key> + <string>ref=3:mixed-refs:bframes=6:weightb:direct=auto:b-pyramid:me=umh:subme=9:analyse=all:8x8dct:trellis=1:no-fast-pskip:psy-rd=1,1</string> </dict> - </array> - <key>preset_description</key> - <string>HandBrake's normal, default settings.</string> - <key>preset_name</key> - <string>Normal</string> - <key>preset_type</key> - <integer>0</integer> - <key>subtitle_lang</key> - <string>none</string> - <key>turbo</key> - <true /> - <key>two_pass</key> - <true /> - <key>video_bitrate</key> - <integer>1500</integer> - <key>video_codec</key> - <string>x264</string> - <key>video_quality</key> - <integer>64</integer> - <key>video_target_size</key> - <integer>700</integer> - <key>vquality_type_bitrate</key> - <true /> - <key>x264_options</key> - <string>ref=2:bframes=2:me=umh</string> - </dict> - <dict> - <key>anamorphic</key> - <true /> - <key>autoscale</key> - <true /> - <key>chapter_markers</key> - <false /> - <key>container</key> - <string>mp4</string> - <key>deblock</key> - <real>0</real> - <key>decomb</key> - <false /> - <key>deinterlace</key> - <string>none</string> - <key>denoise</key> - <integer>0</integer> - <key>detelecine</key> - <false /> - <key>framerate</key> - <string>source</string> - <key>grayscale</key> - <false /> - <key>keep_aspect</key> - <false /> - <key>max_height</key> - <integer>0</integer> - <key>max_width</key> - <integer>0</integer> - <key>pref_audio_list</key> - <array> - <dict> - <key>audio_bitrate</key> - <string>160</string> - <key>audio_codec</key> - <string>faac</string> - <key>audio_drc</key> - <real>1</real> - <key>audio_mix</key> - <string>dpl2</string> - <key>audio_rate</key> - <string>48</string> - </dict> - </array> - <key>preset_description</key> - <string>HandBrake's settings for the Sony PlayStation 3.</string> - <key>preset_name</key> - <string>PS3</string> - <key>preset_type</key> - <integer>0</integer> - <key>subtitle_lang</key> - <string>none</string> - <key>two_pass</key> - <false /> - <key>video_bitrate</key> - <integer>2500</integer> - <key>video_codec</key> - <string>x264</string> - <key>video_quality</key> - <integer>64</integer> - <key>video_target_size</key> - <integer>700</integer> - <key>vquality_type_bitrate</key> - <true /> - <key>x264_options</key> - <string>level=41:me=umh</string> - </dict> - <dict> - <key>anamorphic</key> - <false /> - <key>autocrop</key> - <true /> - <key>autoscale</key> - <false /> - <key>chapter_markers</key> - <true /> - <key>container</key> - <string>mp4</string> - <key>deblock</key> - <real>0</real> - <key>decomb</key> - <false /> - <key>deinterlace</key> - <string>none</string> - <key>denoise</key> - <integer>0</integer> - <key>detelecine</key> - <false /> - <key>framerate</key> - <string>source</string> - <key>grayscale</key> - <false /> - <key>keep_aspect</key> - <true /> - <key>max_height</key> - <integer>208</integer> - <key>max_width</key> - <integer>368</integer> - <key>pref_audio_list</key> - <array> - <dict> - <key>audio_bitrate</key> - <string>128</string> - <key>audio_codec</key> - <string>faac</string> - <key>audio_drc</key> - <real>1</real> - <key>audio_mix</key> - <string>dpl2</string> - <key>audio_rate</key> - <string>48</string> - </dict> - </array> - <key>preset_description</key> - <string>HandBrake's settings for the Sony PlayStation Portable.</string> - <key>preset_name</key> - <string>PSP</string> - <key>preset_type</key> - <integer>0</integer> - <key>subtitle_lang</key> - <string>none</string> - <key>two_pass</key> - <false /> - <key>video_bitrate</key> - <integer>1024</integer> - <key>video_codec</key> - <string>ffmpeg</string> - <key>video_quality</key> - <integer>64</integer> - <key>video_target_size</key> - <integer>700</integer> - <key>vquality_type_bitrate</key> - <true /> - <key>x264_options</key> - <string></string> - </dict> - <dict> - <key>anamorphic</key> - <true /> - <key>autocrop</key> - <true /> - <key>autoscale</key> - <true /> - <key>chapter_markers</key> - <true /> - <key>container</key> - <string>mp4</string> - <key>deblock</key> - <real>0</real> - <key>decomb</key> - <false /> - <key>deinterlace</key> - <string>none</string> - <key>denoise</key> - <integer>0</integer> - <key>detelecine</key> - <false /> - <key>framerate</key> - <string>source</string> - <key>grayscale</key> - <false /> - <key>keep_aspect</key> - <false /> - <key>max_height</key> - <integer>0</integer> - <key>max_width</key> - <integer>0</integer> - <key>pref_audio_list</key> - <array> <dict> - <key>audio_bitrate</key> - <string>160</string> - <key>audio_codec</key> - <string>faac</string> - <key>audio_drc</key> - <real>1</real> - <key>audio_mix</key> - <string>dpl2</string> - <key>audio_rate</key> + <key>Default</key> + <false /> + <key>anamorphic</key> + <true /> + <key>autocrop</key> + <true /> + <key>autoscale</key> + <true /> + <key>chapter_markers</key> + <true /> + <key>container</key> + <string>mkv</string> + <key>deblock</key> + <integer>0</integer> + <key>decomb</key> + <true /> + <key>deinterlace</key> + <string>none</string> + <key>denoise</key> + <string>none</string> + <key>detelecine</key> + <true /> + <key>framerate</key> <string>source</string> + <key>grayscale</key> + <false /> + <key>keep_aspect</key> + <false /> + <key>max_height</key> + <integer>0</integer> + <key>max_width</key> + <integer>0</integer> + <key>pref_audio_list</key> + <array> + <dict> + <key>audio_bitrate</key> + <string>160</string> + <key>audio_codec</key> + <string>faac</string> + <key>audio_drc</key> + <real>1</real> + <key>audio_mix</key> + <string>dpl2</string> + <key>audio_rate</key> + <string>source</string> + </dict> + </array> + <key>preset_description</key> + <string>HandBrake's settings for video from television.</string> + <key>preset_name</key> + <string>Television</string> + <key>preset_type</key> + <integer>0</integer> + <key>round_dimensions</key> + <false /> + <key>subtitle_lang</key> + <string>none</string> + <key>turbo</key> + <true /> + <key>two_pass</key> + <true /> + <key>video_bitrate</key> + <integer>1300</integer> + <key>video_codec</key> + <string>x264</string> + <key>video_quality</key> + <integer>65</integer> + <key>video_target_size</key> + <integer>700</integer> + <key>vquality_type_bitrate</key> + <true /> + <key>vquality_type_constant</key> + <false /> + <key>vquality_type_target</key> + <false /> + <key>x264_options</key> + <string>ref=3:mixed-refs:bframes=6:weightb:direct=auto:b-pyramid:me=umh:subme=9:analyse=all:8x8dct:trellis=1:nr=150:no-fast-pskip=1:psy-rd=1,1</string> </dict> </array> - <key>preset_description</key> - <string>HandBrake's high quality settings for use with QuickTime. It can be slow, so use it when the Normal preset doesn't look good enough.</string> <key>preset_name</key> - <string>QuickTime</string> + <string>High Profile</string> <key>preset_type</key> - <integer>0</integer> - <key>subtitle_lang</key> - <string>none</string> - <key>turbo</key> - <true /> - <key>two_pass</key> - <true /> - <key>video_bitrate</key> - <integer>2000</integer> - <key>video_codec</key> - <string>x264</string> - <key>video_quality</key> - <integer>64</integer> - <key>video_target_size</key> - <integer>700</integer> - <key>vquality_type_bitrate</key> - <true /> - <key>x264_options</key> - <string>ref=3:mixed-refs:bframes=3:weightb:direct=auto:me=umh:analyse=all:trellis=1:no-fast-pskip</string> + <integer>2</integer> </dict> <dict> - <key>anamorphic</key> - <false /> - <key>autocrop</key> - <true /> - <key>autoscale</key> - <true /> - <key>chapter_markers</key> - <true /> - <key>container</key> - <string>mkv</string> - <key>deblock</key> - <real>0</real> - <key>decomb</key> - <false /> - <key>deinterlace</key> - <string>slower</string> - <key>denoise</key> - <integer>1</integer> - <key>detelecine</key> - <false /> - <key>framerate</key> - <string>source</string> - <key>grayscale</key> - <false /> - <key>keep_aspect</key> - <true /> - <key>max_height</key> - <integer>0</integer> - <key>max_width</key> - <integer>0</integer> - <key>pref_audio_list</key> + <key>preset_folder</key> <array> <dict> - <key>audio_bitrate</key> - <string>160</string> - <key>audio_codec</key> - <string>faac</string> - <key>audio_drc</key> - <real>1</real> - <key>audio_mix</key> - <string>dpl2</string> - <key>audio_rate</key> + <key>Default</key> + <false /> + <key>anamorphic</key> + <false /> + <key>autocrop</key> + <true /> + <key>chapter_markers</key> + <true /> + <key>container</key> + <string>mp4</string> + <key>deblock</key> + <integer>0</integer> + <key>deinterlace</key> + <string>none</string> + <key>denoise</key> + <string>none</string> + <key>detelecine</key> + <false /> + <key>framerate</key> <string>source</string> + <key>grayscale</key> + <false /> + <key>keep_aspect</key> + <true /> + <key>max_height</key> + <integer>208</integer> + <key>max_width</key> + <integer>368</integer> + <key>pref_audio_list</key> + <array> + <dict> + <key>audio_bitrate</key> + <string>128</string> + <key>audio_codec</key> + <string>faac</string> + <key>audio_drc</key> + <real>1</real> + <key>audio_mix</key> + <string>dpl2</string> + <key>audio_rate</key> + <string>48</string> + </dict> + </array> + <key>preset_description</key> + <string>HandBrake's settings for the Sony PlayStation Portable.</string> + <key>preset_name</key> + <string>PSP</string> + <key>preset_type</key> + <integer>0</integer> + <key>round_dimensions</key> + <true /> + <key>subtitle_lang</key> + <string>none</string> + <key>two_pass</key> + <false /> + <key>video_bitrate</key> + <integer>1024</integer> + <key>video_codec</key> + <string>ffmpeg</string> + <key>video_quality</key> + <integer>65</integer> + <key>video_target_size</key> + <integer>700</integer> + <key>vquality_type_bitrate</key> + <true /> + <key>vquality_type_constant</key> + <false /> + <key>vquality_type_target</key> + <false /> + <key>x264_options</key> + <string></string> </dict> - </array> - <key>preset_description</key> - <string>HandBrake's settings for video from television.</string> - <key>preset_name</key> - <string>Television</string> - <key>preset_type</key> - <integer>0</integer> - <key>subtitle_lang</key> - <string>none</string> - <key>turbo</key> - <true /> - <key>two_pass</key> - <true /> - <key>video_bitrate</key> - <integer>1300</integer> - <key>video_codec</key> - <string>x264</string> - <key>video_quality</key> - <integer>64</integer> - <key>video_target_size</key> - <integer>700</integer> - <key>vquality_type_bitrate</key> - <true /> - <key>x264_options</key> - <string>ref=3:mixed-refs:bframes=6:weightb:direct=auto:b-pyramid:me=umh:analyse=all:8x8dct:trellis=1:nr=150:no-fast-pskip</string> - </dict> - <dict> - <key>anamorphic</key> - <true /> - <key>autoscale</key> - <true /> - <key>chapter_markers</key> - <false /> - <key>container</key> - <string>mp4</string> - <key>deblock</key> - <real>0</real> - <key>decomb</key> - <false /> - <key>deinterlace</key> - <string>none</string> - <key>denoise</key> - <integer>0</integer> - <key>detelecine</key> - <false /> - <key>framerate</key> - <string>source</string> - <key>grayscale</key> - <false /> - <key>keep_aspect</key> - <false /> - <key>max_height</key> - <integer>0</integer> - <key>max_width</key> - <integer>0</integer> - <key>pref_audio_list</key> - <array> - <dict> - <key>audio_bitrate</key> - <string>160</string> - <key>audio_codec</key> - <string>faac</string> - <key>audio_drc</key> - <real>1</real> - <key>audio_mix</key> - <string>dpl2</string> - <key>audio_rate</key> - <string>48</string> - </dict> - </array> - <key>preset_description</key> - <string>HandBrake's settings for the Microsoft Xbox 360.</string> - <key>preset_name</key> - <string>Xbox 360</string> - <key>preset_type</key> - <integer>0</integer> - <key>subtitle_lang</key> - <string>none</string> - <key>two_pass</key> - <false /> - <key>video_bitrate</key> - <integer>2000</integer> - <key>video_codec</key> - <string>x264</string> - <key>video_quality</key> - <integer>64</integer> - <key>video_target_size</key> - <integer>700</integer> - <key>vquality_type_bitrate</key> - <true /> - <key>x264_options</key> - <string>level=40:ref=2:mixed-refs:bframes=3:weightb:direct=auto:b-pyramid:me=umh:analyse=all:no-fast-pskip:filter=-2,-1</string> - </dict> - <dict> - <key>anamorphic</key> - <false /> - <key>autocrop</key> - <true /> - <key>autoscale</key> - <false /> - <key>chapter_markers</key> - <true /> - <key>container</key> - <string>mp4</string> - <key>deblock</key> - <real>0</real> - <key>decomb</key> - <false /> - <key>deinterlace</key> - <string>none</string> - <key>denoise</key> - <integer>0</integer> - <key>detelecine</key> - <false /> - <key>framerate</key> - <string>source</string> - <key>grayscale</key> - <false /> - <key>ipod_file</key> - <true /> - <key>keep_aspect</key> - <true /> - <key>max_height</key> - <integer>0</integer> - <key>max_width</key> - <integer>480</integer> - <key>pref_audio_list</key> - <array> - <dict> - <key>audio_bitrate</key> - <string>128</string> - <key>audio_codec</key> - <string>faac</string> - <key>audio_drc</key> - <real>1</real> - <key>audio_mix</key> - <string>dpl2</string> - <key>audio_rate</key> - <string>48</string> - </dict> - </array> - <key>preset_description</key> - <string>HandBrake's settings for the iPhone and iPod Touch.</string> - <key>preset_name</key> - <string>iPhone / iPod Touch</string> - <key>preset_type</key> - <integer>0</integer> - <key>subtitle_lang</key> - <string>none</string> - <key>two_pass</key> - <false /> - <key>video_bitrate</key> - <integer>960</integer> - <key>video_codec</key> - <string>x264</string> - <key>video_quality</key> - <integer>64</integer> - <key>video_target_size</key> - <integer>700</integer> - <key>vquality_type_bitrate</key> - <true /> - <key>x264_options</key> - <string>level=30:cabac=0:ref=1:analyse=all:me=umh:no-fast-pskip=1:trellis=1</string> - </dict> - <dict> - <key>anamorphic</key> - <false /> - <key>autocrop</key> - <true /> - <key>autoscale</key> - <false /> - <key>chapter_markers</key> - <true /> - <key>container</key> - <string>mp4</string> - <key>deblock</key> - <real>0</real> - <key>decomb</key> - <false /> - <key>deinterlace</key> - <string>none</string> - <key>denoise</key> - <integer>0</integer> - <key>detelecine</key> - <false /> - <key>framerate</key> - <string>source</string> - <key>grayscale</key> - <false /> - <key>ipod_file</key> - <true /> - <key>keep_aspect</key> - <true /> - <key>max_height</key> - <integer>0</integer> - <key>max_width</key> - <integer>640</integer> - <key>pref_audio_list</key> - <array> <dict> - <key>audio_bitrate</key> - <string>160</string> - <key>audio_codec</key> - <string>faac</string> - <key>audio_drc</key> - <real>1</real> - <key>audio_mix</key> - <string>dpl2</string> - <key>audio_rate</key> - <string>48</string> + <key>Default</key> + <false /> + <key>anamorphic</key> + <true /> + <key>autocrop</key> + <false /> + <key>autoscale</key> + <true /> + <key>chapter_markers</key> + <false /> + <key>container</key> + <string>mp4</string> + <key>deblock</key> + <integer>0</integer> + <key>deinterlace</key> + <string>none</string> + <key>denoise</key> + <string>none</string> + <key>detelecine</key> + <false /> + <key>framerate</key> + <string>source</string> + <key>grayscale</key> + <false /> + <key>keep_aspect</key> + <false /> + <key>max_height</key> + <integer>0</integer> + <key>max_width</key> + <integer>0</integer> + <key>pref_audio_list</key> + <array> + <dict> + <key>audio_bitrate</key> + <string>160</string> + <key>audio_codec</key> + <string>faac</string> + <key>audio_drc</key> + <real>1</real> + <key>audio_mix</key> + <string>dpl2</string> + <key>audio_rate</key> + <string>48</string> + </dict> + </array> + <key>preset_description</key> + <string>HandBrake's settings for the Sony PlayStation 3.</string> + <key>preset_name</key> + <string>PS3</string> + <key>preset_type</key> + <integer>0</integer> + <key>round_dimensions</key> + <false /> + <key>subtitle_lang</key> + <string>none</string> + <key>two_pass</key> + <false /> + <key>video_bitrate</key> + <integer>2500</integer> + <key>video_codec</key> + <string>x264</string> + <key>video_quality</key> + <integer>65</integer> + <key>video_target_size</key> + <integer>700</integer> + <key>vquality_type_bitrate</key> + <true /> + <key>vquality_type_constant</key> + <false /> + <key>vquality_type_target</key> + <false /> + <key>x264_options</key> + <string>level=41:me=umh</string> </dict> - </array> - <key>preset_description</key> - <string>HandBrake's high resolution settings for the iPod. Good video quality, great for viewing on a TV using your iPod</string> - <key>preset_name</key> - <string>iPod High-Rez</string> - <key>preset_type</key> - <integer>0</integer> - <key>subtitle_lang</key> - <string>none</string> - <key>two_pass</key> - <false /> - <key>video_bitrate</key> - <integer>1500</integer> - <key>video_codec</key> - <string>x264</string> - <key>video_quality</key> - <integer>64</integer> - <key>video_target_size</key> - <integer>700</integer> - <key>vquality_type_bitrate</key> - <true /> - <key>x264_options</key> - <string>level=30:bframes=0:cabac=0:ref=1:vbv-maxrate=1500:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1</string> - </dict> - <dict> - <key>anamorphic</key> - <false /> - <key>autocrop</key> - <true /> - <key>autoscale</key> - <false /> - <key>chapter_markers</key> - <true /> - <key>container</key> - <string>mp4</string> - <key>deblock</key> - <real>0</real> - <key>decomb</key> - <false /> - <key>deinterlace</key> - <string>none</string> - <key>denoise</key> - <integer>0</integer> - <key>detelecine</key> - <false /> - <key>framerate</key> - <string>source</string> - <key>grayscale</key> - <false /> - <key>ipod_file</key> - <true /> - <key>keep_aspect</key> - <true /> - <key>max_height</key> - <integer>0</integer> - <key>max_width</key> - <integer>320</integer> - <key>pref_audio_list</key> - <array> <dict> - <key>audio_bitrate</key> - <string>160</string> - <key>audio_codec</key> - <string>faac</string> - <key>audio_drc</key> - <real>1</real> - <key>audio_mix</key> - <string>dpl2</string> - <key>audio_rate</key> - <string>48</string> + <key>Default</key> + <false /> + <key>anamorphic</key> + <true /> + <key>autoscale</key> + <true /> + <key>chapter_markers</key> + <false /> + <key>container</key> + <string>mp4</string> + <key>deblock</key> + <integer>0</integer> + <key>deinterlace</key> + <string>none</string> + <key>denoise</key> + <string>none</string> + <key>detelecine</key> + <false /> + <key>framerate</key> + <string>source</string> + <key>grayscale</key> + <false /> + <key>keep_aspect</key> + <false /> + <key>max_height</key> + <integer>0</integer> + <key>max_width</key> + <integer>0</integer> + <key>pref_audio_list</key> + <array> + <dict> + <key>audio_bitrate</key> + <string>160</string> + <key>audio_codec</key> + <string>faac</string> + <key>audio_drc</key> + <real>1</real> + <key>audio_mix</key> + <string>dpl2</string> + <key>audio_rate</key> + <string>48</string> + </dict> + </array> + <key>preset_description</key> + <string>HandBrake's settings for the Microsoft Xbox 360.</string> + <key>preset_name</key> + <string>Xbox 360</string> + <key>preset_type</key> + <integer>0</integer> + <key>round_dimensions</key> + <false /> + <key>subtitle_lang</key> + <string>none</string> + <key>two_pass</key> + <false /> + <key>video_bitrate</key> + <integer>2000</integer> + <key>video_codec</key> + <string>x264</string> + <key>video_quality</key> + <integer>65</integer> + <key>video_target_size</key> + <integer>700</integer> + <key>vquality_type_bitrate</key> + <true /> + <key>vquality_type_constant</key> + <false /> + <key>vquality_type_target</key> + <false /> + <key>x264_options</key> + <string>level=40:ref=2:mixed-refs:bframes=3:weightb:subme=7:direct=auto:b-pyramid:me=umh:analyse=all:no-fast-pskip:filter=-2,-1</string> </dict> </array> - <key>preset_description</key> - <string>HandBrake's low resolution settings for the iPod. Optimized for great playback on the iPod screen, with smaller file size.</string> <key>preset_name</key> - <string>iPod Low-Rez</string> + <string>Gaming Consoles</string> <key>preset_type</key> - <integer>0</integer> - <key>subtitle_lang</key> - <string>none</string> - <key>two_pass</key> - <false /> - <key>video_bitrate</key> - <integer>700</integer> - <key>video_codec</key> - <string>x264</string> - <key>video_quality</key> - <integer>64</integer> - <key>video_target_size</key> - <integer>700</integer> - <key>vquality_type_bitrate</key> - <true /> - <key>x264_options</key> - <string>level=30:bframes=0:cabac=0:ref=1:vbv-maxrate=768:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1</string> + <integer>2</integer> </dict> </array> <key>widget-deps</key> diff --git a/gtk/src/settings.c b/gtk/src/settings.c index e3bec95ea..4cb797fe1 100644 --- a/gtk/src/settings.c +++ b/gtk/src/settings.c @@ -290,8 +290,18 @@ ghb_widget_value(GtkWidget *widget) else if (type == GTK_TYPE_HSCALE) { gdouble dval; + gint digits; + + digits = gtk_scale_get_digits(GTK_SCALE(widget)); dval = gtk_range_get_value(GTK_RANGE(widget)); - value = ghb_double_value_new(dval); + if (digits) + { + value = ghb_double_value_new(dval); + } + else + { + value = ghb_int_value_new(dval); + } } else if (type == GTK_TYPE_TEXT_VIEW) { diff --git a/gtk/src/standard_presets.xml b/gtk/src/standard_presets.xml index 9d147d58a..3238466d0 100644 --- a/gtk/src/standard_presets.xml +++ b/gtk/src/standard_presets.xml @@ -3,1280 +3,1210 @@ <plist version="1.0"> <array> <dict> - <key>preset_name</key> - <string>Animation</string> - <key>anamorphic</key> - <true /> - <key>autocrop</key> - <true /> - <key>autoscale</key> - <true /> - <key>chapter_markers</key> - <true /> - <key>container</key> - <string>mkv</string> - <key>deblock</key> - <real>0</real> - <key>decomb</key> - <false /> - <key>deinterlace</key> - <string>slower</string> - <key>denoise</key> - <integer>0</integer> - <key>detelecine</key> - <false /> - <key>framerate</key> - <string>source</string> - <key>grayscale</key> - <false /> - <key>keep_aspect</key> - <false /> - <key>max_height</key> - <integer>0</integer> - <key>max_width</key> - <integer>0</integer> - <key>pref_audio_list</key> + <key>preset_folder</key> <array> <dict> - <key>audio_bitrate</key> - <string>160</string> - <key>audio_codec</key> - <string>faac</string> - <key>audio_drc</key> - <real>1</real> - <key>audio_mix</key> - <string>dpl2</string> - <key>audio_rate</key> - <string>source</string> - </dict> - </array> - <key>preset_description</key> - <string>HandBrake's settings for cartoons, anime, and CGI.</string> - <key>preset_type</key> - <integer>0</integer> - <key>subtitle_lang</key> - <string>none</string> - <key>turbo</key> - <true /> - <key>two_pass</key> - <true /> - <key>video_bitrate</key> - <integer>1000</integer> - <key>video_codec</key> - <string>x264</string> - <key>video_quality</key> - <integer>64</integer> - <key>video_target_size</key> - <integer>700</integer> - <key>vquality_type_bitrate</key> - <true /> - <key>x264_options</key> - <string>ref=5:mixed-refs:bframes=6:weightb:direct=auto:b-pyramid:me=umh:analyse=all:8x8dct:trellis=1:nr=150:no-fast-pskip:filter=2,2</string> - </dict> - <dict> - <key>preset_name</key> - <string>AppleTV</string> - <key>anamorphic</key> - <true /> - <key>autoscale</key> - <true /> - <key>chapter_markers</key> - <true /> - <key>container</key> - <string>mp4</string> - <key>deblock</key> - <real>0</real> - <key>decomb</key> - <false /> - <key>deinterlace</key> - <string>none</string> - <key>denoise</key> - <integer>0</integer> - <key>detelecine</key> - <false /> - <key>framerate</key> - <string>source</string> - <key>grayscale</key> - <false /> - <key>keep_aspect</key> - <false /> - <key>large_mp4</key> - <true /> - <key>max_height</key> - <integer>0</integer> - <key>max_width</key> - <integer>0</integer> - <key>pref_audio_list</key> - <array> - <dict> - <key>audio_bitrate</key> - <string>160</string> - <key>audio_codec</key> - <string>faac</string> - <key>audio_drc</key> - <real>1</real> - <key>audio_mix</key> - <string>dpl2</string> - <key>audio_rate</key> - <string>48</string> - </dict> - <dict> - <key>audio_bitrate</key> - <string>160</string> - <key>audio_codec</key> - <string>ac3</string> - <key>audio_drc</key> - <real>1</real> - <key>audio_mix</key> + <key>Default</key> + <false /> + <key>anamorphic</key> + <true /> + <key>autocrop</key> + <true /> + <key>chapter_markers</key> + <true /> + <key>container</key> + <string>mp4</string> + <key>deblock</key> + <integer>0</integer> + <key>deinterlace</key> + <string>none</string> + <key>denoise</key> <string>none</string> - <key>audio_rate</key> + <key>detelecine</key> + <false /> + <key>framerate</key> <string>source</string> + <key>grayscale</key> + <false /> + <key>keep_aspect</key> + <false /> + <key>large_mp4</key> + <true /> + <key>max_height</key> + <integer>0</integer> + <key>max_width</key> + <integer>720</integer> + <key>pref_audio_list</key> + <array> + <dict> + <key>audio_bitrate</key> + <string>160</string> + <key>audio_codec</key> + <string>faac</string> + <key>audio_drc</key> + <real>1</real> + <key>audio_mix</key> + <string>dpl2</string> + <key>audio_rate</key> + <string>48</string> + </dict> + <dict> + <key>audio_bitrate</key> + <string>160</string> + <key>audio_codec</key> + <string>ac3</string> + <key>audio_drc</key> + <real>1</real> + <key>audio_mix</key> + <string>none</string> + <key>audio_rate</key> + <string>source</string> + </dict> + </array> + <key>preset_description</key> + <string>HandBrake's universally compatible, full resolution settings for all current Apple devices: iPod, iPhone, AppleTV, and Macs</string> + <key>preset_name</key> + <string>Universal</string> + <key>preset_type</key> + <integer>0</integer> + <key>round_dimensions</key> + <true /> + <key>subtitle_lang</key> + <string>none</string> + <key>two_pass</key> + <false /> + <key>video_bitrate</key> + <integer>2500</integer> + <key>video_codec</key> + <string>x264</string> + <key>video_quality</key> + <integer>59</integer> + <key>video_target_size</key> + <integer>700</integer> + <key>vquality_type_bitrate</key> + <false /> + <key>vquality_type_constant</key> + <true /> + <key>vquality_type_target</key> + <false /> + <key>x264_options</key> + <string>level=30:cabac=0:ref=3:mixed-refs=1:analyse=all:me=umh:no-fast-pskip=1:subme=8</string> </dict> - </array> - <key>preset_description</key> - <string>HandBrake's settings for the AppleTV, including Dolby Digital 5.1 AC3 sound. Provides a good balance between quality and file size, and optimizes performance.</string> - <key>preset_type</key> - <integer>0</integer> - <key>subtitle_lang</key> - <string>none</string> - <key>two_pass</key> - <false /> - <key>video_bitrate</key> - <integer>2500</integer> - <key>video_codec</key> - <string>x264</string> - <key>video_quality</key> - <integer>64</integer> - <key>video_target_size</key> - <integer>700</integer> - <key>vquality_type_bitrate</key> - <true /> - <key>x264_options</key> - <string>bframes=3:ref=1:me=umh:no-fast-pskip=1:trellis=1:cabac=0</string> - </dict> - <dict> - <key>preset_name</key> - <string>Bedlam</string> - <key>anamorphic</key> - <true /> - <key>autocrop</key> - <true /> - <key>autoscale</key> - <true /> - <key>chapter_markers</key> - <true /> - <key>container</key> - <string>mkv</string> - <key>deblock</key> - <real>0</real> - <key>decomb</key> - <false /> - <key>deinterlace</key> - <string>none</string> - <key>denoise</key> - <integer>0</integer> - <key>detelecine</key> - <false /> - <key>framerate</key> - <string>source</string> - <key>grayscale</key> - <false /> - <key>keep_aspect</key> - <false /> - <key>max_height</key> - <integer>0</integer> - <key>max_width</key> - <integer>0</integer> - <key>pref_audio_list</key> - <array> <dict> - <key>audio_bitrate</key> - <string>160</string> - <key>audio_codec</key> - <string>ac3</string> - <key>audio_drc</key> - <real>1</real> - <key>audio_mix</key> + <key>Default</key> + <false /> + <key>anamorphic</key> + <true /> + <key>autocrop</key> + <true /> + <key>chapter_markers</key> + <true /> + <key>container</key> + <string>mp4</string> + <key>deblock</key> + <integer>0</integer> + <key>deinterlace</key> <string>none</string> - <key>audio_rate</key> + <key>denoise</key> + <string>none</string> + <key>detelecine</key> + <false /> + <key>framerate</key> <string>source</string> + <key>grayscale</key> + <false /> + <key>keep_aspect</key> + <false /> + <key>large_mp4</key> + <true /> + <key>max_height</key> + <integer>0</integer> + <key>max_width</key> + <integer>960</integer> + <key>pref_audio_list</key> + <array> + <dict> + <key>audio_bitrate</key> + <string>160</string> + <key>audio_codec</key> + <string>faac</string> + <key>audio_drc</key> + <real>1</real> + <key>audio_mix</key> + <string>dpl2</string> + <key>audio_rate</key> + <string>48</string> + </dict> + <dict> + <key>audio_bitrate</key> + <string>160</string> + <key>audio_codec</key> + <string>ac3</string> + <key>audio_drc</key> + <real>1</real> + <key>audio_mix</key> + <string>none</string> + <key>audio_rate</key> + <string>source</string> + </dict> + </array> + <key>preset_description</key> + <string>HandBrake's settings for the AppleTV, including Dolby Digital 5.1 AC3 sound. Provides a good balance between quality and file size, and optimizes performance.</string> + <key>preset_name</key> + <string>AppleTV</string> + <key>preset_type</key> + <integer>0</integer> + <key>round_dimensions</key> + <true /> + <key>subtitle_lang</key> + <string>none</string> + <key>two_pass</key> + <false /> + <key>video_bitrate</key> + <integer>2500</integer> + <key>video_codec</key> + <string>x264</string> + <key>video_quality</key> + <integer>59</integer> + <key>video_target_size</key> + <integer>700</integer> + <key>vquality_type_bitrate</key> + <false /> + <key>vquality_type_constant</key> + <true /> + <key>vquality_type_target</key> + <false /> + <key>x264_options</key> + <string>level=30:cabac=0:ref=3:mixed-refs=1:bframes=6:weightb=1:direct=auto:no-fast-pskip=1:me=umh:subq=9:analyse=all</string> </dict> - </array> - <key>preset_description</key> - <string>HandBrake's settings maxed out for slowest encoding and highest quality. Use at your own risk. So slow it's not just insane...it's a trip to the looney bin.</string> - <key>preset_type</key> - <integer>0</integer> - <key>subtitle_lang</key> - <string>none</string> - <key>turbo</key> - <true /> - <key>two_pass</key> - <true /> - <key>video_bitrate</key> - <integer>1800</integer> - <key>video_codec</key> - <string>x264</string> - <key>video_quality</key> - <integer>64</integer> - <key>video_target_size</key> - <integer>700</integer> - <key>vquality_type_bitrate</key> - <true /> - <key>x264_options</key> - <string>ref=16:mixed-refs:bframes=16:weightb:direct=auto:b-pyramid:me=esa:subme=7:me-range=64:analyse=all:8x8dct:trellis=1:no-fast-pskip:no-dct-decimate:filter=-2,-1</string> - </dict> - <dict> - <key>preset_name</key> - <string>Blind</string> - <key>anamorphic</key> - <false /> - <key>autocrop</key> - <true /> - <key>autoscale</key> - <false /> - <key>chapter_markers</key> - <true /> - <key>container</key> - <string>mp4</string> - <key>deblock</key> - <real>0</real> - <key>decomb</key> - <false /> - <key>deinterlace</key> - <string>none</string> - <key>denoise</key> - <integer>0</integer> - <key>detelecine</key> - <false /> - <key>framerate</key> - <string>source</string> - <key>grayscale</key> - <false /> - <key>keep_aspect</key> - <true /> - <key>max_height</key> - <integer>0</integer> - <key>max_width</key> - <integer>512</integer> - <key>pref_audio_list</key> - <array> <dict> - <key>audio_bitrate</key> - <string>128</string> - <key>audio_codec</key> - <string>faac</string> - <key>audio_drc</key> - <real>1</real> - <key>audio_mix</key> - <string>dpl2</string> - <key>audio_rate</key> - <string>source</string> + <key>preset_folder</key> + <array> + <dict> + <key>Default</key> + <false /> + <key>anamorphic</key> + <false /> + <key>autocrop</key> + <true /> + <key>chapter_markers</key> + <true /> + <key>container</key> + <string>mp4</string> + <key>deblock</key> + <integer>0</integer> + <key>deinterlace</key> + <string>none</string> + <key>denoise</key> + <string>none</string> + <key>detelecine</key> + <false /> + <key>framerate</key> + <string>source</string> + <key>grayscale</key> + <false /> + <key>ipod_file</key> + <true /> + <key>keep_aspect</key> + <true /> + <key>max_height</key> + <integer>0</integer> + <key>max_width</key> + <integer>320</integer> + <key>pref_audio_list</key> + <array> + <dict> + <key>audio_bitrate</key> + <string>160</string> + <key>audio_codec</key> + <string>faac</string> + <key>audio_drc</key> + <real>1</real> + <key>audio_mix</key> + <string>dpl2</string> + <key>audio_rate</key> + <string>48</string> + </dict> + </array> + <key>preset_description</key> + <string>HandBrake's low resolution settings for the iPod. Optimized for great playback on the iPod screen, with smaller file size.</string> + <key>preset_name</key> + <string>iPod Classic & iPod Nano</string> + <key>preset_type</key> + <integer>0</integer> + <key>round_dimensions</key> + <true /> + <key>subtitle_lang</key> + <string>none</string> + <key>two_pass</key> + <false /> + <key>video_bitrate</key> + <integer>700</integer> + <key>video_codec</key> + <string>x264</string> + <key>video_quality</key> + <integer>65</integer> + <key>video_target_size</key> + <integer>700</integer> + <key>vquality_type_bitrate</key> + <true /> + <key>vquality_type_constant</key> + <false /> + <key>vquality_type_target</key> + <false /> + <key>x264_options</key> + <string>level=30:bframes=0:cabac=0:ref=1:vbv-maxrate=768:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1</string> + </dict> + <dict> + <key>Default</key> + <false /> + <key>anamorphic</key> + <false /> + <key>autocrop</key> + <true /> + <key>chapter_markers</key> + <true /> + <key>container</key> + <string>mp4</string> + <key>deblock</key> + <integer>0</integer> + <key>deinterlace</key> + <string>none</string> + <key>denoise</key> + <string>none</string> + <key>detelecine</key> + <false /> + <key>framerate</key> + <string>source</string> + <key>grayscale</key> + <false /> + <key>ipod_file</key> + <true /> + <key>keep_aspect</key> + <true /> + <key>max_height</key> + <integer>0</integer> + <key>max_width</key> + <integer>480</integer> + <key>pref_audio_list</key> + <array> + <dict> + <key>audio_bitrate</key> + <string>128</string> + <key>audio_codec</key> + <string>faac</string> + <key>audio_drc</key> + <real>1</real> + <key>audio_mix</key> + <string>dpl2</string> + <key>audio_rate</key> + <string>48</string> + </dict> + </array> + <key>preset_description</key> + <string>HandBrake's settings for the iPhone and iPod Touch.</string> + <key>preset_name</key> + <string>iPhone & iPod Touch</string> + <key>preset_type</key> + <integer>0</integer> + <key>round_dimensions</key> + <true /> + <key>subtitle_lang</key> + <string>none</string> + <key>two_pass</key> + <false /> + <key>video_bitrate</key> + <integer>960</integer> + <key>video_codec</key> + <string>x264</string> + <key>video_quality</key> + <integer>65</integer> + <key>video_target_size</key> + <integer>700</integer> + <key>vquality_type_bitrate</key> + <true /> + <key>vquality_type_constant</key> + <false /> + <key>vquality_type_target</key> + <false /> + <key>x264_options</key> + <string>level=30:cabac=0:ref=1:analyse=all:me=umh:no-fast-pskip=1:trellis=1</string> + </dict> + <dict> + <key>Default</key> + <false /> + <key>anamorphic</key> + <false /> + <key>autocrop</key> + <true /> + <key>chapter_markers</key> + <true /> + <key>container</key> + <string>mp4</string> + <key>deblock</key> + <integer>0</integer> + <key>deinterlace</key> + <string>none</string> + <key>denoise</key> + <string>none</string> + <key>detelecine</key> + <false /> + <key>framerate</key> + <string>source</string> + <key>grayscale</key> + <false /> + <key>ipod_file</key> + <true /> + <key>keep_aspect</key> + <true /> + <key>max_height</key> + <integer>0</integer> + <key>max_width</key> + <integer>640</integer> + <key>pref_audio_list</key> + <array> + <dict> + <key>audio_bitrate</key> + <string>160</string> + <key>audio_codec</key> + <string>faac</string> + <key>audio_drc</key> + <real>1</real> + <key>audio_mix</key> + <string>dpl2</string> + <key>audio_rate</key> + <string>48</string> + </dict> + </array> + <key>preset_description</key> + <string>HandBrake's high resolution settings for older 5 and 5.5G iPods. Good video quality, great for viewing on a TV using your iPod</string> + <key>preset_name</key> + <string>iPod Legacy</string> + <key>preset_type</key> + <integer>0</integer> + <key>round_dimensions</key> + <true /> + <key>subtitle_lang</key> + <string>none</string> + <key>two_pass</key> + <false /> + <key>video_bitrate</key> + <integer>1500</integer> + <key>video_codec</key> + <string>x264</string> + <key>video_quality</key> + <integer>65</integer> + <key>video_target_size</key> + <integer>700</integer> + <key>vquality_type_bitrate</key> + <true /> + <key>vquality_type_constant</key> + <false /> + <key>vquality_type_target</key> + <false /> + <key>x264_options</key> + <string>level=30:bframes=0:cabac=0:ref=1:vbv-maxrate=1500:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1</string> + </dict> + </array> + <key>preset_name</key> + <string>iPod & iPhone</string> + <key>preset_type</key> + <integer>2</integer> </dict> - </array> - <key>preset_description</key> - <string>HandBrake's preset for impatient people who don't care about picture quality.</string> - <key>preset_type</key> - <integer>0</integer> - <key>subtitle_lang</key> - <string>none</string> - <key>turbo</key> - <false /> - <key>two_pass</key> - <false /> - <key>video_bitrate</key> - <integer>512</integer> - <key>video_codec</key> - <string>ffmpeg</string> - <key>video_quality</key> - <integer>64</integer> - <key>video_target_size</key> - <integer>700</integer> - <key>vquality_type_bitrate</key> - <true /> - <key>x264_options</key> - <string></string> - </dict> - <dict> - <key>preset_name</key> - <string>Broke</string> - <key>anamorphic</key> - <false /> - <key>autocrop</key> - <true /> - <key>autoscale</key> - <false /> - <key>chapter_markers</key> - <true /> - <key>container</key> - <string>mp4</string> - <key>deblock</key> - <real>0</real> - <key>decomb</key> - <false /> - <key>deinterlace</key> - <string>none</string> - <key>denoise</key> - <integer>0</integer> - <key>detelecine</key> - <false /> - <key>framerate</key> - <string>source</string> - <key>grayscale</key> - <false /> - <key>keep_aspect</key> - <true /> - <key>max_height</key> - <integer>0</integer> - <key>max_width</key> - <integer>640</integer> - <key>pref_audio_list</key> - <array> <dict> - <key>audio_bitrate</key> - <string>128</string> - <key>audio_codec</key> - <string>faac</string> - <key>audio_drc</key> - <real>1</real> - <key>audio_mix</key> - <string>dpl2</string> - <key>audio_rate</key> + <key>Default</key> + <false /> + <key>anamorphic</key> + <true /> + <key>autocrop</key> + <true /> + <key>autoscale</key> + <true /> + <key>chapter_markers</key> + <true /> + <key>container</key> + <string>mp4</string> + <key>deblock</key> + <integer>0</integer> + <key>deinterlace</key> + <string>none</string> + <key>denoise</key> + <string>none</string> + <key>detelecine</key> + <false /> + <key>framerate</key> <string>source</string> + <key>grayscale</key> + <false /> + <key>keep_aspect</key> + <false /> + <key>max_height</key> + <integer>0</integer> + <key>max_width</key> + <integer>0</integer> + <key>pref_audio_list</key> + <array> + <dict> + <key>audio_bitrate</key> + <string>160</string> + <key>audio_codec</key> + <string>faac</string> + <key>audio_drc</key> + <real>1</real> + <key>audio_mix</key> + <string>dpl2</string> + <key>audio_rate</key> + <string>source</string> + </dict> + </array> + <key>preset_description</key> + <string>HandBrake's high profile settings for use with QuickTime. It can be slow, so use it when the Normal preset doesn't look good enough.</string> + <key>preset_name</key> + <string>QuickTime</string> + <key>preset_type</key> + <integer>0</integer> + <key>round_dimensions</key> + <false /> + <key>subtitle_lang</key> + <string>none</string> + <key>turbo</key> + <true /> + <key>two_pass</key> + <true /> + <key>video_bitrate</key> + <integer>1800</integer> + <key>video_codec</key> + <string>x264</string> + <key>video_quality</key> + <integer>65</integer> + <key>video_target_size</key> + <integer>700</integer> + <key>vquality_type_bitrate</key> + <true /> + <key>vquality_type_constant</key> + <false /> + <key>vquality_type_target</key> + <false /> + <key>x264_options</key> + <string>ref=3:mixed-refs:bframes=3:weightb:direct=auto:me=umh:subme=7:analyse=all:8x8dct:trellis=1:no-fast-pskip=1:psy-rd=1,1</string> </dict> </array> - <key>preset_description</key> - <string>HandBrake's preset for people without a lot of money to waste on hard drives. Tries to maximize quality for burning to CDs, so you can party like it's 1999.</string> + <key>preset_name</key> + <string>Apple</string> <key>preset_type</key> - <integer>0</integer> - <key>subtitle_lang</key> - <string>none</string> - <key>turbo</key> - <true /> - <key>two_pass</key> - <true /> - <key>video_bitrate</key> - <integer>1600</integer> - <key>video_codec</key> - <string>x264</string> - <key>video_quality</key> - <integer>64</integer> - <key>video_target_size</key> - <integer>695</integer> - <key>vquality_type_target</key> - <true /> - <key>x264_options</key> - <string>ref=3:mixed-refs:bframes=16:weightb:b-pyramid:direct=auto:me=umh:trellis=1:analyse=all:8x8dct:no-fast-pskip</string> + <integer>2</integer> </dict> <dict> - <key>preset_name</key> - <string>Classic</string> - <key>anamorphic</key> - <false /> - <key>autocrop</key> - <true /> - <key>autoscale</key> - <true /> - <key>chapter_markers</key> - <false /> - <key>container</key> - <string>mp4</string> - <key>deblock</key> - <real>0</real> - <key>decomb</key> - <false /> - <key>deinterlace</key> - <string>none</string> - <key>denoise</key> - <integer>0</integer> - <key>detelecine</key> - <false /> - <key>framerate</key> - <string>source</string> - <key>grayscale</key> - <false /> - <key>keep_aspect</key> - <true /> - <key>max_height</key> - <integer>0</integer> - <key>max_width</key> - <integer>0</integer> - <key>pref_audio_list</key> + <key>preset_folder</key> <array> <dict> - <key>audio_bitrate</key> - <string>160</string> - <key>audio_codec</key> - <string>faac</string> - <key>audio_drc</key> - <real>1</real> - <key>audio_mix</key> - <string>dpl2</string> - <key>audio_rate</key> + <key>Default</key> + <true /> + <key>anamorphic</key> + <true /> + <key>autocrop</key> + <true /> + <key>autoscale</key> + <true /> + <key>chapter_markers</key> + <true /> + <key>container</key> + <string>mp4</string> + <key>deblock</key> + <integer>0</integer> + <key>deinterlace</key> + <string>none</string> + <key>denoise</key> + <string>none</string> + <key>detelecine</key> + <false /> + <key>framerate</key> <string>source</string> + <key>grayscale</key> + <false /> + <key>keep_aspect</key> + <false /> + <key>max_height</key> + <integer>0</integer> + <key>max_width</key> + <integer>0</integer> + <key>pref_audio_list</key> + <array> + <dict> + <key>audio_bitrate</key> + <string>160</string> + <key>audio_codec</key> + <string>faac</string> + <key>audio_drc</key> + <real>1</real> + <key>audio_mix</key> + <string>dpl2</string> + <key>audio_rate</key> + <string>source</string> + </dict> + </array> + <key>preset_description</key> + <string>HandBrake's normal, default settings.</string> + <key>preset_name</key> + <string>Normal</string> + <key>preset_type</key> + <integer>0</integer> + <key>round_dimensions</key> + <false /> + <key>subtitle_lang</key> + <string>none</string> + <key>turbo</key> + <true /> + <key>two_pass</key> + <true /> + <key>video_bitrate</key> + <integer>1500</integer> + <key>video_codec</key> + <string>x264</string> + <key>video_quality</key> + <integer>65</integer> + <key>video_target_size</key> + <integer>700</integer> + <key>vquality_type_bitrate</key> + <true /> + <key>vquality_type_constant</key> + <false /> + <key>vquality_type_target</key> + <false /> + <key>x264_options</key> + <string>ref=2:bframes=2:me=umh</string> </dict> - </array> - <key>preset_description</key> - <string>HandBrake's traditional, faster, lower-quality settings.</string> - <key>preset_type</key> - <integer>0</integer> - <key>subtitle_lang</key> - <string>none</string> - <key>two_pass</key> - <false /> - <key>video_bitrate</key> - <integer>1000</integer> - <key>video_codec</key> - <string>ffmpeg</string> - <key>video_quality</key> - <integer>64</integer> - <key>video_target_size</key> - <integer>700</integer> - <key>vquality_type_bitrate</key> - <true /> - <key>x264_options</key> - <string></string> - </dict> - <dict> - <key>preset_name</key> - <string>Constant Quality Rate</string> - <key>anamorphic</key> - <true /> - <key>autocrop</key> - <true /> - <key>autoscale</key> - <true /> - <key>chapter_markers</key> - <true /> - <key>container</key> - <string>mkv</string> - <key>deblock</key> - <real>0</real> - <key>decomb</key> - <false /> - <key>deinterlace</key> - <string>none</string> - <key>denoise</key> - <integer>0</integer> - <key>detelecine</key> - <false /> - <key>framerate</key> - <string>source</string> - <key>grayscale</key> - <false /> - <key>keep_aspect</key> - <false /> - <key>max_height</key> - <integer>0</integer> - <key>max_width</key> - <integer>0</integer> - <key>pref_audio_list</key> - <array> <dict> - <key>audio_bitrate</key> - <string>160</string> - <key>audio_codec</key> - <string>ac3</string> - <key>audio_drc</key> - <real>1</real> - <key>audio_mix</key> + <key>Default</key> + <false /> + <key>anamorphic</key> + <false /> + <key>autocrop</key> + <true /> + <key>autoscale</key> + <true /> + <key>chapter_markers</key> + <false /> + <key>container</key> + <string>mp4</string> + <key>deblock</key> + <integer>0</integer> + <key>deinterlace</key> <string>none</string> - <key>audio_rate</key> + <key>denoise</key> + <string>none</string> + <key>detelecine</key> + <false /> + <key>framerate</key> <string>source</string> + <key>grayscale</key> + <false /> + <key>keep_aspect</key> + <true /> + <key>max_height</key> + <integer>0</integer> + <key>max_width</key> + <integer>0</integer> + <key>pref_audio_list</key> + <array> + <dict> + <key>audio_bitrate</key> + <string>160</string> + <key>audio_codec</key> + <string>faac</string> + <key>audio_drc</key> + <real>1</real> + <key>audio_mix</key> + <string>dpl2</string> + <key>audio_rate</key> + <string>source</string> + </dict> + </array> + <key>preset_description</key> + <string>HandBrake's traditional, faster, lower-quality settings.</string> + <key>preset_name</key> + <string>Classic</string> + <key>preset_type</key> + <integer>0</integer> + <key>round_dimensions</key> + <true /> + <key>subtitle_lang</key> + <string>none</string> + <key>two_pass</key> + <false /> + <key>video_bitrate</key> + <integer>1000</integer> + <key>video_codec</key> + <string>ffmpeg</string> + <key>video_quality</key> + <integer>65</integer> + <key>video_target_size</key> + <integer>700</integer> + <key>vquality_type_bitrate</key> + <true /> + <key>vquality_type_constant</key> + <false /> + <key>vquality_type_target</key> + <false /> + <key>x264_options</key> + <string></string> </dict> </array> - <key>preset_description</key> - <string>HandBrake's preset for consistently excellent quality in one pass, with the downside of entirely unpredictable file sizes and bitrates.</string> + <key>preset_name</key> + <string>Basic</string> <key>preset_type</key> - <integer>0</integer> - <key>subtitle_lang</key> - <string>none</string> - <key>turbo</key> - <false /> - <key>two_pass</key> - <false /> - <key>video_bitrate</key> - <integer>2000</integer> - <key>video_codec</key> - <string>x264</string> - <key>video_quality</key> - <integer>64</integer> - <key>video_target_size</key> - <integer>700</integer> - <key>vquality_type_constant</key> - <true /> - <key>x264_options</key> - <string>ref=3:mixed-refs:bframes=3:b-pyramid:weightb:filter=-2,-1:trellis=1:analyse=all:8x8dct:me=umh</string> + <integer>2</integer> </dict> <dict> - <key>preset_name</key> - <string>Deux Six Quatre</string> - <key>anamorphic</key> - <true /> - <key>autocrop</key> - <true /> - <key>autoscale</key> - <true /> - <key>chapter_markers</key> - <true /> - <key>container</key> - <string>mkv</string> - <key>deblock</key> - <real>0</real> - <key>decomb</key> - <false /> - <key>deinterlace</key> - <string>none</string> - <key>denoise</key> - <integer>0</integer> - <key>detelecine</key> - <false /> - <key>framerate</key> - <string>source</string> - <key>grayscale</key> - <false /> - <key>keep_aspect</key> - <false /> - <key>max_height</key> - <integer>0</integer> - <key>max_width</key> - <integer>0</integer> - <key>pref_audio_list</key> + <key>preset_folder</key> <array> <dict> - <key>audio_bitrate</key> - <string>160</string> - <key>audio_codec</key> - <string>ac3</string> - <key>audio_drc</key> - <real>1</real> - <key>audio_mix</key> + <key>Default</key> + <false /> + <key>anamorphic</key> + <true /> + <key>autocrop</key> + <true /> + <key>autoscale</key> + <true /> + <key>chapter_markers</key> + <true /> + <key>container</key> + <string>mkv</string> + <key>deblock</key> + <integer>0</integer> + <key>decomb</key> + <true /> + <key>deinterlace</key> + <string>none</string> + <key>denoise</key> <string>none</string> - <key>audio_rate</key> + <key>detelecine</key> + <true /> + <key>framerate</key> <string>source</string> + <key>grayscale</key> + <false /> + <key>keep_aspect</key> + <false /> + <key>max_height</key> + <integer>0</integer> + <key>max_width</key> + <integer>0</integer> + <key>pref_audio_list</key> + <array> + <dict> + <key>audio_bitrate</key> + <string>160</string> + <key>audio_codec</key> + <string>faac</string> + <key>audio_drc</key> + <real>1</real> + <key>audio_mix</key> + <string>dpl2</string> + <key>audio_rate</key> + <string>source</string> + </dict> + </array> + <key>preset_description</key> + <string>HandBrake's settings for cartoons, anime, and CGI.</string> + <key>preset_name</key> + <string>Animation</string> + <key>preset_type</key> + <integer>0</integer> + <key>round_dimensions</key> + <false /> + <key>subtitle_lang</key> + <string>none</string> + <key>turbo</key> + <true /> + <key>two_pass</key> + <true /> + <key>video_bitrate</key> + <integer>1000</integer> + <key>video_codec</key> + <string>x264</string> + <key>video_quality</key> + <integer>65</integer> + <key>video_target_size</key> + <integer>700</integer> + <key>vquality_type_bitrate</key> + <true /> + <key>vquality_type_constant</key> + <false /> + <key>vquality_type_target</key> + <false /> + <key>x264_options</key> + <string>ref=5:mixed-refs:bframes=6:weightb:direct=auto:b-pyramid:me=umh:analyse=all:8x8dct:trellis=1:nr=150:no-fast-pskip:filter=2,2:psy-rd=1,1:subme=9</string> </dict> - </array> - <key>preset_description</key> - <string>HandBrake's preset for true high profile x264 quality. A good balance of quality and speed, based on community standards found in the wild. This preset will give you a much better sense of x264's capabilities than vanilla main profile.</string> - <key>preset_type</key> - <integer>0</integer> - <key>subtitle_lang</key> - <string>none</string> - <key>turbo</key> - <true /> - <key>two_pass</key> - <true /> - <key>video_bitrate</key> - <integer>1600</integer> - <key>video_codec</key> - <string>x264</string> - <key>video_quality</key> - <integer>64</integer> - <key>video_target_size</key> - <integer>700</integer> - <key>vquality_type_bitrate</key> - <true /> - <key>x264_options</key> - <string>ref=5:mixed-refs:bframes=3:weightb:b-pyramid:me=umh:subme=7:trellis=1:analyse=all:8x8dct:no-fast-pskip</string> - </dict> - <dict> - <key>preset_name</key> - <string>Film</string> - <key>anamorphic</key> - <true /> - <key>autocrop</key> - <true /> - <key>autoscale</key> - <true /> - <key>chapter_markers</key> - <true /> - <key>container</key> - <string>mkv</string> - <key>deblock</key> - <real>0</real> - <key>decomb</key> - <false /> - <key>deinterlace</key> - <string>none</string> - <key>denoise</key> - <integer>0</integer> - <key>detelecine</key> - <false /> - <key>framerate</key> - <string>source</string> - <key>grayscale</key> - <false /> - <key>keep_aspect</key> - <false /> - <key>max_height</key> - <integer>0</integer> - <key>max_width</key> - <integer>0</integer> - <key>pref_audio_list</key> - <array> <dict> - <key>audio_bitrate</key> - <string>160</string> - <key>audio_codec</key> - <string>ac3</string> - <key>audio_drc</key> - <real>1</real> - <key>audio_mix</key> + <key>Default</key> + <false /> + <key>anamorphic</key> + <true /> + <key>autocrop</key> + <true /> + <key>autoscale</key> + <true /> + <key>chapter_markers</key> + <true /> + <key>container</key> + <string>mkv</string> + <key>deblock</key> + <integer>0</integer> + <key>deinterlace</key> + <string>none</string> + <key>denoise</key> <string>none</string> - <key>audio_rate</key> + <key>detelecine</key> + <false /> + <key>framerate</key> <string>source</string> + <key>grayscale</key> + <false /> + <key>keep_aspect</key> + <false /> + <key>max_height</key> + <integer>0</integer> + <key>max_width</key> + <integer>0</integer> + <key>pref_audio_list</key> + <array> + <dict> + <key>audio_bitrate</key> + <string>160</string> + <key>audio_codec</key> + <string>ac3</string> + <key>audio_drc</key> + <real>1</real> + <key>audio_mix</key> + <string>none</string> + <key>audio_rate</key> + <string>source</string> + </dict> + </array> + <key>preset_description</key> + <string>HandBrake's preset for consistently excellent quality in one pass, with the downside of entirely unpredictable file sizes and bitrates.</string> + <key>preset_name</key> + <string>Constant Quality Rate</string> + <key>preset_type</key> + <integer>0</integer> + <key>round_dimensions</key> + <false /> + <key>subtitle_lang</key> + <string>none</string> + <key>turbo</key> + <false /> + <key>two_pass</key> + <false /> + <key>video_bitrate</key> + <integer>2000</integer> + <key>video_codec</key> + <string>x264</string> + <key>video_quality</key> + <integer>60</integer> + <key>video_target_size</key> + <integer>700</integer> + <key>vquality_type_bitrate</key> + <false /> + <key>vquality_type_constant</key> + <true /> + <key>vquality_type_target</key> + <false /> + <key>x264_options</key> + <string>ref=3:mixed-refs:bframes=3:b-pyramid:weightb:filter=-2,-1:trellis=1:analyse=all:8x8dct:me=umh:subme=9:psy-rd=1,1</string> </dict> - </array> - <key>preset_description</key> - <string>HandBrake's preset for feature films.</string> - <key>preset_type</key> - <integer>0</integer> - <key>subtitle_lang</key> - <string>none</string> - <key>turbo</key> - <true /> - <key>two_pass</key> - <true /> - <key>video_bitrate</key> - <integer>1800</integer> - <key>video_codec</key> - <string>x264</string> - <key>video_quality</key> - <integer>64</integer> - <key>video_target_size</key> - <integer>700</integer> - <key>vquality_type_bitrate</key> - <true /> - <key>x264_options</key> - <string>ref=3:mixed-refs:bframes=6:weightb:direct=auto:b-pyramid:me=umh:subme=7:analyse=all:8x8dct:trellis=1:no-fast-pskip</string> - </dict> - <dict> - <key>preset_name</key> - <string>Normal</string> - <key>anamorphic</key> - <true /> - <key>autocrop</key> - <true /> - <key>autoscale</key> - <true /> - <key>chapter_markers</key> - <true /> - <key>container</key> - <string>mp4</string> - <key>deblock</key> - <real>0</real> - <key>decomb</key> - <false /> - <key>deinterlace</key> - <string>none</string> - <key>denoise</key> - <integer>0</integer> - <key>detelecine</key> - <false /> - <key>framerate</key> - <string>source</string> - <key>grayscale</key> - <false /> - <key>keep_aspect</key> - <false /> - <key>max_height</key> - <integer>0</integer> - <key>max_width</key> - <integer>0</integer> - <key>pref_audio_list</key> - <array> <dict> - <key>audio_bitrate</key> - <string>160</string> - <key>audio_codec</key> - <string>faac</string> - <key>audio_drc</key> - <real>1</real> - <key>audio_mix</key> - <string>dpl2</string> - <key>audio_rate</key> + <key>Default</key> + <false /> + <key>anamorphic</key> + <true /> + <key>autocrop</key> + <true /> + <key>autoscale</key> + <true /> + <key>chapter_markers</key> + <true /> + <key>container</key> + <string>mkv</string> + <key>deblock</key> + <integer>0</integer> + <key>deinterlace</key> + <string>none</string> + <key>denoise</key> + <string>none</string> + <key>detelecine</key> + <false /> + <key>framerate</key> <string>source</string> + <key>grayscale</key> + <false /> + <key>keep_aspect</key> + <false /> + <key>max_height</key> + <integer>0</integer> + <key>max_width</key> + <integer>0</integer> + <key>pref_audio_list</key> + <array> + <dict> + <key>audio_bitrate</key> + <string>160</string> + <key>audio_codec</key> + <string>ac3</string> + <key>audio_drc</key> + <real>1</real> + <key>audio_mix</key> + <string>none</string> + <key>audio_rate</key> + <string>source</string> + </dict> + </array> + <key>preset_description</key> + <string>HandBrake's preset for feature films.</string> + <key>preset_name</key> + <string>Film</string> + <key>preset_type</key> + <integer>0</integer> + <key>round_dimensions</key> + <false /> + <key>subtitle_lang</key> + <string>none</string> + <key>turbo</key> + <true /> + <key>two_pass</key> + <true /> + <key>video_bitrate</key> + <integer>1800</integer> + <key>video_codec</key> + <string>x264</string> + <key>video_quality</key> + <integer>65</integer> + <key>video_target_size</key> + <integer>700</integer> + <key>vquality_type_bitrate</key> + <true /> + <key>vquality_type_constant</key> + <false /> + <key>vquality_type_target</key> + <false /> + <key>x264_options</key> + <string>ref=3:mixed-refs:bframes=6:weightb:direct=auto:b-pyramid:me=umh:subme=9:analyse=all:8x8dct:trellis=1:no-fast-pskip:psy-rd=1,1</string> </dict> - </array> - <key>preset_description</key> - <string>HandBrake's normal, default settings.</string> - <key>preset_type</key> - <integer>0</integer> - <key>subtitle_lang</key> - <string>none</string> - <key>turbo</key> - <true /> - <key>two_pass</key> - <true /> - <key>video_bitrate</key> - <integer>1500</integer> - <key>video_codec</key> - <string>x264</string> - <key>video_quality</key> - <integer>64</integer> - <key>video_target_size</key> - <integer>700</integer> - <key>vquality_type_bitrate</key> - <true /> - <key>x264_options</key> - <string>ref=2:bframes=2:me=umh</string> - </dict> - <dict> - <key>preset_name</key> - <string>PS3</string> - <key>anamorphic</key> - <true /> - <key>autoscale</key> - <true /> - <key>chapter_markers</key> - <false /> - <key>container</key> - <string>mp4</string> - <key>deblock</key> - <real>0</real> - <key>decomb</key> - <false /> - <key>deinterlace</key> - <string>none</string> - <key>denoise</key> - <integer>0</integer> - <key>detelecine</key> - <false /> - <key>framerate</key> - <string>source</string> - <key>grayscale</key> - <false /> - <key>keep_aspect</key> - <false /> - <key>max_height</key> - <integer>0</integer> - <key>max_width</key> - <integer>0</integer> - <key>pref_audio_list</key> - <array> <dict> - <key>audio_bitrate</key> - <string>160</string> - <key>audio_codec</key> - <string>faac</string> - <key>audio_drc</key> - <real>1</real> - <key>audio_mix</key> - <string>dpl2</string> - <key>audio_rate</key> - <string>48</string> + <key>Default</key> + <false /> + <key>anamorphic</key> + <true /> + <key>autocrop</key> + <true /> + <key>autoscale</key> + <true /> + <key>chapter_markers</key> + <true /> + <key>container</key> + <string>mkv</string> + <key>deblock</key> + <integer>0</integer> + <key>decomb</key> + <true /> + <key>deinterlace</key> + <string>none</string> + <key>denoise</key> + <string>none</string> + <key>detelecine</key> + <true /> + <key>framerate</key> + <string>source</string> + <key>grayscale</key> + <false /> + <key>keep_aspect</key> + <false /> + <key>max_height</key> + <integer>0</integer> + <key>max_width</key> + <integer>0</integer> + <key>pref_audio_list</key> + <array> + <dict> + <key>audio_bitrate</key> + <string>160</string> + <key>audio_codec</key> + <string>faac</string> + <key>audio_drc</key> + <real>1</real> + <key>audio_mix</key> + <string>dpl2</string> + <key>audio_rate</key> + <string>source</string> + </dict> + </array> + <key>preset_description</key> + <string>HandBrake's settings for video from television.</string> + <key>preset_name</key> + <string>Television</string> + <key>preset_type</key> + <integer>0</integer> + <key>round_dimensions</key> + <false /> + <key>subtitle_lang</key> + <string>none</string> + <key>turbo</key> + <true /> + <key>two_pass</key> + <true /> + <key>video_bitrate</key> + <integer>1300</integer> + <key>video_codec</key> + <string>x264</string> + <key>video_quality</key> + <integer>65</integer> + <key>video_target_size</key> + <integer>700</integer> + <key>vquality_type_bitrate</key> + <true /> + <key>vquality_type_constant</key> + <false /> + <key>vquality_type_target</key> + <false /> + <key>x264_options</key> + <string>ref=3:mixed-refs:bframes=6:weightb:direct=auto:b-pyramid:me=umh:subme=9:analyse=all:8x8dct:trellis=1:nr=150:no-fast-pskip=1:psy-rd=1,1</string> </dict> </array> - <key>preset_description</key> - <string>HandBrake's settings for the Sony PlayStation 3.</string> - <key>preset_type</key> - <integer>0</integer> - <key>subtitle_lang</key> - <string>none</string> - <key>two_pass</key> - <false /> - <key>video_bitrate</key> - <integer>2500</integer> - <key>video_codec</key> - <string>x264</string> - <key>video_quality</key> - <integer>64</integer> - <key>video_target_size</key> - <integer>700</integer> - <key>vquality_type_bitrate</key> - <true /> - <key>x264_options</key> - <string>level=41:me=umh</string> - </dict> - <dict> <key>preset_name</key> - <string>PSP</string> - <key>anamorphic</key> - <false /> - <key>autocrop</key> - <true /> - <key>autoscale</key> - <false /> - <key>chapter_markers</key> - <true /> - <key>container</key> - <string>mp4</string> - <key>deblock</key> - <real>0</real> - <key>decomb</key> - <false /> - <key>deinterlace</key> - <string>none</string> - <key>denoise</key> - <integer>0</integer> - <key>detelecine</key> - <false /> - <key>framerate</key> - <string>source</string> - <key>grayscale</key> - <false /> - <key>keep_aspect</key> - <true /> - <key>max_height</key> - <integer>208</integer> - <key>max_width</key> - <integer>368</integer> - <key>pref_audio_list</key> - <array> - <dict> - <key>audio_bitrate</key> - <string>128</string> - <key>audio_codec</key> - <string>faac</string> - <key>audio_drc</key> - <real>1</real> - <key>audio_mix</key> - <string>dpl2</string> - <key>audio_rate</key> - <string>48</string> - </dict> - </array> - <key>preset_description</key> - <string>HandBrake's settings for the Sony PlayStation Portable.</string> + <string>High Profile</string> <key>preset_type</key> - <integer>0</integer> - <key>subtitle_lang</key> - <string>none</string> - <key>two_pass</key> - <false /> - <key>video_bitrate</key> - <integer>1024</integer> - <key>video_codec</key> - <string>ffmpeg</string> - <key>video_quality</key> - <integer>64</integer> - <key>video_target_size</key> - <integer>700</integer> - <key>vquality_type_bitrate</key> - <true /> - <key>x264_options</key> - <string></string> + <integer>2</integer> </dict> <dict> - <key>preset_name</key> - <string>QuickTime</string> - <key>anamorphic</key> - <true /> - <key>autocrop</key> - <true /> - <key>autoscale</key> - <true /> - <key>chapter_markers</key> - <true /> - <key>container</key> - <string>mp4</string> - <key>deblock</key> - <real>0</real> - <key>decomb</key> - <false /> - <key>deinterlace</key> - <string>none</string> - <key>denoise</key> - <integer>0</integer> - <key>detelecine</key> - <false /> - <key>framerate</key> - <string>source</string> - <key>grayscale</key> - <false /> - <key>keep_aspect</key> - <false /> - <key>max_height</key> - <integer>0</integer> - <key>max_width</key> - <integer>0</integer> - <key>pref_audio_list</key> + <key>preset_folder</key> <array> <dict> - <key>audio_bitrate</key> - <string>160</string> - <key>audio_codec</key> - <string>faac</string> - <key>audio_drc</key> - <real>1</real> - <key>audio_mix</key> - <string>dpl2</string> - <key>audio_rate</key> + <key>Default</key> + <false /> + <key>anamorphic</key> + <false /> + <key>autocrop</key> + <true /> + <key>chapter_markers</key> + <true /> + <key>container</key> + <string>mp4</string> + <key>deblock</key> + <integer>0</integer> + <key>deinterlace</key> + <string>none</string> + <key>denoise</key> + <string>none</string> + <key>detelecine</key> + <false /> + <key>framerate</key> <string>source</string> + <key>grayscale</key> + <false /> + <key>keep_aspect</key> + <true /> + <key>max_height</key> + <integer>208</integer> + <key>max_width</key> + <integer>368</integer> + <key>pref_audio_list</key> + <array> + <dict> + <key>audio_bitrate</key> + <string>128</string> + <key>audio_codec</key> + <string>faac</string> + <key>audio_drc</key> + <real>1</real> + <key>audio_mix</key> + <string>dpl2</string> + <key>audio_rate</key> + <string>48</string> + </dict> + </array> + <key>preset_description</key> + <string>HandBrake's settings for the Sony PlayStation Portable.</string> + <key>preset_name</key> + <string>PSP</string> + <key>preset_type</key> + <integer>0</integer> + <key>round_dimensions</key> + <true /> + <key>subtitle_lang</key> + <string>none</string> + <key>two_pass</key> + <false /> + <key>video_bitrate</key> + <integer>1024</integer> + <key>video_codec</key> + <string>ffmpeg</string> + <key>video_quality</key> + <integer>65</integer> + <key>video_target_size</key> + <integer>700</integer> + <key>vquality_type_bitrate</key> + <true /> + <key>vquality_type_constant</key> + <false /> + <key>vquality_type_target</key> + <false /> + <key>x264_options</key> + <string></string> </dict> - </array> - <key>preset_description</key> - <string>HandBrake's high quality settings for use with QuickTime. It can be slow, so use it when the Normal preset doesn't look good enough.</string> - <key>preset_type</key> - <integer>0</integer> - <key>subtitle_lang</key> - <string>none</string> - <key>turbo</key> - <true /> - <key>two_pass</key> - <true /> - <key>video_bitrate</key> - <integer>2000</integer> - <key>video_codec</key> - <string>x264</string> - <key>video_quality</key> - <integer>64</integer> - <key>video_target_size</key> - <integer>700</integer> - <key>vquality_type_bitrate</key> - <true /> - <key>x264_options</key> - <string>ref=3:mixed-refs:bframes=3:weightb:direct=auto:me=umh:analyse=all:trellis=1:no-fast-pskip</string> - </dict> - <dict> - <key>preset_name</key> - <string>Television</string> - <key>anamorphic</key> - <false /> - <key>autocrop</key> - <true /> - <key>autoscale</key> - <true /> - <key>chapter_markers</key> - <true /> - <key>container</key> - <string>mkv</string> - <key>deblock</key> - <real>0</real> - <key>decomb</key> - <false /> - <key>deinterlace</key> - <string>slower</string> - <key>denoise</key> - <integer>1</integer> - <key>detelecine</key> - <false /> - <key>framerate</key> - <string>source</string> - <key>grayscale</key> - <false /> - <key>keep_aspect</key> - <true /> - <key>max_height</key> - <integer>0</integer> - <key>max_width</key> - <integer>0</integer> - <key>pref_audio_list</key> - <array> <dict> - <key>audio_bitrate</key> - <string>160</string> - <key>audio_codec</key> - <string>faac</string> - <key>audio_drc</key> - <real>1</real> - <key>audio_mix</key> - <string>dpl2</string> - <key>audio_rate</key> + <key>Default</key> + <false /> + <key>anamorphic</key> + <true /> + <key>autocrop</key> + <false /> + <key>autoscale</key> + <true /> + <key>chapter_markers</key> + <false /> + <key>container</key> + <string>mp4</string> + <key>deblock</key> + <integer>0</integer> + <key>deinterlace</key> + <string>none</string> + <key>denoise</key> + <string>none</string> + <key>detelecine</key> + <false /> + <key>framerate</key> <string>source</string> + <key>grayscale</key> + <false /> + <key>keep_aspect</key> + <false /> + <key>max_height</key> + <integer>0</integer> + <key>max_width</key> + <integer>0</integer> + <key>pref_audio_list</key> + <array> + <dict> + <key>audio_bitrate</key> + <string>160</string> + <key>audio_codec</key> + <string>faac</string> + <key>audio_drc</key> + <real>1</real> + <key>audio_mix</key> + <string>dpl2</string> + <key>audio_rate</key> + <string>48</string> + </dict> + </array> + <key>preset_description</key> + <string>HandBrake's settings for the Sony PlayStation 3.</string> + <key>preset_name</key> + <string>PS3</string> + <key>preset_type</key> + <integer>0</integer> + <key>round_dimensions</key> + <false /> + <key>subtitle_lang</key> + <string>none</string> + <key>two_pass</key> + <false /> + <key>video_bitrate</key> + <integer>2500</integer> + <key>video_codec</key> + <string>x264</string> + <key>video_quality</key> + <integer>65</integer> + <key>video_target_size</key> + <integer>700</integer> + <key>vquality_type_bitrate</key> + <true /> + <key>vquality_type_constant</key> + <false /> + <key>vquality_type_target</key> + <false /> + <key>x264_options</key> + <string>level=41:me=umh</string> </dict> - </array> - <key>preset_description</key> - <string>HandBrake's settings for video from television.</string> - <key>preset_type</key> - <integer>0</integer> - <key>subtitle_lang</key> - <string>none</string> - <key>turbo</key> - <true /> - <key>two_pass</key> - <true /> - <key>video_bitrate</key> - <integer>1300</integer> - <key>video_codec</key> - <string>x264</string> - <key>video_quality</key> - <integer>64</integer> - <key>video_target_size</key> - <integer>700</integer> - <key>vquality_type_bitrate</key> - <true /> - <key>x264_options</key> - <string>ref=3:mixed-refs:bframes=6:weightb:direct=auto:b-pyramid:me=umh:analyse=all:8x8dct:trellis=1:nr=150:no-fast-pskip</string> - </dict> - <dict> - <key>preset_name</key> - <string>Xbox 360</string> - <key>anamorphic</key> - <true /> - <key>autoscale</key> - <true /> - <key>chapter_markers</key> - <false /> - <key>container</key> - <string>mp4</string> - <key>deblock</key> - <real>0</real> - <key>decomb</key> - <false /> - <key>deinterlace</key> - <string>none</string> - <key>denoise</key> - <integer>0</integer> - <key>detelecine</key> - <false /> - <key>framerate</key> - <string>source</string> - <key>grayscale</key> - <false /> - <key>keep_aspect</key> - <false /> - <key>max_height</key> - <integer>0</integer> - <key>max_width</key> - <integer>0</integer> - <key>pref_audio_list</key> - <array> - <dict> - <key>audio_bitrate</key> - <string>160</string> - <key>audio_codec</key> - <string>faac</string> - <key>audio_drc</key> - <real>1</real> - <key>audio_mix</key> - <string>dpl2</string> - <key>audio_rate</key> - <string>48</string> - </dict> - </array> - <key>preset_description</key> - <string>HandBrake's settings for the Microsoft Xbox 360.</string> - <key>preset_type</key> - <integer>0</integer> - <key>subtitle_lang</key> - <string>none</string> - <key>two_pass</key> - <false /> - <key>video_bitrate</key> - <integer>2000</integer> - <key>video_codec</key> - <string>x264</string> - <key>video_quality</key> - <integer>64</integer> - <key>video_target_size</key> - <integer>700</integer> - <key>vquality_type_bitrate</key> - <true /> - <key>x264_options</key> - <string>level=40:ref=2:mixed-refs:bframes=3:weightb:direct=auto:b-pyramid:me=umh:analyse=all:no-fast-pskip:filter=-2,-1</string> - </dict> - <dict> - <key>preset_name</key> - <string>iPhone / iPod Touch</string> - <key>anamorphic</key> - <false /> - <key>autocrop</key> - <true /> - <key>autoscale</key> - <false /> - <key>chapter_markers</key> - <true /> - <key>container</key> - <string>mp4</string> - <key>deblock</key> - <real>0</real> - <key>decomb</key> - <false /> - <key>deinterlace</key> - <string>none</string> - <key>denoise</key> - <integer>0</integer> - <key>detelecine</key> - <false /> - <key>framerate</key> - <string>source</string> - <key>grayscale</key> - <false /> - <key>ipod_file</key> - <true /> - <key>keep_aspect</key> - <true /> - <key>max_height</key> - <integer>0</integer> - <key>max_width</key> - <integer>480</integer> - <key>pref_audio_list</key> - <array> <dict> - <key>audio_bitrate</key> - <string>128</string> - <key>audio_codec</key> - <string>faac</string> - <key>audio_drc</key> - <real>1</real> - <key>audio_mix</key> - <string>dpl2</string> - <key>audio_rate</key> - <string>48</string> - </dict> - </array> - <key>preset_description</key> - <string>HandBrake's settings for the iPhone and iPod Touch.</string> - <key>preset_type</key> - <integer>0</integer> - <key>subtitle_lang</key> - <string>none</string> - <key>two_pass</key> - <false /> - <key>video_bitrate</key> - <integer>960</integer> - <key>video_codec</key> - <string>x264</string> - <key>video_quality</key> - <integer>64</integer> - <key>video_target_size</key> - <integer>700</integer> - <key>vquality_type_bitrate</key> - <true /> - <key>x264_options</key> - <string>level=30:cabac=0:ref=1:analyse=all:me=umh:no-fast-pskip=1:trellis=1</string> - </dict> - <dict> - <key>preset_name</key> - <string>iPod High-Rez</string> - <key>anamorphic</key> - <false /> - <key>autocrop</key> - <true /> - <key>autoscale</key> - <false /> - <key>chapter_markers</key> - <true /> - <key>container</key> - <string>mp4</string> - <key>deblock</key> - <real>0</real> - <key>decomb</key> - <false /> - <key>deinterlace</key> - <string>none</string> - <key>denoise</key> - <integer>0</integer> - <key>detelecine</key> - <false /> - <key>framerate</key> - <string>source</string> - <key>grayscale</key> - <false /> - <key>ipod_file</key> - <true /> - <key>keep_aspect</key> - <true /> - <key>max_height</key> - <integer>0</integer> - <key>max_width</key> - <integer>640</integer> - <key>pref_audio_list</key> - <array> - <dict> - <key>audio_bitrate</key> - <string>160</string> - <key>audio_codec</key> - <string>faac</string> - <key>audio_drc</key> - <real>1</real> - <key>audio_mix</key> - <string>dpl2</string> - <key>audio_rate</key> - <string>48</string> + <key>Default</key> + <false /> + <key>anamorphic</key> + <true /> + <key>autoscale</key> + <true /> + <key>chapter_markers</key> + <false /> + <key>container</key> + <string>mp4</string> + <key>deblock</key> + <integer>0</integer> + <key>deinterlace</key> + <string>none</string> + <key>denoise</key> + <string>none</string> + <key>detelecine</key> + <false /> + <key>framerate</key> + <string>source</string> + <key>grayscale</key> + <false /> + <key>keep_aspect</key> + <false /> + <key>max_height</key> + <integer>0</integer> + <key>max_width</key> + <integer>0</integer> + <key>pref_audio_list</key> + <array> + <dict> + <key>audio_bitrate</key> + <string>160</string> + <key>audio_codec</key> + <string>faac</string> + <key>audio_drc</key> + <real>1</real> + <key>audio_mix</key> + <string>dpl2</string> + <key>audio_rate</key> + <string>48</string> + </dict> + </array> + <key>preset_description</key> + <string>HandBrake's settings for the Microsoft Xbox 360.</string> + <key>preset_name</key> + <string>Xbox 360</string> + <key>preset_type</key> + <integer>0</integer> + <key>round_dimensions</key> + <false /> + <key>subtitle_lang</key> + <string>none</string> + <key>two_pass</key> + <false /> + <key>video_bitrate</key> + <integer>2000</integer> + <key>video_codec</key> + <string>x264</string> + <key>video_quality</key> + <integer>65</integer> + <key>video_target_size</key> + <integer>700</integer> + <key>vquality_type_bitrate</key> + <true /> + <key>vquality_type_constant</key> + <false /> + <key>vquality_type_target</key> + <false /> + <key>x264_options</key> + <string>level=40:ref=2:mixed-refs:bframes=3:weightb:subme=7:direct=auto:b-pyramid:me=umh:analyse=all:no-fast-pskip:filter=-2,-1</string> </dict> </array> - <key>preset_description</key> - <string>HandBrake's high resolution settings for the iPod. Good video quality, great for viewing on a TV using your iPod</string> - <key>preset_type</key> - <integer>0</integer> - <key>subtitle_lang</key> - <string>none</string> - <key>two_pass</key> - <false /> - <key>video_bitrate</key> - <integer>1500</integer> - <key>video_codec</key> - <string>x264</string> - <key>video_quality</key> - <integer>64</integer> - <key>video_target_size</key> - <integer>700</integer> - <key>vquality_type_bitrate</key> - <true /> - <key>x264_options</key> - <string>level=30:bframes=0:cabac=0:ref=1:vbv-maxrate=1500:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1</string> - </dict> - <dict> <key>preset_name</key> - <string>iPod Low-Rez</string> - <key>anamorphic</key> - <false /> - <key>autocrop</key> - <true /> - <key>autoscale</key> - <false /> - <key>chapter_markers</key> - <true /> - <key>container</key> - <string>mp4</string> - <key>deblock</key> - <real>0</real> - <key>decomb</key> - <false /> - <key>deinterlace</key> - <string>none</string> - <key>denoise</key> - <integer>0</integer> - <key>detelecine</key> - <false /> - <key>framerate</key> - <string>source</string> - <key>grayscale</key> - <false /> - <key>ipod_file</key> - <true /> - <key>keep_aspect</key> - <true /> - <key>max_height</key> - <integer>0</integer> - <key>max_width</key> - <integer>320</integer> - <key>pref_audio_list</key> - <array> - <dict> - <key>audio_bitrate</key> - <string>160</string> - <key>audio_codec</key> - <string>faac</string> - <key>audio_drc</key> - <real>1</real> - <key>audio_mix</key> - <string>dpl2</string> - <key>audio_rate</key> - <string>48</string> - </dict> - </array> - <key>preset_description</key> - <string>HandBrake's low resolution settings for the iPod. Optimized for great playback on the iPod screen, with smaller file size.</string> + <string>Gaming Consoles</string> <key>preset_type</key> - <integer>0</integer> - <key>subtitle_lang</key> - <string>none</string> - <key>two_pass</key> - <false /> - <key>video_bitrate</key> - <integer>700</integer> - <key>video_codec</key> - <string>x264</string> - <key>video_quality</key> - <integer>64</integer> - <key>video_target_size</key> - <integer>700</integer> - <key>vquality_type_bitrate</key> - <true /> - <key>x264_options</key> - <string>level=30:bframes=0:cabac=0:ref=1:vbv-maxrate=768:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1</string> + <integer>2</integer> </dict> </array> </plist> diff --git a/gtk/src/values.c b/gtk/src/values.c index 4f6c40769..4124b0a26 100644 --- a/gtk/src/values.c +++ b/gtk/src/values.c @@ -45,7 +45,7 @@ ghb_value_dup(const GValue *val) return copy; } -static void +void debug_show_type(GType tp) { const gchar *str = "unknown"; @@ -61,6 +61,10 @@ debug_show_type(GType tp) { str ="int64"; } + else if (tp == G_TYPE_DOUBLE) + { + str ="double"; + } else if (tp == G_TYPE_BOOLEAN) { str ="bool"; @@ -652,6 +656,22 @@ ghb_array_replace(GValue *gval, guint ii, GValue *val) ((GValue**)arr->data)[ii] = val; } +void +ghb_array_copy(GValue *arr1, GValue *arr2, gint count) +{ + gint len, ii; + + // empty the first array if it is not already empty + len = ghb_array_len(arr1); + for (ii = 0; ii < len; ii++) + ghb_array_remove(arr1, 0); + + len = ghb_array_len(arr2); + count = MIN(count, len); + for (ii = 0; ii < count; ii++) + ghb_array_append(arr1, ghb_value_dup(ghb_array_get_nth(arr2, ii))); +} + gint ghb_array_len(const GValue *gval) { diff --git a/gtk/src/values.h b/gtk/src/values.h index feb995d24..4000ad6f8 100644 --- a/gtk/src/values.h +++ b/gtk/src/values.h @@ -35,6 +35,7 @@ void ghb_array_replace(GValue *gval, guint ii, GValue *val); void ghb_array_append(GValue *gval, GValue *val); void ghb_array_remove(GValue *gval, guint ii); gint ghb_array_len(const GValue *gval); +void ghb_array_copy(GValue *arr1, GValue *arr2, gint count); void ghb_value_free(GValue *gval); GValue* ghb_value_new(GType gtype); |