From 7d4f3c93ea6ce9de22cf4187b03bb9432e51726c Mon Sep 17 00:00:00 2001 From: jstebbins Date: Fri, 17 Oct 2008 16:20:43 +0000 Subject: [PATCH] LinGui: Make preset key/values mostly align with macui presets. One step closer to having a common preset format. Audio presets are still not compatible. git-svn-id: svn://localhost/HandBrake/trunk@1840 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- gtk/src/audiohandler.c | 196 ++-- gtk/src/callbacks.c | 137 ++- gtk/src/ghb.ui | 113 +- gtk/src/hb-backend.c | 495 ++++---- gtk/src/hb-backend.h | 9 +- gtk/src/internal_defaults.xml | 153 ++- gtk/src/main.c | 10 +- gtk/src/makedeps.c | 51 +- gtk/src/preset_xlat.c | 368 +++--- gtk/src/presets.c | 1428 +++++++++++++++++------ gtk/src/presets.h | 3 +- gtk/src/queuehandler.c | 125 +- gtk/src/resource_data.h | 2589 ++++++++++++++++++++++------------------- gtk/src/resources.plist | 2585 +++++++++++++++++++++------------------- gtk/src/settings.c | 73 -- gtk/src/settings.h | 8 - gtk/src/standard_presets.xml | 1998 ++++++++++++++++--------------- gtk/src/values.c | 11 +- gtk/src/widget_deps | 81 +- gtk/src/widget_reverse_deps | 212 ++-- gtk/src/x264handler.c | 14 +- 21 files changed, 5874 insertions(+), 4785 deletions(-) diff --git a/gtk/src/audiohandler.c b/gtk/src/audiohandler.c index 6c29a874..eaf7f93e 100644 --- a/gtk/src/audiohandler.c +++ b/gtk/src/audiohandler.c @@ -30,18 +30,18 @@ ghb_adjust_audio_rate_combos(signal_user_data_t *ud) g_debug("ghb_adjust_audio_rate_combos ()"); titleindex = ghb_settings_combo_int(ud->settings, "title"); - widget = GHB_WIDGET(ud->builder, "audio_track"); + widget = GHB_WIDGET(ud->builder, "AudioTrack"); gval = ghb_widget_value(widget); - audioindex = ghb_lookup_combo_int("audio_track", gval); + audioindex = ghb_lookup_combo_int("AudioTrack", gval); ghb_value_free(gval); - widget = GHB_WIDGET(ud->builder, "audio_codec"); + widget = GHB_WIDGET(ud->builder, "AudioEncoder"); gval = ghb_widget_value(widget); - acodec = ghb_lookup_combo_int("audio_codec", gval); + acodec = ghb_lookup_combo_int("AudioEncoder", gval); ghb_value_free(gval); - widget = GHB_WIDGET(ud->builder, "audio_mix"); + widget = GHB_WIDGET(ud->builder, "AudioMixdown"); gval = ghb_widget_value(widget); - mix = ghb_lookup_combo_int("audio_mix", gval); + mix = ghb_lookup_combo_int("AudioMixdown", gval); ghb_value_free(gval); if (ghb_audio_is_passthru (acodec)) @@ -52,27 +52,27 @@ ghb_adjust_audio_rate_combos(signal_user_data_t *ud) gint br = ainfo.bitrate / 1000; // Set the values for bitrate and samplerate to the input rates ghb_set_passthru_bitrate_opts (ud->builder, br); - ghb_ui_update(ud, "audio_bitrate", ghb_int64_value(br)); - ghb_ui_update(ud, "audio_rate", ghb_int64_value(0)); - ghb_ui_update(ud, "audio_mix", ghb_int64_value(0)); + ghb_ui_update(ud, "AudioBitrate", ghb_int64_value(br)); + ghb_ui_update(ud, "AudioSamplerate", ghb_int64_value(0)); + ghb_ui_update(ud, "AudioMixdown", ghb_int64_value(0)); } else { - ghb_ui_update(ud, "audio_bitrate", ghb_int64_value(384)); - ghb_ui_update(ud, "audio_rate", ghb_int64_value(0)); - ghb_ui_update(ud, "audio_mix", ghb_int64_value(0)); + ghb_ui_update(ud, "AudioBitrate", ghb_int64_value(384)); + ghb_ui_update(ud, "AudioSamplerate", ghb_int64_value(0)); + ghb_ui_update(ud, "AudioMixdown", ghb_int64_value(0)); } } else if (acodec == HB_ACODEC_FAAC && mix != HB_AMIXDOWN_6CH) { gint br; - widget = GHB_WIDGET(ud->builder, "audio_bitrate"); + widget = GHB_WIDGET(ud->builder, "AudioBitrate"); gval = ghb_widget_value(widget); - br = ghb_lookup_combo_int("audio_bitrate", gval); + br = ghb_lookup_combo_int("AudioBitrate", gval); ghb_value_free(gval); if (br > 160) - ghb_ui_update(ud, "audio_bitrate", ghb_int64_value(160)); + ghb_ui_update(ud, "AudioBitrate", ghb_int64_value(160)); ghb_set_default_bitrate_opts (ud->builder, 160); } else @@ -102,21 +102,21 @@ ghb_set_pref_audio(gint titleindex, signal_user_data_t *ud) ghb_clear_audio_list(ud); // Find "best" audio based on audio preferences button = GHB_WIDGET (ud->builder, "audio_add"); - source_lang = ghb_settings_get_string(ud->settings, "source_audio_lang"); + source_lang = ghb_settings_get_string(ud->settings, "SourceAudioLang"); - pref_audio = ghb_settings_get_value(ud->settings, "pref_audio_list"); + pref_audio = ghb_settings_get_value(ud->settings, "AudioList"); list_count = 0; count = ghb_array_len(pref_audio); for (ii = 0; ii < count; ii++) { audio = ghb_array_get_nth(pref_audio, ii); - acodec = ghb_settings_get_value(audio, "audio_codec"); - bitrate = ghb_settings_get_value(audio, "audio_bitrate"); - rate = ghb_settings_get_value(audio, "audio_rate"); - mix = ghb_settings_get_value(audio, "audio_mix"); - drc = ghb_settings_get_value(audio, "audio_drc"); - acodec_code = ghb_lookup_combo_int("audio_codec", acodec); + acodec = ghb_settings_get_value(audio, "AudioEncoder"); + bitrate = ghb_settings_get_value(audio, "AudioBitrate"); + rate = ghb_settings_get_value(audio, "AudioSamplerate"); + mix = ghb_settings_get_value(audio, "AudioMixdown"); + drc = ghb_settings_get_value(audio, "AudioTrackDRCSlider"); + acodec_code = ghb_lookup_combo_int("AudioEncoder", acodec); // If there are multiple audios using the same codec, then // select sequential tracks for each. This hash keeps track // of the last used track for each codec. @@ -153,19 +153,19 @@ ghb_set_pref_audio(gint titleindex, signal_user_data_t *ud) // Add to audio list g_signal_emit_by_name(button, "clicked", ud); list_count++; - ghb_ui_update(ud, "audio_track", ghb_int64_value(track)); - ghb_ui_update(ud, "audio_codec", acodec); + ghb_ui_update(ud, "AudioTrack", ghb_int64_value(track)); + ghb_ui_update(ud, "AudioEncoder", acodec); if (!ghb_audio_is_passthru (acodec_code)) { // This gets set autimatically if the codec is passthru - ghb_ui_update(ud, "audio_bitrate", bitrate); - ghb_ui_update(ud, "audio_rate", rate); - mix_code = ghb_lookup_combo_int("audio_mix", mix); + ghb_ui_update(ud, "AudioBitrate", bitrate); + ghb_ui_update(ud, "AudioSamplerate", rate); + mix_code = ghb_lookup_combo_int("AudioMixdown", mix); mix_code = ghb_get_best_mix( titleindex, track, acodec_code, mix_code); - ghb_ui_update(ud, "audio_mix", ghb_int64_value(mix_code)); + ghb_ui_update(ud, "AudioMixdown", ghb_int64_value(mix_code)); } - ghb_ui_update(ud, "audio_drc", drc); + ghb_ui_update(ud, "AudioTrackDRCSlider", drc); index++; g_hash_table_insert(track_indicies, &acodec_code, &index); } @@ -240,19 +240,19 @@ audio_list_refresh_selected(signal_user_data_t *ud) return; asettings = ghb_array_get_nth(audio_list, row); - track = ghb_settings_combo_option(asettings, "audio_track"); - codec = ghb_settings_combo_option(asettings, "audio_codec"); - br = ghb_settings_combo_option(asettings, "audio_bitrate"); - sr = ghb_settings_combo_option(asettings, "audio_rate"); - mix = ghb_settings_combo_option(asettings, "audio_mix"); - drc = ghb_settings_get_string(asettings, "audio_drc"); + track = ghb_settings_combo_option(asettings, "AudioTrack"); + codec = ghb_settings_combo_option(asettings, "AudioEncoder"); + br = ghb_settings_combo_option(asettings, "AudioBitrate"); + sr = ghb_settings_combo_option(asettings, "AudioSamplerate"); + mix = ghb_settings_combo_option(asettings, "AudioMixdown"); + drc = ghb_settings_get_string(asettings, "AudioTrackDRCSlider"); - s_track = ghb_settings_get_string(asettings, "audio_track"); - s_codec = ghb_settings_get_string(asettings, "audio_codec"); - s_br = ghb_settings_get_string(asettings, "audio_bitrate"); - s_sr = ghb_settings_get_string(asettings, "audio_rate"); - s_mix = ghb_settings_get_string(asettings, "audio_mix"); - s_drc = ghb_settings_get_double(asettings, "audio_drc"); + s_track = ghb_settings_get_string(asettings, "AudioTrack"); + s_codec = ghb_settings_get_string(asettings, "AudioEncoder"); + s_br = ghb_settings_get_string(asettings, "AudioBitrate"); + s_sr = ghb_settings_get_string(asettings, "AudioSamplerate"); + s_mix = ghb_settings_get_string(asettings, "AudioMixdown"); + s_drc = ghb_settings_get_double(asettings, "AudioTrackDRCSlider"); gtk_list_store_set(GTK_LIST_STORE(store), &iter, // These are displayed in list @@ -288,7 +288,7 @@ audio_codec_changed_cb(GtkWidget *widget, signal_user_data_t *ud) g_debug("audio_codec_changed_cb ()"); gval = ghb_widget_value(widget); - acodec_code = ghb_lookup_combo_int("audio_codec", gval); + acodec_code = ghb_lookup_combo_int("AudioEncoder", gval); ghb_value_free(gval); if (ghb_audio_is_passthru (prev_acodec) && !ghb_audio_is_passthru (acodec_code)) @@ -299,14 +299,14 @@ audio_codec_changed_cb(GtkWidget *widget, signal_user_data_t *ud) gint track; titleindex = ghb_settings_combo_int(ud->settings, "title"); - track = ghb_settings_combo_int(ud->settings, "audio_track"); + track = ghb_settings_combo_int(ud->settings, "AudioTrack"); - ghb_ui_update(ud, "audio_bitrate", ghb_string_value("160")); - ghb_ui_update(ud, "audio_rate", ghb_string_value("source")); - mix_code = ghb_lookup_combo_int("audio_mix", ghb_string_value("dpl2")); + ghb_ui_update(ud, "AudioBitrate", ghb_string_value("160")); + ghb_ui_update(ud, "AudioSamplerate", ghb_string_value("source")); + mix_code = ghb_lookup_combo_int("AudioMixdown", ghb_string_value("dpl2")); mix_code = ghb_get_best_mix( titleindex, track, acodec_code, mix_code); - ghb_ui_update(ud, "audio_mix", ghb_int64_value(mix_code)); - ghb_ui_update(ud, "audio_drc", ghb_double_value(1.0)); + ghb_ui_update(ud, "AudioMixdown", ghb_int64_value(mix_code)); + ghb_ui_update(ud, "AudioTrackDRCSlider", ghb_double_value(1.0)); } ghb_adjust_audio_rate_combos(ud); ghb_grey_combo_options (ud->builder); @@ -325,10 +325,10 @@ audio_codec_changed_cb(GtkWidget *widget, signal_user_data_t *ud) { gchar *container; - container = ghb_settings_get_string(ud->settings, "container"); + container = ghb_settings_get_string(ud->settings, "FileFormat"); if (strcmp(container, "mp4") == 0) { - ghb_ui_update(ud, "container", ghb_string_value("m4v")); + ghb_ui_update(ud, "FileFormat", ghb_string_value("m4v")); } g_free(container); } @@ -350,8 +350,8 @@ audio_track_changed_cb(GtkWidget *widget, signal_user_data_t *ud) ghb_widget_to_setting(asettings, widget); audio_list_refresh_selected(ud); - track = ghb_settings_combo_option(asettings, "audio_track"); - ghb_settings_set_string(asettings, "audio_track_long", track); + track = ghb_settings_combo_option(asettings, "AudioTrack"); + ghb_settings_set_string(asettings, "AudioTrackDescription", track); } } @@ -436,19 +436,19 @@ add_to_audio_list(signal_user_data_t *ud, GValue *settings) selection = gtk_tree_view_get_selection (treeview); store = GTK_LIST_STORE(gtk_tree_view_get_model(treeview)); - track = ghb_settings_combo_option(settings, "audio_track"); - codec = ghb_settings_combo_option(settings, "audio_codec"); - br = ghb_settings_combo_option(settings, "audio_bitrate"); - sr = ghb_settings_combo_option(settings, "audio_rate"); - mix = ghb_settings_combo_option(settings, "audio_mix"); - drc = ghb_settings_get_string(settings, "audio_drc"); + track = ghb_settings_combo_option(settings, "AudioTrack"); + codec = ghb_settings_combo_option(settings, "AudioEncoder"); + br = ghb_settings_combo_option(settings, "AudioBitrate"); + sr = ghb_settings_combo_option(settings, "AudioSamplerate"); + mix = ghb_settings_combo_option(settings, "AudioMixdown"); + drc = ghb_settings_get_string(settings, "AudioTrackDRCSlider"); - s_track = ghb_settings_get_string(settings, "audio_track"); - s_codec = ghb_settings_get_string(settings, "audio_codec"); - s_br = ghb_settings_get_string(settings, "audio_bitrate"); - s_sr = ghb_settings_get_string(settings, "audio_rate"); - s_mix = ghb_settings_get_string(settings, "audio_mix"); - s_drc = ghb_settings_get_double(settings, "audio_drc"); + s_track = ghb_settings_get_string(settings, "AudioTrack"); + s_codec = ghb_settings_get_string(settings, "AudioEncoder"); + s_br = ghb_settings_get_string(settings, "AudioBitrate"); + s_sr = ghb_settings_get_string(settings, "AudioSamplerate"); + s_mix = ghb_settings_get_string(settings, "AudioMixdown"); + s_drc = ghb_settings_get_double(settings, "AudioTrackDRCSlider"); gtk_list_store_append(store, &iter); gtk_list_store_set(store, &iter, @@ -497,12 +497,12 @@ audio_list_selection_changed_cb(GtkTreeSelection *selection, signal_user_data_t 10, &mix, 11, &drc, -1); - ghb_ui_update(ud, "audio_track", ghb_string_value(track)); - ghb_ui_update(ud, "audio_codec", ghb_string_value(codec)); - ghb_ui_update(ud, "audio_bitrate", ghb_string_value(bitrate)); - ghb_ui_update(ud, "audio_rate", ghb_string_value(sample_rate)); - ghb_ui_update(ud, "audio_mix", ghb_string_value(mix)); - ghb_ui_update(ud, "audio_drc", ghb_double_value(drc)); + ghb_ui_update(ud, "AudioTrack", ghb_string_value(track)); + ghb_ui_update(ud, "AudioEncoder", ghb_string_value(codec)); + ghb_ui_update(ud, "AudioBitrate", ghb_string_value(bitrate)); + ghb_ui_update(ud, "AudioSamplerate", ghb_string_value(sample_rate)); + ghb_ui_update(ud, "AudioMixdown", ghb_string_value(mix)); + ghb_ui_update(ud, "AudioTrackDRCSlider", ghb_double_value(drc)); widget = GHB_WIDGET (ud->builder, "audio_remove"); gtk_widget_set_sensitive(widget, TRUE); //widget = GHB_WIDGET (ud->builder, "audio_update"); @@ -530,20 +530,20 @@ audio_add_clicked_cb(GtkWidget *xwidget, signal_user_data_t *ud) g_debug("audio_add_clicked_cb ()"); asettings = ghb_dict_value_new(); // Only allow up to 8 audio entries - widget = GHB_WIDGET(ud->builder, "audio_track"); - ghb_settings_take_value(asettings, "audio_track", ghb_widget_value(widget)); - widget = GHB_WIDGET(ud->builder, "audio_codec"); - ghb_settings_take_value(asettings, "audio_codec", ghb_widget_value(widget)); - widget = GHB_WIDGET(ud->builder, "audio_bitrate"); - ghb_settings_take_value(asettings, "audio_bitrate", ghb_widget_value(widget)); - widget = GHB_WIDGET(ud->builder, "audio_rate"); - ghb_settings_take_value(asettings, "audio_rate", ghb_widget_value(widget)); - widget = GHB_WIDGET(ud->builder, "audio_mix"); - ghb_settings_take_value(asettings, "audio_mix", ghb_widget_value(widget)); - widget = GHB_WIDGET(ud->builder, "audio_drc"); - ghb_settings_take_value(asettings, "audio_drc", ghb_widget_value(widget)); - track = ghb_settings_combo_option(asettings, "audio_track"); - ghb_settings_set_string(asettings, "audio_track_long", track); + widget = GHB_WIDGET(ud->builder, "AudioTrack"); + ghb_settings_take_value(asettings, "AudioTrack", ghb_widget_value(widget)); + widget = GHB_WIDGET(ud->builder, "AudioEncoder"); + ghb_settings_take_value(asettings, "AudioEncoder", ghb_widget_value(widget)); + widget = GHB_WIDGET(ud->builder, "AudioBitrate"); + ghb_settings_take_value(asettings, "AudioBitrate", ghb_widget_value(widget)); + widget = GHB_WIDGET(ud->builder, "AudioSamplerate"); + ghb_settings_take_value(asettings, "AudioSamplerate", ghb_widget_value(widget)); + widget = GHB_WIDGET(ud->builder, "AudioMixdown"); + ghb_settings_take_value(asettings, "AudioMixdown", ghb_widget_value(widget)); + widget = GHB_WIDGET(ud->builder, "AudioTrackDRCSlider"); + ghb_settings_take_value(asettings, "AudioTrackDRCSlider", ghb_widget_value(widget)); + track = ghb_settings_combo_option(asettings, "AudioTrack"); + ghb_settings_set_string(asettings, "AudioTrackDescription", track); audio_list = ghb_settings_get_value(ud->settings, "audio_list"); if (audio_list == NULL) @@ -630,28 +630,28 @@ ghb_set_audio(signal_user_data_t *ud, GValue *settings) for (ii = 0; ii < count; ii++) { audio = ghb_array_get_nth(alist, ii); - track = ghb_settings_get_value(audio, "audio_track"); - acodec = ghb_settings_get_value(audio, "audio_codec"); - bitrate = ghb_settings_get_value(audio, "audio_bitrate"); - rate = ghb_settings_get_value(audio, "audio_rate"); - mix = ghb_settings_get_value(audio, "audio_mix"); - drc = ghb_settings_get_value(audio, "audio_drc"); - acodec_code = ghb_lookup_combo_int("audio_codec", acodec); + track = ghb_settings_get_value(audio, "AudioTrack"); + acodec = ghb_settings_get_value(audio, "AudioEncoder"); + bitrate = ghb_settings_get_value(audio, "AudioBitrate"); + rate = ghb_settings_get_value(audio, "AudioSamplerate"); + mix = ghb_settings_get_value(audio, "AudioMixdown"); + drc = ghb_settings_get_value(audio, "AudioTrackDRCSlider"); + acodec_code = ghb_lookup_combo_int("AudioEncoder", acodec); if (acodec_code != 0) { // Add to audio list g_signal_emit_by_name(button, "clicked", ud); - ghb_ui_update(ud, "audio_track", track); - ghb_ui_update(ud, "audio_codec", acodec); + ghb_ui_update(ud, "AudioTrack", track); + ghb_ui_update(ud, "AudioEncoder", acodec); if (!ghb_audio_is_passthru (acodec_code)) { // This gets set autimatically if the codec is passthru - ghb_ui_update(ud, "audio_bitrate", bitrate); - ghb_ui_update(ud, "audio_rate", rate); - ghb_ui_update(ud, "audio_mix", mix); + ghb_ui_update(ud, "AudioBitrate", bitrate); + ghb_ui_update(ud, "AudioSamplerate", rate); + ghb_ui_update(ud, "AudioMixdown", mix); } - ghb_ui_update(ud, "audio_drc", drc); + ghb_ui_update(ud, "AudioTrackDRCSlider", drc); } } } diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c index 516f33aa..c0a7e6b1 100644 --- a/gtk/src/callbacks.c +++ b/gtk/src/callbacks.c @@ -273,7 +273,7 @@ set_destination(signal_user_data_t *ud) gchar *dir, *new_name; filename = ghb_settings_get_string(ud->settings, "destination"); - extension = ghb_settings_get_string(ud->settings, "container"); + extension = ghb_settings_get_string(ud->settings, "FileFormat"); dir = g_path_get_dirname (filename); vol_name = ghb_settings_get_string(ud->settings, "volume_label"); if (ghb_settings_get_boolean(ud->settings, "chapters_in_destination")) @@ -695,7 +695,7 @@ update_destination_extension(signal_user_data_t *ud) GtkEntry *entry; g_debug("update_destination_extension ()"); - extension = ghb_settings_get_string(ud->settings, "container"); + extension = ghb_settings_get_string(ud->settings, "FileFormat"); entry = GTK_ENTRY(GHB_WIDGET(ud->builder, "destination")); filename = g_strdup(gtk_entry_get_text(entry)); for (ii = 0; containers[ii] != NULL; ii++) @@ -875,10 +875,10 @@ container_changed_cb(GtkWidget *widget, signal_user_data_t *ud) { gchar *container; - container = ghb_settings_get_string(ud->settings, "container"); + container = ghb_settings_get_string(ud->settings, "FileFormat"); if (strcmp(container, "mp4") == 0) { - ghb_ui_update(ud, "container", ghb_string_value("m4v")); + ghb_ui_update(ud, "FileFormat", ghb_string_value("m4v")); } g_free(container); } @@ -948,7 +948,7 @@ show_title_info(signal_user_data_t *ud, ghb_title_info_t *tinfo) ghb_int64_value(tinfo->width - tinfo->crop[2] - tinfo->crop[3])); // If anamorphic or keep_aspect, the hight will be automatically calculated gboolean keep_aspect, anamorphic; - keep_aspect = ghb_settings_get_boolean(ud->settings, "keep_aspect"); + keep_aspect = ghb_settings_get_boolean(ud->settings, "PictureKeepRatio"); anamorphic = ghb_settings_get_boolean(ud->settings, "anamorphic"); if (!(keep_aspect || anamorphic)) { @@ -960,29 +960,34 @@ show_title_info(signal_user_data_t *ud, ghb_title_info_t *tinfo) // you pass it a cropped width or height == 0. gint bound; bound = tinfo->height / 2 - 2; - widget = GHB_WIDGET (ud->builder, "crop_top"); + widget = GHB_WIDGET (ud->builder, "PictureTopCrop"); gtk_spin_button_set_range (GTK_SPIN_BUTTON(widget), 0, bound); - widget = GHB_WIDGET (ud->builder, "crop_bottom"); + widget = GHB_WIDGET (ud->builder, "PictureBottomCrop"); gtk_spin_button_set_range (GTK_SPIN_BUTTON(widget), 0, bound); bound = tinfo->width / 2 - 2; - widget = GHB_WIDGET (ud->builder, "crop_left"); + widget = GHB_WIDGET (ud->builder, "PictureLeftCrop"); gtk_spin_button_set_range (GTK_SPIN_BUTTON(widget), 0, bound); - widget = GHB_WIDGET (ud->builder, "crop_right"); + widget = GHB_WIDGET (ud->builder, "PictureRightCrop"); gtk_spin_button_set_range (GTK_SPIN_BUTTON(widget), 0, bound); - if (ghb_settings_get_boolean(ud->settings, "autocrop")) - { - ghb_ui_update(ud, "crop_top", ghb_int64_value(tinfo->crop[0])); - ghb_ui_update(ud, "crop_bottom", ghb_int64_value(tinfo->crop[1])); - 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)); - } + if (ghb_settings_get_boolean(ud->settings, "PictureAutoCrop")) + { + ghb_ui_update(ud, "PictureTopCrop", ghb_int64_value(tinfo->crop[0])); + ghb_ui_update(ud, "PictureBottomCrop", ghb_int64_value(tinfo->crop[1])); + ghb_ui_update(ud, "PictureLeftCrop", ghb_int64_value(tinfo->crop[2])); + ghb_ui_update(ud, "PictureRightCrop", ghb_int64_value(tinfo->crop[3])); + } + gint width, height, crop[4]; + crop[0] = ghb_settings_get_int(ud->settings, "PictureTopCrop"); + crop[1] = ghb_settings_get_int(ud->settings, "PictureBottomCrop"); + crop[2] = ghb_settings_get_int(ud->settings, "PictureLeftCrop"); + crop[3] = ghb_settings_get_int(ud->settings, "PictureRightCrop"); + width = tinfo->width - crop[2] - crop[3]; + height = tinfo->height - crop[0] - crop[1]; + widget = GHB_WIDGET (ud->builder, "crop_dimensions"); + text = g_strdup_printf ("%d x %d", width, height); + gtk_label_set_text (GTK_LABEL(widget), text); + g_free(text); + 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); @@ -1045,18 +1050,16 @@ title_changed_cb(GtkWidget *widget, signal_user_data_t *ud) { ghb_title_info_t tinfo; gint titleindex; - GValue *preset; g_debug("title_changed_cb ()"); ghb_widget_to_setting(ud->settings, widget); ghb_check_dependency(ud, widget); titleindex = ghb_settings_combo_int(ud->settings, "title"); - ghb_update_ui_combo_box (ud->builder, "audio_track", titleindex, FALSE); - ghb_update_ui_combo_box (ud->builder, "subtitle_lang", titleindex, FALSE); + ghb_update_ui_combo_box (ud->builder, "AudioTrack", titleindex, FALSE); + ghb_update_ui_combo_box (ud->builder, "Subtitles", titleindex, FALSE); - preset = ghb_settings_get_value (ud->settings, "preset"); - ghb_update_from_preset(ud, preset, "subtitle_lang"); + ghb_update_from_preset(ud, "Subtitles"); if (ghb_get_title_info (&tinfo, titleindex)) { show_title_info(ud, &tinfo); @@ -1067,7 +1070,7 @@ title_changed_cb(GtkWidget *widget, signal_user_data_t *ud) if (ghb_settings_get_boolean(ud->settings, "vquality_type_target")) { gint bitrate = ghb_calculate_target_bitrate (ud->settings, titleindex); - ghb_ui_update(ud, "video_bitrate", ghb_int64_value(bitrate)); + ghb_ui_update(ud, "VideoAvgBitrate", ghb_int64_value(bitrate)); } // Unfortunately, there is no way to query how many frames were @@ -1127,7 +1130,7 @@ deint_tweak_focus_out_cb(GtkWidget *widget, GdkEventFocus *event, signal_user_data_t *ud) { g_debug("deint_tweak_focus_out_cb ()"); - validate_filter_widget(ud, "tweak_deinterlace"); + validate_filter_widget(ud, "tweak_PictureDeinterlace"); return FALSE; } @@ -1136,7 +1139,7 @@ denoise_tweak_focus_out_cb(GtkWidget *widget, GdkEventFocus *event, signal_user_data_t *ud) { g_debug("denoise_tweak_focus_out_cb ()"); - validate_filter_widget(ud, "tweak_noise"); + validate_filter_widget(ud, "tweak_PictureDenoise"); return FALSE; } @@ -1153,14 +1156,23 @@ http_opt_changed_cb(GtkWidget *widget, signal_user_data_t *ud) void vcodec_changed_cb(GtkWidget *widget, signal_user_data_t *ud) { - gint vqmin, vqmax; + gdouble vqmin, vqmax, step, page; + gint digits; + gint vcodec; ghb_widget_to_setting(ud->settings, widget); ghb_check_dependency(ud, widget); ghb_clear_presets_selection(ud); - ghb_vquality_range(ud, &vqmin, &vqmax); - GtkWidget *qp = GHB_WIDGET(ud->builder, "video_quality"); + ghb_vquality_range(ud, &vqmin, &vqmax, &step, &page, &digits); + GtkWidget *qp = GHB_WIDGET(ud->builder, "VideoQualitySlider"); gtk_range_set_range (GTK_RANGE(qp), vqmin, vqmax); + gtk_range_set_increments (GTK_RANGE(qp), step, page); + gtk_scale_set_digits(GTK_SCALE(qp), digits); + vcodec = ghb_settings_combo_int(ud->settings, "VideoEncoder"); + if (vcodec != HB_VCODEC_X264 && vcodec != HB_VCODEC_FFMPEG) + { + ghb_ui_update(ud, "directqp", ghb_boolean_value(FALSE)); + } } void @@ -1176,7 +1188,7 @@ target_size_changed_cb(GtkWidget *widget, signal_user_data_t *ud) gint titleindex; titleindex = ghb_settings_combo_int(ud->settings, "title"); gint bitrate = ghb_calculate_target_bitrate (ud->settings, titleindex); - ghb_ui_update(ud, "video_bitrate", ghb_int64_value(bitrate)); + ghb_ui_update(ud, "VideoAvgBitrate", ghb_int64_value(bitrate)); } } @@ -1263,10 +1275,10 @@ crop_changed_cb(GtkWidget *widget, signal_user_data_t *ud) ghb_check_dependency(ud, widget); ghb_set_scale (ud, GHB_SCALE_KEEP_NONE); - crop[0] = ghb_settings_get_int(ud->settings, "crop_top"); - crop[1] = ghb_settings_get_int(ud->settings, "crop_bottom"); - crop[2] = ghb_settings_get_int(ud->settings, "crop_left"); - crop[3] = ghb_settings_get_int(ud->settings, "crop_right"); + crop[0] = ghb_settings_get_int(ud->settings, "PictureTopCrop"); + crop[1] = ghb_settings_get_int(ud->settings, "PictureBottomCrop"); + crop[2] = ghb_settings_get_int(ud->settings, "PictureLeftCrop"); + crop[3] = ghb_settings_get_int(ud->settings, "PictureRightCrop"); titleindex = ghb_settings_combo_int(ud->settings, "title"); if (ghb_get_title_info (&tinfo, titleindex)) { @@ -1300,7 +1312,7 @@ scale_changed_cb(GtkWidget *widget, signal_user_data_t *ud) gchar *text; - text = ghb_settings_get_boolean(ud->settings, "autocrop") ? "On" : "Off"; + text = ghb_settings_get_boolean(ud->settings, "PictureAutoCrop") ? "On" : "Off"; widget = GHB_WIDGET (ud->builder, "crop_auto"); gtk_label_set_text (GTK_LABEL(widget), text); text = ghb_settings_get_boolean(ud->settings, "autoscale") ? "On" : "Off"; @@ -2232,30 +2244,30 @@ tweaks_changed_cb(GtkWidget *widget, signal_user_data_t *ud) ghb_pref_save(ud->settings, name); gboolean tweaks = ghb_settings_get_boolean(ud->settings, "allow_tweaks"); - widget = GHB_WIDGET(ud->builder, "deinterlace"); + widget = GHB_WIDGET(ud->builder, "PictureDeinterlace"); tweaks ? gtk_widget_hide(widget) : gtk_widget_show(widget); - widget = GHB_WIDGET(ud->builder, "tweak_deinterlace"); + widget = GHB_WIDGET(ud->builder, "tweak_PictureDeinterlace"); !tweaks ? gtk_widget_hide(widget) : gtk_widget_show(widget); - widget = GHB_WIDGET(ud->builder, "denoise"); + widget = GHB_WIDGET(ud->builder, "PictureDenoise"); tweaks ? gtk_widget_hide(widget) : gtk_widget_show(widget); - widget = GHB_WIDGET(ud->builder, "tweak_denoise"); + widget = GHB_WIDGET(ud->builder, "tweak_PictureDenoise"); !tweaks ? gtk_widget_hide(widget) : gtk_widget_show(widget); if (tweaks) { const GValue *value; - value = ghb_settings_get_value(ud->settings, "deinterlace"); - ghb_ui_update(ud, "tweak_deinterlace", value); - value = ghb_settings_get_value(ud->settings, "denoise"); - ghb_ui_update(ud, "tweak_denoise", value); + value = ghb_settings_get_value(ud->settings, "PictureDeinterlace"); + ghb_ui_update(ud, "tweak_PictureDeinterlace", value); + value = ghb_settings_get_value(ud->settings, "PictureDenoise"); + ghb_ui_update(ud, "tweak_PictureDenoise", value); } else { const GValue *value; - value = ghb_settings_get_value(ud->settings, "tweak_deinterlace"); - ghb_ui_update(ud, "deinterlace", value); - value = ghb_settings_get_value(ud->settings, "tweak_denoise"); - ghb_ui_update(ud, "denoise", value); + value = ghb_settings_get_value(ud->settings, "tweak_PictureDeinterlace"); + ghb_ui_update(ud, "PictureDeinterlace", value); + value = ghb_settings_get_value(ud->settings, "tweak_PictureDenoise"); + ghb_ui_update(ud, "PictureDenoise", value); } } @@ -2573,3 +2585,24 @@ format_deblock_cb(GtkScale *scale, gdouble val, signal_user_data_t *ud) return g_strdup_printf("%d", (gint)val); } } + +gchar* +format_vquality_cb(GtkScale *scale, gdouble val, signal_user_data_t *ud) +{ + if (ghb_settings_get_boolean(ud->settings, "directqp")) + { + gint vcodec = ghb_settings_combo_int(ud->settings, "VideoEncoder"); + // Only x264 and ffmpeg currently support direct qp/crf entry + if (vcodec != HB_VCODEC_X264 && vcodec != HB_VCODEC_FFMPEG) + { + val *= 100; + return g_strdup_printf("%.1f", val); + } + return g_strdup_printf("%d", (gint)val); + } + else + { + val *= 100; + return g_strdup_printf("%.1f", val); + } +} diff --git a/gtk/src/ghb.ui b/gtk/src/ghb.ui index 3f523bcc..d1b04860 100644 --- a/gtk/src/ghb.ui +++ b/gtk/src/ghb.ui @@ -114,12 +114,12 @@ 0 - 100 + 1 0 - 10 - 1 + 1 + 0.1 0 - 63 + 0.63 4 @@ -796,7 +796,7 @@ - + True Output file container type @@ -813,7 +813,7 @@ 0.10000000149011612 0 - + True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -829,7 +829,7 @@ - + True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -843,7 +843,7 @@ - + True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -1302,7 +1302,7 @@ True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - + True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -1315,7 +1315,7 @@ - + True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -1330,7 +1330,7 @@ - + True True De-Comb @@ -1364,7 +1364,7 @@ 0 0.55 - + True True This is a filter that gets applied before encoding. If the source looks blocky before encoding, you may want to use this. @@ -1404,7 +1404,7 @@ - + 100 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -1417,7 +1417,7 @@ - + False @@ -1459,7 +1459,7 @@ - + 100 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -1472,7 +1472,7 @@ - + False @@ -1645,7 +1645,7 @@ 0 0 - + True @@ -1684,7 +1684,7 @@ 0 0 - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -1703,7 +1703,7 @@ - + True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -1721,7 +1721,7 @@ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0.23999999463558197 - + True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -1811,7 +1811,7 @@ 0.11999999731779099 0.10000000149011612 - + True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -1851,7 +1851,7 @@ 0.11999999731779099 0.10000000149011612 - + True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -1889,14 +1889,15 @@ - + True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK adjustment5 - 0 + 3 GTK_POS_RIGHT + 1 @@ -2056,7 +2057,7 @@ - + True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -2089,7 +2090,7 @@ 2 5 - + 215 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -2101,7 +2102,7 @@ - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -2115,7 +2116,7 @@ - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -2191,7 +2192,7 @@ - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -2205,7 +2206,7 @@ - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -2274,7 +2275,7 @@ 5 - + 150 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -2316,7 +2317,7 @@ 5 - + 150 True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -2324,7 +2325,7 @@ - + True True True @@ -2638,7 +2639,7 @@ 12 2 - + True True Your selected options will appear here. @@ -3085,7 +3086,7 @@ no-fast-pskip=0:no-dct-decimate=0:cabac=1 True - + True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -3420,22 +3421,6 @@ auto-generated destination name. - - True - True - x264 uses a different scale for video quality than -other codecs. This adjusts the scale so that -similar values give similar quality across all the -video codecs. - Adjust x264 video quality scale - True - - - - 2 - - - True True @@ -3449,7 +3434,7 @@ the required multiple. - 3 + 2 @@ -3468,7 +3453,7 @@ this setting. - 4 + 3 @@ -3479,7 +3464,7 @@ this setting. - 5 + 4 @@ -3490,7 +3475,7 @@ this setting. - 6 + 5 @@ -3662,7 +3647,7 @@ this setting. - + True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -3696,7 +3681,7 @@ this setting. 12 4 - + 60 True True @@ -4147,7 +4132,7 @@ this setting. - + True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -4177,7 +4162,7 @@ this setting. - + True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -4193,7 +4178,7 @@ this setting. - + True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -4209,7 +4194,7 @@ this setting. - + True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -4246,7 +4231,7 @@ this setting. - + True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -4370,7 +4355,7 @@ this setting. True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - + True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -4412,7 +4397,7 @@ adjusted to keep the video's original aspect ratio. - + True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK diff --git a/gtk/src/hb-backend.c b/gtk/src/hb-backend.c index e82473e9..b6908381 100644 --- a/gtk/src/hb-backend.c +++ b/gtk/src/hb-backend.c @@ -32,6 +32,7 @@ #include "settings.h" #include "callbacks.h" #include "values.h" +#include "lang.h" typedef struct { @@ -223,24 +224,25 @@ typedef struct combo_name_map_t combo_name_map[] = { - {"container", &container_opts}, - {"deinterlace", &deint_opts}, - {"tweak_deinterlace", &deint_opts}, - {"denoise", &denoise_opts}, - {"tweak_denoise", &denoise_opts}, - {"video_codec", &vcodec_opts}, - {"audio_codec", &acodec_opts}, + {"FileFormat", &container_opts}, + {"PictureDeinterlace", &deint_opts}, + {"tweak_PictureDeinterlace", &deint_opts}, + {"PictureDenoise", &denoise_opts}, + {"tweak_PictureDenoise", &denoise_opts}, + {"VideoEncoder", &vcodec_opts}, + {"AudioEncoder", &acodec_opts}, {"x264_direct", &direct_opts}, {"x264_me", &me_opts}, {"x264_subme", &subme_opts}, {"x264_analyse", &analyse_opts}, {"x264_trellis", &trellis_opts}, - {"subtitle_lang", &subtitle_opts}, + {"Subtitles", &subtitle_opts}, {"title", &title_opts}, - {"audio_track", &audio_track_opts}, + {"AudioTrack", &audio_track_opts}, {NULL, NULL} }; +#if 0 typedef struct iso639_lang_t { char * eng_name; /* Description in English */ @@ -249,8 +251,9 @@ typedef struct iso639_lang_t char * iso639_2; /* ISO-639-2/t (3 character) code */ char * iso639_2b; /* ISO-639-2/b code (if different from above) */ } iso639_lang_t; +#endif -static const iso639_lang_t language_table[] = +const iso639_lang_t ghb_language_table[] = { { "Any", "", "zz", "und" }, { "Afar", "", "aa", "aar" }, @@ -438,8 +441,9 @@ static const iso639_lang_t language_table[] = { "Yoruba", "", "yo", "yor" }, { "Zhuang", "", "za", "zha" }, { "Zulu", "", "zu", "zul" }, + {NULL, NULL, NULL, NULL} }; -#define LANG_TABLE_SIZE (sizeof(language_table)/ sizeof(iso639_lang_t)) +#define LANG_TABLE_SIZE (sizeof(ghb_language_table)/ sizeof(iso639_lang_t)-1) static void audio_bitrate_opts_set(GtkBuilder *builder, const gchar *name); @@ -477,12 +481,21 @@ ghb_version() } void -ghb_vquality_range(signal_user_data_t *ud, gint *min, gint *max) +ghb_vquality_range( + signal_user_data_t *ud, + gdouble *min, + gdouble *max, + gdouble *step, + gdouble *page, + gint *digits) { if (ghb_settings_get_boolean(ud->settings, "directqp")) { - gint vcodec = ghb_settings_combo_int(ud->settings, "video_codec"); + gint vcodec = ghb_settings_combo_int(ud->settings, "VideoEncoder"); // Only x264 and ffmpeg currently support direct qp/crf entry + *step = 1; + *page = 10; + *digits = 0; if (vcodec == HB_VCODEC_X264) { *min = 0; @@ -496,13 +509,19 @@ ghb_vquality_range(signal_user_data_t *ud, gint *min, gint *max) else { *min = 0; - *max = 100; + *max = 1.0; + *step = 0.001; + *page = 0.1; + *digits = 3; } } else { *min = 0; - *max = 100; + *max = 1.0; + *step = 0.001; + *page = 0.1; + *digits = 3; } } @@ -730,7 +749,7 @@ lookup_audio_lang_int(const GValue *rate) str = ghb_value_string(rate); for (ii = 0; ii < LANG_TABLE_SIZE; ii++) { - if (strcmp(language_table[ii].iso639_2, str) == 0) + if (strcmp(ghb_language_table[ii].iso639_2, str) == 0) { result = ii; break; @@ -752,9 +771,9 @@ lookup_audio_lang_option(const GValue *rate) str = ghb_value_string(rate); for (ii = 0; ii < LANG_TABLE_SIZE; ii++) { - if (strcmp(language_table[ii].iso639_2, str) == 0) + if (strcmp(ghb_language_table[ii].iso639_2, str) == 0) { - result = language_table[ii].eng_name; + result = ghb_language_table[ii].eng_name; break; } } @@ -925,21 +944,22 @@ ghb_grey_combo_options(GtkBuilder *builder) gval = ghb_widget_value(widget); titleindex = ghb_lookup_combo_int("title", gval); ghb_value_free(gval); - widget = GHB_WIDGET (builder, "audio_track"); + widget = GHB_WIDGET (builder, "AudioTrack"); gval = ghb_widget_value(widget); - track = ghb_lookup_combo_int("audio_track", gval); + track = ghb_lookup_combo_int("AudioTrack", gval); ghb_value_free(gval); audio = get_hb_audio(titleindex, track); - widget = GHB_WIDGET (builder, "container"); + widget = GHB_WIDGET (builder, "FileFormat"); gval = ghb_widget_value(widget); - container = ghb_lookup_combo_int("container", gval); + container = ghb_lookup_combo_int("FileFormat", gval); ghb_value_free(gval); - widget = GHB_WIDGET (builder, "http_optimize_mp4"); + widget = GHB_WIDGET (builder, "Mp4HttpOptimize"); httpopt = ghb_widget_boolean(widget); - grey_combo_box_item(builder, "audio_codec", HB_ACODEC_FAAC, FALSE); - grey_combo_box_item(builder, "audio_codec", HB_ACODEC_LAME, FALSE); - grey_combo_box_item(builder, "audio_codec", HB_ACODEC_VORBIS, FALSE); + grey_combo_box_item(builder, "x264_analyse", 3, TRUE); + grey_combo_box_item(builder, "AudioEncoder", HB_ACODEC_FAAC, FALSE); + grey_combo_box_item(builder, "AudioEncoder", HB_ACODEC_LAME, FALSE); + grey_combo_box_item(builder, "AudioEncoder", HB_ACODEC_VORBIS, FALSE); gboolean allow_ac3 = TRUE; allow_ac3 = @@ -948,41 +968,41 @@ ghb_grey_combo_options(GtkBuilder *builder) if (allow_ac3) { - grey_combo_box_item(builder, "audio_codec", HB_ACODEC_AC3, FALSE); + grey_combo_box_item(builder, "AudioEncoder", HB_ACODEC_AC3, FALSE); } else { - grey_combo_box_item(builder, "audio_codec", HB_ACODEC_AC3, TRUE); + grey_combo_box_item(builder, "AudioEncoder", HB_ACODEC_AC3, TRUE); } if (audio && audio->in.codec != HB_ACODEC_AC3) { - grey_combo_box_item(builder, "audio_codec", HB_ACODEC_AC3, TRUE); + grey_combo_box_item(builder, "AudioEncoder", HB_ACODEC_AC3, TRUE); } - grey_combo_box_item(builder, "video_codec", HB_VCODEC_THEORA, FALSE); + grey_combo_box_item(builder, "VideoEncoder", HB_VCODEC_THEORA, FALSE); - widget = GHB_WIDGET (builder, "audio_codec"); + widget = GHB_WIDGET (builder, "AudioEncoder"); gval = ghb_widget_value(widget); - acodec = ghb_lookup_combo_int("audio_codec", gval); + acodec = ghb_lookup_combo_int("AudioEncoder", gval); ghb_value_free(gval); if (acodec != HB_ACODEC_AC3) { - grey_combo_box_item(builder, "audio_mix", 0, TRUE); + grey_combo_box_item(builder, "AudioMixdown", 0, TRUE); } if (container == HB_MUX_MP4) { - grey_combo_box_item(builder, "audio_codec", HB_ACODEC_LAME, TRUE); - grey_combo_box_item(builder, "audio_codec", HB_ACODEC_VORBIS, TRUE); - grey_combo_box_item(builder, "video_codec", HB_VCODEC_THEORA, TRUE); + grey_combo_box_item(builder, "AudioEncoder", HB_ACODEC_LAME, TRUE); + grey_combo_box_item(builder, "AudioEncoder", HB_ACODEC_VORBIS, TRUE); + grey_combo_box_item(builder, "VideoEncoder", HB_VCODEC_THEORA, TRUE); } else if (container == HB_MUX_AVI) { - grey_combo_box_item(builder, "audio_codec", HB_ACODEC_FAAC, TRUE); - grey_combo_box_item(builder, "audio_codec", HB_ACODEC_VORBIS, TRUE); - grey_combo_box_item(builder, "video_codec", HB_VCODEC_THEORA, TRUE); + grey_combo_box_item(builder, "AudioEncoder", HB_ACODEC_FAAC, TRUE); + grey_combo_box_item(builder, "AudioEncoder", HB_ACODEC_VORBIS, TRUE); + grey_combo_box_item(builder, "VideoEncoder", HB_VCODEC_THEORA, TRUE); } else if (container == HB_MUX_OGM) { - grey_combo_box_item(builder, "audio_codec", HB_ACODEC_FAAC, TRUE); + grey_combo_box_item(builder, "AudioEncoder", HB_ACODEC_FAAC, TRUE); } gboolean allow_mono = TRUE; @@ -1009,11 +1029,11 @@ ghb_grey_combo_options(GtkBuilder *builder) (layout == HB_INPUT_CH_LAYOUT_3F2R) && (audio->in.channel_layout & HB_INPUT_CH_LAYOUT_HAS_LFE); } - grey_combo_box_item(builder, "audio_mix", HB_AMIXDOWN_MONO, !allow_mono); - grey_combo_box_item(builder, "audio_mix", HB_AMIXDOWN_STEREO, !allow_stereo); - grey_combo_box_item(builder, "audio_mix", HB_AMIXDOWN_DOLBY, !allow_dolby); - grey_combo_box_item(builder, "audio_mix", HB_AMIXDOWN_DOLBYPLII, !allow_dpl2); - grey_combo_box_item(builder, "audio_mix", HB_AMIXDOWN_6CH, !allow_6ch); + grey_combo_box_item(builder, "AudioMixdown", HB_AMIXDOWN_MONO, !allow_mono); + grey_combo_box_item(builder, "AudioMixdown", HB_AMIXDOWN_STEREO, !allow_stereo); + grey_combo_box_item(builder, "AudioMixdown", HB_AMIXDOWN_DOLBY, !allow_dolby); + grey_combo_box_item(builder, "AudioMixdown", HB_AMIXDOWN_DOLBYPLII, !allow_dpl2); + grey_combo_box_item(builder, "AudioMixdown", HB_AMIXDOWN_6CH, !allow_6ch); } gint @@ -1249,11 +1269,11 @@ language_opts_set(GtkBuilder *builder, const gchar *name) { gtk_list_store_append(store, &iter); gtk_list_store_set(store, &iter, - 0, language_table[ii].eng_name, + 0, ghb_language_table[ii].eng_name, 1, TRUE, - 2, language_table[ii].iso639_2, + 2, ghb_language_table[ii].iso639_2, 3, ii, - 4, language_table[ii].iso639_1, + 4, ghb_language_table[ii].iso639_1, -1); } } @@ -1480,7 +1500,7 @@ subtitle_opts_set(GtkBuilder *builder, const gchar *name, gint titleindex) subtitle_opts.map[0].svalue = "none"; gtk_list_store_append(store, &iter); gtk_list_store_set(store, &iter, - 0, "Same as audio", + 0, "Autoselect", 1, TRUE, 2, "auto", 3, -1, @@ -1515,16 +1535,16 @@ subtitle_opts_set(GtkBuilder *builder, const gchar *name, gint titleindex) { gtk_list_store_append(store, &iter); gtk_list_store_set(store, &iter, - 0, language_table[ii].eng_name, + 0, ghb_language_table[ii].eng_name, 1, TRUE, - 2, language_table[ii].iso639_2, + 2, ghb_language_table[ii].iso639_2, 3, ii, - 4, language_table[ii].iso639_2, + 4, ghb_language_table[ii].iso639_2, -1); - subtitle_opts.map[ii+2].option = language_table[ii].eng_name; - subtitle_opts.map[ii+2].shortOpt = language_table[ii].iso639_2; + subtitle_opts.map[ii+2].option = ghb_language_table[ii].eng_name; + subtitle_opts.map[ii+2].shortOpt = ghb_language_table[ii].iso639_2; subtitle_opts.map[ii+2].ivalue = ii; - subtitle_opts.map[ii+2].svalue = language_table[ii].iso639_2; + subtitle_opts.map[ii+2].svalue = ghb_language_table[ii].iso639_2; } } } @@ -1637,15 +1657,15 @@ find_combo_table(const gchar *name) gint ghb_lookup_combo_int(const gchar *name, const GValue *gval) { - if (strcmp(name, "audio_bitrate") == 0) + if (strcmp(name, "AudioBitrate") == 0) return lookup_audio_bitrate_int(gval); - else if (strcmp(name, "audio_rate") == 0) + else if (strcmp(name, "AudioSamplerate") == 0) return lookup_audio_rate_int(gval); - else if (strcmp(name, "framerate") == 0) + else if (strcmp(name, "VideoFramerate") == 0) return lookup_video_rate_int(gval); - else if (strcmp(name, "audio_mix") == 0) + else if (strcmp(name, "AudioMixdown") == 0) return lookup_mix_int(gval); - else if (strcmp(name, "source_audio_lang") == 0) + else if (strcmp(name, "SourceAudioLang") == 0) return lookup_audio_lang_int(gval); else { @@ -1658,15 +1678,15 @@ ghb_lookup_combo_int(const gchar *name, const GValue *gval) const gchar* ghb_lookup_combo_option(const gchar *name, const GValue *gval) { - if (strcmp(name, "audio_bitrate") == 0) + if (strcmp(name, "AudioBitrate") == 0) return lookup_audio_bitrate_option(gval); - else if (strcmp(name, "audio_rate") == 0) + else if (strcmp(name, "AudioSamplerate") == 0) return lookup_audio_rate_option(gval); - else if (strcmp(name, "framerate") == 0) + else if (strcmp(name, "VideoFramerate") == 0) return lookup_video_rate_option(gval); - else if (strcmp(name, "audio_mix") == 0) + else if (strcmp(name, "AudioMixdown") == 0) return lookup_mix_option(gval); - else if (strcmp(name, "source_audio_lang") == 0) + else if (strcmp(name, "SourceAudioLang") == 0) return lookup_audio_lang_option(gval); else { @@ -1705,21 +1725,21 @@ ghb_update_ui_combo_box(GtkBuilder *builder, const gchar *name, gint user_data, } if (all) { - audio_bitrate_opts_set(builder, "audio_bitrate"); - audio_samplerate_opts_set(builder, "audio_rate", hb_audio_rates, hb_audio_rates_count); - video_rate_opts_set(builder, "framerate", hb_video_rates, hb_video_rates_count); - mix_opts_set(builder, "audio_mix"); - language_opts_set(builder, "source_audio_lang"); - subtitle_opts_set(builder, "subtitle_lang", user_data); + audio_bitrate_opts_set(builder, "AudioBitrate"); + audio_samplerate_opts_set(builder, "AudioSamplerate", hb_audio_rates, hb_audio_rates_count); + video_rate_opts_set(builder, "VideoFramerate", hb_video_rates, hb_video_rates_count); + mix_opts_set(builder, "AudioMixdown"); + language_opts_set(builder, "SourceAudioLang"); + subtitle_opts_set(builder, "Subtitles", user_data); title_opts_set(builder, "title"); - audio_track_opts_set(builder, "audio_track", user_data); - generic_opts_set(builder, "container", &container_opts); - generic_opts_set(builder, "deinterlace", &deint_opts); - generic_opts_set(builder, "tweak_deinterlace", &deint_opts); - generic_opts_set(builder, "denoise", &denoise_opts); - generic_opts_set(builder, "tweak_denoise", &denoise_opts); - generic_opts_set(builder, "video_codec", &vcodec_opts); - generic_opts_set(builder, "audio_codec", &acodec_opts); + audio_track_opts_set(builder, "AudioTrack", user_data); + generic_opts_set(builder, "FileFormat", &container_opts); + generic_opts_set(builder, "PictureDeinterlace", &deint_opts); + generic_opts_set(builder, "tweak_PictureDeinterlace", &deint_opts); + generic_opts_set(builder, "PictureDenoise", &denoise_opts); + generic_opts_set(builder, "tweak_PictureDenoise", &denoise_opts); + generic_opts_set(builder, "VideoEncoder", &vcodec_opts); + generic_opts_set(builder, "AudioEncoder", &acodec_opts); generic_opts_set(builder, "x264_direct", &direct_opts); generic_opts_set(builder, "x264_me", &me_opts); generic_opts_set(builder, "x264_subme", &subme_opts); @@ -1728,22 +1748,22 @@ ghb_update_ui_combo_box(GtkBuilder *builder, const gchar *name, gint user_data, } else { - if (strcmp(name, "audio_bitrate") == 0) - audio_bitrate_opts_set(builder, "audio_bitrate"); - else if (strcmp(name, "audio_rate") == 0) - audio_samplerate_opts_set(builder, "audio_rate", hb_audio_rates, hb_audio_rates_count); - else if (strcmp(name, "framerate") == 0) - video_rate_opts_set(builder, "framerate", hb_video_rates, hb_video_rates_count); - else if (strcmp(name, "audio_mix") == 0) - mix_opts_set(builder, "audio_mix"); - else if (strcmp(name, "source_audio_lang") == 0) - language_opts_set(builder, "source_audio_lang"); - else if (strcmp(name, "subtitle_lang") == 0) - subtitle_opts_set(builder, "subtitle_lang", user_data); + if (strcmp(name, "AudioBitrate") == 0) + audio_bitrate_opts_set(builder, "AudioBitrate"); + else if (strcmp(name, "AudioSamplerate") == 0) + audio_samplerate_opts_set(builder, "AudioSamplerate", hb_audio_rates, hb_audio_rates_count); + else if (strcmp(name, "VideoFramerate") == 0) + video_rate_opts_set(builder, "VideoFramerate", hb_video_rates, hb_video_rates_count); + else if (strcmp(name, "AudioMixdown") == 0) + mix_opts_set(builder, "AudioMixdown"); + else if (strcmp(name, "SourceAudioLang") == 0) + language_opts_set(builder, "SourceAudioLang"); + else if (strcmp(name, "Subtitles") == 0) + subtitle_opts_set(builder, "Subtitles", user_data); else if (strcmp(name, "title") == 0) title_opts_set(builder, "title"); - else if (strcmp(name, "audio_track") == 0) - audio_track_opts_set(builder, "audio_track", user_data); + else if (strcmp(name, "AudioTrack") == 0) + audio_track_opts_set(builder, "AudioTrack", user_data); else generic_opts_set(builder, name, find_combo_table(name)); } @@ -1758,14 +1778,14 @@ init_ui_combo_boxes(GtkBuilder *builder) { gint ii; - init_combo_box(builder, "audio_bitrate"); - init_combo_box(builder, "audio_rate"); - init_combo_box(builder, "framerate"); - init_combo_box(builder, "audio_mix"); - init_combo_box(builder, "source_audio_lang"); - init_combo_box(builder, "subtitle_lang"); + init_combo_box(builder, "AudioBitrate"); + init_combo_box(builder, "AudioSamplerate"); + init_combo_box(builder, "VideoFramerate"); + init_combo_box(builder, "AudioMixdown"); + init_combo_box(builder, "SourceAudioLang"); + init_combo_box(builder, "Subtitles"); init_combo_box(builder, "title"); - init_combo_box(builder, "audio_track"); + init_combo_box(builder, "AudioTrack"); for (ii = 0; combo_name_map[ii].name != NULL; ii++) { init_combo_box(builder, combo_name_map[ii].name); @@ -1782,7 +1802,7 @@ gchar* ghb_build_x264opts_string(GValue *settings) { gchar *result; - gchar *opts = ghb_settings_get_string(settings, "x264_options"); + gchar *opts = ghb_settings_get_string(settings, "x264Option"); if (opts != NULL) { result = opts; @@ -1841,7 +1861,7 @@ ghb_ac3_in_audio_list(const GValue *audio_list) gint acodec; asettings = ghb_array_get_nth(audio_list, ii); - acodec = ghb_settings_combo_int(asettings, "audio_codec"); + acodec = ghb_settings_combo_int(asettings, "AudioEncoder"); if (acodec == HB_ACODEC_AC3) return TRUE; } @@ -1936,13 +1956,13 @@ audio_bitrate_opts_set(GtkBuilder *builder, const gchar *name) void ghb_set_passthru_bitrate_opts(GtkBuilder *builder, gint bitrate) { - audio_bitrate_opts_add(builder, "audio_bitrate", bitrate); + audio_bitrate_opts_add(builder, "AudioBitrate", bitrate); } void ghb_set_default_bitrate_opts(GtkBuilder *builder, gint last_rate) { - audio_bitrate_opts_clean(builder, "audio_bitrate", last_rate); + audio_bitrate_opts_clean(builder, "AudioBitrate", last_rate); } static ghb_status_t hb_status; @@ -2225,10 +2245,10 @@ ghb_set_scale(signal_user_data_t *ud, gint mode) if (job == NULL) return; // First configure widgets - round_dims = ghb_settings_get_boolean(ud->settings, "round_dimensions"); + round_dims = ghb_settings_get_boolean(ud->settings, "ModDimensions"); anamorphic = ghb_settings_get_boolean(ud->settings, "anamorphic"); - keep_aspect = ghb_settings_get_boolean(ud->settings, "keep_aspect"); - autocrop = ghb_settings_get_boolean(ud->settings, "autocrop"); + keep_aspect = ghb_settings_get_boolean(ud->settings, "PictureKeepRatio"); + autocrop = ghb_settings_get_boolean(ud->settings, "PictureAutoCrop"); autoscale = ghb_settings_get_boolean(ud->settings, "autoscale"); // "Noscale" is a flag that says we prefer to crop extra to satisfy // alignment constraints rather than scaling to satisfy them. @@ -2281,16 +2301,16 @@ ghb_set_scale(signal_user_data_t *ud, gint mode) crop[2] += need1; crop[3] += need2; } - ghb_ui_update(ud, "crop_top", ghb_int64_value(crop[0])); - ghb_ui_update(ud, "crop_bottom", ghb_int64_value(crop[1])); - ghb_ui_update(ud, "crop_left", ghb_int64_value(crop[2])); - ghb_ui_update(ud, "crop_right", ghb_int64_value(crop[3])); + ghb_ui_update(ud, "PictureTopCrop", ghb_int64_value(crop[0])); + ghb_ui_update(ud, "PictureBottomCrop", ghb_int64_value(crop[1])); + ghb_ui_update(ud, "PictureLeftCrop", ghb_int64_value(crop[2])); + ghb_ui_update(ud, "PictureRightCrop", ghb_int64_value(crop[3])); } } - crop[0] = ghb_settings_get_int(ud->settings, "crop_top"); - crop[1] = ghb_settings_get_int(ud->settings, "crop_bottom"); - crop[2] = ghb_settings_get_int(ud->settings, "crop_left"); - crop[3] = ghb_settings_get_int(ud->settings, "crop_right"); + crop[0] = ghb_settings_get_int(ud->settings, "PictureTopCrop"); + crop[1] = ghb_settings_get_int(ud->settings, "PictureBottomCrop"); + crop[2] = ghb_settings_get_int(ud->settings, "PictureLeftCrop"); + crop[3] = ghb_settings_get_int(ud->settings, "PictureRightCrop"); hb_reduce(&aspect_n, &aspect_d, title->width * title->pixel_aspect_width, title->height * title->pixel_aspect_height); @@ -2307,8 +2327,8 @@ ghb_set_scale(signal_user_data_t *ud, gint mode) { width = ghb_settings_get_int(ud->settings, "scale_width"); height = ghb_settings_get_int(ud->settings, "scale_height"); - max_width = ghb_settings_get_int(ud->settings, "max_width"); - max_height = ghb_settings_get_int(ud->settings, "max_width"); + max_width = ghb_settings_get_int(ud->settings, "PictureWidth"); + max_height = ghb_settings_get_int(ud->settings, "PictureHeight"); // Align max dims max_width = (max_width >> modshift) << modshift; max_height = (max_height >> modshift) << modshift; @@ -2405,14 +2425,14 @@ ghb_set_scale(signal_user_data_t *ud, gint mode) static void set_preview_job_settings(hb_job_t *job, GValue *settings) { - job->crop[0] = ghb_settings_get_int(settings, "crop_top"); - job->crop[1] = ghb_settings_get_int(settings, "crop_bottom"); - job->crop[2] = ghb_settings_get_int(settings, "crop_left"); - job->crop[3] = ghb_settings_get_int(settings, "crop_right"); + job->crop[0] = ghb_settings_get_int(settings, "PictureTopCrop"); + job->crop[1] = ghb_settings_get_int(settings, "PictureBottomCrop"); + job->crop[2] = ghb_settings_get_int(settings, "PictureLeftCrop"); + job->crop[3] = ghb_settings_get_int(settings, "PictureRightCrop"); gboolean anamorphic, round_dimensions; anamorphic = ghb_settings_get_boolean(settings, "anamorphic"); - round_dimensions = ghb_settings_get_boolean(settings, "round_dimensions"); + round_dimensions = ghb_settings_get_boolean(settings, "ModDimensions"); if (round_dimensions && anamorphic) { job->modulus = 16; @@ -2430,8 +2450,8 @@ set_preview_job_settings(hb_job_t *job, GValue *settings) } job->width = ghb_settings_get_int(settings, "scale_width"); job->height = ghb_settings_get_int(settings, "scale_height"); - gint deint = ghb_settings_combo_int(settings, "deinterlace"); - gboolean decomb = ghb_settings_get_boolean(settings, "decomb"); + gint deint = ghb_settings_combo_int(settings, "PictureDeinterlace"); + gboolean decomb = ghb_settings_get_boolean(settings, "PictureDecomb"); job->deinterlace = (!decomb && deint == 0) ? 0 : 1; } @@ -2443,57 +2463,16 @@ ghb_calculate_target_bitrate(GValue *settings, gint titleindex) hb_job_t * job; gint size; - if (h_scan == NULL) return 2000; + if (h_scan == NULL) return 1500; list = hb_get_titles( h_scan ); title = hb_list_item( list, titleindex ); - if (title == NULL) return 2000; + if (title == NULL) return 1500; job = title->job; - if (job == NULL) return 2000; - size = ghb_settings_get_int(settings, "video_target_size"); + if (job == NULL) return 1500; + size = ghb_settings_get_int(settings, "VideoTargetSize"); return hb_calc_bitrate( job, size ); } -gint -ghb_guess_bitrate(GValue *settings) -{ - gint bitrate; - if (ghb_settings_get_boolean(settings, "vquality_type_constant")) - { - // This is really rough. I'm trying to err on the high - // side since this is used to estimate if there is - // sufficient disk space left - gint vcodec; - gdouble vquality; - - vcodec = ghb_settings_combo_int(settings, "video_codec"); - vquality = ghb_settings_get_double(settings, "video_quality")/100; - if (vcodec == HB_VCODEC_X264 && - !ghb_settings_get_boolean(settings, "linear_vquality")) - { - vquality = 51.0 - vquality * 51.0; - // Convert log curve to linear - vquality = exp2((vquality-12)/6); - // Don't let it go to 0 - if (vquality >= 31) vquality = 30; - vquality = (31 - vquality) / 31; - } - // bitrate seems to be a log relasionship to quality - // with typical source material - // This is a real wag - bitrate = 20*1024*1024*exp10(vquality*14)/exp10(14); - // Add some bits for audio - bitrate += 500*1024; - } - else - { - // Add some fudge to the bitrate to leave breathing room - bitrate = ghb_settings_get_int(settings, "video_bitrate")*1024; - // Add some bits for audio - bitrate += 500*1024; - } - return bitrate; -} - gboolean ghb_validate_filter_string(const gchar *str, gint max_fields) { @@ -2535,8 +2514,8 @@ ghb_validate_filters(signal_user_data_t *ud) if (tweaks) { // detele 6 - str = ghb_settings_get_string(ud->settings, "tweak_detelecine"); - enabled = ghb_settings_get_boolean(ud->settings, "detelecine"); + str = ghb_settings_get_string(ud->settings, "tweak_PictureDetelecine"); + enabled = ghb_settings_get_boolean(ud->settings, "PictureDetelecine"); if (enabled && !ghb_validate_filter_string(str, 6)) { message = g_strdup_printf( @@ -2549,8 +2528,8 @@ ghb_validate_filters(signal_user_data_t *ud) } g_free(str); // decomb 7 - str = ghb_settings_get_string(ud->settings, "tweak_decomb"); - enabled = ghb_settings_get_boolean(ud->settings, "decomb"); + str = ghb_settings_get_string(ud->settings, "tweak_PictureDecomb"); + enabled = ghb_settings_get_boolean(ud->settings, "PictureDecomb"); if (enabled && !ghb_validate_filter_string(str, 7)) { message = g_strdup_printf( @@ -2563,11 +2542,11 @@ ghb_validate_filters(signal_user_data_t *ud) } g_free(str); // deinte 4 - index = ghb_lookup_combo_int("tweak_deinterlace", - ghb_settings_get_value(ud->settings, "tweak_deinterlace")); + index = ghb_lookup_combo_int("tweak_PictureDeinterlace", + ghb_settings_get_value(ud->settings, "tweak_PictureDeinterlace")); if (index < 0) { - str = ghb_settings_get_string(ud->settings, "tweak_deinterlace"); + str = ghb_settings_get_string(ud->settings, "tweak_PictureDeinterlace"); if (!ghb_validate_filter_string(str, 4)) { message = g_strdup_printf( @@ -2580,29 +2559,12 @@ ghb_validate_filters(signal_user_data_t *ud) } g_free(str); } -#if 0 - // Deblock is being reworked - // debloc 2 - str = ghb_settings_get_string(ud->settings, "tweak_deblock"); - enabled = ghb_settings_get_boolean(ud->settings, "deblock"); - if (enabled && !ghb_validate_filter_string(str, 2)) - { - message = g_strdup_printf( - "Invalid Deblock Settings:\n\n%s\n", - str); - ghb_message_dialog(GTK_MESSAGE_ERROR, message, "Cancel", NULL); - g_free(str); - g_free(message); - return FALSE; - } - g_free(str); -#endif // denois 4 - index = ghb_lookup_combo_int("tweak_denoise", - ghb_settings_get_value(ud->settings, "tweak_denoise")); + index = ghb_lookup_combo_int("tweak_PictureDenoise", + ghb_settings_get_value(ud->settings, "tweak_PictureDenoise")); if (index < 0) { - str = ghb_settings_get_string(ud->settings, "tweak_denoise"); + str = ghb_settings_get_string(ud->settings, "tweak_PictureDenoise"); if (!ghb_validate_filter_string(str, 4)) { message = g_strdup_printf( @@ -2625,8 +2587,8 @@ ghb_validate_video(signal_user_data_t *ud) gint vcodec, mux; gchar *message; - mux = ghb_settings_combo_int(ud->settings, "container"); - vcodec = ghb_settings_combo_int(ud->settings, "video_codec"); + mux = ghb_settings_combo_int(ud->settings, "FileFormat"); + vcodec = ghb_settings_combo_int(ud->settings, "VideoEncoder"); if ((mux == HB_MUX_MP4 || mux == HB_MUX_AVI) && (vcodec == HB_VCODEC_THEORA)) { @@ -2642,7 +2604,7 @@ ghb_validate_video(signal_user_data_t *ud) } g_free(message); vcodec = HB_VCODEC_XVID; - ghb_ui_update(ud, "video_codec", ghb_int64_value(vcodec)); + ghb_ui_update(ud, "VideoEncoder", ghb_int64_value(vcodec)); } return TRUE; } @@ -2653,14 +2615,14 @@ ghb_validate_container(signal_user_data_t *ud) gint container; gchar *message; - container = ghb_settings_combo_int(ud->settings, "container"); + container = ghb_settings_combo_int(ud->settings, "FileFormat"); if (container == HB_MUX_MP4) { const GValue *audio_list; gboolean httpopt; audio_list = ghb_settings_get_value(ud->settings, "audio_list"); - httpopt = ghb_settings_get_boolean(ud->settings, "http_optimize_mp4"); + httpopt = ghb_settings_get_boolean(ud->settings, "Mp4HttpOptimize"); if (httpopt && ghb_ac3_in_audio_list(audio_list)) { message = g_strdup_printf( @@ -2682,14 +2644,14 @@ ghb_validate_container(signal_user_data_t *ud) GValue *asettings; asettings = ghb_array_get_nth(audio_list, ii); - gint acodec = ghb_settings_combo_int(asettings, "audio_codec"); + gint acodec = ghb_settings_combo_int(asettings, "AudioEncoder"); if (acodec == HB_ACODEC_AC3) { GValue *value; value = get_acodec_value(HB_ACODEC_FAAC); - ghb_settings_take_value(asettings, "audio_codec", value); + ghb_settings_take_value(asettings, "AudioEncoder", value); value = get_abitrate_value(160); - ghb_settings_take_value(asettings, "audio_bitrate", value); + ghb_settings_take_value(asettings, "AudioBitrate", value); } } } @@ -2719,7 +2681,7 @@ ghb_validate_audio(signal_user_data_t *ud) titleindex = ghb_settings_combo_int(ud->settings, "title"); title = hb_list_item( list, titleindex ); if (title == NULL) return FALSE; - gint mux = ghb_settings_combo_int(ud->settings, "container"); + gint mux = ghb_settings_combo_int(ud->settings, "FileFormat"); const GValue *audio_list; gint count, ii; @@ -2732,8 +2694,8 @@ ghb_validate_audio(signal_user_data_t *ud) hb_audio_config_t *taudio; asettings = ghb_array_get_nth(audio_list, ii); - gint track = ghb_settings_combo_int(asettings, "audio_track"); - gint codec = ghb_settings_combo_int(asettings, "audio_codec"); + gint track = ghb_settings_combo_int(asettings, "AudioTrack"); + gint codec = ghb_settings_combo_int(asettings, "AudioEncoder"); taudio = (hb_audio_config_t *) hb_list_audio_config_item( title->list_audio, track ); if ((taudio->in.codec != HB_ACODEC_AC3) && (codec == HB_ACODEC_AC3)) @@ -2758,7 +2720,7 @@ ghb_validate_audio(signal_user_data_t *ud) codec = HB_ACODEC_FAAC; } value = get_acodec_value(codec); - ghb_settings_take_value(asettings, "audio_codec", value); + ghb_settings_take_value(asettings, "AudioEncoder", value); } gchar *a_unsup = NULL; gchar *mux_s = NULL; @@ -2820,9 +2782,9 @@ ghb_validate_audio(signal_user_data_t *ud) } g_free(message); value = get_acodec_value(codec); - ghb_settings_take_value(asettings, "audio_codec", value); + ghb_settings_take_value(asettings, "AudioEncoder", value); } - gint mix = ghb_settings_combo_int (asettings, "audio_mix"); + gint mix = ghb_settings_combo_int (asettings, "AudioMixdown"); gboolean allow_mono = TRUE; gboolean allow_stereo = TRUE; gboolean allow_dolby = TRUE; @@ -2880,7 +2842,7 @@ ghb_validate_audio(signal_user_data_t *ud) g_free(message); mix = ghb_get_best_mix(titleindex, track, codec, mix); value = get_amix_value(mix); - ghb_settings_take_value(asettings, "audio_mix", value); + ghb_settings_take_value(asettings, "AudioMixdown", value); } } return TRUE; @@ -2894,18 +2856,20 @@ ghb_validate_vquality(GValue *settings) gint min, max; if (ghb_settings_get_boolean(settings, "nocheckvquality")) return TRUE; - vcodec = ghb_settings_combo_int(settings, "video_codec"); + vcodec = ghb_settings_combo_int(settings, "VideoEncoder"); + gdouble vquality; + vquality = ghb_settings_get_double(settings, "VideoQualitySlider"); if (ghb_settings_get_boolean(settings, "vquality_type_constant")) { if (!ghb_settings_get_boolean(settings, "directqp")) { - if (vcodec != HB_VCODEC_X264 || - ghb_settings_get_boolean(settings, "linear_vquality")) + vquality *= 100.0; + if (vcodec != HB_VCODEC_X264) { min = 68; max = 97; } - else if (vcodec == HB_VCODEC_X264) + else { min = 40; max = 70; @@ -2927,16 +2891,16 @@ ghb_validate_vquality(GValue *settings) { min = 68; max = 97; + vquality *= 100.0; } } - gint vquality = ghb_settings_get_double(settings, "video_quality"); if (vquality < min || vquality > max) { message = g_strdup_printf( "Interesting video quality choise: %d\n\n" "Typical values range from %d to %d.\n" "Are you sure you wish to use this setting?", - vquality, min, max); + (gint)vquality, min, max); if (!ghb_message_dialog(GTK_MESSAGE_QUESTION, message, "Cancel", "Continue")) { @@ -2987,11 +2951,11 @@ ghb_add_job(GValue *js, gint unique_id) if (job == NULL) return; tweaks = ghb_settings_get_boolean(js, "allow_tweaks"); - job->mux = ghb_settings_combo_int(js, "container"); + job->mux = ghb_settings_combo_int(js, "FileFormat"); if (job->mux == HB_MUX_MP4) { - job->largeFileSize = ghb_settings_get_boolean(js, "large_mp4"); - job->mp4_optimize = ghb_settings_get_boolean(js, "http_optimize_mp4"); + job->largeFileSize = ghb_settings_get_boolean(js, "Mp4LargeFile"); + job->mp4_optimize = ghb_settings_get_boolean(js, "Mp4HttpOptimize"); } else { @@ -3005,7 +2969,7 @@ ghb_add_job(GValue *js, gint unique_id) job->chapter_start = MIN( num_chapters, chapter_start ); job->chapter_end = MAX( job->chapter_start, chapter_end ); - job->chapter_markers = ghb_settings_get_boolean(js, "chapter_markers"); + job->chapter_markers = ghb_settings_get_boolean(js, "ChapterMarkers"); if ( job->chapter_markers ) { GValue *chapters; @@ -3036,23 +3000,23 @@ ghb_add_job(GValue *js, gint unique_id) g_free(name); } } - job->crop[0] = ghb_settings_get_int(js, "crop_top"); - job->crop[1] = ghb_settings_get_int(js, "crop_bottom"); - job->crop[2] = ghb_settings_get_int(js, "crop_left"); - job->crop[3] = ghb_settings_get_int(js, "crop_right"); + job->crop[0] = ghb_settings_get_int(js, "PictureTopCrop"); + job->crop[1] = ghb_settings_get_int(js, "PictureBottomCrop"); + job->crop[2] = ghb_settings_get_int(js, "PictureLeftCrop"); + job->crop[3] = ghb_settings_get_int(js, "PictureRightCrop"); - gboolean decomb = ghb_settings_get_boolean(js, "decomb"); + gboolean decomb = ghb_settings_get_boolean(js, "PictureDecomb"); gint deint = ghb_settings_combo_int(js, - tweaks ? "tweak_deinterlace":"deinterlace"); + tweaks ? "tweak_PictureDeinterlace":"PictureDeinterlace"); if (!decomb) job->deinterlace = (deint != 0) ? 1 : 0; else job->deinterlace = 0; - job->grayscale = ghb_settings_get_boolean(js, "grayscale"); + job->grayscale = ghb_settings_get_boolean(js, "VideoGrayScale"); gboolean anamorphic = ghb_settings_get_boolean(js, "anamorphic"); - gboolean round_dimensions = ghb_settings_get_boolean(js, "round_dimensions"); + gboolean round_dimensions = ghb_settings_get_boolean(js, "ModDimensions"); if (round_dimensions && anamorphic) { job->pixel_ratio = 2; @@ -3074,18 +3038,18 @@ ghb_add_job(GValue *js, gint unique_id) } /* Add selected filters */ job->filters = hb_list_init(); - gint vrate = ghb_settings_combo_int(js, "framerate"); - if( vrate == 0 && ghb_settings_get_boolean(js, "detelecine" ) ) + gint vrate = ghb_settings_combo_int(js, "VideoFramerate"); + if( vrate == 0 && ghb_settings_get_boolean(js, "PictureDetelecine" ) ) job->vfr = 1; else job->vfr = 0; - if( ghb_settings_get_boolean(js, "detelecine" ) ) + if( ghb_settings_get_boolean(js, "PictureDetelecine" ) ) { hb_filter_detelecine.settings = NULL; if (tweaks) { - detel_str = ghb_settings_get_string(js, "tweak_detelecine"); + detel_str = ghb_settings_get_string(js, "tweak_PictureDetelecine"); if (detel_str && detel_str[0]) { hb_filter_detelecine.settings = detel_str; @@ -3099,7 +3063,7 @@ ghb_add_job(GValue *js, gint unique_id) hb_filter_decomb.settings = NULL; if (tweaks) { - decomb_str = ghb_settings_get_string(js, "tweak_decomb"); + decomb_str = ghb_settings_get_string(js, "tweak_PictureDecomb"); if (decomb_str && decomb_str[0]) { hb_filter_decomb.settings = (gchar*)decomb_str; @@ -3113,11 +3077,11 @@ ghb_add_job(GValue *js, gint unique_id) deint_str = g_strdup(deint_opts.map[deint].svalue); else deint_str = ghb_settings_get_string(js, - tweaks ? "tweak_deinterlace" : "deinterlace"); + tweaks ? "tweak_PictureDeinterlace" : "PictureDeinterlace"); hb_filter_deinterlace.settings = deint_str; hb_list_add( job->filters, &hb_filter_deinterlace ); } - gint deblock = ghb_settings_get_int(js, "deblock"); + gint deblock = ghb_settings_get_int(js, "PictureDeblock"); if( deblock >= 5 ) { deblock_str = g_strdup_printf("%d", deblock); @@ -3125,21 +3089,21 @@ ghb_add_job(GValue *js, gint unique_id) hb_list_add( job->filters, &hb_filter_deblock ); } gint denoise = ghb_settings_combo_int(js, - tweaks ? "tweak_denoise" : "denoise"); + tweaks ? "tweak_PictureDenoise" : "PictureDenoise"); if( denoise != 0 ) { if (denoise > 0) denoise_str = g_strdup(denoise_opts.map[denoise].svalue); else denoise_str = (gchar*)ghb_settings_get_string( - js, tweaks ? "tweak_denoise" : "denoise"); + js, tweaks ? "tweak_PictureDenoise" : "PictureDenoise"); hb_filter_denoise.settings = denoise_str; hb_list_add( job->filters, &hb_filter_denoise ); } job->width = ghb_settings_get_int(js, "scale_width"); job->height = ghb_settings_get_int(js, "scale_height"); - job->vcodec = ghb_settings_combo_int(js, "video_codec"); + job->vcodec = ghb_settings_combo_int(js, "VideoEncoder"); if ((job->mux == HB_MUX_MP4 || job->mux == HB_MUX_AVI) && (job->vcodec == HB_VCODEC_THEORA)) { @@ -3148,37 +3112,16 @@ ghb_add_job(GValue *js, gint unique_id) } if ((job->vcodec == HB_VCODEC_X264) && (job->mux == HB_MUX_MP4)) { - job->ipod_atom = ghb_settings_get_boolean(js, "ipod_file"); + job->ipod_atom = ghb_settings_get_boolean(js, "Mp4iPodCompatible"); } if (ghb_settings_get_boolean(js, "vquality_type_constant")) { gdouble vquality; - vquality = ghb_settings_get_double(js, "video_quality"); + vquality = ghb_settings_get_double(js, "VideoQualitySlider"); if (!ghb_settings_get_boolean(js, "directqp")) { - vquality /= 100.0; - if (ghb_settings_get_boolean(js, "linear_vquality")) - { - if (job->vcodec == HB_VCODEC_X264) - { - // Adjust to same range as xvid and ffmpeg - vquality = 31.0 - vquality * 31.0; - if (vquality > 0) - { - // Convert linear to log curve - vquality = 12 + 6 * log2(vquality); - if (vquality > 51) vquality = 51; - if (vquality < 1) vquality = 1; - } - else - vquality = 0; - } - } - else - { - if (vquality == 0.0) vquality = 0.01; - if (vquality == 1.0) vquality = 0.0; - } + if (vquality == 0.0) vquality = 0.01; + if (vquality == 1.0) vquality = 0.0; } job->vquality = vquality; job->vbitrate = 0; @@ -3186,7 +3129,7 @@ ghb_add_job(GValue *js, gint unique_id) else if (ghb_settings_get_boolean(js, "vquality_type_bitrate")) { job->vquality = -1.0; - job->vbitrate = ghb_settings_get_int(js, "video_bitrate"); + job->vbitrate = ghb_settings_get_int(js, "VideoAvgBitrate"); } // AVI container does not support variable frame rate. if (job->mux == HB_MUX_AVI) @@ -3231,9 +3174,9 @@ ghb_add_job(GValue *js, gint unique_id) hb_audio_config_init(&audio); asettings = ghb_array_get_nth(audio_list, ii); - audio.in.track = ghb_settings_get_int(asettings, "audio_track"); + audio.in.track = ghb_settings_get_int(asettings, "AudioTrack"); audio.out.track = tcount; - audio.out.codec = ghb_settings_combo_int(asettings, "audio_codec"); + audio.out.codec = ghb_settings_combo_int(asettings, "AudioEncoder"); taudio = (hb_audio_config_t *) hb_list_audio_config_item( title->list_audio, audio.in.track ); if ((taudio->in.codec != HB_ACODEC_AC3) && (audio.out.codec == HB_ACODEC_AC3)) @@ -3270,7 +3213,7 @@ ghb_add_job(GValue *js, gint unique_id) audio.out.codec = HB_ACODEC_VORBIS; } audio.out.dynamic_range_compression = - ghb_settings_get_double(asettings, "audio_drc"); + ghb_settings_get_double(asettings, "AudioTrackDRCSlider"); // It would be better if this were done in libhb for us, but its not yet. if (audio.out.codec == HB_ACODEC_AC3 || audio.out.codec == HB_ACODEC_DCA) { @@ -3278,13 +3221,13 @@ ghb_add_job(GValue *js, gint unique_id) } else { - audio.out.mixdown = ghb_settings_combo_int(asettings, "audio_mix"); + audio.out.mixdown = ghb_settings_combo_int(asettings, "AudioMixdown"); // Make sure the mixdown is valid and pick a new one if not. audio.out.mixdown = ghb_get_best_mix(titleindex, audio.in.track, audio.out.codec, audio.out.mixdown); audio.out.bitrate = - ghb_settings_combo_int(asettings, "audio_bitrate"); - gint srate = ghb_settings_combo_int(asettings, "audio_rate"); + ghb_settings_combo_int(asettings, "AudioBitrate"); + gint srate = ghb_settings_combo_int(asettings, "AudioSamplerate"); if (srate == 0) // 0 is same as source audio.out.samplerate = taudio->in.samplerate; else @@ -3302,7 +3245,7 @@ ghb_add_job(GValue *js, gint unique_id) { gint size; - size = ghb_settings_get_int(js, "video_target_size"); + size = ghb_settings_get_int(js, "VideoTargetSize"); job->vbitrate = hb_calc_bitrate( job, size ); job->vquality = -1.0; } @@ -3326,7 +3269,7 @@ ghb_add_job(GValue *js, gint unique_id) job->x264opts = NULL; } gint subtitle; - gchar *slang = ghb_settings_get_string(js, "subtitle_lang"); + gchar *slang = ghb_settings_get_string(js, "Subtitles"); subtitle = -2; // default to none if (strcmp(slang, "auto") == 0) { @@ -3348,7 +3291,7 @@ ghb_add_job(GValue *js, gint unique_id) } } } - gboolean forced_subtitles = ghb_settings_get_boolean(js, "forced_subtitles"); + gboolean forced_subtitles = ghb_settings_get_boolean(js, "SubtitlesForced"); job->subtitle_force = forced_subtitles; if (subtitle >= 0) job->subtitle = subtitle; @@ -3386,7 +3329,7 @@ ghb_add_job(GValue *js, gint unique_id) { job->select_subtitle = NULL; } - if( ghb_settings_get_boolean(js, "two_pass") && + if( ghb_settings_get_boolean(js, "VideoTwoPass") && !ghb_settings_get_boolean(js, "vquality_type_constant")) { /* @@ -3407,7 +3350,7 @@ ghb_add_job(GValue *js, gint unique_id) * If turbo options have been selected then append them * to the x264opts now (size includes one ':' and the '\0') */ - if( ghb_settings_get_boolean(js, "turbo") ) + if( ghb_settings_get_boolean(js, "VideoTurboTwoPass") ) { char *tmp_x264opts; diff --git a/gtk/src/hb-backend.h b/gtk/src/hb-backend.h index df0aabcd..baeded20 100644 --- a/gtk/src/hb-backend.h +++ b/gtk/src/hb-backend.h @@ -80,7 +80,13 @@ typedef struct #define GHB_FRAMERATE 3 const gchar* ghb_version(void); -void ghb_vquality_range(signal_user_data_t *ud, gint *min, gint *max); +void ghb_vquality_range( + signal_user_data_t *ud, + gdouble *min, + gdouble *max, + gdouble *step, + gdouble *page, + gint *digits); //const gchar* ghb_get_rate_string(gint rate, gint type); void ghb_backend_init(GtkBuilder *builder, gint debug, gint update); void ghb_backend_close(void); @@ -123,7 +129,6 @@ gint ghb_calculate_target_bitrate(GValue *settings, gint titleindex); gchar* ghb_dvd_volname(const gchar *device); gint ghb_get_title_number(gint titleindex); -gint ghb_guess_bitrate(GValue *settings); gboolean ghb_validate_container(signal_user_data_t *ud); gboolean ghb_validate_vquality(GValue *settings); gboolean ghb_validate_audio(signal_user_data_t *ud); diff --git a/gtk/src/internal_defaults.xml b/gtk/src/internal_defaults.xml index bd5ea744..c445cddd 100644 --- a/gtk/src/internal_defaults.xml +++ b/gtk/src/internal_defaults.xml @@ -4,14 +4,10 @@ Initialization - crop_bottom - 0 - crop_left - 0 - crop_right - 0 - crop_top - 0 + anamorphic + + autoscale + end_chapter 100 folder @@ -29,9 +25,9 @@ preset_type_normal scale_height - 480 + 0 scale_width - 720 + 0 start_chapter 1 title @@ -75,6 +71,16 @@ audio_list + tweak_PictureDecomb + + tweak_PictureDetelecine + + vquality_type_bitrate + + vquality_type_constant + + vquality_type_target + Preferences @@ -90,8 +96,6 @@ hbfd_feature - linear_vquality - nocheckvquality noscale @@ -103,102 +107,125 @@ version 0.1 - Presets + XlatPresets anamorphic - autocrop - autoscale - chapter_markers + vquality_type_bitrate + + vquality_type_constant + + vquality_type_target + + + Presets + + PictureAutoCrop + + ChapterMarkers constant_rate_factor - container + FileFormat mp4 - deblock + Folder + + PictureDeblock 0 - decomb + PictureDecomb Default - deinterlace + PictureBottomCrop + 0 + PictureLeftCrop + 0 + PictureRightCrop + 0 + PictureTopCrop + 0 + PictureDeinterlace none - denoise + PictureDenoise none - detelecine + PictureDetelecine directqp - forced_subtitles + SubtitlesForced - framerate + VideoFramerate source - grayscale + VideoGrayScale - http_optimize_mp4 + Mp4HttpOptimize - ipod_file + Mp4iPodCompatible - keep_aspect + PictureKeepRatio - large_mp4 + Mp4LargeFile - max_height + ModDimensions + + PicturePAR + 2 + PictureHeight 0 - max_width + PictureWidth 0 - pref_audio_list + AudioList - audio_bitrate + AudioBitrate 192 - audio_codec + AudioEncoder ac3 - audio_drc + AudioTrack + 1 + AudioTrackDescription + + AudioTrackDRCSlider 1 - audio_mix + AudioMixdown dpl2 - audio_rate + AudioSamplerate source - preset_description + PresetDescription - preset_name - - preset_type + PresetName + Name Missing + Type 1 - round_dimensions - - source_audio_lang + SourceAudioLang und - subtitle_lang + Subtitles none - turbo + VideoTurboTwoPass - tweak_decomb - - tweak_detelecine - - two_pass + UsesPictureFilters + + UsesPictureSettings + 2 + UsesMaxPictureSettings + + VideoTwoPass - video_bitrate + VideoAvgBitrate 1800 - video_codec + VideoEncoder x264 - video_quality - 64 - video_target_size + VideoQualityType + 2 + VideoQualitySlider + 0.60 + VideoTargetSize 700 - vquality_type_bitrate - - vquality_type_constant - - vquality_type_target - - x264_options + x264Option diff --git a/gtk/src/main.c b/gtk/src/main.c index d20de0e5..c9021c58 100644 --- a/gtk/src/main.c +++ b/gtk/src/main.c @@ -533,7 +533,7 @@ main (int argc, char *argv[]) // since it can't be done automatically GtkTextView *textview; GtkTextBuffer *buffer; - textview = GTK_TEXT_VIEW(GHB_WIDGET (ud->builder, "x264_options")); + textview = GTK_TEXT_VIEW(GHB_WIDGET (ud->builder, "x264Option")); buffer = gtk_text_view_get_buffer (textview); g_signal_connect(buffer, "changed", (GCallback)x264_entry_changed_cb, ud); @@ -570,14 +570,14 @@ main (int argc, char *argv[]) } gboolean tweaks = ghb_settings_get_boolean(ud->settings, "allow_tweaks"); GtkWidget *widget; - widget = GHB_WIDGET(ud->builder, "deinterlace"); + widget = GHB_WIDGET(ud->builder, "PictureDeinterlace"); tweaks ? gtk_widget_hide(widget) : gtk_widget_show(widget); - widget = GHB_WIDGET(ud->builder, "tweak_deinterlace"); + widget = GHB_WIDGET(ud->builder, "tweak_PictureDeinterlace"); !tweaks ? gtk_widget_hide(widget) : gtk_widget_show(widget); - widget = GHB_WIDGET(ud->builder, "denoise"); + widget = GHB_WIDGET(ud->builder, "PictureDenoise"); tweaks ? gtk_widget_hide(widget) : gtk_widget_show(widget); - widget = GHB_WIDGET(ud->builder, "tweak_denoise"); + widget = GHB_WIDGET(ud->builder, "tweak_PictureDenoise"); !tweaks ? gtk_widget_hide(widget) : gtk_widget_show(widget); gchar *source = ghb_settings_get_string(ud->settings, "default_source"); diff --git a/gtk/src/makedeps.c b/gtk/src/makedeps.c index d0f084c9..b094054e 100644 --- a/gtk/src/makedeps.c +++ b/gtk/src/makedeps.c @@ -27,41 +27,42 @@ static dependency_t dep_map[] = {"title", "title", "none", TRUE}, {"title", "start_chapter", "none", TRUE}, {"title", "end_chapter", "none", TRUE}, - {"vquality_type_bitrate", "video_bitrate", "TRUE", FALSE}, - {"vquality_type_target", "video_target_size", "TRUE", FALSE}, - {"vquality_type_constant", "video_quality", "TRUE", FALSE}, + {"vquality_type_bitrate", "VideoAvgBitrate", "TRUE", FALSE}, + {"vquality_type_target", "VideoTargetSize", "TRUE", FALSE}, + {"vquality_type_constant", "VideoQualitySlider", "TRUE", FALSE}, {"vquality_type_constant", "constant_rate_factor", "TRUE", FALSE}, - {"vquality_type_constant", "two_pass", "TRUE", TRUE}, - {"vquality_type_constant", "turbo", "TRUE", TRUE}, - {"two_pass", "turbo", "TRUE", FALSE}, - {"container", "large_mp4", "mp4|m4v", FALSE}, - {"container", "http_optimize_mp4", "mp4|m4v", FALSE}, - {"container", "ipod_file", "mp4|m4v", FALSE}, - {"decomb", "deinterlace", "TRUE", TRUE}, - {"decomb", "tweak_deinterlace", "TRUE", TRUE}, - {"autocrop", "crop_top", "FALSE", FALSE}, - {"autocrop", "crop_bottom", "FALSE", FALSE}, - {"autocrop", "crop_left", "FALSE", FALSE}, - {"autocrop", "crop_right", "FALSE", FALSE}, + {"vquality_type_constant", "VideoTwoPass", "TRUE", TRUE}, + {"vquality_type_constant", "VideoTurboTwoPass", "TRUE", TRUE}, + {"VideoTwoPass", "VideoTurboTwoPass", "TRUE", FALSE}, + {"FileFormat", "Mp4LargeFile", "mp4|m4v", FALSE}, + {"FileFormat", "Mp4HttpOptimize", "mp4|m4v", FALSE}, + {"FileFormat", "Mp4iPodCompatible", "mp4|m4v", FALSE}, + {"PictureDecomb", "PictureDeinterlace", "TRUE", TRUE}, + {"PictureDecomb", "tweak_PictureDeinterlace", "TRUE", TRUE}, + {"PictureAutoCrop", "PictureTopCrop", "FALSE", FALSE}, + {"PictureAutoCrop", "PictureBottomCrop", "FALSE", FALSE}, + {"PictureAutoCrop", "PictureLeftCrop", "FALSE", FALSE}, + {"PictureAutoCrop", "PictureRightCrop", "FALSE", FALSE}, {"autoscale", "scale_width", "FALSE", FALSE}, {"autoscale", "scale_height", "FALSE", FALSE}, - {"anamorphic", "keep_aspect", "FALSE", FALSE}, + {"anamorphic", "PictureKeepRatio", "FALSE", FALSE}, {"anamorphic", "scale_height", "FALSE", FALSE}, - {"keep_aspect", "scale_height", "FALSE", FALSE}, - {"video_codec", "x264_tab", "x264", FALSE}, - {"video_codec", "x264_tab_label", "x264", FALSE}, - {"video_codec", "ipod_file", "x264", FALSE}, - {"audio_codec", "audio_bitrate", "ac3", TRUE}, - {"audio_codec", "audio_rate", "ac3", TRUE}, - {"audio_codec", "audio_mix", "ac3", TRUE}, - {"audio_codec", "audio_drc", "ac3", TRUE}, + {"PictureKeepRatio", "scale_height", "FALSE", FALSE}, + {"VideoEncoder", "x264_tab", "x264", FALSE}, + {"VideoEncoder", "x264_tab_label", "x264", FALSE}, + {"VideoEncoder", "Mp4iPodCompatible", "x264", FALSE}, + {"VideoEncoder", "directqp", "x264|ffmpeg", FALSE}, + {"AudioEncoder", "AudioBitrate", "ac3", TRUE}, + {"AudioEncoder", "AudioSamplerate", "ac3", TRUE}, + {"AudioEncoder", "AudioMixdown", "ac3", TRUE}, + {"AudioEncoder", "AudioTrackDRCSlider", "ac3", TRUE}, {"x264_bframes", "x264_weighted_bframes", "0", TRUE}, {"x264_bframes", "x264_bpyramid", "<2", TRUE}, {"x264_bframes", "x264_direct", "0", TRUE}, {"x264_refs", "x264_mixed_refs", "<2", TRUE}, {"x264_cabac", "x264_trellis", "TRUE", FALSE}, {"x264_me", "x264_merange", "umh|esa", FALSE}, - {"chapter_markers", "chapters_list", "TRUE", FALSE}, + {"ChapterMarkers", "chapters_list", "TRUE", FALSE}, {"use_source_name", "chapters_in_destination", "TRUE", FALSE}, }; diff --git a/gtk/src/preset_xlat.c b/gtk/src/preset_xlat.c index b19d009b..d3fad530 100644 --- a/gtk/src/preset_xlat.c +++ b/gtk/src/preset_xlat.c @@ -13,24 +13,7 @@ typedef struct gchar *lin_val; } value_map_t; -static value_map_t vcodec_xlat[] = -{ - {"MPEG-4 (FFmpeg)", "ffmpeg"}, - {"MPEG-4 (XviD)", "xvid"}, - {"H.264 (x264)", "x264"}, - {"VP3 (Theora)", "theora"}, - {NULL,NULL} -}; - -static value_map_t acodec_xlat[] = -{ - {"AAC (faac)", "faac"}, - {"AC3 Passthru", "ac3"}, - {"MP3 (lame)", "lame"}, - {"Vorbis (vorbis)", "vorbis"}, - {NULL,NULL} -}; - +#if 0 static value_map_t subtitle_xlat[] = { { "None", "none" }, @@ -224,6 +207,15 @@ static value_map_t subtitle_xlat[] = {NULL, NULL} }; +static value_map_t vcodec_xlat[] = +{ + {"MPEG-4 (FFmpeg)", "ffmpeg"}, + {"MPEG-4 (XviD)", "xvid"}, + {"H.264 (x264)", "x264"}, + {"VP3 (Theora)", "theora"}, + {NULL,NULL} +}; + value_map_t container_xlat[] = { {"MP4 file", "mp4"}, @@ -248,6 +240,33 @@ value_map_t framerate_xlat[] = {NULL, NULL} }; +value_map_t deint_xlat[] = +{ + {"0", "none"}, + {"1", "fast"}, + {"2", "slow"}, + {"3", "slower"}, + {NULL, NULL} +}; + +value_map_t denoise_xlat[] = +{ + {"0", "none"}, + {"1", "weak"}, + {"2", "medium"}, + {"3", "strong"}, + {NULL, NULL} +}; + +static value_map_t acodec_xlat[] = +{ + {"AAC (faac)", "faac"}, + {"AC3 Passthru", "ac3"}, + {"MP3 (lame)", "lame"}, + {"Vorbis (vorbis)", "vorbis"}, + {NULL,NULL} +}; + value_map_t samplerate_xlat[] = { {"Auto", "source"}, @@ -269,89 +288,73 @@ value_map_t mix_xlat[] = {"AC3 Passthru", "none"}, {NULL, NULL} }; - -value_map_t deint_xlat[] = -{ - {"0", "none"}, - {"1", "fast"}, - {"2", "slow"}, - {"3", "slower"}, - {NULL, NULL} -}; - -value_map_t denoise_xlat[] = -{ - {"0", "none"}, - {"1", "weak"}, - {"2", "medium"}, - {"3", "strong"}, - {NULL, NULL} -}; +#endif typedef struct { gchar *mac_key; gchar *lin_key; value_map_t *value_map; + gboolean same; gboolean ignore; } key_map_t; key_map_t key_map[] = { - {"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}, + {"Audio1Bitrate", NULL, NULL, FALSE, FALSE}, + {"Audio1Encoder", NULL, NULL, FALSE, FALSE}, + {"Audio1Mixdown", NULL, NULL, FALSE, FALSE}, + {"Audio1Samplerate", NULL, NULL, FALSE, FALSE}, + {"Audio1Track", NULL, NULL, FALSE, FALSE}, + {"Audio1TrackDescription", NULL, NULL, FALSE, FALSE}, + {"Audio1TrackDRCSlider", NULL, NULL, FALSE, FALSE}, + {"Audio2Bitrate", NULL, NULL, FALSE, FALSE}, + {"Audio2Encoder", NULL, NULL, FALSE, FALSE}, + {"Audio2Mixdown", NULL, NULL, FALSE, FALSE}, + {"Audio2Samplerate", NULL, NULL, FALSE, FALSE}, + {"Audio2Track", NULL, NULL, FALSE, FALSE}, + {"Audio2TrackDescription", NULL, NULL, FALSE, FALSE}, + {"Audio2TrackDRCSlider", NULL, NULL, FALSE, FALSE}, + {"ChapterMarkers", NULL, NULL, TRUE, FALSE}, + {"Default", NULL, NULL, TRUE, FALSE}, + {"FileFormat", NULL, NULL, TRUE, FALSE}, + {"Folder", NULL, NULL, TRUE, FALSE}, + {"Mp4HttpOptimize", NULL, NULL, TRUE, FALSE}, + {"Mp4iPodCompatible", NULL, NULL, TRUE, FALSE}, + {"Mp4LargeFile", NULL, NULL, TRUE, FALSE}, + {"PictureAutoCrop", NULL, NULL, TRUE, FALSE}, + {"PictureBottomCrop", NULL, NULL, TRUE, FALSE}, + {"PictureDeblock", NULL, NULL, TRUE, FALSE}, + {"PictureDecomb", NULL, NULL, TRUE, FALSE}, + {"PictureDeinterlace", NULL, NULL, TRUE, FALSE}, + {"PictureDenoise", NULL, NULL, TRUE, FALSE}, + {"PictureDetelecine", NULL, NULL, TRUE, FALSE}, + {"PictureHeight", NULL, NULL, TRUE, FALSE}, + {"PictureKeepRatio", NULL, NULL, TRUE, FALSE}, + {"PictureLeftCrop", NULL, NULL, TRUE, FALSE}, + {"PicturePAR", NULL, NULL, TRUE, FALSE}, + {"PictureRightCrop", NULL, NULL, TRUE, FALSE}, + {"PictureTopCrop", NULL, NULL, TRUE, FALSE}, + {"PictureWidth", NULL, NULL, TRUE, FALSE}, + {"PresetDescription", NULL, NULL, TRUE, FALSE}, + {"PresetName", NULL, NULL, TRUE, FALSE}, + {"Subtitles", NULL, NULL, TRUE, FALSE}, + {"SubtitlesForced", NULL, NULL, TRUE, FALSE}, + {"Type", NULL, NULL, TRUE, FALSE}, + {"UsesMaxPictureSettings", NULL, NULL, TRUE, FALSE}, + {"UsesPictureFilters", NULL, NULL, TRUE, FALSE}, + {"UsesPictureSettings", NULL, NULL, TRUE, FALSE}, + {"VFR", NULL, NULL, FALSE, TRUE}, + {"VideoAvgBitrate", NULL, NULL, TRUE, FALSE}, + {"VideoEncoder", NULL, NULL, TRUE, FALSE}, + {"VideoFramerate", NULL, NULL, TRUE, FALSE}, + {"VideoGrayScale", NULL, NULL, TRUE, FALSE}, + {"VideoQualitySlider", NULL, NULL, TRUE, FALSE}, + {"VideoQualityType", NULL, NULL, TRUE, FALSE}, + {"VideoTargetSize", NULL, NULL, TRUE, FALSE}, + {"VideoTwoPass", NULL, NULL, TRUE, FALSE}, + {"VideoTurboTwoPass", NULL, NULL, TRUE, FALSE}, + {"x264Option", NULL, NULL, TRUE, FALSE}, {NULL, NULL} }; @@ -381,7 +384,11 @@ value_xlat( GValue *mac_val) { GValue *gval, *def_val; - const gchar *lin_key = key_map[key_index].lin_key; + const gchar *lin_key; + if (key_map[key_index].same) + lin_key = key_map[key_index].mac_key; + else + lin_key = key_map[key_index].lin_key; value_map_t *value_map = key_map[key_index].value_map; def_val = ghb_dict_lookup(defaults, lin_key); @@ -437,156 +444,49 @@ value_xlat( key_map_t audio_key_map[] = { - {"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}, + {"Audio1Bitrate", "AudioBitrate", NULL, FALSE, FALSE}, + {"Audio1Encoder", "AudioEncoder", NULL, FALSE, FALSE}, + {"Audio1Mixdown", "AudioMixdown", NULL, FALSE}, + {"Audio1Samplerate", "AudioSamplerate", NULL, FALSE, FALSE}, + {"Audio1Track", "AudioTrack", NULL, FALSE, FALSE}, + {"Audio1TrackDescription", "AudioTrackDescription", NULL, FALSE, FALSE}, + {"Audio1TrackDRCSlider", "AudioTrackDRCSlider", NULL, FALSE, FALSE}, + {"Audio2Bitrate", "AudioBitrate", NULL, FALSE, FALSE}, + {"Audio2Encoder", "AudioEncoder", NULL, FALSE, FALSE}, + {"Audio2Mixdown", "AudioMixdown", NULL, FALSE, FALSE}, + {"Audio2Samplerate", "AudioSamplerate", NULL, FALSE, FALSE}, + {"Audio2Track", "AudioTrack", NULL, FALSE, FALSE}, + {"Audio2TrackDescription", "AudioTrackDescription", NULL, FALSE, FALSE}, + {"Audio2TrackDRCSlider", "AudioTrackDRCSlider", NULL, FALSE, FALSE}, {NULL, NULL} }; static void hard_value_xlat(GValue *lin_dict, const gchar *mac_key, GValue *mac_val) { - if (strcmp(mac_key, "VideoQualitySlider") == 0) - { - gint vquality; - - vquality = (ghb_value_double(mac_val) + 0.005) * 100.0; - ghb_dict_insert(lin_dict, "video_quality", - ghb_int_value_new(vquality)); - } - else if (strcmp(mac_key, "UsesMaxPictureSettings") == 0) - { - GValue *gval; - - gval = ghb_dict_lookup(lin_dict, "autoscale"); - if (gval == NULL && ghb_value_boolean(mac_val)) - { - ghb_dict_insert(lin_dict, "autoscale", ghb_boolean_value_new(TRUE)); - } - } - 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) - { - ghb_dict_insert(lin_dict, "autoscale", ghb_boolean_value_new(TRUE)); - } - } - else if (strcmp(mac_key, "PicturePAR") == 0) - { - gint ana; - - ana = ghb_value_int(mac_val); - switch (ana) - { - 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 (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: - { - 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 { gint key_index; GValue *audio_defaults; audio_defaults = ghb_array_get_nth( - ghb_dict_lookup(defaults, "pref_audio_list"), 0); + ghb_dict_lookup(defaults, "AudioList"), 0); key_index = key_xlat(audio_key_map, mac_key); if (key_index >= 0) { gint audio_index, count, ii; GValue *alist, *adict, *val; + const gchar *lin_key; + if (audio_key_map[key_index].same) + lin_key = audio_key_map[key_index].mac_key; + else + lin_key = audio_key_map[key_index].lin_key; audio_index = mac_key[5] - '1'; - alist = ghb_dict_lookup(lin_dict, "pref_audio_list"); + alist = ghb_dict_lookup(lin_dict, "AudioList"); if (alist == NULL) { alist = ghb_array_value_new(8); - ghb_dict_insert(lin_dict, "pref_audio_list", alist); + ghb_dict_insert(lin_dict, "AudioList", alist); } count = ghb_array_len(alist); for (ii = count; ii <= audio_index; ii++) @@ -598,8 +498,7 @@ hard_value_xlat(GValue *lin_dict, const gchar *mac_key, GValue *mac_val) val = value_xlat(audio_defaults, audio_key_map, key_index, mac_val); if (val) { - ghb_dict_insert(adict, - g_strdup(audio_key_map[key_index].lin_key), val); + ghb_dict_insert(adict, g_strdup(lin_key), val); } } } @@ -623,13 +522,18 @@ parse_preset_dict(GValue *mac_dict, GValue *lin_dict) key_index = key_xlat(key_map, key); if (key_index >= 0) { // The simple translations - if (key_map[key_index].lin_key) + const gchar *lin_key; + + if (key_map[key_index].same) + lin_key = key_map[key_index].mac_key; + else + lin_key = key_map[key_index].lin_key; + if (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); + ghb_dict_insert(lin_dict, g_strdup(lin_key), val); } } else @@ -660,13 +564,13 @@ parse_preset_array(GValue *mac_array, GValue *lin_array) gval = ghb_dict_lookup(mac_dict, "PresetName"); if (gval) { - ghb_dict_insert(lin_dict, g_strdup("preset_name"), + ghb_dict_insert(lin_dict, g_strdup("PresetName"), ghb_value_dup(gval)); } gval = ghb_dict_lookup(mac_dict, "PresetDescription"); if (gval) { - ghb_dict_insert(lin_dict, g_strdup("preset_description"), + ghb_dict_insert(lin_dict, g_strdup("PresetDescription"), ghb_value_dup(gval)); } gval = ghb_dict_lookup(mac_dict, "Folder"); @@ -676,14 +580,16 @@ parse_preset_array(GValue *mac_array, GValue *lin_array) 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)); + ghb_dict_insert(lin_dict, g_strdup("ChildrenArray"), lval); + ghb_dict_insert(lin_dict, g_strdup("Folder"), + ghb_boolean_value_new(TRUE)); + ghb_dict_insert(lin_dict, g_strdup("Type"), + ghb_int_value_new(0)); parse_preset_array(mval, lval); } else { // Normal preset - ghb_dict_insert(lin_dict, g_strdup("preset_type"), + ghb_dict_insert(lin_dict, g_strdup("Type"), ghb_int_value_new(0)); parse_preset_dict(mac_dict, lin_dict); } diff --git a/gtk/src/presets.c b/gtk/src/presets.c index 5f120e5b..bb5e2e70 100644 --- a/gtk/src/presets.c +++ b/gtk/src/presets.c @@ -24,14 +24,14 @@ #include "resources.h" #include "presets.h" #include "values.h" +#include "lang.h" #define MAX_NESTED_PRESET 3 -// These are flags. One bit for each feature enum { - PRESETS_CUST = 0x01, - PRESETS_FOLDER = 0x02, + PRESETS_BUILTIN = 0, + PRESETS_CUSTOM }; static GValue *presetsPlist = NULL; @@ -40,6 +40,7 @@ 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); +static void store_presets(void); // This only handle limited depth GtkTreePath* @@ -95,18 +96,19 @@ preset_path_from_indices(GValue *presets, gint *indices, gint len) for (ii = 0; ii < len; ii++) { GValue *dict; - gint count, ptype; + gint count, folder; 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)) + name = ghb_dict_lookup(dict, "PresetName"); + if (name) + ghb_array_append(path, ghb_value_dup(name)); + folder = ghb_value_boolean(preset_dict_get_value(dict, "Folder")); + if (!folder) break; - presets = ghb_dict_lookup(dict, "preset_folder"); + presets = ghb_dict_lookup(dict, "ChildrenArray"); } return path; } @@ -225,7 +227,7 @@ preset_path_cmp(const GValue *path1, const GValue *path2) static GValue* presets_get_dict(GValue *presets, gint *indices, gint len) { - gint ii, count, ptype; + gint ii, count, folder; GValue *dict = NULL; g_debug("presets_get_dict ()"); @@ -236,10 +238,10 @@ presets_get_dict(GValue *presets, gint *indices, gint len) 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)) + folder = ghb_value_boolean(preset_dict_get_value(dict, "Folder")); + if (!folder) return NULL; - presets = ghb_dict_lookup(dict, "preset_folder"); + presets = ghb_dict_lookup(dict, "ChildrenArray"); } } if (ii < len) @@ -250,7 +252,7 @@ presets_get_dict(GValue *presets, gint *indices, gint len) static GValue* presets_get_folder(GValue *presets, gint *indices, gint len) { - gint ii, count, ptype; + gint ii, count, folder; GValue *dict; g_debug("presets_get_folder ()"); @@ -259,10 +261,10 @@ presets_get_folder(GValue *presets, gint *indices, gint len) 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)) + folder = ghb_value_boolean(preset_dict_get_value(dict, "Folder")); + if (!folder) break; - presets = ghb_dict_lookup(dict, "preset_folder"); + presets = ghb_dict_lookup(dict, "ChildrenArray"); } if (ii < len) return NULL; @@ -279,21 +281,19 @@ plist_get_dict(GValue *presets, const gchar *name) static const gchar* preset_get_name(GValue *dict) { - return g_value_get_string(ghb_dict_lookup(dict, "preset_name")); + return g_value_get_string(preset_dict_get_value(dict, "PresetName")); } -gint -ghb_preset_flags(GValue *dict) +gboolean +ghb_preset_folder(GValue *dict) { - const GValue *gval; - gint ptype = 0; + return ghb_value_int(preset_dict_get_value(dict, "Folder")); +} - gval = preset_dict_get_value(dict, "preset_type"); - if (gval) - { - ptype = ghb_value_int(gval); - } - return ptype; +gint +ghb_preset_type(GValue *dict) +{ + return ghb_value_int(preset_dict_get_value(dict, "Type")); } static void @@ -403,7 +403,7 @@ single_find_pos(GValue *presets, const gchar *name, gint type) 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")); + ptype = ghb_value_int(preset_dict_get_value(dict, "Type")); if (strcasecmp(name, str) <= 0 && ptype == type) { return ii; @@ -419,7 +419,8 @@ presets_find_pos(const GValue *path, gint type, gint *len) { GValue *nested; GValue *val; - gint count, ii, ptype; + gint count, ii; + gboolean folder; gint *indices = NULL; const gchar *name; GValue *dict; @@ -435,11 +436,11 @@ presets_find_pos(const GValue *path, gint type, gint *len) 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")); + folder = ghb_value_boolean(preset_dict_get_value(dict, "Folder")); nested = NULL; - if (!(ptype & PRESETS_FOLDER)) + if (!folder) break; - nested = ghb_dict_lookup(dict, "preset_folder"); + nested = ghb_dict_lookup(dict, "ChildrenArray"); } if (nested) { @@ -456,16 +457,16 @@ presets_find_pos(const GValue *path, gint type, gint *len) static gint preset_tree_depth(GValue *dict) { - gint ptype; + gboolean folder; - ptype = ghb_value_int(preset_dict_get_value(dict, "preset_type")); - if (ptype & PRESETS_FOLDER) + folder = ghb_value_boolean(preset_dict_get_value(dict, "Folder")); + if (folder) { gint depth = 0; gint count, ii; GValue *presets; - presets = ghb_dict_lookup(dict, "preset_folder"); + presets = ghb_dict_lookup(dict, "ChildrenArray"); count = ghb_array_len(presets); for (ii = 0; ii < count; ii++) { @@ -489,7 +490,7 @@ preset_is_default(GValue *dict) const GValue *val; val = preset_dict_get_value(dict, "Default"); - return g_value_get_boolean(val); + return ghb_value_boolean(val); } static gint* @@ -502,16 +503,16 @@ presets_find_default2(GValue *presets, gint *len) for (ii = 0; ii < count; ii++) { GValue *dict; - gint ptype; + gboolean folder; dict = ghb_array_get_nth(presets, ii); - ptype = ghb_value_int(preset_dict_get_value(dict, "preset_type")); - if (ptype & PRESETS_FOLDER) + folder = ghb_value_boolean(preset_dict_get_value(dict, "Folder")); + if (folder) { GValue *nested; gint pos = *len; - nested = ghb_dict_lookup(dict, "preset_folder"); + nested = ghb_dict_lookup(dict, "ChildrenArray"); (*len)++; indices = presets_find_default2(nested, len); if (indices) @@ -551,10 +552,11 @@ ghb_preset_indices_from_path( { GValue *nested; GValue *val; - gint count, ii, ptype; + gint count, ii; gint *indices = NULL; const gchar *name; GValue *dict; + gboolean folder; g_debug("ghb_preset_indices_from_path () "); nested = presets; @@ -575,13 +577,13 @@ ghb_preset_indices_from_path( if (ii < count-1) { dict = ghb_array_get_nth(nested, indices[ii]); - ptype = ghb_value_int(preset_dict_get_value(dict, "preset_type")); - if (!(ptype & PRESETS_FOLDER)) + folder = ghb_value_boolean(preset_dict_get_value(dict, "Folder")); + if (!folder) { g_free(indices); return NULL; } - nested = ghb_dict_lookup(dict, "preset_folder"); + nested = ghb_dict_lookup(dict, "ChildrenArray"); } } *len = ii; @@ -595,19 +597,41 @@ ghb_presets_get_type( gint len) { GValue *dict; - gint flags = 0; + gint type = 0; dict = presets_get_dict(presets, indices, len); if (dict) { - flags = ghb_preset_flags(dict); + type = ghb_preset_type(dict); } else { g_warning("ghb_presets_get_type ()"); g_warning("internal preset lookup error"); } - return flags; + return type; +} + +static gboolean +ghb_presets_get_folder( + GValue *presets, + gint *indices, + gint len) +{ + GValue *dict; + gboolean folder = FALSE; + + dict = presets_get_dict(presets, indices, len); + if (dict) + { + folder = ghb_preset_folder(dict); + } + else + { + g_warning("ghb_presets_get_folder ()"); + g_warning("internal preset lookup error"); + } + return folder; } void @@ -632,7 +656,7 @@ presets_set_default(gint *indices, gint len) { ghb_dict_insert(dict, g_strdup("Default"), ghb_boolean_value_new(TRUE)); } - store_plist(presetsPlist, "presets"); + store_presets(); } // Used for sorting dictionaries. @@ -671,28 +695,12 @@ ghb_presets_get_description(GValue *pdict) if (pdict == NULL) return NULL; desc = g_value_get_string( - preset_dict_get_value(pdict, "preset_description")); + preset_dict_get_value(pdict, "PresetDescription")); if (desc[0] == 0) return NULL; return desc; } -static const GValue* -preset_get_value(const GValue *preset, const gchar *key) -{ - GValue *dict = NULL; - gint *indices, len; - - - indices = ghb_preset_indices_from_path(presetsPlist, preset, &len); - if (indices) - { - dict = presets_get_dict(presetsPlist, indices, len); - g_free(indices); - } - return preset_dict_get_value(dict, key); -} - static void init_settings_from_dict( GValue *dest, GValue *internal, GValue *dict); @@ -821,32 +829,35 @@ preset_to_ui(signal_user_data_t *ud, GValue *dict) { g_debug("preset_to_ui()\n"); // Initialize the ui from presets file. - GValue *internal; + GValue *internal, *hidden; // Get key list from internal default presets. This way we do not // load any unknown keys. if (internalPlist == NULL) return; internal = plist_get_dict(internalPlist, "Presets"); + hidden = plist_get_dict(internalPlist, "XlatPresets"); // Setting a ui widget will cause the corresponding setting // to be set, but it also triggers a callback that can // have the side effect of using other settings values // that have not yet been set. So set *all* settings first // then update the ui. init_settings_from_dict(ud->settings, internal, dict); + init_settings_from_dict(ud->settings, hidden, dict); init_ui_from_dict(ud, internal, dict); + init_ui_from_dict(ud, hidden, dict); if (ghb_settings_get_boolean(ud->settings, "allow_tweaks")) { const GValue *gval; - gval = preset_dict_get_value(dict, "deinterlace"); + gval = preset_dict_get_value(dict, "PictureDeinterlace"); if (gval) { - ghb_ui_update(ud, "tweak_deinterlace", gval); + ghb_ui_update(ud, "tweak_PictureDeinterlace", gval); } - gval = preset_dict_get_value(dict, "denoise"); + gval = preset_dict_get_value(dict, "PictureDenoise"); if (gval) { - ghb_ui_update(ud, "tweak_denoise", gval); + ghb_ui_update(ud, "tweak_PictureDenoise", gval); } } } @@ -857,6 +868,8 @@ ghb_settings_to_ui(signal_user_data_t *ud, GValue *dict) init_ui_from_dict(ud, dict, dict); } +static GValue *current_preset = NULL; + void ghb_set_preset_from_indices(signal_user_data_t *ud, gint *indices, gint len) { @@ -874,14 +887,16 @@ ghb_set_preset_from_indices(signal_user_data_t *ud, gint *indices, gint len) if (dict == NULL) { preset_to_ui(ud, NULL); + current_preset = NULL; } else { - gint ptype; GValue *path; + gboolean folder; - ptype = ghb_value_int(preset_dict_get_value(dict, "preset_type")); - if (ptype & PRESETS_FOLDER) + current_preset = dict; + folder = ghb_value_boolean(preset_dict_get_value(dict, "Folder")); + if (folder) preset_to_ui(ud, NULL); else preset_to_ui(ud, dict); @@ -891,34 +906,88 @@ ghb_set_preset_from_indices(signal_user_data_t *ud, gint *indices, gint len) } } -void -ghb_set_preset(signal_user_data_t *ud, const GValue *path) +static const GValue* +curr_preset_get_value(const gchar *key) { - 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); + if (current_preset == NULL) return NULL; + return preset_dict_get_value(current_preset, key); } void ghb_update_from_preset( signal_user_data_t *ud, - const GValue *preset, const gchar *key) { const GValue *gval; g_debug("ghb_update_from_preset() %s", key); - if (preset == NULL) return; - gval = preset_get_value(preset, key); + gval = curr_preset_get_value(key); if (gval != NULL) { ghb_ui_update(ud, key, gval); } } +static void +ghb_select_preset2( + GtkBuilder *builder, + gint *indices, + gint len) +{ + GtkTreeView *treeview; + GtkTreeSelection *selection; + GtkTreeModel *store; + GtkTreeIter iter; + GtkTreePath *path; + + 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); + path = ghb_tree_path_new_from_indices(indices, len); + if (path) + { + 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); + } +} + +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) + { + ghb_select_preset2(builder, indices, len); + g_free(indices); + } +} + +void +ghb_select_default_preset(GtkBuilder *builder) +{ + gint *indices, len; + + g_debug("ghb_select_default_preset()"); + indices = presets_find_default(&len); + if (indices) + { + ghb_select_preset2(builder, indices, len); + g_free(indices); + } +} + gchar* ghb_get_user_config_dir() { @@ -1248,14 +1317,14 @@ ghb_prefs_load(signal_user_data_t *ud) } static const gchar* -get_preset_color(gint flags) +get_preset_color(gint type, gboolean folder) { const gchar *color; - if (flags & PRESETS_CUST) + if (type == PRESETS_CUSTOM) { color = "DimGray"; - if (flags & PRESETS_FOLDER) + if (folder) { color = "black"; } @@ -1263,7 +1332,7 @@ get_preset_color(gint flags) else { color = "blue"; - if (flags & PRESETS_FOLDER) + if (folder) { color = "Navy"; } @@ -1284,7 +1353,6 @@ ghb_presets_list_init( const gchar *preset; GtkTreePath *parent_path; const gchar *description; - gint flags; gboolean def; gint count, ii; GValue *dict; @@ -1317,6 +1385,8 @@ ghb_presets_list_init( for (ii = 0; ii < count; ii++) { const gchar *color; + gint type; + gboolean folder; // Additional settings, add row dict = ghb_array_get_nth(presets, ii); @@ -1326,8 +1396,9 @@ ghb_presets_list_init( description = ghb_presets_get_description(dict); gtk_tree_store_append(store, &iter, piter); - flags = ghb_preset_flags(dict); - color = get_preset_color(flags); + type = ghb_preset_type(dict); + folder = ghb_preset_folder(dict); + color = get_preset_color(type, folder); gtk_tree_store_set(store, &iter, 0, preset, 1, def ? 800 : 400, 2, def ? 2 : 0, @@ -1350,7 +1421,7 @@ ghb_presets_list_init( gtk_tree_view_expand_row(treeview, path, FALSE); gtk_tree_path_free(path); } - if (flags & PRESETS_FOLDER) + if (folder) { ghb_presets_list_init(ud, more_indices, len+1); } @@ -1370,8 +1441,8 @@ presets_list_update_item( GtkTreePath *treepath; const gchar *name; const gchar *description; - gint flags; - gboolean def; + gint type; + gboolean def, folder; GValue *dict; const gchar *color; @@ -1388,15 +1459,16 @@ presets_list_update_item( def = preset_is_default(dict); description = ghb_presets_get_description(dict); - flags = ghb_preset_flags(dict); - color = get_preset_color(flags); + type = ghb_preset_type(dict); + folder = ghb_preset_folder(dict); + color = get_preset_color(type, folder); gtk_tree_store_set(store, &iter, 0, name, 1, def ? 800 : 400, 2, def ? 2 : 0, 3, color, 4, description, -1); - if (flags & PRESETS_FOLDER) + if (folder) { ghb_presets_list_init(ud, indices, len); } @@ -1413,8 +1485,8 @@ presets_list_insert( GtkTreeStore *store; const gchar *preset; const gchar *description; - gint flags; - gboolean def; + gint type; + gboolean def, folder; gint count; GValue *presets; GtkTreePath *parent_path; @@ -1451,15 +1523,16 @@ presets_list_insert( description = ghb_presets_get_description(dict); gtk_tree_store_insert(store, &iter, piter, indices[len-1]); - flags = ghb_preset_flags(dict); - color = get_preset_color(flags); + type = ghb_preset_type(dict); + folder = ghb_preset_folder(dict); + color = get_preset_color(type, folder); gtk_tree_store_set(store, &iter, 0, preset, 1, def ? 800 : 400, 2, def ? 2 : 0, 3, color, 4, description, -1); - if (flags & PRESETS_FOLDER) + if (folder) { ghb_presets_list_init(ud, indices, len); } @@ -1501,8 +1574,8 @@ remove_std_presets(signal_user_data_t *ud) gint ptype; dict = ghb_array_get_nth(presetsPlist, ii); - ptype = ghb_value_int(preset_dict_get_value(dict, "preset_type")); - if (!(ptype & PRESETS_CUST)) + ptype = ghb_value_int(preset_dict_get_value(dict, "Type")); + if (ptype == PRESETS_BUILTIN) { if (ghb_presets_remove(presetsPlist, &indices, 1)) { @@ -1513,44 +1586,6 @@ remove_std_presets(signal_user_data_t *ud) } void -ghb_presets_reload(signal_user_data_t *ud) -{ - GValue *std_presets; - gint count, ii; - - g_debug("ghb_presets_reload()\n"); - 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 = count-1; ii >= 0; ii--) - { - GValue *std_dict; - GValue *copy_dict; - GHashTableIter iter; - gchar *key; - GValue *value; - gint indices = 0; - - std_dict = ghb_array_get_nth(std_presets, ii); - copy_dict = ghb_dict_value_new(); - 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" - while (g_hash_table_iter_next( - &iter, (gpointer*)(void*)&key, (gpointer*)(void*)&value)) - { - ghb_dict_insert(copy_dict, g_strdup(key), ghb_value_dup(value)); - } - presets_list_insert(ud, &indices, 1); - } - store_plist(presetsPlist, "presets"); -} - -void ghb_save_queue(GValue *queue) { store_plist(queue, "queue"); @@ -1568,121 +1603,811 @@ ghb_remove_queue_file() remove_plist("queue"); } -void -ghb_presets_load() +typedef struct { - presetsPlist = load_plist("presets"); - if (presetsPlist == NULL) - { - presetsPlist = ghb_value_dup(ghb_resource_get("standard-presets")); - store_plist(presetsPlist, "presets"); - } - if (G_VALUE_TYPE(presetsPlist) == ghb_dict_get_type()) - { // Presets is older dictionary format. Convert to array - GHashTableIter old_iter; - GValue *presets; - gchar *name; - GValue *orig_dict; + gchar *mac_val; + gchar *lin_val; +} value_map_t; - presets = ghb_array_value_new(32); - ghb_dict_iter_init(&old_iter, presetsPlist); - // middle (void*) cast prevents gcc warning "defreferencing type-punned - // pointer will break strict-aliasing rules" - while (g_hash_table_iter_next( - &old_iter, (gpointer*)(void*)&name, (gpointer*)(void*)&orig_dict)) - { - GHashTableIter iter; - gchar *key; - GValue *value, *dict; +static value_map_t vcodec_xlat[] = +{ + {"MPEG-4 (FFmpeg)", "ffmpeg"}, + {"MPEG-4 (XviD)", "xvid"}, + {"H.264 (x264)", "x264"}, + {"VP3 (Theora)", "theora"}, + {NULL,NULL} +}; - dict = ghb_dict_value_new(); - ghb_dict_insert(dict, g_strdup("preset_name"), - ghb_string_value_new(name)); - ghb_array_append(presets, dict); - ghb_dict_iter_init(&iter, orig_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*)&value)) - { - ghb_dict_insert(dict, g_strdup(key), ghb_value_dup(value)); - } +static value_map_t acodec_xlat[] = +{ + {"AAC (faac)", "faac"}, + {"AC3 Passthru", "ac3"}, + {"MP3 (lame)", "lame"}, + {"Vorbis (vorbis)", "vorbis"}, + {NULL,NULL} +}; + +value_map_t container_xlat[] = +{ + {"MP4 file", "mp4"}, + {"M4V file", "m4v"}, + {"MKV file", "mkv"}, + {"AVI file", "avi"}, + {"OGM file", "ogm"}, + {NULL, NULL} +}; + +value_map_t framerate_xlat[] = +{ + {"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} +}; + +value_map_t samplerate_xlat[] = +{ + {"Auto", "source"}, + {"22.05", "22.05"}, + {"24", "24"}, + {"32", "32"}, + {"44.1", "44.1"}, + {"48", "48"}, + {NULL, NULL} +}; + +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} +}; + +value_map_t deint_xlat[] = +{ + {"0", "none"}, + {"1", "fast"}, + {"2", "slow"}, + {"3", "slower"}, + {NULL, NULL} +}; + +value_map_t denoise_xlat[] = +{ + {"0", "none"}, + {"1", "weak"}, + {"2", "medium"}, + {"3", "strong"}, + {NULL, NULL} +}; + +extern iso639_lang_t ghb_language_table[]; + +static GValue* +export_lang_xlat2(GValue *lin_val) +{ + GValue *gval; + + if (lin_val == NULL) return NULL; + gint ii; + gchar *str; + + str = ghb_value_string(lin_val); + for (ii = 0; ghb_language_table[ii].eng_name; ii++) + { + if (strcmp(str, ghb_language_table[ii].iso639_2) == 0) + { + gval = ghb_string_value_new(ghb_language_table[ii].eng_name); + g_free(str); + return gval; } - ghb_value_free(presetsPlist); - presetsPlist = presets; - store_plist(presetsPlist, "presets"); } + g_debug("Can't map language value: (%s)", str); + g_free(str); + return NULL; } -static void -settings_save(signal_user_data_t *ud, const GValue *path) +static GValue* +export_subtitle_xlat2(GValue *lin_val) { - GValue *dict, *internal; - GHashTableIter iter; - gchar *key; - GValue *value; - gboolean autoscale; - gint *indices, len, count; - const gchar *name; - gboolean replace = FALSE; + gchar *str; + GValue *gval; - 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) + str = ghb_value_string(lin_val); + if (strcmp(str, "none") == 0) { - 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; + gval = ghb_string_value_new("None"); + } + else if (strcmp(str, "auto") == 0) + { + gval = ghb_string_value_new("Autoselect"); } 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; - } + gval = export_lang_xlat2(lin_val); } - ghb_dict_insert(dict, g_strdup("preset_name"), ghb_string_value_new(name)); + g_free(str); + return gval; +} - if (ghb_settings_get_boolean(ud->settings, "allow_tweaks")) - { - gchar *str; - str = ghb_settings_get_string(ud->settings, "tweak_deinterlace"); - if (str) +static GValue* +import_lang_xlat2(GValue *mac_val) +{ + GValue *gval; + + if (mac_val == NULL) return NULL; + gint ii; + gchar *str; + + str = ghb_value_string(mac_val); + for (ii = 0; ghb_language_table[ii].eng_name; ii++) + { + if (strcmp(str, ghb_language_table[ii].eng_name) == 0) { - ghb_settings_set_string(ud->settings, "deinterlace", str); + gval = ghb_string_value_new(ghb_language_table[ii].iso639_2); g_free(str); + return gval; } - str = ghb_settings_get_string(ud->settings, "tweak_denoise"); + } + g_debug("Can't map language value: (%s)", str); + g_free(str); + return NULL; +} + +static GValue* +import_subtitle_xlat2(GValue *mac_val) +{ + gchar *str; + GValue *gval; + + str = ghb_value_string(mac_val); + if (strcmp(str, "None") == 0) + { + gval = ghb_string_value_new("none"); + } + else if (strcmp(str, "Autoselect") == 0) + { + gval = ghb_string_value_new("auto"); + } + else + { + gval = import_lang_xlat2(mac_val); + } + g_free(str); + return gval; +} + +static GValue* +export_audio_track_xlat2(GValue *lin_val) +{ + gchar *str; + GValue *gval = NULL; + + str = ghb_value_string(lin_val); + if (strcmp(str, "none") == 0) + { + gval = ghb_int_value_new(1); + } + else + { + gint val = ghb_value_int(lin_val) + 1; + gval = ghb_int_value_new(val); + } + g_free(str); + return gval; +} + +static GValue* +import_audio_track_xlat2(GValue *mac_val) +{ + gint val; + gchar *str; + GValue *gval; + + val = ghb_value_int(mac_val); + if (val <= 0) + { + val = 0; + } + else + { + val--; + } + str = g_strdup_printf("%d", val); + gval = ghb_string_value_new(str); + g_free(str); + return gval; +} + +static GValue* +export_value_xlat2(value_map_t *value_map, GValue *lin_val, GType mac_type) +{ + GValue *gval; + + if (lin_val == NULL) return NULL; + gint ii; + gchar *str; + GValue *sval; + + str = ghb_value_string(lin_val); + for (ii = 0; value_map[ii].mac_val; ii++) + { + if (strcmp(str, value_map[ii].lin_val) == 0) + { + sval = ghb_string_value_new(value_map[ii].mac_val); + g_free(str); + gval = ghb_value_new(mac_type); + if (!g_value_transform(sval, gval)) + { + g_warning("can't transform"); + ghb_value_free(gval); + ghb_value_free(sval); + return NULL; + } + ghb_value_free(sval); + return gval; + } + } + g_debug("Can't map value: (%s)", str); + g_free(str); + return NULL; +} + +static void +export_value_xlat(GValue *dict) +{ + GValue *lin_val, *gval; + const gchar *key; + + key = "VideoEncoder"; + lin_val = ghb_dict_lookup(dict, key); + gval = export_value_xlat2(vcodec_xlat, lin_val, G_TYPE_STRING); + if (gval) + ghb_dict_insert(dict, g_strdup(key), gval); + key = "FileFormat"; + lin_val = ghb_dict_lookup(dict, key); + gval = export_value_xlat2(container_xlat, lin_val, G_TYPE_STRING); + if (gval) + ghb_dict_insert(dict, g_strdup(key), gval); + key = "VideoFramerate"; + lin_val = ghb_dict_lookup(dict, key); + gval = export_value_xlat2(framerate_xlat, lin_val, G_TYPE_STRING); + if (gval) + ghb_dict_insert(dict, g_strdup(key), gval); + key = "PictureDeinterlace"; + lin_val = ghb_dict_lookup(dict, key); + gval = export_value_xlat2(deint_xlat, lin_val, G_TYPE_INT); + if (gval) + ghb_dict_insert(dict, g_strdup(key), gval); + else + ghb_dict_insert(dict, g_strdup(key), ghb_value_dup(lin_val)); + key = "PictureDenoise"; + lin_val = ghb_dict_lookup(dict, key); + gval = export_value_xlat2(denoise_xlat, lin_val, G_TYPE_INT); + if (gval) + ghb_dict_insert(dict, g_strdup(key), gval); + else + ghb_dict_insert(dict, g_strdup(key), ghb_value_dup(lin_val)); + key = "Subtitles"; + lin_val = ghb_dict_lookup(dict, key); + gval = export_subtitle_xlat2(lin_val); + if (gval) + ghb_dict_insert(dict, g_strdup(key), gval); + + GValue *alist; + GValue *adict; + gint count, ii; + + alist = ghb_dict_lookup(dict, "AudioList"); + count = ghb_array_len(alist); + for (ii = 0; ii < count; ii++) + { + adict = ghb_array_get_nth(alist, ii); + key = "AudioTrack"; + lin_val = ghb_dict_lookup(adict, key); + gval = export_audio_track_xlat2(lin_val); + if (gval) + ghb_dict_insert(adict, g_strdup(key), gval); + key = "AudioEncoder"; + lin_val = ghb_dict_lookup(adict, key); + gval = export_value_xlat2(acodec_xlat, lin_val, G_TYPE_STRING); + if (gval) + ghb_dict_insert(adict, g_strdup(key), gval); + key = "AudioSamplerate"; + lin_val = ghb_dict_lookup(adict, key); + gval = export_value_xlat2(samplerate_xlat, lin_val, G_TYPE_STRING); + if (gval) + ghb_dict_insert(adict, g_strdup(key), gval); + key = "AudioMixdown"; + lin_val = ghb_dict_lookup(adict, key); + gval = export_value_xlat2(mix_xlat, lin_val, G_TYPE_STRING); + if (gval) + ghb_dict_insert(adict, g_strdup(key), gval); + } +} + + +static GValue* +import_value_xlat2( + GValue *defaults, + value_map_t *value_map, + const gchar *key, + GValue *mac_val) +{ + GValue *gval, *def_val; + + if (mac_val == NULL) return NULL; + def_val = ghb_dict_lookup(defaults, key); + if (def_val) + { + gint ii; + gchar *str; + GValue *sval; + + str = ghb_value_string(mac_val); + for (ii = 0; value_map[ii].mac_val; ii++) + { + if (strcmp(str, value_map[ii].mac_val) == 0) + { + 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("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 + { + g_warning("Bad key: (%s)", key); + return NULL; + } + return NULL; +} + +static void +import_value_xlat(GValue *dict) +{ + GValue *defaults, *mac_val, *gval; + const gchar *key; + + defaults = plist_get_dict(internalPlist, "Presets"); + key = "VideoEncoder"; + mac_val = ghb_dict_lookup(dict, key); + gval = import_value_xlat2(defaults, vcodec_xlat, key, mac_val); + if (gval) + ghb_dict_insert(dict, g_strdup(key), gval); + key = "FileFormat"; + mac_val = ghb_dict_lookup(dict, key); + gval = import_value_xlat2(defaults, container_xlat, key, mac_val); + if (gval) + ghb_dict_insert(dict, g_strdup(key), gval); + key = "VideoFramerate"; + mac_val = ghb_dict_lookup(dict, key); + gval = import_value_xlat2(defaults, framerate_xlat, key, mac_val); + if (gval) + ghb_dict_insert(dict, g_strdup(key), gval); + key = "PictureDeinterlace"; + mac_val = ghb_dict_lookup(dict, key); + gval = import_value_xlat2(defaults, deint_xlat, key, mac_val); + if (gval) + ghb_dict_insert(dict, g_strdup(key), gval); + key = "PictureDenoise"; + mac_val = ghb_dict_lookup(dict, key); + gval = import_value_xlat2(defaults, denoise_xlat, key, mac_val); + if (gval) + ghb_dict_insert(dict, g_strdup(key), gval); + key = "Subtitles"; + mac_val = ghb_dict_lookup(dict, key); + gval = import_subtitle_xlat2(mac_val); + if (gval) + ghb_dict_insert(dict, g_strdup(key), gval); + + GValue *alist; + GValue *adict; + GValue *adefaults; + GValue *adeflist; + gint count, ii; + + adeflist = ghb_dict_lookup(dict, "AudioList"); + if (adeflist) + { + adefaults = ghb_array_get_nth(adeflist, 0); + alist = ghb_dict_lookup(dict, "AudioList"); + count = ghb_array_len(alist); + for (ii = 0; ii < count; ii++) + { + adict = ghb_array_get_nth(alist, ii); + key = "AudioTrack"; + mac_val = ghb_dict_lookup(adict, key); + gval = import_audio_track_xlat2(mac_val); + if (gval) + ghb_dict_insert(adict, g_strdup(key), gval); + key = "AudioEncoder"; + mac_val = ghb_dict_lookup(adict, key); + gval = import_value_xlat2(adefaults, acodec_xlat, key, mac_val); + if (gval) + ghb_dict_insert(adict, g_strdup(key), gval); + key = "AudioSamplerate"; + mac_val = ghb_dict_lookup(adict, key); + gval = import_value_xlat2(adefaults, samplerate_xlat, key, mac_val); + if (gval) + ghb_dict_insert(adict, g_strdup(key), gval); + key = "AudioMixdown"; + mac_val = ghb_dict_lookup(adict, key); + gval = import_value_xlat2(adefaults, mix_xlat, key, mac_val); + if (gval) + ghb_dict_insert(adict, g_strdup(key), gval); + } + } +} + +static void +import_xlat_preset(GValue *dict) +{ + gboolean uses_max; + gint uses_pic; + gint par; + gint vqtype; + + g_debug("import_xlat_preset ()"); + uses_max = ghb_value_boolean( + preset_dict_get_value(dict, "UsesMaxPictureSettings")); + uses_pic = ghb_value_int( + preset_dict_get_value(dict, "UsesPictureSettings")); + par = ghb_value_int(preset_dict_get_value(dict, "PicturePAR")); + vqtype = ghb_value_int(preset_dict_get_value(dict, "VideoQualityType")); + + if (uses_max || uses_pic == 2) + { + ghb_dict_insert(dict, g_strdup("autoscale"), + ghb_boolean_value_new(TRUE)); + } + switch (par) + { + case 0: + { + ghb_dict_insert(dict, g_strdup("anamorphic"), + ghb_boolean_value_new(FALSE)); + if (ghb_dict_lookup(dict, "ModDimensions") == NULL) + ghb_dict_insert(dict, g_strdup("ModDimensions"), + ghb_boolean_value_new(TRUE)); + } break; + case 1: + { + ghb_dict_insert(dict, g_strdup("anamorphic"), + ghb_boolean_value_new(TRUE)); + ghb_dict_insert(dict, g_strdup("ModDimensions"), + ghb_boolean_value_new(FALSE)); + } break; + case 2: + { + ghb_dict_insert(dict, g_strdup("anamorphic"), + ghb_boolean_value_new(TRUE)); + ghb_dict_insert(dict, g_strdup("ModDimensions"), + ghb_boolean_value_new(TRUE)); + } break; + default: + { + ghb_dict_insert(dict, g_strdup("anamorphic"), + ghb_boolean_value_new(TRUE)); + ghb_dict_insert(dict, g_strdup("ModDimensions"), + ghb_boolean_value_new(TRUE)); + } break; + } + // VideoQualityType/0/1/2 - vquality_type_/target/bitrate/constant + switch (vqtype) + { + case 0: + { + ghb_dict_insert(dict, g_strdup("vquality_type_target"), + ghb_boolean_value_new(TRUE)); + ghb_dict_insert(dict, g_strdup("vquality_type_bitrate"), + ghb_boolean_value_new(FALSE)); + ghb_dict_insert(dict, g_strdup("vquality_type_constant"), + ghb_boolean_value_new(FALSE)); + } break; + case 1: + { + ghb_dict_insert(dict, g_strdup("vquality_type_target"), + ghb_boolean_value_new(FALSE)); + ghb_dict_insert(dict, g_strdup("vquality_type_bitrate"), + ghb_boolean_value_new(TRUE)); + ghb_dict_insert(dict, g_strdup("vquality_type_constant"), + ghb_boolean_value_new(FALSE)); + } break; + case 2: + { + ghb_dict_insert(dict, g_strdup("vquality_type_target"), + ghb_boolean_value_new(FALSE)); + ghb_dict_insert(dict, g_strdup("vquality_type_bitrate"), + ghb_boolean_value_new(FALSE)); + ghb_dict_insert(dict, g_strdup("vquality_type_constant"), + ghb_boolean_value_new(TRUE)); + } break; + default: + { + ghb_dict_insert(dict, g_strdup("vquality_type_target"), + ghb_boolean_value_new(FALSE)); + ghb_dict_insert(dict, g_strdup("vquality_type_bitrate"), + ghb_boolean_value_new(FALSE)); + ghb_dict_insert(dict, g_strdup("vquality_type_constant"), + ghb_boolean_value_new(TRUE)); + } break; + } + import_value_xlat(dict); +} + +static void +import_xlat_presets(GValue *presets) +{ + gint count, ii; + GValue *dict; + gboolean folder; + + g_debug("import_xlat_presets ()"); + if (presets == NULL) return; + count = ghb_array_len(presets); + for (ii = 0; ii < count; ii++) + { + dict = ghb_array_get_nth(presets, ii); + folder = ghb_value_boolean(preset_dict_get_value(dict, "Folder")); + if (folder) + { + GValue *nested; + + nested = ghb_dict_lookup(dict, "ChildrenArray"); + import_xlat_presets(nested); + } + else + { + import_xlat_preset(dict); + } + } +} + +static void +export_xlat_preset(GValue *dict) +{ + gboolean ana, round, autoscale, target, br, constant; + + g_debug("export_xlat_prest ()"); + autoscale = ghb_value_boolean(preset_dict_get_value(dict, "autoscale")); + ana = ghb_value_boolean(preset_dict_get_value(dict, "anamorphic")); + round = ghb_value_boolean(preset_dict_get_value(dict, "ModDimensions")); + target = ghb_value_boolean( + preset_dict_get_value(dict, "vquality_type_target")); + br = ghb_value_boolean( + preset_dict_get_value(dict, "vquality_type_bitrate")); + constant = ghb_value_boolean( + preset_dict_get_value(dict, "vquality_type_constant")); + + if (autoscale) + ghb_dict_insert(dict, g_strdup("UsesPictureSettings"), + ghb_int_value_new(2)); + else + ghb_dict_insert(dict, g_strdup("UsesPictureSettings"), + ghb_int_value_new(1)); + + if (ana) + { + if (round) + ghb_dict_insert(dict, g_strdup("PicturePAR"), + ghb_int_value_new(2)); + else + ghb_dict_insert(dict, g_strdup("PicturePAR"), + ghb_int_value_new(1)); + } + else + { + ghb_dict_insert(dict, g_strdup("PicturePAR"), + ghb_int_value_new(0)); + } + // VideoQualityType/0/1/2 - vquality_type_/target/bitrate/constant + if (target) + { + ghb_dict_insert(dict, g_strdup("VideoQualityType"), + ghb_int_value_new(0)); + } + else if (br) + { + ghb_dict_insert(dict, g_strdup("VideoQualityType"), + ghb_int_value_new(1)); + } + else if (constant) + { + ghb_dict_insert(dict, g_strdup("VideoQualityType"), + ghb_int_value_new(2)); + } + ghb_dict_remove(dict, "autoscale"); + ghb_dict_remove(dict, "anamorphic"); + ghb_dict_remove(dict, "vquality_type_target"); + ghb_dict_remove(dict, "vquality_type_bitrate"); + ghb_dict_remove(dict, "vquality_type_constant"); + export_value_xlat(dict); +} + +static void +export_xlat_presets(GValue *presets) +{ + gint count, ii; + GValue *dict; + gboolean folder; + + if (presets == NULL) return; + count = ghb_array_len(presets); + for (ii = 0; ii < count; ii++) + { + dict = ghb_array_get_nth(presets, ii); + folder = ghb_value_boolean(preset_dict_get_value(dict, "Folder")); + if (folder) + { + GValue *nested; + + nested = ghb_dict_lookup(dict, "ChildrenArray"); + export_xlat_presets(nested); + } + else + { + export_xlat_preset(dict); + } + } +} + +static void +store_presets() +{ + GValue *export; + + export = ghb_value_dup(presetsPlist); + export_xlat_presets(export); + store_plist(export, "presets"); + ghb_value_free(export); +} + +void +ghb_presets_reload(signal_user_data_t *ud) +{ + GValue *std_presets; + gint count, ii; + + g_debug("ghb_presets_reload()\n"); + 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 = count-1; ii >= 0; ii--) + { + GValue *std_dict; + GValue *copy_dict; + GHashTableIter iter; + gchar *key; + GValue *value; + gint indices = 0; + + std_dict = ghb_array_get_nth(std_presets, ii); + copy_dict = ghb_dict_value_new(); + 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" + while (g_hash_table_iter_next( + &iter, (gpointer*)(void*)&key, (gpointer*)(void*)&value)) + { + ghb_dict_insert(copy_dict, g_strdup(key), ghb_value_dup(value)); + } + presets_list_insert(ud, &indices, 1); + } + import_xlat_presets(presetsPlist); + store_presets(); +} + +void +ghb_presets_load() +{ + presetsPlist = load_plist("presets"); + if (presetsPlist == NULL) + { + presetsPlist = ghb_value_dup(ghb_resource_get("standard-presets")); + store_presets(); + } + else if (G_VALUE_TYPE(presetsPlist) == ghb_dict_get_type()) + { // Presets is older dictionary format. Convert to array + ghb_value_free(presetsPlist); + presetsPlist = ghb_value_dup(ghb_resource_get("standard-presets")); + store_presets(); + } + import_xlat_presets(presetsPlist); +} + +static void +settings_save(signal_user_data_t *ud, const GValue *path) +{ + GValue *dict, *internal; + GHashTableIter iter; + gchar *key; + GValue *value; + gboolean autoscale; + 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_folder(presetsPlist, indices, len)) + { + 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_CUSTOM, &len); + if (indices) + { + dict = ghb_dict_value_new(); + ghb_presets_insert(presetsPlist, dict, indices, len); + } + else + { + g_warning("failed to find insert path"); + return; + } + } + + if (ghb_settings_get_boolean(ud->settings, "allow_tweaks")) + { + gchar *str; + str = ghb_settings_get_string(ud->settings, "tweak_PictureDeinterlace"); + if (str) + { + ghb_settings_set_string(ud->settings, "PictureDeinterlace", str); + g_free(str); + } + str = ghb_settings_get_string(ud->settings, "tweak_PictureDenoise"); if (str) { - ghb_settings_set_string(ud->settings, "denoise", str); + ghb_settings_set_string(ud->settings, "PictureDenoise", str); g_free(str); } } autoscale = ghb_settings_get_boolean(ud->settings, "autoscale"); - ghb_settings_set_int64(ud->settings, "preset_type", PRESETS_CUST); + ghb_settings_set_int64(ud->settings, "Type", PRESETS_CUSTOM); internal = plist_get_dict(internalPlist, "Presets"); ghb_dict_iter_init(&iter, internal); @@ -1697,11 +2422,11 @@ settings_save(signal_user_data_t *ud, const GValue *path) key2 = key; if (!autoscale) { - if (strcmp(key, "max_width") == 0) + if (strcmp(key, "PictureWidth") == 0) { key2 = "scale_width"; } - else if (strcmp(key, "max_height") == 0) + else if (strcmp(key, "PictureHeight") == 0) { key2 = "scale_height"; } @@ -1709,15 +2434,27 @@ settings_save(signal_user_data_t *ud, const GValue *path) gval = ghb_settings_get_value(ud->settings, key2); if (gval == NULL) { - g_debug("Setting (%s) is not in defaults\n", (gchar*)key); continue; } - if (ghb_value_cmp(gval, value) != 0) + ghb_dict_insert(dict, g_strdup(key), ghb_value_dup(gval)); + } + internal = plist_get_dict(internalPlist, "XlatPresets"); + ghb_dict_iter_init(&iter, internal); + // 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)) + { + const GValue *gval; + + gval = ghb_settings_get_value(ud->settings, key); + if (gval == NULL) { - // Differs from default value. Store it. - ghb_dict_insert(dict, g_strdup(key), ghb_value_dup(gval)); + continue; } + ghb_dict_insert(dict, g_strdup(key), ghb_value_dup(gval)); } + ghb_dict_insert(dict, g_strdup("PresetName"), ghb_string_value_new(name)); if (replace) presets_list_update_item(ud, indices, len); else @@ -1726,10 +2463,11 @@ settings_save(signal_user_data_t *ud, const GValue *path) ghb_boolean_value_new(FALSE)); presets_list_insert(ud, indices, len); } - g_free(indices); - store_plist(presetsPlist, "presets"); + store_presets(); ud->dont_clear_presets = TRUE; - ghb_set_preset(ud, path); + // Make the new preset the selected item + ghb_select_preset2(ud->builder, indices, len); + g_free(indices); ud->dont_clear_presets = FALSE; return; } @@ -1746,8 +2484,7 @@ folder_save(signal_user_data_t *ud, const GValue *path) indices = ghb_preset_indices_from_path(presetsPlist, path, &len); if (indices) { - if (!(ghb_presets_get_type(presetsPlist, indices, len) & - PRESETS_FOLDER)) + if (!ghb_presets_get_folder(presetsPlist, indices, len)) { gchar *message; message = g_strdup_printf( @@ -1761,15 +2498,15 @@ folder_save(signal_user_data_t *ud, const GValue *path) } // Already exists, update its description dict = presets_get_dict(presetsPlist, indices, len); - ghb_dict_insert(dict, g_strdup("preset_description"), + ghb_dict_insert(dict, g_strdup("PresetDescription"), ghb_value_dup(preset_dict_get_value( - ud->settings, "preset_description"))); + ud->settings, "PresetDescription"))); g_free(indices); return; } else { - indices = presets_find_pos(path, PRESETS_CUST, &len); + indices = presets_find_pos(path, PRESETS_CUSTOM, &len); if (indices) { dict = ghb_dict_value_new(); @@ -1781,21 +2518,19 @@ folder_save(signal_user_data_t *ud, const GValue *path) return; } } - ghb_dict_insert(dict, g_strdup("preset_description"), + ghb_dict_insert(dict, g_strdup("PresetDescription"), ghb_value_dup(preset_dict_get_value( - ud->settings, "preset_description"))); - ghb_dict_insert(dict, g_strdup("preset_name"), ghb_string_value_new(name)); + ud->settings, "PresetDescription"))); + ghb_dict_insert(dict, g_strdup("PresetName"), ghb_string_value_new(name)); folder = ghb_array_value_new(8); - ghb_dict_insert(dict, g_strdup("preset_folder"), folder); - ghb_dict_insert(dict, g_strdup("preset_type"), - ghb_int64_value_new(PRESETS_FOLDER|PRESETS_CUST)); + ghb_dict_insert(dict, g_strdup("ChildrenArray"), folder); + ghb_dict_insert(dict, g_strdup("Type"), + ghb_int64_value_new(PRESETS_CUSTOM)); + ghb_dict_insert(dict, g_strdup("Folder"), ghb_boolean_value_new(TRUE)); presets_list_insert(ud, indices, len); g_free(indices); - store_plist(presetsPlist, "presets"); - ud->dont_clear_presets = TRUE; - ghb_set_preset(ud, path); - ud->dont_clear_presets = FALSE; + store_presets(); return; } @@ -1858,73 +2593,13 @@ ghb_presets_list_clear_default(signal_user_data_t *ud) } static void -ghb_select_preset2( - GtkBuilder *builder, - gint *indices, - gint len) -{ - GtkTreeView *treeview; - GtkTreeSelection *selection; - GtkTreeModel *store; - GtkTreeIter iter; - GtkTreePath *path; - - 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); - path = ghb_tree_path_new_from_indices(indices, len); - if (path) - { - 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); - } -} - -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) - { - ghb_select_preset2(builder, indices, len); - g_free(indices); - } -} - -void -ghb_select_default_preset(GtkBuilder *builder) -{ - gint *indices, len; - - g_debug("ghb_select_default_preset()"); - indices = presets_find_default(&len); - if (indices) - { - ghb_select_preset2(builder, indices, len); - g_free(indices); - } -} - -static void update_audio_presets(signal_user_data_t *ud) { g_debug("update_audio_presets"); const GValue *audio_list; audio_list = ghb_settings_get_value(ud->settings, "audio_list"); - ghb_settings_set_value(ud->settings, "pref_audio_list", audio_list); + ghb_settings_set_value(ud->settings, "AudioList", audio_list); } void @@ -1932,22 +2607,22 @@ enforce_preset_type(signal_user_data_t *ud, const GValue *path) { gint *indices, len; GtkWidget *normal, *folder; - gint ptype; + gboolean fold; normal = GHB_WIDGET(ud->builder, "preset_type_normal"); folder = GHB_WIDGET(ud->builder, "preset_type_folder"); indices = ghb_preset_indices_from_path(presetsPlist, path, &len); if (indices) { - ptype = ghb_presets_get_type(presetsPlist, indices, len); - if (ptype & PRESETS_FOLDER) + fold = ghb_presets_get_folder(presetsPlist, indices, len); + if (fold) gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(folder), TRUE); else gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(normal), TRUE); - gtk_widget_set_sensitive(folder, ptype & PRESETS_FOLDER); - gtk_widget_set_sensitive(normal, !(ptype & PRESETS_FOLDER)); + gtk_widget_set_sensitive(folder, fold); + gtk_widget_set_sensitive(normal, !fold); g_free(indices); } else @@ -1977,9 +2652,9 @@ presets_save_clicked_cb(GtkWidget *xwidget, signal_user_data_t *ud) else count = 1; // Clear the description - desc = GTK_TEXT_VIEW(GHB_WIDGET(ud->builder, "preset_description")); + desc = GTK_TEXT_VIEW(GHB_WIDGET(ud->builder, "PresetDescription")); dialog = GHB_WIDGET(ud->builder, "preset_save_dialog"); - entry = GTK_ENTRY(GHB_WIDGET(ud->builder, "preset_name")); + entry = GTK_ENTRY(GHB_WIDGET(ud->builder, "PresetName")); gtk_entry_set_text(entry, name); enforce_preset_type(ud, preset); response = gtk_dialog_run(GTK_DIALOG(dialog)); @@ -2004,7 +2679,7 @@ presets_save_clicked_cb(GtkWidget *xwidget, signal_user_data_t *ud) gint ptype; ptype = ghb_presets_get_type(presetsPlist, indices, len); - if (ptype & PRESETS_CUST) + if (ptype == PRESETS_CUSTOM) { ghb_array_copy(dest, preset, count-1); } @@ -2022,8 +2697,6 @@ presets_save_clicked_cb(GtkWidget *xwidget, signal_user_data_t *ud) update_audio_presets(ud); settings_save(ud, dest); } - // Make the new preset the selected item - ghb_select_preset(ud->builder, dest); ghb_value_free(dest); } } @@ -2082,18 +2755,18 @@ presets_remove_clicked_cb(GtkWidget *xwidget, signal_user_data_t *ud) GtkWidget *dialog; GtkTreePath *path; gint *indices, len; - gint ptype; + gboolean folder; gtk_tree_model_get(store, &iter, 0, &preset, -1); path = gtk_tree_model_get_path(store, &iter); indices = gtk_tree_path_get_indices(path); len = gtk_tree_path_get_depth(path); - ptype = ghb_presets_get_type(presetsPlist, indices, len); + folder = ghb_presets_get_folder(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", - (ptype & PRESETS_FOLDER) ? "folder" : "preset", + folder ? "folder" : "preset", preset); response = gtk_dialog_run(GTK_DIALOG(dialog)); gtk_widget_destroy (dialog); @@ -2113,7 +2786,7 @@ presets_remove_clicked_cb(GtkWidget *xwidget, signal_user_data_t *ud) gtk_tree_selection_unselect_iter (selection, &iter); if (ghb_presets_remove(presetsPlist, indices, len)) { - store_plist(presetsPlist, "presets"); + store_presets(); presets_list_remove(ud, indices, len); } if (!valid) @@ -2150,6 +2823,7 @@ presets_drag_motion_cb( GtkTreeModel *model; GtkTreeSelection *select; gint src_ptype, dst_ptype; + gboolean src_folder, dst_folder; GValue *preset; gint tree_depth, ii; @@ -2165,9 +2839,10 @@ presets_drag_motion_cb( tree_depth = preset_tree_depth(preset); src_ptype = ghb_presets_get_type(presetsPlist, indices, len); + src_folder = ghb_presets_get_folder(presetsPlist, indices, len); gtk_tree_path_free(path); - if ((src_ptype & PRESETS_FOLDER) && tree_depth == 1) + if (src_folder && tree_depth == 1) tree_depth = 2; // The rest checks that the destination is a valid position @@ -2179,7 +2854,7 @@ presets_drag_motion_cb( return TRUE; } // Don't allow repositioning of builtin presets - if (!(src_ptype & PRESETS_CUST)) + if (src_ptype != PRESETS_CUSTOM) { gdk_drag_status(ctx, 0, time); return TRUE; @@ -2198,15 +2873,16 @@ presets_drag_motion_cb( indices = gtk_tree_path_get_indices(path); len = gtk_tree_path_get_depth(path); dst_ptype = ghb_presets_get_type(presetsPlist, indices, len); + dst_folder = ghb_presets_get_folder(presetsPlist, indices, len); // Don't allow mixing custom presets in the builtins - if (!(dst_ptype & PRESETS_CUST)) + if (dst_ptype != PRESETS_CUSTOM) { gdk_drag_status(ctx, 0, time); return TRUE; } // Only allow *drop into* for folders - if (!(dst_ptype & PRESETS_FOLDER)) + if (!dst_folder) { if (drop_pos == GTK_TREE_VIEW_DROP_INTO_OR_BEFORE) drop_pos = GTK_TREE_VIEW_DROP_BEFORE; @@ -2234,7 +2910,8 @@ presets_drag_cb( GtkTreeViewDropPosition drop_pos; GtkTreeIter dstiter, srciter; gint *dst_indices, dst_len, *src_indices, src_len; - gint src_ptype, dst_ptype; + gint src_ptype; + gboolean src_folder, dst_folder; GtkTreeModel *dstmodel = gtk_tree_view_get_model(dstwidget); @@ -2277,16 +2954,17 @@ presets_drag_cb( 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); + src_folder = ghb_presets_get_folder(presetsPlist, src_indices, src_len); preset = ghb_value_dup( presets_get_dict(presetsPlist, src_indices, src_len)); gtk_tree_path_free(srcpath); // Don't allow repositioning of builtin presets - if (!(src_ptype & PRESETS_CUST)) + if (src_ptype != PRESETS_CUSTOM) return; tree_depth = preset_tree_depth(preset); - if ((src_ptype & PRESETS_FOLDER) && tree_depth == 1) + if (src_folder && tree_depth == 1) tree_depth = 2; dst_len = gtk_tree_path_get_depth(path); @@ -2302,9 +2980,9 @@ presets_drag_cb( 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); + dst_folder = ghb_presets_get_folder(presetsPlist, dst_indices, dst_len); // Only allow *drop into* for folders - if (!(dst_ptype & PRESETS_FOLDER)) + if (!dst_folder) { if (drop_pos == GTK_TREE_VIEW_DROP_INTO_OR_BEFORE) drop_pos = GTK_TREE_VIEW_DROP_BEFORE; @@ -2362,7 +3040,7 @@ presets_drag_cb( presets_list_update_item(ud, dst_indices, dst_len); gtk_tree_path_free(dstpath); - store_plist(presetsPlist, "presets"); + store_presets(); } gtk_tree_path_free(path); } @@ -2377,7 +3055,7 @@ preset_update_title_deps(signal_user_data_t *ud, ghb_title_info_t *tinfo) ghb_int64_value(tinfo->width - tinfo->crop[2] - tinfo->crop[3])); // If anamorphic or keep_aspect, the hight will be automatically calculated gboolean keep_aspect, anamorphic; - keep_aspect = ghb_settings_get_boolean(ud->settings, "keep_aspect"); + keep_aspect = ghb_settings_get_boolean(ud->settings, "PictureKeepRatio"); anamorphic = ghb_settings_get_boolean(ud->settings, "anamorphic"); if (!(keep_aspect || anamorphic)) { @@ -2389,28 +3067,21 @@ preset_update_title_deps(signal_user_data_t *ud, ghb_title_info_t *tinfo) // you pass it a cropped width or height == 0. gint bound; bound = tinfo->height / 2 - 2; - widget = GHB_WIDGET (ud->builder, "crop_top"); + widget = GHB_WIDGET (ud->builder, "PictureTopCrop"); gtk_spin_button_set_range (GTK_SPIN_BUTTON(widget), 0, bound); - widget = GHB_WIDGET (ud->builder, "crop_bottom"); + widget = GHB_WIDGET (ud->builder, "PictureBottomCrop"); gtk_spin_button_set_range (GTK_SPIN_BUTTON(widget), 0, bound); bound = tinfo->width / 2 - 2; - widget = GHB_WIDGET (ud->builder, "crop_left"); + widget = GHB_WIDGET (ud->builder, "PictureLeftCrop"); gtk_spin_button_set_range (GTK_SPIN_BUTTON(widget), 0, bound); - widget = GHB_WIDGET (ud->builder, "crop_right"); + widget = GHB_WIDGET (ud->builder, "PictureRightCrop"); gtk_spin_button_set_range (GTK_SPIN_BUTTON(widget), 0, bound); - if (ghb_settings_get_boolean(ud->settings, "autocrop")) - { - ghb_ui_update(ud, "crop_top", ghb_int64_value(tinfo->crop[0])); - ghb_ui_update(ud, "crop_bottom", ghb_int64_value(tinfo->crop[1])); - 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 + if (ghb_settings_get_boolean(ud->settings, "PictureAutoCrop")) { - 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)); + ghb_ui_update(ud, "PictureTopCrop", ghb_int64_value(tinfo->crop[0])); + ghb_ui_update(ud, "PictureBottomCrop", ghb_int64_value(tinfo->crop[1])); + ghb_ui_update(ud, "PictureLeftCrop", ghb_int64_value(tinfo->crop[2])); + ghb_ui_update(ud, "PictureRightCrop", ghb_int64_value(tinfo->crop[3])); } } @@ -2427,8 +3098,9 @@ presets_list_selection_changed_cb(GtkTreeSelection *selection, signal_user_data_ if (gtk_tree_selection_get_selected(selection, &store, &iter)) { GtkTreePath *treepath; - gint *indices, len, ptype; + gint *indices, len; GValue *path; + gboolean folder; treepath = gtk_tree_model_get_path(store, &iter); indices = gtk_tree_path_get_indices(treepath); @@ -2437,15 +3109,16 @@ presets_list_selection_changed_cb(GtkTreeSelection *selection, signal_user_data_ 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)) + folder = ghb_presets_get_folder(presetsPlist, indices, len); + if (!folder) { 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"); + GtkWidget *qp = GHB_WIDGET(ud->builder, "VideoQualitySlider"); gtk_range_set_range (GTK_RANGE(qp), 0, 100); + gtk_scale_set_digits(GTK_SCALE(qp), 3); // 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 @@ -2463,11 +3136,27 @@ presets_list_selection_changed_cb(GtkTreeSelection *selection, signal_user_data_ } ghb_set_scale (ud, GHB_SCALE_KEEP_NONE); - gint vqmin, vqmax; - ghb_vquality_range(ud, &vqmin, &vqmax); + gdouble vqmin, vqmax, step, page; + gint digits; + ghb_vquality_range(ud, &vqmin, &vqmax, &step, &page, &digits); gtk_range_set_range (GTK_RANGE(qp), vqmin, vqmax); - gtk_widget_set_sensitive(widget, TRUE); + gtk_range_set_increments (GTK_RANGE(qp), step, page); + gtk_scale_set_digits(GTK_SCALE(qp), digits); + + gchar *text; + gint crop[4]; + GtkWidget *crop_widget; + crop[0] = ghb_settings_get_int(ud->settings, "PictureTopCrop"); + crop[1] = ghb_settings_get_int(ud->settings, "PictureBottomCrop"); + crop[2] = ghb_settings_get_int(ud->settings, "PictureLeftCrop"); + crop[3] = ghb_settings_get_int(ud->settings, "PictureRightCrop"); + crop_widget = GHB_WIDGET (ud->builder, "crop_values"); + text = g_strdup_printf("%d:%d:%d:%d", + crop[0], crop[1], crop[2], crop[3]); + gtk_label_set_text (GTK_LABEL(crop_widget), text); + g_free(text); } + gtk_widget_set_sensitive(widget, TRUE); } else { @@ -2521,8 +3210,7 @@ presets_default_clicked_cb(GtkWidget *xwidget, signal_user_data_t *ud) indices = ghb_preset_indices_from_path(presetsPlist, preset, &len); if (indices) { - if (!(ghb_presets_get_type(presetsPlist, indices, len) & - PRESETS_FOLDER)) + if (!ghb_presets_get_folder(presetsPlist, indices, len)) { ghb_presets_list_clear_default(ud); presets_set_default(indices, len); diff --git a/gtk/src/presets.h b/gtk/src/presets.h index 3b2f572b..2c34f30b 100644 --- a/gtk/src/presets.h +++ b/gtk/src/presets.h @@ -18,8 +18,7 @@ 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 GValue *preset, const gchar *key); +void ghb_update_from_preset(signal_user_data_t *ud, 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(); diff --git a/gtk/src/queuehandler.c b/gtk/src/queuehandler.c index 6d56af7a..63f0f654 100644 --- a/gtk/src/queuehandler.c +++ b/gtk/src/queuehandler.c @@ -70,7 +70,7 @@ add_to_queue_list(signal_user_data_t *ud, GValue *settings, GtkTreeIter *piter) gchar *dest, *preset, *vol_name, *basename; const gchar *vcodec, *container; gchar *fps, *vcodec_abbr; - gint title, start_chapter, end_chapter, width, height, vqvalue; + gint title, start_chapter, end_chapter, width, height; gint source_width, source_height; gboolean pass2, anamorphic, round_dim, keep_aspect, vqtype, turbo; gboolean tweaks; @@ -84,7 +84,7 @@ add_to_queue_list(signal_user_data_t *ud, GValue *settings, GtkTreeIter *piter) title = ghb_settings_combo_int(settings, "title"); start_chapter = ghb_settings_get_int(settings, "start_chapter"); end_chapter = ghb_settings_get_int(settings, "end_chapter"); - pass2 = ghb_settings_get_boolean(settings, "two_pass"); + pass2 = ghb_settings_get_boolean(settings, "VideoTwoPass"); vol_name = ghb_settings_get_string(settings, "volume_label"); dest = ghb_settings_get_string(settings, "destination"); basename = g_path_get_basename(dest); @@ -130,12 +130,12 @@ add_to_queue_list(signal_user_data_t *ud, GValue *settings, GtkTreeIter *piter) gint mux; const GValue *path; - container = ghb_settings_combo_option(settings, "container"); - mux = ghb_settings_combo_int(settings, "container"); + container = ghb_settings_combo_option(settings, "FileFormat"); + mux = ghb_settings_combo_int(settings, "FileFormat"); preset_modified = ghb_settings_get_boolean(settings, "preset_modified"); path = ghb_settings_get_value(settings, "preset"); preset = ghb_preset_path_string(path); - markers = ghb_settings_get_boolean(settings, "chapter_markers"); + markers = ghb_settings_get_boolean(settings, "ChapterMarkers"); if (preset_modified) g_string_append_printf(str, @@ -161,9 +161,9 @@ add_to_queue_list(signal_user_data_t *ud, GValue *settings, GtkTreeIter *piter) { gboolean ipod, http, large; - ipod = ghb_settings_get_boolean(settings, "ipod_file"); - http = ghb_settings_get_boolean(settings, "http_optimize_mp4"); - large = ghb_settings_get_boolean(settings, "large_mp4"); + ipod = ghb_settings_get_boolean(settings, "Mp4iPodCompatible"); + http = ghb_settings_get_boolean(settings, "Mp4HttpOptimize"); + large = ghb_settings_get_boolean(settings, "Mp4LargeFile"); if (http || ipod || large) { g_string_append_printf(str, "MP4 Options:"); @@ -182,8 +182,8 @@ add_to_queue_list(signal_user_data_t *ud, GValue *settings, GtkTreeIter *piter) width = ghb_settings_get_int(settings, "scale_width"); height = ghb_settings_get_int(settings, "scale_height"); anamorphic = ghb_settings_get_boolean(settings, "anamorphic"); - round_dim = ghb_settings_get_boolean(settings, "round_dimensions"); - keep_aspect = ghb_settings_get_boolean(settings, "keep_aspect"); + round_dim = ghb_settings_get_boolean(settings, "ModDimensions"); + keep_aspect = ghb_settings_get_boolean(settings, "PictureKeepRatio"); gchar *aspect_desc; if (anamorphic) @@ -209,39 +209,51 @@ add_to_queue_list(signal_user_data_t *ud, GValue *settings, GtkTreeIter *piter) } } vqtype = ghb_settings_get_boolean(settings, "vquality_type_constant"); - vqvalue = 0; gchar *vq_desc = "Error"; gchar *vq_units = ""; + gchar *vqstr; + gdouble vqvalue; if (!vqtype) { vqtype = ghb_settings_get_boolean(settings, "vquality_type_target"); if (!vqtype) { // Has to be bitrate - vqvalue = ghb_settings_get_int(settings, "video_bitrate"); + vqvalue = ghb_settings_get_int(settings, "VideoAvgBitrate"); vq_desc = "Bitrate:"; vq_units = "kbps"; } else { // Target file size - vqvalue = ghb_settings_get_int(settings, "video_target_size"); + vqvalue = ghb_settings_get_int(settings, "VideoTargetSize"); vq_desc = "Target Size:"; vq_units = "MB"; } + vqstr = g_strdup_printf("%d", (gint)vqvalue); } else { // Constant quality - vqvalue = ghb_settings_get_int(settings, "video_quality"); + vqvalue = ghb_settings_get_double(settings, "VideoQualitySlider"); vq_desc = "Constant Quality:"; + if (ghb_settings_get_boolean(settings, "directqp")) + { + vqstr = g_strdup_printf("%d", (gint)vqvalue); + vq_units = "(crf)"; + } + else + { + vqstr = g_strdup_printf("%.1f", 100*vqvalue); + vq_units = "%"; + } } - fps = ghb_settings_get_string(settings, "framerate"); + fps = ghb_settings_get_string(settings, "VideoFramerate"); if (strcmp("source", fps) == 0) { g_free(fps); - if (ghb_settings_get_boolean(settings, "detelecine")) + if (ghb_settings_get_boolean(settings, "PictureDetelecine")) fps = g_strdup("Same As Source (vfr detelecine)"); else fps = g_strdup("Same As Source (variable)"); @@ -253,8 +265,8 @@ add_to_queue_list(signal_user_data_t *ud, GValue *settings, GtkTreeIter *piter) g_free(fps); fps = tmp; } - vcodec = ghb_settings_combo_option(settings, "video_codec"); - vcodec_abbr = ghb_settings_get_string(settings, "video_codec"); + vcodec = ghb_settings_combo_option(settings, "VideoEncoder"); + vcodec_abbr = ghb_settings_get_string(settings, "VideoEncoder"); source_width = ghb_settings_get_int(settings, "source_width"); source_height = ghb_settings_get_int(settings, "source_height"); g_string_append_printf(str, @@ -264,9 +276,9 @@ add_to_queue_list(signal_user_data_t *ud, GValue *settings, GtkTreeIter *piter) gboolean decomb; gboolean filters = FALSE; - decomb = ghb_settings_get_boolean(settings, "decomb"); + decomb = ghb_settings_get_boolean(settings, "PictureDecomb"); g_string_append_printf(str, "Filters:"); - if (ghb_settings_get_boolean(settings, "detelecine")) + if (ghb_settings_get_boolean(settings, "PictureDetelecine")) { g_string_append_printf(str, " - Detelecine"); filters = TRUE; @@ -279,31 +291,31 @@ add_to_queue_list(signal_user_data_t *ud, GValue *settings, GtkTreeIter *piter) else { gint deint = ghb_settings_combo_int(settings, - tweaks ? "tweak_deinterlace":"deinterlace"); + tweaks ? "tweak_PictureDeinterlace":"PictureDeinterlace"); if (deint) { const gchar *opt = ghb_settings_combo_option(settings, - tweaks ? "tweak_deinterlace":"deinterlace"); + tweaks ? "tweak_PictureDeinterlace":"PictureDeinterlace"); g_string_append_printf(str, " - Deinterlace: %s", opt); filters = TRUE; } } gint denoise = ghb_settings_combo_int(settings, - tweaks ? "tweak_denoise":"denoise"); + tweaks ? "tweak_PictureDenoise":"PictureDenoise"); if (denoise) { const gchar *opt = ghb_settings_combo_option(settings, - tweaks ? "tweak_denoise":"denoise"); + tweaks ? "tweak_PictureDenoise":"PictureDenoise"); g_string_append_printf(str, " - Denoise: %s", opt); filters = TRUE; } - gint deblock = ghb_settings_get_int(settings, "deblock"); + gint deblock = ghb_settings_get_int(settings, "PictureDeblock"); if (deblock >= 5) { g_string_append_printf(str, " - Deblock (%d)", deblock); filters = TRUE; } - if (ghb_settings_get_boolean(settings, "grayscale")) + if (ghb_settings_get_boolean(settings, "VideoGrayScale")) { g_string_append_printf(str, " - Grayscale"); filters = TRUE; @@ -313,10 +325,10 @@ add_to_queue_list(signal_user_data_t *ud, GValue *settings, GtkTreeIter *piter) g_string_append_printf(str, "\n"); g_string_append_printf(str, - "Video: %s, Framerate: %s, %s %d%s\n", - vcodec, fps, vq_desc, vqvalue, vq_units); + "Video: %s, Framerate: %s, %s %s%s\n", + vcodec, fps, vq_desc, vqstr, vq_units); - turbo = ghb_settings_get_boolean(settings, "turbo"); + turbo = ghb_settings_get_boolean(settings, "VideoTurboTwoPass"); if (turbo) { g_string_append_printf(str, "Turbo: On\n"); @@ -342,16 +354,16 @@ add_to_queue_list(signal_user_data_t *ud, GValue *settings, GtkTreeIter *piter) asettings = ghb_array_get_nth(audio_list, ii); - acodec = ghb_settings_combo_option(asettings, "audio_codec"); - bitrate = ghb_settings_get_string(asettings, "audio_bitrate"); - samplerate = ghb_settings_get_string(asettings, "audio_rate"); + acodec = ghb_settings_combo_option(asettings, "AudioEncoder"); + bitrate = ghb_settings_get_string(asettings, "AudioBitrate"); + samplerate = ghb_settings_get_string(asettings, "AudioSamplerate"); if (strcmp("source", samplerate) == 0) { g_free(samplerate); samplerate = g_strdup("Same As Source"); } - track = ghb_settings_get_string(asettings, "audio_track_long"); - mix = ghb_settings_combo_option(asettings, "audio_mix"); + track = ghb_settings_get_string(asettings, "AudioTrackDescription"); + mix = ghb_settings_combo_option(asettings, "AudioMixdown"); g_string_append_printf(str, "Audio: %s, Encoder: %s, Mixdown: %s, SampleRate: %s, Bitrate: %s", track, acodec, mix, samplerate, bitrate); @@ -372,25 +384,6 @@ add_to_queue_list(signal_user_data_t *ud, GValue *settings, GtkTreeIter *piter) g_free(preset); } -static gint64 -estimate_file_size(signal_user_data_t *ud) -{ - ghb_title_info_t tinfo; - gint duration; - gint bitrate; - gint64 size; - gint titleindex; - - titleindex = ghb_settings_combo_int(ud->settings, "title"); - if (titleindex < 0) return 0; - - if (!ghb_get_title_info(&tinfo, titleindex)) return 0; - duration = ((tinfo.hours*60)+tinfo.minutes)*60+tinfo.seconds; - bitrate = ghb_guess_bitrate(ud->settings); - size = (gint64)duration * (gint64)bitrate/8; - return size; -} - void audio_list_refresh(signal_user_data_t *ud) { @@ -418,19 +411,19 @@ audio_list_refresh(signal_user_data_t *ud) return; asettings = ghb_array_get_nth(audio_list, row); - track = ghb_settings_combo_option(asettings, "audio_track"); - codec = ghb_settings_combo_option(asettings, "audio_codec"); - br = ghb_settings_combo_option(asettings, "audio_bitrate"); - sr = ghb_settings_combo_option(asettings, "audio_rate"); - mix = ghb_settings_combo_option(asettings, "audio_mix"); - drc = ghb_settings_get_string(asettings, "audio_drc"); + track = ghb_settings_combo_option(asettings, "AudioTrack"); + codec = ghb_settings_combo_option(asettings, "AudioEncoder"); + br = ghb_settings_combo_option(asettings, "AudioBitrate"); + sr = ghb_settings_combo_option(asettings, "AudioSamplerate"); + mix = ghb_settings_combo_option(asettings, "AudioMixdown"); + drc = ghb_settings_get_string(asettings, "AudioTrackDRCSlider"); - s_track = ghb_settings_get_string(asettings, "audio_track"); - s_codec = ghb_settings_get_string(asettings, "audio_codec"); - s_br = ghb_settings_get_string(asettings, "audio_bitrate"); - s_sr = ghb_settings_get_string(asettings, "audio_rate"); - s_mix = ghb_settings_get_string(asettings, "audio_mix"); - s_drc = ghb_settings_get_double(asettings, "audio_drc"); + s_track = ghb_settings_get_string(asettings, "AudioTrack"); + s_codec = ghb_settings_get_string(asettings, "AudioEncoder"); + s_br = ghb_settings_get_string(asettings, "AudioBitrate"); + s_sr = ghb_settings_get_string(asettings, "AudioSamplerate"); + s_mix = ghb_settings_get_string(asettings, "AudioMixdown"); + s_drc = ghb_settings_get_double(asettings, "AudioTrackDRCSlider"); gtk_list_store_set(GTK_LIST_STORE(store), &iter, // These are displayed in list @@ -539,7 +532,7 @@ validate_settings(signal_user_data_t *ud) size = g_file_info_get_attribute_uint64(info, G_FILE_ATTRIBUTE_FILESYSTEM_FREE); - gint64 fsize = estimate_file_size(ud); + gint64 fsize = 10L * 1024L * 1024L * 1024L; if (size < fsize) { message = g_strdup_printf( diff --git a/gtk/src/resource_data.h b/gtk/src/resource_data.h index 2ba6d786..026389c7 100644 --- a/gtk/src/resource_data.h +++ b/gtk/src/resource_data.h @@ -149,13 +149,13 @@ " </object>\n" " <object class="GtkAdjustment" id="adjustment5"" ">\n" -" <property name="upper">100</property>\n" +" <property name="upper">1</property>\n" " <property name="lower">0</property>\n" -" <property name="page_increment">10</property>" -"\n" -" <property name="step_increment">1</property>\n" +" <property name="page_increment">1</property>\n" +" <property name="step_increment">0.1</property>" +";\n" " <property name="page_size">0</property>\n" -" <property name="value">63</property>\n" +" <property name="value">0.63</property>\n" " </object>\n" " <object class="GtkAdjustment" id="adjustment6"" ">\n" @@ -1210,7 +1210,7 @@ " </child>\n" " <child>\n" " <object class="GtkComboBox&qu" -"ot; id="container">\n" +"ot; id="FileFormat">\n" " <property name="visible&quo" "t;>True</property>\n" " <property name="tooltip-tex" @@ -1240,7 +1240,7 @@ ";>0</property>\n" " <child>\n" " <object class="GtkCheckBu" -"tton" id="ipod_file">\n" +"tton" id="Mp4iPodCompatible">\n" " <property name="visible" "">True</property>\n" " <property name="can_foc" @@ -1266,7 +1266,7 @@ " </child>\n" " <child>\n" " <object class="GtkCheckButton" -"" id="http_optimize_mp4">\n" +"" id="Mp4HttpOptimize">\n" " <property name="visible&quo" "t;>True</property>\n" " <property name="can_focus&q" @@ -1290,7 +1290,7 @@ " </child>\n" " <child>\n" " <object class="GtkCheckButton" -"" id="large_mp4">\n" +"" id="Mp4LargeFile">\n" " <property name="visible&quo" "t;>True</property>\n" " <property name="can_focus&q" @@ -2038,7 +2038,7 @@ "N_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>\n" " <child>\n" " <object class="GtkCheckBu" -"tton" id="grayscale">\n" +"tton" id="VideoGrayScale">\n" " <property name="visible" "">True</property>\n" " <property name="can_foc" @@ -2060,7 +2060,7 @@ " </child>\n" " <child>\n" " <object class="GtkCheckBu" -"tton" id="detelecine">\n" +"tton" id="PictureDetelecine">\n" " <property name="visible" "">True</property>\n" " <property name="can_foc" @@ -2086,7 +2086,7 @@ " </child>\n" " <child>\n" " <object class="GtkCheckBu" -"tton" id="decomb">\n" +"tton" id="PictureDecomb">\n" " <property name="visible" "">True</property>\n" " <property name="can_foc" @@ -2142,7 +2142,7 @@ "ale">0.55</property>\n" " <child>\n" " <object class="Gt" -"kHScale" id="deblock">\n" +"kHScale" id="PictureDeblock">\n" " <property name="" ";visible">True</property>\n" " <property name="" @@ -2209,7 +2209,7 @@ " </child>\n" " <child>\n" " <object class="GtkCom" -"boBox" id="deinterlace">\n" +"boBox" id="PictureDeinterlace">\n" " <property name="wid" "th_request">100</property>\n" " <property name="vis" @@ -2231,7 +2231,7 @@ " </child>\n" " <child>\n" " <object class="GtkCom" -"boBoxEntry" id="tweak_deinterlace">\n" +"boBoxEntry" id="tweak_PictureDeinterlace">\n" " <property name="vis" "ible">False</property>\n" " <signal handler="se" @@ -2300,7 +2300,7 @@ " </child>\n" " <child>\n" " <object class="GtkCom" -"boBox" id="denoise">\n" +"boBox" id="PictureDenoise">\n" " <property name="wid" "th_request">100</property>\n" " <property name="vis" @@ -2322,7 +2322,7 @@ " </child>\n" " <child>\n" " <object class="GtkCom" -"boBoxEntry" id="tweak_denoise">\n" +"boBoxEntry" id="tweak_PictureDenoise">\n" " <property name="vis" "ible">False</property>\n" " <signal handler="se" @@ -2605,7 +2605,7 @@ "ale">0</property>\n" " <child>\n" " <object class="Gt" -"kComboBox" id="video_codec">\n" +"kComboBox" id="VideoEncoder">\n" " <property name="" ";visible">True</property>\n" " <signal handler=&quo" @@ -2668,7 +2668,7 @@ "ale">0</property>\n" " <child>\n" " <object class="Gt" -"kComboBox" id="framerate">\n" +"kComboBox" id="VideoFramerate">\n" " <property name="" ";visible">True</property>\n" " <property name="" @@ -2696,7 +2696,7 @@ " </child>\n" " <child>\n" " <object class="GtkCheckBu" -"tton" id="two_pass">\n" +"tton" id="VideoTwoPass">\n" " <property name="visible" "">True</property>\n" " <property name="can_foc" @@ -2728,7 +2728,7 @@ "quot;>0.23999999463558197</property>\n" " <child>\n" " <object class="GtkChe" -"ckButton" id="turbo">\n" +"ckButton" id="VideoTurboTwoPass">\n" " <property name="vis" "ible">True</property>\n" " <property name="can" @@ -2881,7 +2881,7 @@ "ale">0.10000000149011612</property>\n" " <child>\n" " <object class="Gt" -"kSpinButton" id="video_bitrate">\n" +"kSpinButton" id="VideoAvgBitrate">\n" " <property name="" ";visible">True</property>\n" " <property name="" @@ -2950,7 +2950,7 @@ "ale">0.10000000149011612</property>\n" " <child>\n" " <object class="Gt" -"kSpinButton" id="video_target_size">\n" +"kSpinButton" id="VideoTargetSize">\n" " <property name="" ";visible">True</property>\n" " <property name="" @@ -3012,7 +3012,7 @@ " </child>\n" " <child>\n" " <object class="GtkHSc" -"ale" id="video_quality">\n" +"ale" id="VideoQualitySlider">\n" " <property name="vis" "ible">True</property>\n" " <property name="can" @@ -3023,11 +3023,13 @@ " <property name="adj" "ustment">adjustment5</property>\n" " <property name="dig" -"its">0</property>\n" +"its">3</property>\n" " <property name="val" "ue_pos">GTK_POS_RIGHT</property>\n" " <signal handler="se" "tting_widget_changed_cb" name="value_changed"/>\n" +" <signal handler="fo" +"rmat_vquality_cb" name="format-value"/>\n" " </object>\n" " <packing>\n" " <property name="pos" @@ -3299,7 +3301,7 @@ " </child>\n" " <child>\n" " <object class="Gt" -"kHScale" id="audio_drc">\n" +"kHScale" id="AudioTrackDRCSlider">\n" " <property name="" ";visible">True</property>\n" " <property name="" @@ -3351,7 +3353,7 @@ "uot;>5</property>\n" " <child>\n" " <object class="GtkComboBo" -"x" id="audio_track">\n" +"x" id="AudioTrack">\n" " <property name="width_r" "equest">215</property>\n" " <property name="visible" @@ -3371,7 +3373,7 @@ " </child>\n" " <child>\n" " <object class="GtkComboBo" -"x" id="audio_codec">\n" +"x" id="AudioEncoder">\n" " <property name="visible" "">True</property>\n" " <property name="events&" @@ -3395,7 +3397,7 @@ " </child>\n" " <child>\n" " <object class="GtkComboBo" -"x" id="audio_rate">\n" +"x" id="AudioSamplerate">\n" " <property name="visible" "">True</property>\n" " <property name="events&" @@ -3523,7 +3525,7 @@ " </child>\n" " <child>\n" " <object class="GtkComboBo" -"x" id="audio_mix">\n" +"x" id="AudioMixdown">\n" " <property name="visible" "">True</property>\n" " <property name="events&" @@ -3547,7 +3549,7 @@ " </child>\n" " <child>\n" " <object class="GtkComboBo" -"x" id="audio_bitrate">\n" +"x" id="AudioBitrate">\n" " <property name="visible" "">True</property>\n" " <property name="events&" @@ -3665,7 +3667,7 @@ "\n" " <child>\n" " <object class="GtkComboBo" -"x" id="source_audio_lang">\n" +"x" id="SourceAudioLang">\n" " <property name="width_r" "equest">150</property>\n" " <property name="visible" @@ -3739,7 +3741,7 @@ "\n" " <child>\n" " <object class="GtkComboBo" -"x" id="subtitle_lang">\n" +"x" id="Subtitles">\n" " <property name="width_r" "equest">150</property>\n" " <property name="visible" @@ -3753,7 +3755,7 @@ " </child>\n" " <child>\n" " <object class="GtkCheckBu" -"tton" id="forced_subtitles">\n" +"tton" id="SubtitlesForced">\n" " <property name="visible" "">True</property>\n" " <property name="can_foc" @@ -4300,7 +4302,7 @@ "uot;>2</property>\n" " <child>\n" " <object class="GtkTextView&qu" -"ot; id="x264_options">\n" +"ot; id="x264Option">\n" " <property name="visible&quo" "t;>True</property>\n" " <property name="can_focus&q" @@ -5071,7 +5073,7 @@ "t;/property>\n" " <child>\n" " <object class="GtkCheckButton" i" -"d="chapter_markers">\n" +"d="ChapterMarkers">\n" " <property name="visible">Tr" "ue</property>\n" " <property name="can_focus">" @@ -5618,31 +5620,6 @@ " </child>\n" " <child>\n" " <object class="GtkCheckButton" i" -"d="linear_vquality">\n" -" <property name="visible">Tr" -"ue</property>\n" -" <property name="can_focus">" -"True</property>\n" -" <property name="tooltip_text"&" -"gt;x264 uses a different scale for video quality than\n" -"other codecs. This adjusts the scale so that \n" -"similar values give similar quality across all the\n" -"video codecs.</property>\n" -" <property name="label" transla" -"table="yes">Adjust x264 video quality scale</property&g" -"t;\n" -" <property name="draw_indicator"" -";>True</property>\n" -" <signal name="toggled" handler" -"="pref_changed_cb"/>\n" -" </object>\n" -" <packing>\n" -" <property name="position">2" -"</property>\n" -" </packing>\n" -" </child>\n" -" <child>\n" -" <object class="GtkCheckButton" i" "d="noscale">\n" " <property name="visible">Tr" "ue</property>\n" @@ -5662,7 +5639,7 @@ "="pref_changed_cb"/>\n" " </object>\n" " <packing>\n" -" <property name="position">3" +" <property name="position">2" "</property>\n" " </packing>\n" " </child>\n" @@ -5689,7 +5666,7 @@ "="vcodec_changed_cb"/>\n" " </object>\n" " <packing>\n" -" <property name="position">4" +" <property name="position">3" "</property>\n" " </packing>\n" " </child>\n" @@ -5706,7 +5683,7 @@ "="tweaks_changed_cb"/>\n" " </object>\n" " <packing>\n" -" <property name="position">5" +" <property name="position">4" "</property>\n" " </packing>\n" " </child>\n" @@ -5723,7 +5700,7 @@ "="hbfd_feature_changed_cb"/>\n" " </object>\n" " <packing>\n" -" <property name="position">6" +" <property name="position">5" "</property>\n" " </packing>\n" " </child>\n" @@ -6000,8 +5977,8 @@ " </packing>\n" " </child>\n" " <child>\n" -" <object class="GtkEntry" id="preset" -"_name">\n" +" <object class="GtkEntry" id="Preset" +"Name">\n" " <property name="visible">True</p" "roperty>\n" " <property name="can_focus">True<" @@ -6061,7 +6038,7 @@ ";/property>\n" " <child>\n" " <object class="GtkTextView" id="" -";preset_description">\n" +";PresetDescription">\n" " <property name="height_request">" ";60</property>\n" " <property name="visible">True&l" @@ -6767,7 +6744,7 @@ " </child>\n" " <child>\n" " <object class="GtkSpinButton&" -"quot; id="crop_left">\n" +"quot; id="PictureLeftCrop">\n" " <property name="visible&quo" "t;>True</property>\n" " <property name="can_focus&q" @@ -6819,7 +6796,7 @@ " </child>\n" " <child>\n" " <object class="GtkSpinButton&" -"quot; id="crop_top">\n" +"quot; id="PictureTopCrop">\n" " <property name="visible&quo" "t;>True</property>\n" " <property name="can_focus&q" @@ -6847,7 +6824,7 @@ " </child>\n" " <child>\n" " <object class="GtkSpinButton&" -"quot; id="crop_bottom">\n" +"quot; id="PictureBottomCrop">\n" " <property name="visible&quo" "t;>True</property>\n" " <property name="can_focus&q" @@ -6875,7 +6852,7 @@ " </child>\n" " <child>\n" " <object class="GtkSpinButton&" -"quot; id="crop_right">\n" +"quot; id="PictureRightCrop">\n" " <property name="visible&quo" "t;>True</property>\n" " <property name="can_focus&q" @@ -6935,7 +6912,7 @@ " </child>\n" " <child>\n" " <object class="GtkCheckButton" i" -"d="autocrop">\n" +"d="PictureAutoCrop">\n" " <property name="visible">Tr" "ue</property>\n" " <property name="can_focus">" @@ -7145,7 +7122,7 @@ "MASK | GDK_BUTTON_RELEASE_MASK</property>\n" " <child>\n" " <object class="GtkCheckButton&quo" -"t; id="round_dimensions">\n" +"t; id="ModDimensions">\n" " <property name="visible"&g" "t;True</property>\n" " <property name="can_focus"" @@ -7219,7 +7196,7 @@ " </child>\n" " <child>\n" " <object class="GtkCheckButton&quo" -"t; id="keep_aspect">\n" +"t; id="PictureKeepRatio">\n" " <property name="visible"&g" "t;True</property>\n" " <property name="can_focus"" @@ -10041,17 +10018,13 @@ " \n" " Initialization\n" " \n" +" anamorphic\n" +" \n" " audio_list\n" " \n" " \n" -" crop_bottom\n" -" 0\n" -" crop_left\n" -" 0\n" -" crop_right\n" -" 0\n" -" crop_top\n" -" 0\n" +" autoscale\n" +" \n" " end_chapter\n" " 100\n" " folder\n" @@ -10069,15 +10042,25 @@ " preset_type_normal\n" " \n" " scale_height\n" -" 480\n" +" 0\n" " scale_width\n" -" 720\n" +" 0\n" " start_chapter\n" " 1\n" " title\n" " none\n" +" tweak_PictureDecomb\n" +" \n" +" tweak_PictureDetelecine\n" +" \n" " volume_label\n" " New Video\n" +" vquality_type_bitrate\n" +" \n" +" vquality_type_constant\n" +" \n" +" vquality_type_target\n" +" \n" " x264_8x8dct\n" " \n" " x264_analyse\n" @@ -10127,8 +10110,6 @@ " \n" " hbfd_feature\n" " \n" -" linear_vquality\n" -" \n" " nocheckvquality\n" " \n" " noscale\n" @@ -10142,1388 +10123,1602 @@ " \n" " Presets\n" " \n" +" AudioList\n" +" \n" +" \n" +" AudioBitrate\n" +" 192\n" +" AudioEncoder\n" +" ac3\n" +" AudioMixdown\n" +" dpl2\n" +" AudioSamplerate\n" +" source\n" +" AudioTrack\n" +" 1\n" +" AudioTrackDRCSlider\n" +" 1\n" +" AudioTrackDescription\n" +" \n" +" \n" +" \n" +" ChapterMarkers\n" +" \n" " Default\n" " \n" -" anamorphic\n" -" \n" -" autocrop\n" -" \n" -" autoscale\n" +" FileFormat\n" +" mp4\n" +" Folder\n" " \n" -" chapter_markers\n" +" ModDimensions\n" " \n" -" constant_rate_factor\n" +" Mp4HttpOptimize\n" +" \n" +" Mp4LargeFile\n" +" \n" +" Mp4iPodCompatible\n" +" \n" +" PictureAutoCrop\n" " \n" -" container\n" -" mp4\n" -" deblock\n" +" PictureBottomCrop\n" " 0\n" -" decomb\n" +" PictureDeblock\n" +" 0\n" +" PictureDecomb\n" " \n" -" deinterlace\n" +" PictureDeinterlace\n" " none\n" -" denoise\n" +" PictureDenoise\n" " none\n" -" detelecine\n" +" PictureDetelecine\n" " \n" -" directqp\n" +" PictureHeight\n" +" 0\n" +" PictureKeepRatio\n" +" \n" +" PictureLeftCrop\n" +" 0\n" +" PicturePAR\n" +" 2\n" +" PictureRightCrop\n" +" 0\n" +" PictureTopCrop\n" +" 0\n" +" PictureWidth\n" +" 0\n" +" PresetDescription\n" +" \n" +" PresetName\n" +" Name Missing\n" +" SourceAudioLang\n" +" und\n" +" Subtitles\n" +" none\n" +" SubtitlesForced\n" +" \n" +" Type\n" +" 1\n" +" UsesMaxPictureSettings\n" " \n" -" forced_subtitles\n" +" UsesPictureFilters\n" " \n" -" framerate\n" +" UsesPictureSettings\n" +" 2\n" +" VideoAvgBitrate\n" +" 1800\n" +" VideoEncoder\n" +" x264\n" +" VideoFramerate\n" " source\n" -" grayscale\n" +" VideoGrayScale\n" " \n" -" http_optimize_mp4\n" +" VideoQualitySlider\n" +" 0.59999999999999998\n" +" VideoQualityType\n" +" 2\n" +" VideoTargetSize\n" +" 700\n" +" VideoTurboTwoPass\n" " \n" -" ipod_file\n" +" VideoTwoPass\n" " \n" -" keep_aspect\n" +" constant_rate_factor\n" " \n" -" large_mp4\n" +" directqp\n" " \n" -" max_height\n" -" 0\n" -" max_width\n" -" 0\n" -" pref_audio_list\n" -" \n" -" \n" -" audio_bitrate\n" -" 192\n" -" audio_codec\n" -" ac3\n" -" audio_drc\n" -" 1\n" -" audio_mix\n" -" dpl2\n" -" audio_rate\n" -" source\n" -" \n" -" \n" -" preset_description\n" +" x264Option\n" " \n" -" preset_name\n" -" \n" -" preset_type\n" -" 1\n" -" round_dimensions\n" +" \n" +" XlatPresets\n" +" \n" +" anamorphic\n" " \n" -" source_audio_lang\n" -" und\n" -" subtitle_lang\n" -" none\n" -" turbo\n" -" \n" -" tweak_decomb\n" -" \n" -" tweak_detelecine\n" -" \n" -" two_pass\n" +" autoscale\n" " \n" -" video_bitrate\n" -" 1800\n" -" video_codec\n" -" x264\n" -" video_quality\n" -" 64\n" -" video_target_size\n" -" 700\n" " vquality_type_bitrate\n" " \n" " vquality_type_constant\n" " \n" " vquality_type_target\n" " \n" -" x264_options\n" -" \n" " \n" " \n" " standard-presets\n" " \n" " \n" -" preset_folder\n" +" ChildrenArray\n" " \n" " \n" -" Default\n" -" \n" -" anamorphic\n" -" \n" -" autocrop\n" -" \n" -" chapter_markers\n" -" \n" -" container\n" -" mp4\n" -" deblock\n" -" 0\n" -" deinterlace\n" -" none\n" -" denoise\n" -" none\n" -" detelecine\n" -" \n" -" framerate\n" -" source\n" -" grayscale\n" -" \n" -" keep_aspect\n" -" \n" -" large_mp4\n" -" \n" -" max_height\n" -" 0\n" -" max_width\n" -" 720\n" -" pref_audio_list\n" +" AudioList\n" " \n" " \n" -" audio_bitrate\n" +" AudioBitrate\n" " 160\n" -" audio_codec\n" -" faac\n" -" audio_drc\n" -" 1\n" -" audio_mix\n" -" dpl2\n" -" audio_rate\n" +" AudioEncoder\n" +" AAC (faac)\n" +" AudioMixdown\n" +" Dolby Pro Logic II\n" +" AudioSamplerate\n" " 48\n" +" AudioTrack\n" +" 1\n" +" AudioTrackDRCSlider\n" +" 1\n" +" AudioTrackDescription\n" +" \n" " \n" " \n" -" audio_bitrate\n" +" AudioBitrate\n" " 160\n" -" audio_codec\n" -" ac3\n" -" audio_drc\n" +" AudioEncoder\n" +" AC3 Passthru\n" +" AudioMixdown\n" +" AC3 Passthru\n" +" AudioSamplerate\n" +" Auto\n" +" AudioTrack\n" +" 1\n" +" AudioTrackDRCSlider\n" " 1\n" -" audio_mix\n" -" none\n" -" audio_rate\n" -" source\n" +" AudioTrackDescription\n" +" \n" " \n" " \n" -" preset_description\n" +" ChapterMarkers\n" +" \n" +" Default\n" +" \n" +" FileFormat\n" +" MP4 file\n" +" Folder\n" +" \n" +" Mp4LargeFile\n" +" \n" +" PictureAutoCrop\n" +" \n" +" PictureBottomCrop\n" +" 0\n" +" PictureDeblock\n" +" 0\n" +" PictureDeinterlace\n" +" 0\n" +" PictureDenoise\n" +" 0\n" +" PictureDetelecine\n" +" \n" +" PictureHeight\n" +" 0\n" +" PictureKeepRatio\n" +" \n" +" PictureLeftCrop\n" +" 0\n" +" PicturePAR\n" +" 2\n" +" PictureRightCrop\n" +" 0\n" +" PictureTopCrop\n" +" 0\n" +" PictureWidth\n" +" 720\n" +" PresetDescription\n" " HandBrake's universally compatible, full resolution s" "ettings for all current Apple devices: iPod, iPhone, AppleTV, and Macs<" "/string>\n" -" preset_name\n" +" PresetName\n" " Universal\n" -" preset_type\n" +" Subtitles\n" +" None\n" +" Type\n" " 0\n" -" round_dimensions\n" +" UsesPictureFilters\n" " \n" -" subtitle_lang\n" -" none\n" -" two_pass\n" -" \n" -" video_bitrate\n" +" UsesPictureSettings\n" +" 1\n" +" VideoAvgBitrate\n" " 2500\n" -" video_codec\n" -" x264\n" -" video_quality\n" -" 59\n" -" video_target_size\n" -" 700\n" -" vquality_type_bitrate\n" +" VideoEncoder\n" +" H.264 (x264)\n" +" VideoFramerate\n" +" Same as source\n" +" VideoGrayScale\n" " \n" -" vquality_type_constant\n" -" \n" -" vquality_type_target\n" +" VideoQualitySlider\n" +" 0.5899999737739563\n" +" VideoQualityType\n" +" 2\n" +" VideoTargetSize\n" +" 700\n" +" VideoTwoPass\n" " \n" -" x264_options\n" +" x264Option\n" " level=30:cabac=0:ref=3:mixed-refs=1:analyse=all:me=umh:no-" "fast-pskip=1:subme=8\n" " \n" " \n" -" Default\n" -" \n" -" anamorphic\n" -" \n" -" autocrop\n" -" \n" -" chapter_markers\n" -" \n" -" container\n" -" mp4\n" -" deblock\n" -" 0\n" -" deinterlace\n" -" none\n" -" denoise\n" -" none\n" -" detelecine\n" -" \n" -" framerate\n" -" source\n" -" grayscale\n" -" \n" -" keep_aspect\n" -" \n" -" large_mp4\n" -" \n" -" max_height\n" -" 0\n" -" max_width\n" -" 960\n" -" pref_audio_list\n" +" AudioList\n" " \n" " \n" -" audio_bitrate\n" +" AudioBitrate\n" " 160\n" -" audio_codec\n" -" faac\n" -" audio_drc\n" -" 1\n" -" audio_mix\n" -" dpl2\n" -" audio_rate\n" +" AudioEncoder\n" +" AAC (faac)\n" +" AudioMixdown\n" +" Dolby Pro Logic II\n" +" AudioSamplerate\n" " 48\n" +" AudioTrack\n" +" 1\n" +" AudioTrackDRCSlider\n" +" 1\n" +" AudioTrackDescription\n" +" \n" " \n" " \n" -" audio_bitrate\n" +" AudioBitrate\n" " 160\n" -" audio_codec\n" -" ac3\n" -" audio_drc\n" +" AudioEncoder\n" +" AC3 Passthru\n" +" AudioMixdown\n" +" AC3 Passthru\n" +" AudioSamplerate\n" +" Auto\n" +" AudioTrack\n" +" 1\n" +" AudioTrackDRCSlider\n" " 1\n" -" audio_mix\n" -" none\n" -" audio_rate\n" -" source\n" +" AudioTrackDescription\n" +" \n" " \n" " \n" -" preset_description\n" +" ChapterMarkers\n" +" \n" +" Default\n" +" \n" +" FileFormat\n" +" MP4 file\n" +" Folder\n" +" \n" +" Mp4LargeFile\n" +" \n" +" PictureAutoCrop\n" +" \n" +" PictureBottomCrop\n" +" 0\n" +" PictureDeblock\n" +" 0\n" +" PictureDeinterlace\n" +" 0\n" +" PictureDenoise\n" +" 0\n" +" PictureDetelecine\n" +" \n" +" PictureHeight\n" +" 0\n" +" PictureKeepRatio\n" +" \n" +" PictureLeftCrop\n" +" 0\n" +" PicturePAR\n" +" 2\n" +" PictureRightCrop\n" +" 0\n" +" PictureTopCrop\n" +" 0\n" +" PictureWidth\n" +" 960\n" +" PresetDescription\n" " 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.\n" -" preset_name\n" +" PresetName\n" " AppleTV\n" -" preset_type\n" +" Subtitles\n" +" None\n" +" Type\n" " 0\n" -" round_dimensions\n" +" UsesPictureFilters\n" " \n" -" subtitle_lang\n" -" none\n" -" two_pass\n" -" \n" -" video_bitrate\n" +" UsesPictureSettings\n" +" 1\n" +" VideoAvgBitrate\n" " 2500\n" -" video_codec\n" -" x264\n" -" video_quality\n" -" 59\n" -" video_target_size\n" -" 700\n" -" vquality_type_bitrate\n" +" VideoEncoder\n" +" H.264 (x264)\n" +" VideoFramerate\n" +" Same as source\n" +" VideoGrayScale\n" " \n" -" vquality_type_constant\n" -" \n" -" vquality_type_target\n" +" VideoQualitySlider\n" +" 0.5899999737739563\n" +" VideoQualityType\n" +" 2\n" +" VideoTargetSize\n" +" 700\n" +" VideoTwoPass\n" " \n" -" x264_options\n" +" x264Option\n" " 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\n" " \n" " \n" -" preset_folder\n" +" ChildrenArray\n" " \n" " \n" +" AudioList\n" +" \n" +" \n" +" AudioBitrate\n" +" 160\n" +" AudioEncoder\n" +" AAC (faac)\n" +" AudioMixdown\n" +" Dolby Pro Logic II\n" +" AudioSamplerate\n" +" 48\n" +" AudioTrack\n" +" 1\n" +" AudioTrackDRCSlider\n" +" 1\n" +" AudioTrackDescription\n" +" \n" +" \n" +" \n" +" ChapterMarkers\n" +" \n" " Default\n" " \n" -" anamorphic\n" -" \n" -" autocrop\n" +" FileFormat\n" +" MP4 file\n" +" Mp4iPodCompatible\n" " \n" -" chapter_markers\n" +" PictureAutoCrop\n" " \n" -" container\n" -" mp4\n" -" deblock\n" +" PictureBottomCrop\n" " 0\n" -" deinterlace\n" -" none\n" -" denoise\n" -" none\n" -" detelecine\n" -" \n" -" framerate\n" -" source\n" -" grayscale\n" +" PictureDeblock\n" +" 0\n" +" PictureDeinterlace\n" +" 0\n" +" PictureDenoise\n" +" 0\n" +" PictureDetelecine\n" " \n" -" ipod_file\n" -" \n" -" keep_aspect\n" +" PictureHeight\n" +" 0\n" +" PictureKeepRatio\n" " \n" -" max_height\n" +" PictureLeftCrop\n" " 0\n" -" max_width\n" +" PicturePAR\n" +" 0\n" +" PictureRightCrop\n" +" 0\n" +" PictureTopCrop\n" +" 0\n" +" PictureWidth\n" " 320\n" -" pref_audio_list\n" -" \n" -" \n" -" audio_bitrate\n" -" 160\n" -" audio_codec\n" -" faac\n" -" audio_drc\n" -" 1\n" -" audio_mix\n" -" dpl2\n" -" audio_rate\n" -" 48\n" -" \n" -" \n" -" preset_description\n" +" PresetDescription\n" " HandBrake's low resolution settings for the iPod. O" "ptimized for great playback on the iPod screen, with smaller file size." "\n" -" preset_name\n" +" PresetName\n" " iPod Classic & iPod Nano\n" -" preset_type\n" +" Subtitles\n" +" None\n" +" Type\n" " 0\n" -" round_dimensions\n" -" \n" -" subtitle_lang\n" -" none\n" -" two_pass\n" +" UsesMaxPictureSettings\n" " \n" -" video_bitrate\n" -" 700\n" -" video_codec\n" -" x264\n" -" video_quality\n" -" 65\n" -" video_target_size\n" -" 700\n" -" vquality_type_bitrate\n" +" UsesPictureFilters\n" " \n" -" vquality_type_constant\n" +" UsesPictureSettings\n" +" 1\n" +" VideoAvgBitrate\n" +" 700\n" +" VideoEncoder\n" +" H.264 (x264)\n" +" VideoFramerate\n" +" Same as source\n" +" VideoGrayScale\n" " \n" -" vquality_type_target\n" +" VideoQualitySlider\n" +" 0.64709997177124023\n" +" VideoQualityType\n" +" 1\n" +" VideoTargetSize\n" +" 700\n" +" VideoTwoPass\n" " \n" -" x264_options\n" +" x264Option\n" " level=30:bframes=0:cabac=0:ref=1:vbv-maxrate=768:vbv-buf" "size=2000:analyse=all:me=umh:no-fast-pskip=1\n" " \n" " \n" +" AudioList\n" +" \n" +" \n" +" AudioBitrate\n" +" 128\n" +" AudioEncoder\n" +" AAC (faac)\n" +" AudioMixdown\n" +" Dolby Pro Logic II\n" +" AudioSamplerate\n" +" 48\n" +" AudioTrack\n" +" 1\n" +" AudioTrackDRCSlider\n" +" 1\n" +" AudioTrackDescription\n" +" \n" +" \n" +" \n" +" ChapterMarkers\n" +" \n" " Default\n" " \n" -" anamorphic\n" -" \n" -" autocrop\n" +" FileFormat\n" +" MP4 file\n" +" Mp4iPodCompatible\n" " \n" -" chapter_markers\n" +" PictureAutoCrop\n" " \n" -" container\n" -" mp4\n" -" deblock\n" +" PictureBottomCrop\n" " 0\n" -" deinterlace\n" -" none\n" -" denoise\n" -" none\n" -" detelecine\n" -" \n" -" framerate\n" -" source\n" -" grayscale\n" +" PictureDeblock\n" +" 0\n" +" PictureDeinterlace\n" +" 0\n" +" PictureDenoise\n" +" 0\n" +" PictureDetelecine\n" " \n" -" ipod_file\n" -" \n" -" keep_aspect\n" +" PictureHeight\n" +" 0\n" +" PictureKeepRatio\n" " \n" -" max_height\n" +" PictureLeftCrop\n" " 0\n" -" max_width\n" +" PicturePAR\n" +" 0\n" +" PictureRightCrop\n" +" 0\n" +" PictureTopCrop\n" +" 0\n" +" PictureWidth\n" " 480\n" -" pref_audio_list\n" -" \n" -" \n" -" audio_bitrate\n" -" 128\n" -" audio_codec\n" -" faac\n" -" audio_drc\n" -" 1\n" -" audio_mix\n" -" dpl2\n" -" audio_rate\n" -" 48\n" -" \n" -" \n" -" preset_description\n" +" PresetDescription\n" " HandBrake's settings for the iPhone and iPod Touch." "\n" -" preset_name\n" +" PresetName\n" " iPhone & iPod Touch\n" -" preset_type\n" +" Subtitles\n" +" None\n" +" Type\n" " 0\n" -" round_dimensions\n" -" \n" -" subtitle_lang\n" -" none\n" -" two_pass\n" +" UsesMaxPictureSettings\n" " \n" -" video_bitrate\n" -" 960\n" -" video_codec\n" -" x264\n" -" video_quality\n" -" 65\n" -" video_target_size\n" -" 700\n" -" vquality_type_bitrate\n" +" UsesPictureFilters\n" " \n" -" vquality_type_constant\n" +" UsesPictureSettings\n" +" 1\n" +" VideoAvgBitrate\n" +" 960\n" +" VideoEncoder\n" +" H.264 (x264)\n" +" VideoFramerate\n" +" Same as source\n" +" VideoGrayScale\n" " \n" -" vquality_type_target\n" +" VideoQualitySlider\n" +" 0.64709997177124023\n" +" VideoQualityType\n" +" 1\n" +" VideoTargetSize\n" +" 700\n" +" VideoTwoPass\n" " \n" -" x264_options\n" +" x264Option\n" " level=30:cabac=0:ref=1:analyse=all:me=umh:no-fast-pskip=" "1:trellis=1\n" " \n" " \n" +" AudioList\n" +" \n" +" \n" +" AudioBitrate\n" +" 160\n" +" AudioEncoder\n" +" AAC (faac)\n" +" AudioMixdown\n" +" Dolby Pro Logic II\n" +" AudioSamplerate\n" +" 48\n" +" AudioTrack\n" +" 1\n" +" AudioTrackDRCSlider\n" +" 1\n" +" AudioTrackDescription\n" +" \n" +" \n" +" \n" +" ChapterMarkers\n" +" \n" " Default\n" " \n" -" anamorphic\n" -" \n" -" autocrop\n" +" FileFormat\n" +" MP4 file\n" +" Mp4iPodCompatible\n" " \n" -" chapter_markers\n" +" PictureAutoCrop\n" " \n" -" container\n" -" mp4\n" -" deblock\n" +" PictureBottomCrop\n" " 0\n" -" deinterlace\n" -" none\n" -" denoise\n" -" none\n" -" detelecine\n" -" \n" -" framerate\n" -" source\n" -" grayscale\n" +" PictureDeblock\n" +" 0\n" +" PictureDeinterlace\n" +" 0\n" +" PictureDenoise\n" +" 0\n" +" PictureDetelecine\n" " \n" -" ipod_file\n" -" \n" -" keep_aspect\n" +" PictureHeight\n" +" 0\n" +" PictureKeepRatio\n" " \n" -" max_height\n" +" PictureLeftCrop\n" " 0\n" -" max_width\n" +" PicturePAR\n" +" 0\n" +" PictureRightCrop\n" +" 0\n" +" PictureTopCrop\n" +" 0\n" +" PictureWidth\n" " 640\n" -" pref_audio_list\n" -" \n" -" \n" -" audio_bitrate\n" -" 160\n" -" audio_codec\n" -" faac\n" -" audio_drc\n" -" 1\n" -" audio_mix\n" -" dpl2\n" -" audio_rate\n" -" 48\n" -" \n" -" \n" -" preset_description\n" +" PresetDescription\n" " 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\n" -" preset_name\n" +" PresetName\n" " iPod Legacy\n" -" preset_type\n" +" Subtitles\n" +" None\n" +" Type\n" " 0\n" -" round_dimensions\n" -" \n" -" subtitle_lang\n" -" none\n" -" two_pass\n" +" UsesMaxPictureSettings\n" " \n" -" video_bitrate\n" -" 1500\n" -" video_codec\n" -" x264\n" -" video_quality\n" -" 65\n" -" video_target_size\n" -" 700\n" -" vquality_type_bitrate\n" +" UsesPictureFilters\n" " \n" -" vquality_type_constant\n" +" UsesPictureSettings\n" +" 1\n" +" VideoAvgBitrate\n" +" 1500\n" +" VideoEncoder\n" +" H.264 (x264)\n" +" VideoFramerate\n" +" Same as source\n" +" VideoGrayScale\n" " \n" -" vquality_type_target\n" +" VideoQualitySlider\n" +" 0.64709997177124023\n" +" VideoQualityType\n" +" 1\n" +" VideoTargetSize\n" +" 700\n" +" VideoTwoPass\n" " \n" -" x264_options\n" +" x264Option\n" " level=30:bframes=0:cabac=0:ref=1:vbv-maxrate=1500:vbv-bu" "fsize=2000:analyse=all:me=umh:no-fast-pskip=1\n" " \n" " \n" -" preset_name\n" +" Folder\n" +" \n" +" PresetName\n" " iPod & iPhone\n" -" preset_type\n" -" 2\n" +" Type\n" +" 0\n" " \n" " \n" +" AudioList\n" +" \n" +" \n" +" AudioBitrate\n" +" 160\n" +" AudioEncoder\n" +" AAC (faac)\n" +" AudioMixdown\n" +" Dolby Pro Logic II\n" +" AudioSamplerate\n" +" Auto\n" +" AudioTrack\n" +" 1\n" +" AudioTrackDRCSlider\n" +" 1\n" +" AudioTrackDescription\n" +" \n" +" \n" +" \n" +" ChapterMarkers\n" +" \n" " Default\n" " \n" -" anamorphic\n" -" \n" -" autocrop\n" +" FileFormat\n" +" MP4 file\n" +" PictureAutoCrop\n" " \n" -" autoscale\n" -" \n" -" chapter_markers\n" -" \n" -" container\n" -" mp4\n" -" deblock\n" +" PictureBottomCrop\n" " 0\n" -" deinterlace\n" -" none\n" -" denoise\n" -" none\n" -" detelecine\n" -" \n" -" framerate\n" -" source\n" -" grayscale\n" +" PictureDeblock\n" +" 0\n" +" PictureDeinterlace\n" +" 0\n" +" PictureDenoise\n" +" 0\n" +" PictureDetelecine\n" " \n" -" keep_aspect\n" +" PictureHeight\n" +" 0\n" +" PictureKeepRatio\n" " \n" -" max_height\n" +" PictureLeftCrop\n" " 0\n" -" max_width\n" +" PicturePAR\n" +" 1\n" +" PictureRightCrop\n" " 0\n" -" pref_audio_list\n" -" \n" -" \n" -" audio_bitrate\n" -" 160\n" -" audio_codec\n" -" faac\n" -" audio_drc\n" -" 1\n" -" audio_mix\n" -" dpl2\n" -" audio_rate\n" -" source\n" -" \n" -" \n" -" preset_description\n" +" PictureTopCrop\n" +" 0\n" +" PictureWidth\n" +" 0\n" +" PresetDescription\n" " 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.\n" -" preset_name\n" +" PresetName\n" " QuickTime\n" -" preset_type\n" +" Subtitles\n" +" None\n" +" Type\n" " 0\n" -" round_dimensions\n" -" \n" -" subtitle_lang\n" -" none\n" -" turbo\n" +" UsesMaxPictureSettings\n" " \n" -" two_pass\n" +" UsesPictureFilters\n" " \n" -" video_bitrate\n" +" UsesPictureSettings\n" +" 1\n" +" VideoAvgBitrate\n" " 1800\n" -" video_codec\n" -" x264\n" -" video_quality\n" -" 65\n" -" video_target_size\n" +" VideoEncoder\n" +" H.264 (x264)\n" +" VideoFramerate\n" +" Same as source\n" +" VideoGrayScale\n" +" \n" +" VideoQualitySlider\n" +" 0.64709997177124023\n" +" VideoQualityType\n" +" 1\n" +" VideoTargetSize\n" " 700\n" -" vquality_type_bitrate\n" +" VideoTurboTwoPass\n" " \n" -" vquality_type_constant\n" -" \n" -" vquality_type_target\n" -" \n" -" x264_options\n" +" VideoTwoPass\n" +" \n" +" x264Option\n" " 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\n" " \n" " \n" -" preset_name\n" +" Folder\n" +" \n" +" PresetName\n" " Apple\n" -" preset_type\n" -" 2\n" +" Type\n" +" 0\n" " \n" " \n" -" preset_folder\n" +" ChildrenArray\n" " \n" " \n" -" Default\n" -" \n" -" anamorphic\n" -" \n" -" autocrop\n" +" AudioList\n" +" \n" +" \n" +" AudioBitrate\n" +" 160\n" +" AudioEncoder\n" +" AAC (faac)\n" +" AudioMixdown\n" +" Dolby Pro Logic II\n" +" AudioSamplerate\n" +" Auto\n" +" AudioTrack\n" +" 1\n" +" AudioTrackDRCSlider\n" +" 1\n" +" AudioTrackDescription\n" +" \n" +" \n" +" \n" +" ChapterMarkers\n" " \n" -" autoscale\n" +" Default\n" " \n" -" chapter_markers\n" +" FileFormat\n" +" MP4 file\n" +" PictureAutoCrop\n" " \n" -" container\n" -" mp4\n" -" deblock\n" +" PictureBottomCrop\n" " 0\n" -" deinterlace\n" -" none\n" -" denoise\n" -" none\n" -" detelecine\n" -" \n" -" framerate\n" -" source\n" -" grayscale\n" +" PictureDeblock\n" +" 0\n" +" PictureDeinterlace\n" +" 0\n" +" PictureDenoise\n" +" 0\n" +" PictureDetelecine\n" " \n" -" keep_aspect\n" +" PictureHeight\n" +" 0\n" +" PictureKeepRatio\n" " \n" -" max_height\n" +" PictureLeftCrop\n" " 0\n" -" max_width\n" +" PicturePAR\n" +" 1\n" +" PictureRightCrop\n" " 0\n" -" pref_audio_list\n" -" \n" -" \n" -" audio_bitrate\n" -" 160\n" -" audio_codec\n" -" faac\n" -" audio_drc\n" -" 1\n" -" audio_mix\n" -" dpl2\n" -" audio_rate\n" -" source\n" -" \n" -" \n" -" preset_description\n" +" PictureTopCrop\n" +" 0\n" +" PictureWidth\n" +" 0\n" +" PresetDescription\n" " HandBrake's normal, default settings.\n" -" preset_name\n" +" PresetName\n" " Normal\n" -" preset_type\n" +" Subtitles\n" +" None\n" +" Type\n" " 0\n" -" round_dimensions\n" -" \n" -" subtitle_lang\n" -" none\n" -" turbo\n" +" UsesMaxPictureSettings\n" " \n" -" two_pass\n" +" UsesPictureFilters\n" " \n" -" video_bitrate\n" +" UsesPictureSettings\n" +" 1\n" +" VideoAvgBitrate\n" " 1500\n" -" video_codec\n" -" x264\n" -" video_quality\n" -" 65\n" -" video_target_size\n" +" VideoEncoder\n" +" H.264 (x264)\n" +" VideoFramerate\n" +" Same as source\n" +" VideoGrayScale\n" +" \n" +" VideoQualitySlider\n" +" 0.64709997177124023\n" +" VideoQualityType\n" +" 1\n" +" VideoTargetSize\n" " 700\n" -" vquality_type_bitrate\n" +" VideoTurboTwoPass\n" " \n" -" vquality_type_constant\n" -" \n" -" vquality_type_target\n" -" \n" -" x264_options\n" +" VideoTwoPass\n" +" \n" +" x264Option\n" " ref=2:bframes=2:me=umh\n" " \n" " \n" -" Default\n" +" AudioList\n" +" \n" +" \n" +" AudioBitrate\n" +" 160\n" +" AudioEncoder\n" +" AAC (faac)\n" +" AudioMixdown\n" +" Dolby Pro Logic II\n" +" AudioSamplerate\n" +" Auto\n" +" AudioTrack\n" +" 1\n" +" AudioTrackDRCSlider\n" +" 1\n" +" AudioTrackDescription\n" +" \n" +" \n" +" \n" +" ChapterMarkers\n" " \n" -" anamorphic\n" +" Default\n" " \n" -" autocrop\n" +" FileFormat\n" +" MP4 file\n" +" PictureAutoCrop\n" " \n" -" autoscale\n" -" \n" -" chapter_markers\n" -" \n" -" container\n" -" mp4\n" -" deblock\n" +" PictureBottomCrop\n" " 0\n" -" deinterlace\n" -" none\n" -" denoise\n" -" none\n" -" detelecine\n" -" \n" -" framerate\n" -" source\n" -" grayscale\n" +" PictureDeblock\n" +" 0\n" +" PictureDeinterlace\n" +" 0\n" +" PictureDenoise\n" +" 0\n" +" PictureDetelecine\n" " \n" -" keep_aspect\n" +" PictureHeight\n" +" 0\n" +" PictureKeepRatio\n" " \n" -" max_height\n" +" PictureLeftCrop\n" " 0\n" -" max_width\n" +" PicturePAR\n" " 0\n" -" pref_audio_list\n" -" \n" -" \n" -" audio_bitrate\n" -" 160\n" -" audio_codec\n" -" faac\n" -" audio_drc\n" -" 1\n" -" audio_mix\n" -" dpl2\n" -" audio_rate\n" -" source\n" -" \n" -" \n" -" preset_description\n" +" PictureRightCrop\n" +" 0\n" +" PictureTopCrop\n" +" 0\n" +" PictureWidth\n" +" 0\n" +" PresetDescription\n" " HandBrake's traditional, faster, lower-quality settin" "gs.\n" -" preset_name\n" +" PresetName\n" " Classic\n" -" preset_type\n" +" Subtitles\n" +" None\n" +" Type\n" " 0\n" -" round_dimensions\n" +" UsesMaxPictureSettings\n" " \n" -" subtitle_lang\n" -" none\n" -" two_pass\n" -" \n" -" video_bitrate\n" -" 1000\n" -" video_codec\n" -" ffmpeg\n" -" video_quality\n" -" 65\n" -" video_target_size\n" -" 700\n" -" vquality_type_bitrate\n" +" UsesPictureFilters\n" " \n" -" vquality_type_constant\n" +" UsesPictureSettings\n" +" 1\n" +" VideoAvgBitrate\n" +" 1000\n" +" VideoEncoder\n" +" MPEG-4 (FFmpeg)\n" +" VideoFramerate\n" +" Same as source\n" +" VideoGrayScale\n" " \n" -" vquality_type_target\n" +" VideoQualitySlider\n" +" 0.64709997177124023\n" +" VideoQualityType\n" +" 1\n" +" VideoTargetSize\n" +" 700\n" +" VideoTwoPass\n" " \n" -" x264_options\n" +" x264Option\n" " \n" " \n" " \n" -" preset_name\n" +" Folder\n" +" \n" +" PresetName\n" " Basic\n" -" preset_type\n" -" 2\n" +" Type\n" +" 0\n" " \n" " \n" -" preset_folder\n" +" ChildrenArray\n" " \n" " \n" +" AudioList\n" +" \n" +" \n" +" AudioBitrate\n" +" 160\n" +" AudioEncoder\n" +" AAC (faac)\n" +" AudioMixdown\n" +" Dolby Pro Logic II\n" +" AudioSamplerate\n" +" Auto\n" +" AudioTrack\n" +" 1\n" +" AudioTrackDRCSlider\n" +" 1\n" +" AudioTrackDescription\n" +" \n" +" \n" +" \n" +" ChapterMarkers\n" +" \n" " Default\n" " \n" -" anamorphic\n" -" \n" -" autocrop\n" -" \n" -" autoscale\n" +" FileFormat\n" +" MKV file\n" +" PictureAutoCrop\n" " \n" -" chapter_markers\n" -" \n" -" container\n" -" mkv\n" -" deblock\n" +" PictureBottomCrop\n" +" 0\n" +" PictureDeblock\n" " 0\n" -" decomb\n" +" PictureDecomb\n" " \n" -" deinterlace\n" -" none\n" -" denoise\n" -" none\n" -" detelecine\n" +" PictureDeinterlace\n" +" 0\n" +" PictureDenoise\n" +" 0\n" +" PictureDetelecine\n" " \n" -" framerate\n" -" source\n" -" grayscale\n" -" \n" -" keep_aspect\n" +" PictureHeight\n" +" 0\n" +" PictureKeepRatio\n" " \n" -" max_height\n" +" PictureLeftCrop\n" " 0\n" -" max_width\n" +" PicturePAR\n" +" 1\n" +" PictureRightCrop\n" " 0\n" -" pref_audio_list\n" -" \n" -" \n" -" audio_bitrate\n" -" 160\n" -" audio_codec\n" -" faac\n" -" audio_drc\n" -" 1\n" -" audio_mix\n" -" dpl2\n" -" audio_rate\n" -" source\n" -" \n" -" \n" -" preset_description\n" +" PictureTopCrop\n" +" 0\n" +" PictureWidth\n" +" 0\n" +" PresetDescription\n" " HandBrake's settings for cartoons, anime, and CGI.\n" -" preset_name\n" +" PresetName\n" " Animation\n" -" preset_type\n" +" Subtitles\n" +" None\n" +" Type\n" " 0\n" -" round_dimensions\n" -" \n" -" subtitle_lang\n" -" none\n" -" turbo\n" +" UsesMaxPictureSettings\n" " \n" -" two_pass\n" +" UsesPictureFilters\n" " \n" -" video_bitrate\n" +" UsesPictureSettings\n" +" 1\n" +" VideoAvgBitrate\n" " 1000\n" -" video_codec\n" -" x264\n" -" video_quality\n" -" 65\n" -" video_target_size\n" +" VideoEncoder\n" +" H.264 (x264)\n" +" VideoFramerate\n" +" Same as source\n" +" VideoGrayScale\n" +" \n" +" VideoQualitySlider\n" +" 0.64709997177124023\n" +" VideoQualityType\n" +" 1\n" +" VideoTargetSize\n" " 700\n" -" vquality_type_bitrate\n" +" VideoTurboTwoPass\n" " \n" -" vquality_type_constant\n" -" \n" -" vquality_type_target\n" -" \n" -" x264_options\n" +" VideoTwoPass\n" +" \n" +" x264Option\n" " 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\n" " \n" " \n" +" AudioList\n" +" \n" +" \n" +" AudioBitrate\n" +" 160\n" +" AudioEncoder\n" +" AC3 Passthru\n" +" AudioMixdown\n" +" AC3 Passthru\n" +" AudioSamplerate\n" +" Auto\n" +" AudioTrack\n" +" 1\n" +" AudioTrackDRCSlider\n" +" 1\n" +" AudioTrackDescription\n" +" \n" +" \n" +" \n" +" ChapterMarkers\n" +" \n" " Default\n" " \n" -" anamorphic\n" -" \n" -" autocrop\n" -" \n" -" autoscale\n" +" FileFormat\n" +" MKV file\n" +" PictureAutoCrop\n" " \n" -" chapter_markers\n" -" \n" -" container\n" -" mkv\n" -" deblock\n" +" PictureBottomCrop\n" " 0\n" -" deinterlace\n" -" none\n" -" denoise\n" -" none\n" -" detelecine\n" -" \n" -" framerate\n" -" source\n" -" grayscale\n" +" PictureDeblock\n" +" 0\n" +" PictureDeinterlace\n" +" 0\n" +" PictureDenoise\n" +" 0\n" +" PictureDetelecine\n" " \n" -" keep_aspect\n" +" PictureHeight\n" +" 0\n" +" PictureKeepRatio\n" " \n" -" max_height\n" +" PictureLeftCrop\n" " 0\n" -" max_width\n" +" PicturePAR\n" +" 1\n" +" PictureRightCrop\n" " 0\n" -" pref_audio_list\n" -" \n" -" \n" -" audio_bitrate\n" -" 160\n" -" audio_codec\n" -" ac3\n" -" audio_drc\n" -" 1\n" -" audio_mix\n" -" none\n" -" audio_rate\n" -" source\n" -" \n" -" \n" -" preset_description\n" +" PictureTopCrop\n" +" 0\n" +" PictureWidth\n" +" 0\n" +" PresetDescription\n" " HandBrake's preset for consistently excellent quality" " in one pass, with the downside of entirely unpredictable file sizes an" "d bitrates.\n" -" preset_name\n" +" PresetName\n" " Constant Quality Rate\n" -" preset_type\n" +" Subtitles\n" +" None\n" +" Type\n" " 0\n" -" round_dimensions\n" -" \n" -" subtitle_lang\n" -" none\n" -" turbo\n" -" \n" -" two_pass\n" -" \n" -" video_bitrate\n" +" UsesMaxPictureSettings\n" +" \n" +" UsesPictureFilters\n" +" \n" +" UsesPictureSettings\n" +" 1\n" +" VideoAvgBitrate\n" " 2000\n" -" video_codec\n" -" x264\n" -" video_quality\n" -" 60\n" -" video_target_size\n" +" VideoEncoder\n" +" H.264 (x264)\n" +" VideoFramerate\n" +" Same as source\n" +" VideoGrayScale\n" +" \n" +" VideoQualitySlider\n" +" 0.60000002384185791\n" +" VideoQualityType\n" +" 2\n" +" VideoTargetSize\n" " 700\n" -" vquality_type_bitrate\n" +" VideoTurboTwoPass\n" " \n" -" vquality_type_constant\n" -" \n" -" vquality_type_target\n" +" VideoTwoPass\n" " \n" -" x264_options\n" +" x264Option\n" " 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\n" " \n" " \n" +" AudioList\n" +" \n" +" \n" +" AudioBitrate\n" +" 160\n" +" AudioEncoder\n" +" AC3 Passthru\n" +" AudioMixdown\n" +" AC3 Passthru\n" +" AudioSamplerate\n" +" Auto\n" +" AudioTrack\n" +" 1\n" +" AudioTrackDRCSlider\n" +" 1\n" +" AudioTrackDescription\n" +" \n" +" \n" +" \n" +" ChapterMarkers\n" +" \n" " Default\n" " \n" -" anamorphic\n" -" \n" -" autocrop\n" -" \n" -" autoscale\n" +" FileFormat\n" +" MKV file\n" +" PictureAutoCrop\n" " \n" -" chapter_markers\n" -" \n" -" container\n" -" mkv\n" -" deblock\n" +" PictureBottomCrop\n" " 0\n" -" deinterlace\n" -" none\n" -" denoise\n" -" none\n" -" detelecine\n" -" \n" -" framerate\n" -" source\n" -" grayscale\n" +" PictureDeblock\n" +" 0\n" +" PictureDeinterlace\n" +" 0\n" +" PictureDenoise\n" +" 0\n" +" PictureDetelecine\n" " \n" -" keep_aspect\n" +" PictureHeight\n" +" 0\n" +" PictureKeepRatio\n" " \n" -" max_height\n" +" PictureLeftCrop\n" " 0\n" -" max_width\n" +" PicturePAR\n" +" 1\n" +" PictureRightCrop\n" " 0\n" -" pref_audio_list\n" -" \n" -" \n" -" audio_bitrate\n" -" 160\n" -" audio_codec\n" -" ac3\n" -" audio_drc\n" -" 1\n" -" audio_mix\n" -" none\n" -" audio_rate\n" -" source\n" -" \n" -" \n" -" preset_description\n" +" PictureTopCrop\n" +" 0\n" +" PictureWidth\n" +" 0\n" +" PresetDescription\n" " HandBrake's preset for feature films.\n" -" preset_name\n" +" PresetName\n" " Film\n" -" preset_type\n" +" Subtitles\n" +" None\n" +" Type\n" " 0\n" -" round_dimensions\n" -" \n" -" subtitle_lang\n" -" none\n" -" turbo\n" +" UsesMaxPictureSettings\n" " \n" -" two_pass\n" +" UsesPictureFilters\n" " \n" -" video_bitrate\n" +" UsesPictureSettings\n" +" 1\n" +" VideoAvgBitrate\n" " 1800\n" -" video_codec\n" -" x264\n" -" video_quality\n" -" 65\n" -" video_target_size\n" +" VideoEncoder\n" +" H.264 (x264)\n" +" VideoFramerate\n" +" Same as source\n" +" VideoGrayScale\n" +" \n" +" VideoQualitySlider\n" +" 0.64709997177124023\n" +" VideoQualityType\n" +" 1\n" +" VideoTargetSize\n" " 700\n" -" vquality_type_bitrate\n" +" VideoTurboTwoPass\n" " \n" -" vquality_type_constant\n" -" \n" -" vquality_type_target\n" -" \n" -" x264_options\n" +" VideoTwoPass\n" +" \n" +" x264Option\n" " 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\n" " \n" " \n" +" AudioList\n" +" \n" +" \n" +" AudioBitrate\n" +" 160\n" +" AudioEncoder\n" +" AAC (faac)\n" +" AudioMixdown\n" +" Dolby Pro Logic II\n" +" AudioSamplerate\n" +" Auto\n" +" AudioTrack\n" +" 1\n" +" AudioTrackDRCSlider\n" +" 1\n" +" AudioTrackDescription\n" +" \n" +" \n" +" \n" +" ChapterMarkers\n" +" \n" " Default\n" " \n" -" anamorphic\n" -" \n" -" autocrop\n" +" FileFormat\n" +" MKV file\n" +" PictureAutoCrop\n" " \n" -" autoscale\n" -" \n" -" chapter_markers\n" -" \n" -" container\n" -" mkv\n" -" deblock\n" +" PictureBottomCrop\n" " 0\n" -" decomb\n" +" PictureDeblock\n" +" 0\n" +" PictureDecomb\n" " \n" -" deinterlace\n" -" none\n" -" denoise\n" -" none\n" -" detelecine\n" +" PictureDeinterlace\n" +" 0\n" +" PictureDenoise\n" +" 0\n" +" PictureDetelecine\n" " \n" -" framerate\n" -" source\n" -" grayscale\n" -" \n" -" keep_aspect\n" +" PictureHeight\n" +" 0\n" +" PictureKeepRatio\n" " \n" -" max_height\n" +" PictureLeftCrop\n" " 0\n" -" max_width\n" +" PicturePAR\n" +" 1\n" +" PictureRightCrop\n" " 0\n" -" pref_audio_list\n" -" \n" -" \n" -" audio_bitrate\n" -" 160\n" -" audio_codec\n" -" faac\n" -" audio_drc\n" -" 1\n" -" audio_mix\n" -" dpl2\n" -" audio_rate\n" -" source\n" -" \n" -" \n" -" preset_description\n" +" PictureTopCrop\n" +" 0\n" +" PictureWidth\n" +" 0\n" +" PresetDescription\n" " HandBrake's settings for video from television.\n" -" preset_name\n" +" PresetName\n" " Television\n" -" preset_type\n" +" Subtitles\n" +" None\n" +" Type\n" " 0\n" -" round_dimensions\n" -" \n" -" subtitle_lang\n" -" none\n" -" turbo\n" +" UsesMaxPictureSettings\n" " \n" -" two_pass\n" +" UsesPictureFilters\n" " \n" -" video_bitrate\n" +" UsesPictureSettings\n" +" 1\n" +" VideoAvgBitrate\n" " 1300\n" -" video_codec\n" -" x264\n" -" video_quality\n" -" 65\n" -" video_target_size\n" +" VideoEncoder\n" +" H.264 (x264)\n" +" VideoFramerate\n" +" Same as source\n" +" VideoGrayScale\n" +" \n" +" VideoQualitySlider\n" +" 0.64709997177124023\n" +" VideoQualityType\n" +" 1\n" +" VideoTargetSize\n" " 700\n" -" vquality_type_bitrate\n" +" VideoTurboTwoPass\n" " \n" -" vquality_type_constant\n" -" \n" -" vquality_type_target\n" -" \n" -" x264_options\n" +" VideoTwoPass\n" +" \n" +" x264Option\n" " 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\n" " \n" " \n" -" preset_name\n" +" Folder\n" +" \n" +" PresetName\n" " High Profile\n" -" preset_type\n" -" 2\n" +" Type\n" +" 0\n" " \n" " \n" -" preset_folder\n" +" ChildrenArray\n" " \n" " \n" +" AudioList\n" +" \n" +" \n" +" AudioBitrate\n" +" 128\n" +" AudioEncoder\n" +" AAC (faac)\n" +" AudioMixdown\n" +" Dolby Pro Logic II\n" +" AudioSamplerate\n" +" 48\n" +" AudioTrack\n" +" 1\n" +" AudioTrackDRCSlider\n" +" 1\n" +" AudioTrackDescription\n" +" \n" +" \n" +" \n" +" ChapterMarkers\n" +" \n" " Default\n" " \n" -" anamorphic\n" -" \n" -" autocrop\n" +" FileFormat\n" +" MP4 file\n" +" PictureAutoCrop\n" " \n" -" chapter_markers\n" -" \n" -" container\n" -" mp4\n" -" deblock\n" +" PictureBottomCrop\n" " 0\n" -" deinterlace\n" -" none\n" -" denoise\n" -" none\n" -" detelecine\n" -" \n" -" framerate\n" -" source\n" -" grayscale\n" +" PictureDeblock\n" +" 0\n" +" PictureDeinterlace\n" +" 0\n" +" PictureDenoise\n" +" 0\n" +" PictureDetelecine\n" " \n" -" keep_aspect\n" -" \n" -" max_height\n" +" PictureHeight\n" " 208\n" -" max_width\n" +" PictureKeepRatio\n" +" \n" +" PictureLeftCrop\n" +" 0\n" +" PicturePAR\n" +" 0\n" +" PictureRightCrop\n" +" 0\n" +" PictureTopCrop\n" +" 0\n" +" PictureWidth\n" " 368\n" -" pref_audio_list\n" -" \n" -" \n" -" audio_bitrate\n" -" 128\n" -" audio_codec\n" -" faac\n" -" audio_drc\n" -" 1\n" -" audio_mix\n" -" dpl2\n" -" audio_rate\n" -" 48\n" -" \n" -" \n" -" preset_description\n" +" PresetDescription\n" " HandBrake's settings for the Sony PlayStation Portabl" "e.\n" -" preset_name\n" +" PresetName\n" " PSP\n" -" preset_type\n" +" Subtitles\n" +" None\n" +" Type\n" " 0\n" -" round_dimensions\n" -" \n" -" subtitle_lang\n" -" none\n" -" two_pass\n" +" UsesMaxPictureSettings\n" " \n" -" video_bitrate\n" -" 1024\n" -" video_codec\n" -" ffmpeg\n" -" video_quality\n" -" 65\n" -" video_target_size\n" -" 700\n" -" vquality_type_bitrate\n" +" UsesPictureFilters\n" " \n" -" vquality_type_constant\n" +" UsesPictureSettings\n" +" 1\n" +" VideoAvgBitrate\n" +" 1024\n" +" VideoEncoder\n" +" MPEG-4 (FFmpeg)\n" +" VideoFramerate\n" +" Same as source\n" +" VideoGrayScale\n" " \n" -" vquality_type_target\n" +" VideoQualitySlider\n" +" 0.64709997177124023\n" +" VideoQualityType\n" +" 1\n" +" VideoTargetSize\n" +" 700\n" +" VideoTwoPass\n" " \n" -" x264_options\n" +" x264Option\n" " \n" " \n" " \n" -" Default\n" +" AudioList\n" +" \n" +" \n" +" AudioBitrate\n" +" 160\n" +" AudioEncoder\n" +" AAC (faac)\n" +" AudioMixdown\n" +" Dolby Pro Logic II\n" +" AudioSamplerate\n" +" 48\n" +" AudioTrack\n" +" 1\n" +" AudioTrackDRCSlider\n" +" 1\n" +" AudioTrackDescription\n" +" \n" +" \n" +" \n" +" ChapterMarkers\n" " \n" -" anamorphic\n" -" \n" -" autocrop\n" +" Default\n" " \n" -" autoscale\n" -" \n" -" chapter_markers\n" +" FileFormat\n" +" MP4 file\n" +" PictureAutoCrop\n" " \n" -" container\n" -" mp4\n" -" deblock\n" +" PictureBottomCrop\n" " 0\n" -" deinterlace\n" -" none\n" -" denoise\n" -" none\n" -" detelecine\n" -" \n" -" framerate\n" -" source\n" -" grayscale\n" +" PictureDeblock\n" +" 0\n" +" PictureDeinterlace\n" +" 0\n" +" PictureDenoise\n" +" 0\n" +" PictureDetelecine\n" " \n" -" keep_aspect\n" +" PictureHeight\n" +" 0\n" +" PictureKeepRatio\n" " \n" -" max_height\n" +" PictureLeftCrop\n" " 0\n" -" max_width\n" +" PicturePAR\n" +" 1\n" +" PictureRightCrop\n" " 0\n" -" pref_audio_list\n" -" \n" -" \n" -" audio_bitrate\n" -" 160\n" -" audio_codec\n" -" faac\n" -" audio_drc\n" -" 1\n" -" audio_mix\n" -" dpl2\n" -" audio_rate\n" -" 48\n" -" \n" -" \n" -" preset_description\n" +" PictureTopCrop\n" +" 0\n" +" PictureWidth\n" +" 0\n" +" PresetDescription\n" " HandBrake's settings for the Sony PlayStation 3.\n" -" preset_name\n" +" PresetName\n" " PS3\n" -" preset_type\n" +" Subtitles\n" +" None\n" +" Type\n" " 0\n" -" round_dimensions\n" -" \n" -" subtitle_lang\n" -" none\n" -" two_pass\n" -" \n" -" video_bitrate\n" -" 2500\n" -" video_codec\n" -" x264\n" -" video_quality\n" -" 65\n" -" video_target_size\n" -" 700\n" -" vquality_type_bitrate\n" +" UsesMaxPictureSettings\n" " \n" -" vquality_type_constant\n" +" UsesPictureFilters\n" +" \n" +" UsesPictureSettings\n" +" 1\n" +" VideoAvgBitrate\n" +" 2500\n" +" VideoEncoder\n" +" H.264 (x264)\n" +" VideoFramerate\n" +" Same as source\n" +" VideoGrayScale\n" " \n" -" vquality_type_target\n" +" VideoQualitySlider\n" +" 0.64709997177124023\n" +" VideoQualityType\n" +" 1\n" +" VideoTargetSize\n" +" 700\n" +" VideoTwoPass\n" " \n" -" x264_options\n" +" x264Option\n" " level=41:me=umh\n" " \n" " \n" -" Default\n" +" AudioList\n" +" \n" +" \n" +" AudioBitrate\n" +" 160\n" +" AudioEncoder\n" +" AAC (faac)\n" +" AudioMixdown\n" +" Dolby Pro Logic II\n" +" AudioSamplerate\n" +" 48\n" +" AudioTrack\n" +" 1\n" +" AudioTrackDRCSlider\n" +" 1\n" +" AudioTrackDescription\n" +" \n" +" \n" +" \n" +" ChapterMarkers\n" " \n" -" anamorphic\n" -" \n" -" autoscale\n" -" \n" -" chapter_markers\n" +" Default\n" " \n" -" container\n" -" mp4\n" -" deblock\n" +" FileFormat\n" +" MP4 file\n" +" PictureBottomCrop\n" " 0\n" -" deinterlace\n" -" none\n" -" denoise\n" -" none\n" -" detelecine\n" -" \n" -" framerate\n" -" source\n" -" grayscale\n" +" PictureDeblock\n" +" 0\n" +" PictureDeinterlace\n" +" 0\n" +" PictureDenoise\n" +" 0\n" +" PictureDetelecine\n" " \n" -" keep_aspect\n" +" PictureHeight\n" +" 0\n" +" PictureKeepRatio\n" " \n" -" max_height\n" +" PictureLeftCrop\n" " 0\n" -" max_width\n" +" PicturePAR\n" +" 1\n" +" PictureRightCrop\n" " 0\n" -" pref_audio_list\n" -" \n" -" \n" -" audio_bitrate\n" -" 160\n" -" audio_codec\n" -" faac\n" -" audio_drc\n" -" 1\n" -" audio_mix\n" -" dpl2\n" -" audio_rate\n" -" 48\n" -" \n" -" \n" -" preset_description\n" +" PictureTopCrop\n" +" 0\n" +" PictureWidth\n" +" 0\n" +" PresetDescription\n" " HandBrake's settings for the Microsoft Xbox 360.\n" -" preset_name\n" +" PresetName\n" " Xbox 360\n" -" preset_type\n" +" Subtitles\n" +" None\n" +" Type\n" " 0\n" -" round_dimensions\n" -" \n" -" subtitle_lang\n" -" none\n" -" two_pass\n" -" \n" -" video_bitrate\n" -" 2000\n" -" video_codec\n" -" x264\n" -" video_quality\n" -" 65\n" -" video_target_size\n" -" 700\n" -" vquality_type_bitrate\n" +" UsesMaxPictureSettings\n" +" \n" +" UsesPictureFilters\n" " \n" -" vquality_type_constant\n" +" UsesPictureSettings\n" +" 1\n" +" VideoAvgBitrate\n" +" 2000\n" +" VideoEncoder\n" +" H.264 (x264)\n" +" VideoFramerate\n" +" Same as source\n" +" VideoGrayScale\n" " \n" -" vquality_type_target\n" +" VideoQualitySlider\n" +" 0.64709997177124023\n" +" VideoQualityType\n" +" 1\n" +" VideoTargetSize\n" +" 700\n" +" VideoTwoPass\n" " \n" -" x264_options\n" +" x264Option\n" " 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\n" " \n" " \n" -" preset_name\n" +" Folder\n" +" \n" +" PresetName\n" " Gaming Consoles\n" -" preset_type\n" -" 2\n" +" Type\n" +" 0\n" " \n" " \n" " widget-deps\n" " \n" -" anamorphic\n" +" AudioEncoder\n" " \n" -" keep_aspect\n" -" scale_height\n" +" AudioBitrate\n" +" AudioSamplerate\n" +" AudioMixdown\n" +" AudioTrackDRCSlider\n" " \n" -" audio_codec\n" +" ChapterMarkers\n" " \n" -" audio_bitrate\n" -" audio_rate\n" -" audio_mix\n" -" audio_drc\n" +" chapters_list\n" " \n" -" autocrop\n" +" FileFormat\n" " \n" -" crop_top\n" -" crop_bottom\n" -" crop_left\n" -" crop_right\n" +" Mp4LargeFile\n" +" Mp4HttpOptimize\n" +" Mp4iPodCompatible\n" " \n" -" autoscale\n" +" PictureAutoCrop\n" +" \n" +" PictureTopCrop\n" +" PictureBottomCrop\n" +" PictureLeftCrop\n" +" PictureRightCrop\n" +" \n" +" PictureDecomb\n" +" \n" +" PictureDeinterlace\n" +" tweak_PictureDeinterlace\n" +" \n" +" PictureKeepRatio\n" " \n" -" scale_width\n" " scale_height\n" " \n" -" chapter_markers\n" +" VideoEncoder\n" " \n" -" chapters_list\n" +" x264_tab\n" +" x264_tab_label\n" +" Mp4iPodCompatible\n" +" directqp\n" " \n" -" container\n" +" VideoTwoPass\n" " \n" -" large_mp4\n" -" http_optimize_mp4\n" -" ipod_file\n" +" VideoTurboTwoPass\n" " \n" -" decomb\n" +" anamorphic\n" " \n" -" deinterlace\n" -" tweak_deinterlace\n" +" PictureKeepRatio\n" +" scale_height\n" " \n" -" keep_aspect\n" +" autoscale\n" " \n" +" scale_width\n" " scale_height\n" " \n" " title\n" @@ -11541,34 +11736,24 @@ " start_chapter\n" " end_chapter\n" " \n" -" two_pass\n" -" \n" -" turbo\n" -" \n" " use_source_name\n" " \n" " chapters_in_destination\n" " \n" -" video_codec\n" -" \n" -" x264_tab\n" -" x264_tab_label\n" -" ipod_file\n" -" \n" " vquality_type_bitrate\n" " \n" -" video_bitrate\n" +" VideoAvgBitrate\n" " \n" " vquality_type_constant\n" " \n" -" video_quality\n" +" VideoQualitySlider\n" " constant_rate_factor\n" -" two_pass\n" -" turbo\n" +" VideoTwoPass\n" +" VideoTurboTwoPass\n" " \n" " vquality_type_target\n" " \n" -" video_target_size\n" +" VideoTargetSize\n" " \n" " x264_bframes\n" " \n" @@ -11591,119 +11776,169 @@ " \n" " widget-reverse-deps\n" " \n" -" audio_bitrate\n" +" AudioBitrate\n" " \n" " \n" -" audio_codec\n" +" AudioEncoder\n" " ac3\n" " \n" " \n" " \n" -" audio_drc\n" +" AudioMixdown\n" " \n" " \n" -" audio_codec\n" +" AudioEncoder\n" " ac3\n" " \n" " \n" " \n" -" audio_mix\n" +" AudioSamplerate\n" " \n" " \n" -" audio_codec\n" +" AudioEncoder\n" " ac3\n" " \n" " \n" " \n" -" audio_rate\n" +" AudioTrackDRCSlider\n" " \n" " \n" -" audio_codec\n" +" AudioEncoder\n" " ac3\n" " \n" " \n" " \n" -" chapters_in_destination\n" +" Mp4HttpOptimize\n" " \n" " \n" -" use_source_name\n" -" TRUE\n" +" FileFormat\n" +" mp4|m4v\n" " \n" " \n" " \n" -" chapters_label\n" +" Mp4LargeFile\n" " \n" " \n" -" title\n" -" none\n" -" \n" +" FileFormat\n" +" mp4|m4v\n" +" \n" " \n" " \n" -" chapters_list\n" +" Mp4iPodCompatible\n" " \n" " \n" -" chapter_markers\n" -" TRUE\n" +" FileFormat\n" +" mp4|m4v\n" +" \n" +" \n" +" \n" +" VideoEncoder\n" +" x264\n" " \n" " \n" " \n" -" chapters_tab\n" +" PictureBottomCrop\n" " \n" " \n" -" title\n" -" none\n" -" \n" +" PictureAutoCrop\n" +" FALSE\n" +" \n" " \n" " \n" -" constant_rate_factor\n" +" PictureDeinterlace\n" " \n" " \n" -" vquality_type_constant\n" +" PictureDecomb\n" " TRUE\n" -" \n" +" \n" " \n" " \n" -" crop_bottom\n" +" PictureKeepRatio\n" " \n" " \n" -" autocrop\n" +" anamorphic\n" " FALSE\n" " \n" " \n" " \n" -" crop_left\n" +" PictureLeftCrop\n" " \n" " \n" -" autocrop\n" +" PictureAutoCrop\n" " FALSE\n" " \n" " \n" " \n" -" crop_right\n" +" PictureRightCrop\n" " \n" " \n" -" autocrop\n" +" PictureAutoCrop\n" " FALSE\n" " \n" " \n" " \n" -" crop_top\n" +" PictureTopCrop\n" " \n" " \n" -" autocrop\n" +" PictureAutoCrop\n" " FALSE\n" " \n" " \n" " \n" -" deinterlace\n" +" VideoAvgBitrate\n" +" \n" +" \n" +" vquality_type_bitrate\n" +" TRUE\n" +" \n" +" \n" +" \n" +" VideoQualitySlider\n" " \n" " \n" -" decomb\n" +" vquality_type_constant\n" +" TRUE\n" +" \n" +" \n" +" \n" +" VideoTargetSize\n" +" \n" +" \n" +" vquality_type_target\n" +" TRUE\n" +" \n" +" \n" +" \n" +" VideoTurboTwoPass\n" +" \n" +" \n" +" vquality_type_constant\n" " TRUE\n" " \n" " \n" +" \n" +" VideoTwoPass\n" +" TRUE\n" +" \n" +" \n" " \n" -" end_chapter\n" +" VideoTwoPass\n" +" \n" +" \n" +" vquality_type_constant\n" +" TRUE\n" +" \n" +" \n" +" \n" +" chapters_in_destination\n" +" \n" +" \n" +" use_source_name\n" +" TRUE\n" +" \n" +" \n" +" \n" +" chapters_label\n" " \n" " \n" " title\n" @@ -11711,41 +11946,44 @@ " \n" " \n" " \n" -" http_optimize_mp4\n" +" chapters_list\n" " \n" " \n" -" container\n" -" mp4|m4v\n" +" ChapterMarkers\n" +" TRUE\n" " \n" " \n" " \n" -" ipod_file\n" +" chapters_tab\n" " \n" " \n" -" container\n" -" mp4|m4v\n" -" \n" +" title\n" +" none\n" +" \n" " \n" +" \n" +" constant_rate_factor\n" +" \n" " \n" -" video_codec\n" -" x264\n" +" vquality_type_constant\n" +" TRUE\n" " \n" " \n" " \n" -" keep_aspect\n" +" directqp\n" " \n" " \n" -" anamorphic\n" -" FALSE\n" +" VideoEncoder\n" +" x264|ffmpeg\n" " \n" " \n" " \n" -" large_mp4\n" +" end_chapter\n" " \n" " \n" -" container\n" -" mp4|m4v\n" -" \n" +" title\n" +" none\n" +" \n" " \n" " \n" " picture_label\n" @@ -11809,7 +12047,7 @@ " \n" " \n" " \n" -" keep_aspect\n" +" PictureKeepRatio\n" " FALSE\n" " \n" " \n" @@ -11846,58 +12084,13 @@ " \n" " \n" " \n" -" turbo\n" +" tweak_PictureDeinterlace\n" " \n" " \n" -" vquality_type_constant\n" +" PictureDecomb\n" " TRUE\n" " \n" " \n" -" \n" -" two_pass\n" -" TRUE\n" -" \n" -" \n" -" \n" -" tweak_deinterlace\n" -" \n" -" \n" -" decomb\n" -" TRUE\n" -" \n" -" \n" -" \n" -" two_pass\n" -" \n" -" \n" -" vquality_type_constant\n" -" TRUE\n" -" \n" -" \n" -" \n" -" video_bitrate\n" -" \n" -" \n" -" vquality_type_bitrate\n" -" TRUE\n" -" \n" -" \n" -" \n" -" video_quality\n" -" \n" -" \n" -" vquality_type_constant\n" -" TRUE\n" -" \n" -" \n" -" \n" -" video_target_size\n" -" \n" -" \n" -" vquality_type_target\n" -" TRUE\n" -" \n" -" \n" " \n" " x264_bpyramid\n" " \n" @@ -11934,7 +12127,7 @@ " x264_tab\n" " \n" " \n" -" video_codec\n" +" VideoEncoder\n" " x264\n" " \n" " \n" @@ -11942,7 +12135,7 @@ " x264_tab_label\n" " \n" " \n" -" video_codec\n" +" VideoEncoder\n" " x264\n" " \n" " \n" diff --git a/gtk/src/resources.plist b/gtk/src/resources.plist index 282dced3..b2e04560 100644 --- a/gtk/src/resources.plist +++ b/gtk/src/resources.plist @@ -119,12 +119,12 @@ <property name="value">0</property> </object> <object class="GtkAdjustment" id="adjustment5"> - <property name="upper">100</property> + <property name="upper">1</property> <property name="lower">0</property> - <property name="page_increment">10</property> - <property name="step_increment">1</property> + <property name="page_increment">1</property> + <property name="step_increment">0.1</property> <property name="page_size">0</property> - <property name="value">63</property> + <property name="value">0.63</property> </object> <object class="GtkAdjustment" id="adjustment6"> <property name="upper">4</property> @@ -801,7 +801,7 @@ </packing> </child> <child> - <object class="GtkComboBox" id="container"> + <object class="GtkComboBox" id="FileFormat"> <property name="visible">True</property> <property name="tooltip-text" translatable="yes">Output file container type</property> <signal handler="container_changed_cb" name="changed"/> @@ -818,7 +818,7 @@ <property name="xalign">0.10000000149011612</property> <property name="xscale">0</property> <child> - <object class="GtkCheckButton" id="ipod_file"> + <object class="GtkCheckButton" id="Mp4iPodCompatible"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> @@ -834,7 +834,7 @@ </packing> </child> <child> - <object class="GtkCheckButton" id="http_optimize_mp4"> + <object class="GtkCheckButton" id="Mp4HttpOptimize"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> @@ -848,7 +848,7 @@ </packing> </child> <child> - <object class="GtkCheckButton" id="large_mp4"> + <object class="GtkCheckButton" id="Mp4LargeFile"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> @@ -1307,7 +1307,7 @@ <property name="visible">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <child> - <object class="GtkCheckButton" id="grayscale"> + <object class="GtkCheckButton" id="VideoGrayScale"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> @@ -1320,7 +1320,7 @@ </packing> </child> <child> - <object class="GtkCheckButton" id="detelecine"> + <object class="GtkCheckButton" id="PictureDetelecine"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> @@ -1335,7 +1335,7 @@ </packing> </child> <child> - <object class="GtkCheckButton" id="decomb"> + <object class="GtkCheckButton" id="PictureDecomb"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="label" translatable="yes">De-Comb</property> @@ -1369,7 +1369,7 @@ <property name="xalign">0</property> <property name="xscale">0.55</property> <child> - <object class="GtkHScale" id="deblock"> + <object class="GtkHScale" id="PictureDeblock"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="tooltip-text" translatable="yes">This is a filter that gets applied before encoding. If the source looks blocky before encoding, you may want to use this.</property> @@ -1409,7 +1409,7 @@ </packing> </child> <child> - <object class="GtkComboBox" id="deinterlace"> + <object class="GtkComboBox" id="PictureDeinterlace"> <property name="width_request">100</property> <property name="visible">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> @@ -1422,7 +1422,7 @@ </packing> </child> <child> - <object class="GtkComboBoxEntry" id="tweak_deinterlace"> + <object class="GtkComboBoxEntry" id="tweak_PictureDeinterlace"> <property name="visible">False</property> <signal handler="setting_widget_changed_cb" name="changed"/> <child internal-child="entry"> @@ -1464,7 +1464,7 @@ </packing> </child> <child> - <object class="GtkComboBox" id="denoise"> + <object class="GtkComboBox" id="PictureDenoise"> <property name="width_request">100</property> <property name="visible">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> @@ -1477,7 +1477,7 @@ </packing> </child> <child> - <object class="GtkComboBoxEntry" id="tweak_denoise"> + <object class="GtkComboBoxEntry" id="tweak_PictureDenoise"> <property name="visible">False</property> <signal handler="setting_widget_changed_cb" name="changed"/> <child internal-child="entry"> @@ -1650,7 +1650,7 @@ <property name="xalign">0</property> <property name="xscale">0</property> <child> - <object class="GtkComboBox" id="video_codec"> + <object class="GtkComboBox" id="VideoEncoder"> <property name="visible">True</property> <signal handler="vcodec_changed_cb" name="changed"/> </object> @@ -1689,7 +1689,7 @@ <property name="xalign">0</property> <property name="xscale">0</property> <child> - <object class="GtkComboBox" id="framerate"> + <object class="GtkComboBox" id="VideoFramerate"> <property name="visible">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <signal handler="setting_widget_changed_cb" name="changed"/> @@ -1708,7 +1708,7 @@ </packing> </child> <child> - <object class="GtkCheckButton" id="two_pass"> + <object class="GtkCheckButton" id="VideoTwoPass"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> @@ -1726,7 +1726,7 @@ <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <property name="xscale">0.23999999463558197</property> <child> - <object class="GtkCheckButton" id="turbo"> + <object class="GtkCheckButton" id="VideoTurboTwoPass"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> @@ -1816,7 +1816,7 @@ <property name="xalign">0.11999999731779099</property> <property name="xscale">0.10000000149011612</property> <child> - <object class="GtkSpinButton" id="video_bitrate"> + <object class="GtkSpinButton" id="VideoAvgBitrate"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> @@ -1856,7 +1856,7 @@ <property name="xalign">0.11999999731779099</property> <property name="xscale">0.10000000149011612</property> <child> - <object class="GtkSpinButton" id="video_target_size"> + <object class="GtkSpinButton" id="VideoTargetSize"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> @@ -1894,14 +1894,15 @@ </packing> </child> <child> - <object class="GtkHScale" id="video_quality"> + <object class="GtkHScale" id="VideoQualitySlider"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <property name="adjustment">adjustment5</property> - <property name="digits">0</property> + <property name="digits">3</property> <property name="value_pos">GTK_POS_RIGHT</property> <signal handler="setting_widget_changed_cb" name="value_changed"/> + <signal handler="format_vquality_cb" name="format-value"/> </object> <packing> <property name="position">1</property> @@ -2061,7 +2062,7 @@ </object> </child> <child> - <object class="GtkHScale" id="audio_drc"> + <object class="GtkHScale" id="AudioTrackDRCSlider"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> @@ -2094,7 +2095,7 @@ <property name="n_rows">2</property> <property name="n_columns">5</property> <child> - <object class="GtkComboBox" id="audio_track"> + <object class="GtkComboBox" id="AudioTrack"> <property name="width_request">215</property> <property name="visible">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> @@ -2106,7 +2107,7 @@ </packing> </child> <child> - <object class="GtkComboBox" id="audio_codec"> + <object class="GtkComboBox" id="AudioEncoder"> <property name="visible">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <signal handler="audio_codec_changed_cb" name="changed"/> @@ -2120,7 +2121,7 @@ </packing> </child> <child> - <object class="GtkComboBox" id="audio_rate"> + <object class="GtkComboBox" id="AudioSamplerate"> <property name="visible">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <signal handler="audio_widget_changed_cb" name="changed"/> @@ -2196,7 +2197,7 @@ </packing> </child> <child> - <object class="GtkComboBox" id="audio_mix"> + <object class="GtkComboBox" id="AudioMixdown"> <property name="visible">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <signal handler="audio_mix_changed_cb" name="changed"/> @@ -2210,7 +2211,7 @@ </packing> </child> <child> - <object class="GtkComboBox" id="audio_bitrate"> + <object class="GtkComboBox" id="AudioBitrate"> <property name="visible">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <signal handler="audio_widget_changed_cb" name="changed"/> @@ -2279,7 +2280,7 @@ <property name="spacing">5</property> <child> - <object class="GtkComboBox" id="source_audio_lang"> + <object class="GtkComboBox" id="SourceAudioLang"> <property name="width_request">150</property> <property name="visible">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> @@ -2321,7 +2322,7 @@ <property name="spacing">5</property> <child> - <object class="GtkComboBox" id="subtitle_lang"> + <object class="GtkComboBox" id="Subtitles"> <property name="width_request">150</property> <property name="visible">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> @@ -2329,7 +2330,7 @@ </object> </child> <child> - <object class="GtkCheckButton" id="forced_subtitles"> + <object class="GtkCheckButton" id="SubtitlesForced"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="has_tooltip">True</property> @@ -2643,7 +2644,7 @@ <property name="left_padding">12</property> <property name="right_padding">2</property> <child> - <object class="GtkTextView" id="x264_options"> + <object class="GtkTextView" id="x264Option"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="tooltip-text" translatable="yes">Your selected options will appear here. @@ -3090,7 +3091,7 @@ no-fast-pskip=0:no-dct-decimate=0:cabac=1</property> <object class="GtkHBox" id="hbox30"> <property name="visible">True</property> <child> - <object class="GtkCheckButton" id="chapter_markers"> + <object class="GtkCheckButton" id="ChapterMarkers"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> @@ -3425,22 +3426,6 @@ auto-generated destination name.</property> </packing> </child> <child> - <object class="GtkCheckButton" id="linear_vquality"> - <property name="visible">True</property> - <property name="can_focus">True</property> - <property name="tooltip_text">x264 uses a different scale for video quality than -other codecs. This adjusts the scale so that -similar values give similar quality across all the -video codecs.</property> - <property name="label" translatable="yes">Adjust x264 video quality scale</property> - <property name="draw_indicator">True</property> - <signal name="toggled" handler="pref_changed_cb"/> - </object> - <packing> - <property name="position">2</property> - </packing> - </child> - <child> <object class="GtkCheckButton" id="noscale"> <property name="visible">True</property> <property name="can_focus">True</property> @@ -3454,7 +3439,7 @@ the required multiple.</property> <signal name="toggled" handler="pref_changed_cb"/> </object> <packing> - <property name="position">3</property> + <property name="position">2</property> </packing> </child> <child> @@ -3473,7 +3458,7 @@ this setting.</property> <signal name="toggled" handler="vcodec_changed_cb"/> </object> <packing> - <property name="position">4</property> + <property name="position">3</property> </packing> </child> <child> @@ -3484,7 +3469,7 @@ this setting.</property> <signal name="toggled" handler="tweaks_changed_cb"/> </object> <packing> - <property name="position">5</property> + <property name="position">4</property> </packing> </child> <child> @@ -3495,7 +3480,7 @@ this setting.</property> <signal name="toggled" handler="hbfd_feature_changed_cb"/> </object> <packing> - <property name="position">6</property> + <property name="position">5</property> </packing> </child> </object> @@ -3667,7 +3652,7 @@ this setting.</property> </packing> </child> <child> - <object class="GtkEntry" id="preset_name"> + <object class="GtkEntry" id="PresetName"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> @@ -3701,7 +3686,7 @@ this setting.</property> <property name="left_padding">12</property> <property name="right_padding">4</property> <child> - <object class="GtkTextView" id="preset_description"> + <object class="GtkTextView" id="PresetDescription"> <property name="height_request">60</property> <property name="visible">True</property> <property name="can_focus">True</property> @@ -4152,7 +4137,7 @@ this setting.</property> </packing> </child> <child> - <object class="GtkSpinButton" id="crop_left"> + <object class="GtkSpinButton" id="PictureLeftCrop"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> @@ -4182,7 +4167,7 @@ this setting.</property> </packing> </child> <child> - <object class="GtkSpinButton" id="crop_top"> + <object class="GtkSpinButton" id="PictureTopCrop"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> @@ -4198,7 +4183,7 @@ this setting.</property> </packing> </child> <child> - <object class="GtkSpinButton" id="crop_bottom"> + <object class="GtkSpinButton" id="PictureBottomCrop"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> @@ -4214,7 +4199,7 @@ this setting.</property> </packing> </child> <child> - <object class="GtkSpinButton" id="crop_right"> + <object class="GtkSpinButton" id="PictureRightCrop"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> @@ -4251,7 +4236,7 @@ this setting.</property> </packing> </child> <child> - <object class="GtkCheckButton" id="autocrop"> + <object class="GtkCheckButton" id="PictureAutoCrop"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> @@ -4375,7 +4360,7 @@ this setting.</property> <property name="visible">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <child> - <object class="GtkCheckButton" id="round_dimensions"> + <object class="GtkCheckButton" id="ModDimensions"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> @@ -4417,7 +4402,7 @@ adjusted to keep the video's original aspect ratio.</property> </packing> </child> <child> - <object class="GtkCheckButton" id="keep_aspect"> + <object class="GtkCheckButton" id="PictureKeepRatio"> <property name="visible">True</property> <property name="can_focus">True</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> @@ -4850,17 +4835,13 @@ R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A Initialization + anamorphic + audio_list - crop_bottom - 0 - crop_left - 0 - crop_right - 0 - crop_top - 0 + autoscale + end_chapter 100 folder @@ -4878,15 +4859,25 @@ R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A preset_type_normal scale_height - 480 + 0 scale_width - 720 + 0 start_chapter 1 title none + tweak_PictureDecomb + + tweak_PictureDetelecine + volume_label New Video + vquality_type_bitrate + + vquality_type_constant + + vquality_type_target + x264_8x8dct x264_analyse @@ -4936,8 +4927,6 @@ R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A hbfd_feature - linear_vquality - nocheckvquality noscale @@ -4951,1355 +4940,1569 @@ R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A Presets + AudioList + + + AudioBitrate + 192 + AudioEncoder + ac3 + AudioMixdown + dpl2 + AudioSamplerate + source + AudioTrack + 1 + AudioTrackDRCSlider + 1 + AudioTrackDescription + + + + ChapterMarkers + Default - anamorphic - - autocrop - - autoscale + FileFormat + mp4 + Folder - chapter_markers + ModDimensions - constant_rate_factor + Mp4HttpOptimize + + Mp4LargeFile + + Mp4iPodCompatible + + PictureAutoCrop - container - mp4 - deblock + PictureBottomCrop + 0 + PictureDeblock 0 - decomb + PictureDecomb - deinterlace + PictureDeinterlace none - denoise + PictureDenoise none - detelecine + PictureDetelecine - directqp + PictureHeight + 0 + PictureKeepRatio + + PictureLeftCrop + 0 + PicturePAR + 2 + PictureRightCrop + 0 + PictureTopCrop + 0 + PictureWidth + 0 + PresetDescription + + PresetName + Name Missing + SourceAudioLang + und + Subtitles + none + SubtitlesForced + + Type + 1 + UsesMaxPictureSettings - forced_subtitles + UsesPictureFilters - framerate + UsesPictureSettings + 2 + VideoAvgBitrate + 1800 + VideoEncoder + x264 + VideoFramerate source - grayscale + VideoGrayScale - http_optimize_mp4 + VideoQualitySlider + 0.59999999999999998 + VideoQualityType + 2 + VideoTargetSize + 700 + VideoTurboTwoPass - ipod_file + VideoTwoPass - keep_aspect + constant_rate_factor - large_mp4 + directqp - max_height - 0 - max_width - 0 - pref_audio_list - - - audio_bitrate - 192 - audio_codec - ac3 - audio_drc - 1 - audio_mix - dpl2 - audio_rate - source - - - preset_description - - preset_name + x264Option - preset_type - 1 - round_dimensions + + XlatPresets + + anamorphic - source_audio_lang - und - subtitle_lang - none - turbo - - tweak_decomb - - tweak_detelecine - - two_pass + autoscale - video_bitrate - 1800 - video_codec - x264 - video_quality - 64 - video_target_size - 700 vquality_type_bitrate vquality_type_constant vquality_type_target - x264_options - standard-presets - preset_folder + ChildrenArray - Default - - anamorphic - - autocrop - - chapter_markers - - container - mp4 - deblock - 0 - deinterlace - none - denoise - none - detelecine - - framerate - source - grayscale - - keep_aspect - - large_mp4 - - max_height - 0 - max_width - 720 - pref_audio_list + AudioList - audio_bitrate + AudioBitrate 160 - audio_codec - faac - audio_drc - 1 - audio_mix - dpl2 - audio_rate + AudioEncoder + AAC (faac) + AudioMixdown + Dolby Pro Logic II + AudioSamplerate 48 + AudioTrack + 1 + AudioTrackDRCSlider + 1 + AudioTrackDescription + - audio_bitrate + AudioBitrate 160 - audio_codec - ac3 - audio_drc + AudioEncoder + AC3 Passthru + AudioMixdown + AC3 Passthru + AudioSamplerate + Auto + AudioTrack + 1 + AudioTrackDRCSlider 1 - audio_mix - none - audio_rate - source + AudioTrackDescription + - preset_description + ChapterMarkers + + Default + + FileFormat + MP4 file + Folder + + Mp4LargeFile + + PictureAutoCrop + + PictureBottomCrop + 0 + PictureDeblock + 0 + PictureDeinterlace + 0 + PictureDenoise + 0 + PictureDetelecine + + PictureHeight + 0 + PictureKeepRatio + + PictureLeftCrop + 0 + PicturePAR + 2 + PictureRightCrop + 0 + PictureTopCrop + 0 + PictureWidth + 720 + PresetDescription HandBrake's universally compatible, full resolution settings for all current Apple devices: iPod, iPhone, AppleTV, and Macs - preset_name + PresetName Universal - preset_type + Subtitles + None + Type 0 - round_dimensions + UsesPictureFilters - subtitle_lang - none - two_pass - - video_bitrate + UsesPictureSettings + 1 + VideoAvgBitrate 2500 - video_codec - x264 - video_quality - 59 - video_target_size - 700 - vquality_type_bitrate + VideoEncoder + H.264 (x264) + VideoFramerate + Same as source + VideoGrayScale - vquality_type_constant - - vquality_type_target + VideoQualitySlider + 0.5899999737739563 + VideoQualityType + 2 + VideoTargetSize + 700 + VideoTwoPass - x264_options + x264Option level=30:cabac=0:ref=3:mixed-refs=1:analyse=all:me=umh:no-fast-pskip=1:subme=8 - Default - - anamorphic - - autocrop - - chapter_markers - - container - mp4 - deblock - 0 - deinterlace - none - denoise - none - detelecine - - framerate - source - grayscale - - keep_aspect - - large_mp4 - - max_height - 0 - max_width - 960 - pref_audio_list + AudioList - audio_bitrate + AudioBitrate 160 - audio_codec - faac - audio_drc - 1 - audio_mix - dpl2 - audio_rate + AudioEncoder + AAC (faac) + AudioMixdown + Dolby Pro Logic II + AudioSamplerate 48 + AudioTrack + 1 + AudioTrackDRCSlider + 1 + AudioTrackDescription + - audio_bitrate + AudioBitrate 160 - audio_codec - ac3 - audio_drc + AudioEncoder + AC3 Passthru + AudioMixdown + AC3 Passthru + AudioSamplerate + Auto + AudioTrack + 1 + AudioTrackDRCSlider 1 - audio_mix - none - audio_rate - source + AudioTrackDescription + - preset_description + ChapterMarkers + + Default + + FileFormat + MP4 file + Folder + + Mp4LargeFile + + PictureAutoCrop + + PictureBottomCrop + 0 + PictureDeblock + 0 + PictureDeinterlace + 0 + PictureDenoise + 0 + PictureDetelecine + + PictureHeight + 0 + PictureKeepRatio + + PictureLeftCrop + 0 + PicturePAR + 2 + PictureRightCrop + 0 + PictureTopCrop + 0 + PictureWidth + 960 + PresetDescription 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. - preset_name + PresetName AppleTV - preset_type + Subtitles + None + Type 0 - round_dimensions + UsesPictureFilters - subtitle_lang - none - two_pass - - video_bitrate + UsesPictureSettings + 1 + VideoAvgBitrate 2500 - video_codec - x264 - video_quality - 59 - video_target_size - 700 - vquality_type_bitrate + VideoEncoder + H.264 (x264) + VideoFramerate + Same as source + VideoGrayScale - vquality_type_constant - - vquality_type_target + VideoQualitySlider + 0.5899999737739563 + VideoQualityType + 2 + VideoTargetSize + 700 + VideoTwoPass - x264_options + x264Option 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 - preset_folder + ChildrenArray + AudioList + + + AudioBitrate + 160 + AudioEncoder + AAC (faac) + AudioMixdown + Dolby Pro Logic II + AudioSamplerate + 48 + AudioTrack + 1 + AudioTrackDRCSlider + 1 + AudioTrackDescription + + + + ChapterMarkers + Default - anamorphic - - autocrop + FileFormat + MP4 file + Mp4iPodCompatible - chapter_markers + PictureAutoCrop - container - mp4 - deblock + PictureBottomCrop 0 - deinterlace - none - denoise - none - detelecine - - framerate - source - grayscale + PictureDeblock + 0 + PictureDeinterlace + 0 + PictureDenoise + 0 + PictureDetelecine - ipod_file - - keep_aspect + PictureHeight + 0 + PictureKeepRatio - max_height + PictureLeftCrop + 0 + PicturePAR + 0 + PictureRightCrop + 0 + PictureTopCrop 0 - max_width + PictureWidth 320 - pref_audio_list - - - audio_bitrate - 160 - audio_codec - faac - audio_drc - 1 - audio_mix - dpl2 - audio_rate - 48 - - - preset_description + PresetDescription HandBrake's low resolution settings for the iPod. Optimized for great playback on the iPod screen, with smaller file size. - preset_name + PresetName iPod Classic & iPod Nano - preset_type + Subtitles + None + Type 0 - round_dimensions - - subtitle_lang - none - two_pass + UsesMaxPictureSettings - video_bitrate - 700 - video_codec - x264 - video_quality - 65 - video_target_size - 700 - vquality_type_bitrate + UsesPictureFilters - vquality_type_constant + UsesPictureSettings + 1 + VideoAvgBitrate + 700 + VideoEncoder + H.264 (x264) + VideoFramerate + Same as source + VideoGrayScale - vquality_type_target + VideoQualitySlider + 0.64709997177124023 + VideoQualityType + 1 + VideoTargetSize + 700 + VideoTwoPass - x264_options + x264Option level=30:bframes=0:cabac=0:ref=1:vbv-maxrate=768:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1 + AudioList + + + AudioBitrate + 128 + AudioEncoder + AAC (faac) + AudioMixdown + Dolby Pro Logic II + AudioSamplerate + 48 + AudioTrack + 1 + AudioTrackDRCSlider + 1 + AudioTrackDescription + + + + ChapterMarkers + Default - anamorphic - - autocrop + FileFormat + MP4 file + Mp4iPodCompatible - chapter_markers + PictureAutoCrop - container - mp4 - deblock + PictureBottomCrop 0 - deinterlace - none - denoise - none - detelecine - - framerate - source - grayscale + PictureDeblock + 0 + PictureDeinterlace + 0 + PictureDenoise + 0 + PictureDetelecine - ipod_file - - keep_aspect + PictureHeight + 0 + PictureKeepRatio - max_height + PictureLeftCrop + 0 + PicturePAR + 0 + PictureRightCrop + 0 + PictureTopCrop 0 - max_width + PictureWidth 480 - pref_audio_list - - - audio_bitrate - 128 - audio_codec - faac - audio_drc - 1 - audio_mix - dpl2 - audio_rate - 48 - - - preset_description + PresetDescription HandBrake's settings for the iPhone and iPod Touch. - preset_name + PresetName iPhone & iPod Touch - preset_type + Subtitles + None + Type 0 - round_dimensions - - subtitle_lang - none - two_pass + UsesMaxPictureSettings - video_bitrate - 960 - video_codec - x264 - video_quality - 65 - video_target_size - 700 - vquality_type_bitrate + UsesPictureFilters - vquality_type_constant + UsesPictureSettings + 1 + VideoAvgBitrate + 960 + VideoEncoder + H.264 (x264) + VideoFramerate + Same as source + VideoGrayScale - vquality_type_target + VideoQualitySlider + 0.64709997177124023 + VideoQualityType + 1 + VideoTargetSize + 700 + VideoTwoPass - x264_options + x264Option level=30:cabac=0:ref=1:analyse=all:me=umh:no-fast-pskip=1:trellis=1 - Default - - anamorphic - - autocrop - - chapter_markers - - container - mp4 - deblock - 0 - deinterlace - none - denoise - none - detelecine - - framerate - source - grayscale - - ipod_file - - keep_aspect - - max_height - 0 - max_width - 640 - pref_audio_list + AudioList - audio_bitrate + AudioBitrate 160 - audio_codec - faac - audio_drc - 1 - audio_mix - dpl2 - audio_rate + AudioEncoder + AAC (faac) + AudioMixdown + Dolby Pro Logic II + AudioSamplerate 48 + AudioTrack + 1 + AudioTrackDRCSlider + 1 + AudioTrackDescription + - preset_description - HandBrake's high resolution settings for older 5 and 5.5G iPods. Good video quality, great for viewing on a TV using your iPod - preset_name - iPod Legacy - preset_type - 0 - round_dimensions + ChapterMarkers - subtitle_lang - none - two_pass + Default - video_bitrate - 1500 - video_codec - x264 - video_quality - 65 - video_target_size - 700 - vquality_type_bitrate + FileFormat + MP4 file + Mp4iPodCompatible - vquality_type_constant + PictureAutoCrop + + PictureBottomCrop + 0 + PictureDeblock + 0 + PictureDeinterlace + 0 + PictureDenoise + 0 + PictureDetelecine + + PictureHeight + 0 + PictureKeepRatio + + PictureLeftCrop + 0 + PicturePAR + 0 + PictureRightCrop + 0 + PictureTopCrop + 0 + PictureWidth + 640 + PresetDescription + HandBrake's high resolution settings for older 5 and 5.5G iPods. Good video quality, great for viewing on a TV using your iPod + PresetName + iPod Legacy + Subtitles + None + Type + 0 + UsesMaxPictureSettings + + UsesPictureFilters + + UsesPictureSettings + 1 + VideoAvgBitrate + 1500 + VideoEncoder + H.264 (x264) + VideoFramerate + Same as source + VideoGrayScale - vquality_type_target + VideoQualitySlider + 0.64709997177124023 + VideoQualityType + 1 + VideoTargetSize + 700 + VideoTwoPass - x264_options + x264Option level=30:bframes=0:cabac=0:ref=1:vbv-maxrate=1500:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1 - preset_name + Folder + + PresetName iPod & iPhone - preset_type - 2 + Type + 0 + AudioList + + + AudioBitrate + 160 + AudioEncoder + AAC (faac) + AudioMixdown + Dolby Pro Logic II + AudioSamplerate + Auto + AudioTrack + 1 + AudioTrackDRCSlider + 1 + AudioTrackDescription + + + + ChapterMarkers + Default - anamorphic - - autocrop - - autoscale + FileFormat + MP4 file + PictureAutoCrop - chapter_markers - - container - mp4 - deblock + PictureBottomCrop 0 - deinterlace - none - denoise - none - detelecine - - framerate - source - grayscale + PictureDeblock + 0 + PictureDeinterlace + 0 + PictureDenoise + 0 + PictureDetelecine - keep_aspect + PictureHeight + 0 + PictureKeepRatio - max_height + PictureLeftCrop 0 - max_width + PicturePAR + 1 + PictureRightCrop 0 - pref_audio_list - - - audio_bitrate - 160 - audio_codec - faac - audio_drc - 1 - audio_mix - dpl2 - audio_rate - source - - - preset_description + PictureTopCrop + 0 + PictureWidth + 0 + PresetDescription 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. - preset_name + PresetName QuickTime - preset_type + Subtitles + None + Type 0 - round_dimensions - - subtitle_lang - none - turbo + UsesMaxPictureSettings - two_pass + UsesPictureFilters - video_bitrate + UsesPictureSettings + 1 + VideoAvgBitrate 1800 - video_codec - x264 - video_quality - 65 - video_target_size + VideoEncoder + H.264 (x264) + VideoFramerate + Same as source + VideoGrayScale + + VideoQualitySlider + 0.64709997177124023 + VideoQualityType + 1 + VideoTargetSize 700 - vquality_type_bitrate + VideoTurboTwoPass - vquality_type_constant - - vquality_type_target - - x264_options + VideoTwoPass + + x264Option 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 - preset_name + Folder + + PresetName Apple - preset_type - 2 + Type + 0 - preset_folder + ChildrenArray - Default - - anamorphic - - autocrop + AudioList + + + AudioBitrate + 160 + AudioEncoder + AAC (faac) + AudioMixdown + Dolby Pro Logic II + AudioSamplerate + Auto + AudioTrack + 1 + AudioTrackDRCSlider + 1 + AudioTrackDescription + + + + ChapterMarkers - autoscale + Default - chapter_markers + FileFormat + MP4 file + PictureAutoCrop - container - mp4 - deblock + PictureBottomCrop 0 - deinterlace - none - denoise - none - detelecine - - framerate - source - grayscale + PictureDeblock + 0 + PictureDeinterlace + 0 + PictureDenoise + 0 + PictureDetelecine - keep_aspect + PictureHeight + 0 + PictureKeepRatio - max_height + PictureLeftCrop 0 - max_width + PicturePAR + 1 + PictureRightCrop 0 - pref_audio_list - - - audio_bitrate - 160 - audio_codec - faac - audio_drc - 1 - audio_mix - dpl2 - audio_rate - source - - - preset_description + PictureTopCrop + 0 + PictureWidth + 0 + PresetDescription HandBrake's normal, default settings. - preset_name + PresetName Normal - preset_type + Subtitles + None + Type 0 - round_dimensions - - subtitle_lang - none - turbo + UsesMaxPictureSettings - two_pass + UsesPictureFilters - video_bitrate + UsesPictureSettings + 1 + VideoAvgBitrate 1500 - video_codec - x264 - video_quality - 65 - video_target_size + VideoEncoder + H.264 (x264) + VideoFramerate + Same as source + VideoGrayScale + + VideoQualitySlider + 0.64709997177124023 + VideoQualityType + 1 + VideoTargetSize 700 - vquality_type_bitrate + VideoTurboTwoPass - vquality_type_constant - - vquality_type_target - - x264_options + VideoTwoPass + + x264Option ref=2:bframes=2:me=umh - Default + AudioList + + + AudioBitrate + 160 + AudioEncoder + AAC (faac) + AudioMixdown + Dolby Pro Logic II + AudioSamplerate + Auto + AudioTrack + 1 + AudioTrackDRCSlider + 1 + AudioTrackDescription + + + + ChapterMarkers - anamorphic + Default - autocrop - - autoscale + FileFormat + MP4 file + PictureAutoCrop - chapter_markers - - container - mp4 - deblock + PictureBottomCrop 0 - deinterlace - none - denoise - none - detelecine - - framerate - source - grayscale + PictureDeblock + 0 + PictureDeinterlace + 0 + PictureDenoise + 0 + PictureDetelecine - keep_aspect + PictureHeight + 0 + PictureKeepRatio - max_height + PictureLeftCrop 0 - max_width + PicturePAR 0 - pref_audio_list - - - audio_bitrate - 160 - audio_codec - faac - audio_drc - 1 - audio_mix - dpl2 - audio_rate - source - - - preset_description + PictureRightCrop + 0 + PictureTopCrop + 0 + PictureWidth + 0 + PresetDescription HandBrake's traditional, faster, lower-quality settings. - preset_name + PresetName Classic - preset_type + Subtitles + None + Type 0 - round_dimensions + UsesMaxPictureSettings - subtitle_lang - none - two_pass - - video_bitrate - 1000 - video_codec - ffmpeg - video_quality - 65 - video_target_size - 700 - vquality_type_bitrate + UsesPictureFilters - vquality_type_constant + UsesPictureSettings + 1 + VideoAvgBitrate + 1000 + VideoEncoder + MPEG-4 (FFmpeg) + VideoFramerate + Same as source + VideoGrayScale - vquality_type_target + VideoQualitySlider + 0.64709997177124023 + VideoQualityType + 1 + VideoTargetSize + 700 + VideoTwoPass - x264_options + x264Option - preset_name + Folder + + PresetName Basic - preset_type - 2 + Type + 0 - preset_folder + ChildrenArray + AudioList + + + AudioBitrate + 160 + AudioEncoder + AAC (faac) + AudioMixdown + Dolby Pro Logic II + AudioSamplerate + Auto + AudioTrack + 1 + AudioTrackDRCSlider + 1 + AudioTrackDescription + + + + ChapterMarkers + Default - anamorphic - - autocrop - - autoscale - - chapter_markers + FileFormat + MKV file + PictureAutoCrop - container - mkv - deblock + PictureBottomCrop 0 - decomb + PictureDeblock + 0 + PictureDecomb - deinterlace - none - denoise - none - detelecine + PictureDeinterlace + 0 + PictureDenoise + 0 + PictureDetelecine - framerate - source - grayscale - - keep_aspect + PictureHeight + 0 + PictureKeepRatio - max_height + PictureLeftCrop 0 - max_width + PicturePAR + 1 + PictureRightCrop 0 - pref_audio_list - - - audio_bitrate - 160 - audio_codec - faac - audio_drc - 1 - audio_mix - dpl2 - audio_rate - source - - - preset_description + PictureTopCrop + 0 + PictureWidth + 0 + PresetDescription HandBrake's settings for cartoons, anime, and CGI. - preset_name + PresetName Animation - preset_type + Subtitles + None + Type 0 - round_dimensions - - subtitle_lang - none - turbo + UsesMaxPictureSettings - two_pass + UsesPictureFilters - video_bitrate + UsesPictureSettings + 1 + VideoAvgBitrate 1000 - video_codec - x264 - video_quality - 65 - video_target_size + VideoEncoder + H.264 (x264) + VideoFramerate + Same as source + VideoGrayScale + + VideoQualitySlider + 0.64709997177124023 + VideoQualityType + 1 + VideoTargetSize 700 - vquality_type_bitrate + VideoTurboTwoPass - vquality_type_constant - - vquality_type_target - - x264_options + VideoTwoPass + + x264Option 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 + AudioList + + + AudioBitrate + 160 + AudioEncoder + AC3 Passthru + AudioMixdown + AC3 Passthru + AudioSamplerate + Auto + AudioTrack + 1 + AudioTrackDRCSlider + 1 + AudioTrackDescription + + + + ChapterMarkers + Default - anamorphic - - autocrop - - autoscale - - chapter_markers + FileFormat + MKV file + PictureAutoCrop - container - mkv - deblock + PictureBottomCrop 0 - deinterlace - none - denoise - none - detelecine - - framerate - source - grayscale + PictureDeblock + 0 + PictureDeinterlace + 0 + PictureDenoise + 0 + PictureDetelecine - keep_aspect + PictureHeight + 0 + PictureKeepRatio - max_height + PictureLeftCrop 0 - max_width + PicturePAR + 1 + PictureRightCrop 0 - pref_audio_list - - - audio_bitrate - 160 - audio_codec - ac3 - audio_drc - 1 - audio_mix - none - audio_rate - source - - - preset_description + PictureTopCrop + 0 + PictureWidth + 0 + PresetDescription HandBrake's preset for consistently excellent quality in one pass, with the downside of entirely unpredictable file sizes and bitrates. - preset_name + PresetName Constant Quality Rate - preset_type + Subtitles + None + Type 0 - round_dimensions - - subtitle_lang - none - turbo - - two_pass - - video_bitrate + UsesMaxPictureSettings + + UsesPictureFilters + + UsesPictureSettings + 1 + VideoAvgBitrate 2000 - video_codec - x264 - video_quality - 60 - video_target_size + VideoEncoder + H.264 (x264) + VideoFramerate + Same as source + VideoGrayScale + + VideoQualitySlider + 0.60000002384185791 + VideoQualityType + 2 + VideoTargetSize 700 - vquality_type_bitrate + VideoTurboTwoPass - vquality_type_constant - - vquality_type_target + VideoTwoPass - x264_options + x264Option 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 + AudioList + + + AudioBitrate + 160 + AudioEncoder + AC3 Passthru + AudioMixdown + AC3 Passthru + AudioSamplerate + Auto + AudioTrack + 1 + AudioTrackDRCSlider + 1 + AudioTrackDescription + + + + ChapterMarkers + Default - anamorphic - - autocrop - - autoscale + FileFormat + MKV file + PictureAutoCrop - chapter_markers - - container - mkv - deblock + PictureBottomCrop 0 - deinterlace - none - denoise - none - detelecine - - framerate - source - grayscale + PictureDeblock + 0 + PictureDeinterlace + 0 + PictureDenoise + 0 + PictureDetelecine - keep_aspect + PictureHeight + 0 + PictureKeepRatio - max_height + PictureLeftCrop 0 - max_width + PicturePAR + 1 + PictureRightCrop 0 - pref_audio_list - - - audio_bitrate - 160 - audio_codec - ac3 - audio_drc - 1 - audio_mix - none - audio_rate - source - - - preset_description + PictureTopCrop + 0 + PictureWidth + 0 + PresetDescription HandBrake's preset for feature films. - preset_name + PresetName Film - preset_type + Subtitles + None + Type 0 - round_dimensions - - subtitle_lang - none - turbo + UsesMaxPictureSettings - two_pass + UsesPictureFilters - video_bitrate + UsesPictureSettings + 1 + VideoAvgBitrate 1800 - video_codec - x264 - video_quality - 65 - video_target_size + VideoEncoder + H.264 (x264) + VideoFramerate + Same as source + VideoGrayScale + + VideoQualitySlider + 0.64709997177124023 + VideoQualityType + 1 + VideoTargetSize 700 - vquality_type_bitrate + VideoTurboTwoPass - vquality_type_constant - - vquality_type_target - - x264_options + VideoTwoPass + + x264Option 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 + AudioList + + + AudioBitrate + 160 + AudioEncoder + AAC (faac) + AudioMixdown + Dolby Pro Logic II + AudioSamplerate + Auto + AudioTrack + 1 + AudioTrackDRCSlider + 1 + AudioTrackDescription + + + + ChapterMarkers + Default - anamorphic - - autocrop + FileFormat + MKV file + PictureAutoCrop - autoscale - - chapter_markers - - container - mkv - deblock + PictureBottomCrop 0 - decomb + PictureDeblock + 0 + PictureDecomb - deinterlace - none - denoise - none - detelecine + PictureDeinterlace + 0 + PictureDenoise + 0 + PictureDetelecine - framerate - source - grayscale - - keep_aspect + PictureHeight + 0 + PictureKeepRatio - max_height + PictureLeftCrop 0 - max_width + PicturePAR + 1 + PictureRightCrop 0 - pref_audio_list - - - audio_bitrate - 160 - audio_codec - faac - audio_drc - 1 - audio_mix - dpl2 - audio_rate - source - - - preset_description + PictureTopCrop + 0 + PictureWidth + 0 + PresetDescription HandBrake's settings for video from television. - preset_name + PresetName Television - preset_type + Subtitles + None + Type 0 - round_dimensions - - subtitle_lang - none - turbo + UsesMaxPictureSettings - two_pass + UsesPictureFilters - video_bitrate + UsesPictureSettings + 1 + VideoAvgBitrate 1300 - video_codec - x264 - video_quality - 65 - video_target_size + VideoEncoder + H.264 (x264) + VideoFramerate + Same as source + VideoGrayScale + + VideoQualitySlider + 0.64709997177124023 + VideoQualityType + 1 + VideoTargetSize 700 - vquality_type_bitrate + VideoTurboTwoPass - vquality_type_constant - - vquality_type_target - - x264_options + VideoTwoPass + + x264Option 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 - preset_name + Folder + + PresetName High Profile - preset_type - 2 + Type + 0 - preset_folder + ChildrenArray + AudioList + + + AudioBitrate + 128 + AudioEncoder + AAC (faac) + AudioMixdown + Dolby Pro Logic II + AudioSamplerate + 48 + AudioTrack + 1 + AudioTrackDRCSlider + 1 + AudioTrackDescription + + + + ChapterMarkers + Default - anamorphic - - autocrop + FileFormat + MP4 file + PictureAutoCrop - chapter_markers - - container - mp4 - deblock + PictureBottomCrop 0 - deinterlace - none - denoise - none - detelecine - - framerate - source - grayscale + PictureDeblock + 0 + PictureDeinterlace + 0 + PictureDenoise + 0 + PictureDetelecine - keep_aspect - - max_height + PictureHeight 208 - max_width + PictureKeepRatio + + PictureLeftCrop + 0 + PicturePAR + 0 + PictureRightCrop + 0 + PictureTopCrop + 0 + PictureWidth 368 - pref_audio_list - - - audio_bitrate - 128 - audio_codec - faac - audio_drc - 1 - audio_mix - dpl2 - audio_rate - 48 - - - preset_description + PresetDescription HandBrake's settings for the Sony PlayStation Portable. - preset_name + PresetName PSP - preset_type + Subtitles + None + Type 0 - round_dimensions - - subtitle_lang - none - two_pass + UsesMaxPictureSettings - video_bitrate - 1024 - video_codec - ffmpeg - video_quality - 65 - video_target_size - 700 - vquality_type_bitrate + UsesPictureFilters - vquality_type_constant + UsesPictureSettings + 1 + VideoAvgBitrate + 1024 + VideoEncoder + MPEG-4 (FFmpeg) + VideoFramerate + Same as source + VideoGrayScale - vquality_type_target + VideoQualitySlider + 0.64709997177124023 + VideoQualityType + 1 + VideoTargetSize + 700 + VideoTwoPass - x264_options + x264Option - Default + AudioList + + + AudioBitrate + 160 + AudioEncoder + AAC (faac) + AudioMixdown + Dolby Pro Logic II + AudioSamplerate + 48 + AudioTrack + 1 + AudioTrackDRCSlider + 1 + AudioTrackDescription + + + + ChapterMarkers - anamorphic - - autocrop + Default - autoscale - - chapter_markers + FileFormat + MP4 file + PictureAutoCrop - container - mp4 - deblock + PictureBottomCrop 0 - deinterlace - none - denoise - none - detelecine - - framerate - source - grayscale + PictureDeblock + 0 + PictureDeinterlace + 0 + PictureDenoise + 0 + PictureDetelecine - keep_aspect + PictureHeight + 0 + PictureKeepRatio - max_height + PictureLeftCrop 0 - max_width + PicturePAR + 1 + PictureRightCrop 0 - pref_audio_list - - - audio_bitrate - 160 - audio_codec - faac - audio_drc - 1 - audio_mix - dpl2 - audio_rate - 48 - - - preset_description + PictureTopCrop + 0 + PictureWidth + 0 + PresetDescription HandBrake's settings for the Sony PlayStation 3. - preset_name + PresetName PS3 - preset_type + Subtitles + None + Type 0 - round_dimensions - - subtitle_lang - none - two_pass - - video_bitrate - 2500 - video_codec - x264 - video_quality - 65 - video_target_size - 700 - vquality_type_bitrate + UsesMaxPictureSettings - vquality_type_constant + UsesPictureFilters + + UsesPictureSettings + 1 + VideoAvgBitrate + 2500 + VideoEncoder + H.264 (x264) + VideoFramerate + Same as source + VideoGrayScale - vquality_type_target + VideoQualitySlider + 0.64709997177124023 + VideoQualityType + 1 + VideoTargetSize + 700 + VideoTwoPass - x264_options + x264Option level=41:me=umh - Default + AudioList + + + AudioBitrate + 160 + AudioEncoder + AAC (faac) + AudioMixdown + Dolby Pro Logic II + AudioSamplerate + 48 + AudioTrack + 1 + AudioTrackDRCSlider + 1 + AudioTrackDescription + + + + ChapterMarkers - anamorphic - - autoscale - - chapter_markers + Default - container - mp4 - deblock + FileFormat + MP4 file + PictureBottomCrop 0 - deinterlace - none - denoise - none - detelecine - - framerate - source - grayscale + PictureDeblock + 0 + PictureDeinterlace + 0 + PictureDenoise + 0 + PictureDetelecine - keep_aspect + PictureHeight + 0 + PictureKeepRatio - max_height + PictureLeftCrop 0 - max_width + PicturePAR + 1 + PictureRightCrop 0 - pref_audio_list - - - audio_bitrate - 160 - audio_codec - faac - audio_drc - 1 - audio_mix - dpl2 - audio_rate - 48 - - - preset_description + PictureTopCrop + 0 + PictureWidth + 0 + PresetDescription HandBrake's settings for the Microsoft Xbox 360. - preset_name + PresetName Xbox 360 - preset_type + Subtitles + None + Type 0 - round_dimensions - - subtitle_lang - none - two_pass - - video_bitrate - 2000 - video_codec - x264 - video_quality - 65 - video_target_size - 700 - vquality_type_bitrate + UsesMaxPictureSettings + + UsesPictureFilters - vquality_type_constant + UsesPictureSettings + 1 + VideoAvgBitrate + 2000 + VideoEncoder + H.264 (x264) + VideoFramerate + Same as source + VideoGrayScale - vquality_type_target + VideoQualitySlider + 0.64709997177124023 + VideoQualityType + 1 + VideoTargetSize + 700 + VideoTwoPass - x264_options + x264Option 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 - preset_name + Folder + + PresetName Gaming Consoles - preset_type - 2 + Type + 0 widget-deps - anamorphic + AudioEncoder - keep_aspect - scale_height + AudioBitrate + AudioSamplerate + AudioMixdown + AudioTrackDRCSlider - audio_codec + ChapterMarkers - audio_bitrate - audio_rate - audio_mix - audio_drc + chapters_list - autocrop + FileFormat - crop_top - crop_bottom - crop_left - crop_right + Mp4LargeFile + Mp4HttpOptimize + Mp4iPodCompatible - autoscale + PictureAutoCrop + + PictureTopCrop + PictureBottomCrop + PictureLeftCrop + PictureRightCrop + + PictureDecomb + + PictureDeinterlace + tweak_PictureDeinterlace + + PictureKeepRatio - scale_width scale_height - chapter_markers + VideoEncoder - chapters_list + x264_tab + x264_tab_label + Mp4iPodCompatible + directqp - container + VideoTwoPass - large_mp4 - http_optimize_mp4 - ipod_file + VideoTurboTwoPass - decomb + anamorphic - deinterlace - tweak_deinterlace + PictureKeepRatio + scale_height - keep_aspect + autoscale + scale_width scale_height title @@ -6317,34 +6520,24 @@ R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A start_chapter end_chapter - two_pass - - turbo - use_source_name chapters_in_destination - video_codec - - x264_tab - x264_tab_label - ipod_file - vquality_type_bitrate - video_bitrate + VideoAvgBitrate vquality_type_constant - video_quality + VideoQualitySlider constant_rate_factor - two_pass - turbo + VideoTwoPass + VideoTurboTwoPass vquality_type_target - video_target_size + VideoTargetSize x264_bframes @@ -6367,119 +6560,169 @@ R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A widget-reverse-deps - audio_bitrate + AudioBitrate - audio_codec + AudioEncoder ac3 - audio_drc + AudioMixdown - audio_codec + AudioEncoder ac3 - audio_mix + AudioSamplerate - audio_codec + AudioEncoder ac3 - audio_rate + AudioTrackDRCSlider - audio_codec + AudioEncoder ac3 - chapters_in_destination + Mp4HttpOptimize - use_source_name - TRUE + FileFormat + mp4|m4v - chapters_label + Mp4LargeFile - title - none - + FileFormat + mp4|m4v + - chapters_list + Mp4iPodCompatible - chapter_markers - TRUE + FileFormat + mp4|m4v + + + + VideoEncoder + x264 - chapters_tab + PictureBottomCrop - title - none - + PictureAutoCrop + FALSE + - constant_rate_factor + PictureDeinterlace - vquality_type_constant + PictureDecomb TRUE - + - crop_bottom + PictureKeepRatio - autocrop + anamorphic FALSE - crop_left + PictureLeftCrop - autocrop + PictureAutoCrop FALSE - crop_right + PictureRightCrop - autocrop + PictureAutoCrop FALSE - crop_top + PictureTopCrop - autocrop + PictureAutoCrop FALSE - deinterlace + VideoAvgBitrate + + + vquality_type_bitrate + TRUE + + + + VideoQualitySlider - decomb + vquality_type_constant + TRUE + + + + VideoTargetSize + + + vquality_type_target + TRUE + + + + VideoTurboTwoPass + + + vquality_type_constant TRUE + + VideoTwoPass + TRUE + + - end_chapter + VideoTwoPass + + + vquality_type_constant + TRUE + + + + chapters_in_destination + + + use_source_name + TRUE + + + + chapters_label title @@ -6487,41 +6730,44 @@ R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A - http_optimize_mp4 + chapters_list - container - mp4|m4v + ChapterMarkers + TRUE - ipod_file + chapters_tab - container - mp4|m4v - + title + none + + + constant_rate_factor + - video_codec - x264 + vquality_type_constant + TRUE - keep_aspect + directqp - anamorphic - FALSE + VideoEncoder + x264|ffmpeg - large_mp4 + end_chapter - container - mp4|m4v - + title + none + picture_label @@ -6585,7 +6831,7 @@ R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A - keep_aspect + PictureKeepRatio FALSE @@ -6622,58 +6868,13 @@ R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A - turbo + tweak_PictureDeinterlace - vquality_type_constant + PictureDecomb TRUE - - two_pass - TRUE - - - - tweak_deinterlace - - - decomb - TRUE - - - - two_pass - - - vquality_type_constant - TRUE - - - - video_bitrate - - - vquality_type_bitrate - TRUE - - - - video_quality - - - vquality_type_constant - TRUE - - - - video_target_size - - - vquality_type_target - TRUE - - x264_bpyramid @@ -6710,7 +6911,7 @@ R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A x264_tab - video_codec + VideoEncoder x264 @@ -6718,7 +6919,7 @@ R2RrUAAABBgBAQACAAAAQAAAABAAAAAQ////AP///wD///8A////AP///wD///8A////AP///wD///8A x264_tab_label - video_codec + VideoEncoder x264 diff --git a/gtk/src/settings.c b/gtk/src/settings.c index 4cb797fe..0b5c9028 100644 --- a/gtk/src/settings.c +++ b/gtk/src/settings.c @@ -597,76 +597,3 @@ ghb_ui_update(signal_user_data_t *ud, const gchar *name, const GValue *value) return 0; } -gint -ghb_pref_acount(GValue *settings) -{ - GValue *acodec; - acodec = ghb_settings_get_value(settings, "pref_audio_codec"); - return ghb_array_len(acodec); -} - -gint -ghb_pref_acodec(GValue *settings, gint index) -{ - GValue *acodec; - gint count; - - acodec = ghb_settings_get_value(settings, "pref_audio_codec"); - count = ghb_array_len(acodec); - if (index >= count) - return 0; - return ghb_value_int(ghb_array_get_nth(acodec, index)); -} - -gint -ghb_pref_bitrate(GValue *settings, gint index) -{ - GValue *bitrate; - gint count; - - bitrate = ghb_settings_get_value(settings, "pref_audio_bitrate"); - count = ghb_array_len(bitrate); - if (index >= count) - return 0; - return ghb_value_int(ghb_array_get_nth(bitrate, index)); -} - -gint -ghb_pref_rate(GValue *settings, gint index) -{ - GValue *rate; - gint count; - - rate = ghb_settings_get_value(settings, "pref_audio_rate"); - count = ghb_array_len(rate); - if (index >= count) - return 0; - return ghb_value_int(ghb_array_get_nth(rate, index)); -} - -gint -ghb_pref_mix(GValue *settings, gint index) -{ - GValue *mix; - gint count; - - mix = ghb_settings_get_value(settings, "pref_audio_mix"); - count = ghb_array_len(mix); - if (index >= count) - return 0; - return ghb_value_int(ghb_array_get_nth(mix, index)); -} - -gdouble -ghb_pref_drc(GValue *settings, gint index) -{ - GValue *drc; - gint count; - - drc = ghb_settings_get_value(settings, "pref_audio_drc"); - count = ghb_array_len(drc); - if (index >= count) - return 0; - return ghb_value_double(ghb_array_get_nth(drc, index)); -} - diff --git a/gtk/src/settings.h b/gtk/src/settings.h index e328ba67..b7887993 100644 --- a/gtk/src/settings.h +++ b/gtk/src/settings.h @@ -91,12 +91,4 @@ void ghb_widget_to_setting(GValue *settings, GtkWidget *widget); int ghb_ui_update( signal_user_data_t *ud, const gchar *name, const GValue *value); - -gint ghb_pref_acount(GValue *settings); -gint ghb_pref_acodec(GValue *settings, gint index); -gint ghb_pref_bitrate(GValue *settings, gint index); -gint ghb_pref_rate(GValue *settings, gint index); -gint ghb_pref_mix(GValue *settings, gint index); -gdouble ghb_pref_drc(GValue *settings, gint index); - #endif // _SETTINGS_H_ diff --git a/gtk/src/standard_presets.xml b/gtk/src/standard_presets.xml index 3238466d..94716c74 100644 --- a/gtk/src/standard_presets.xml +++ b/gtk/src/standard_presets.xml @@ -3,1210 +3,1390 @@ - preset_folder + ChildrenArray - Default - - anamorphic - - autocrop - - chapter_markers - - container - mp4 - deblock - 0 - deinterlace - none - denoise - none - detelecine - - framerate - source - grayscale - - keep_aspect - - large_mp4 - - max_height - 0 - max_width - 720 - pref_audio_list + AudioList - audio_bitrate + AudioBitrate 160 - audio_codec - faac - audio_drc - 1 - audio_mix - dpl2 - audio_rate + AudioEncoder + AAC (faac) + AudioMixdown + Dolby Pro Logic II + AudioSamplerate 48 + AudioTrack + 1 + AudioTrackDRCSlider + 1 + AudioTrackDescription + - audio_bitrate + AudioBitrate 160 - audio_codec - ac3 - audio_drc + AudioEncoder + AC3 Passthru + AudioMixdown + AC3 Passthru + AudioSamplerate + Auto + AudioTrack + 1 + AudioTrackDRCSlider 1 - audio_mix - none - audio_rate - source + AudioTrackDescription + - preset_description + ChapterMarkers + + Default + + FileFormat + MP4 file + Folder + + Mp4LargeFile + + PictureAutoCrop + + PictureBottomCrop + 0 + PictureDeblock + 0 + PictureDeinterlace + 0 + PictureDenoise + 0 + PictureDetelecine + + PictureHeight + 0 + PictureKeepRatio + + PictureLeftCrop + 0 + PicturePAR + 2 + PictureRightCrop + 0 + PictureTopCrop + 0 + PictureWidth + 720 + PresetDescription HandBrake's universally compatible, full resolution settings for all current Apple devices: iPod, iPhone, AppleTV, and Macs - preset_name + PresetName Universal - preset_type + Subtitles + None + Type 0 - round_dimensions + UsesPictureFilters - subtitle_lang - none - two_pass - - video_bitrate + UsesPictureSettings + 1 + VideoAvgBitrate 2500 - video_codec - x264 - video_quality - 59 - video_target_size + VideoEncoder + H.264 (x264) + VideoFramerate + Same as source + VideoGrayScale + + VideoQualitySlider + 0.5899999737739563 + VideoQualityType + 2 + VideoTargetSize 700 - vquality_type_bitrate + VideoTwoPass - vquality_type_constant - - vquality_type_target - - x264_options + x264Option level=30:cabac=0:ref=3:mixed-refs=1:analyse=all:me=umh:no-fast-pskip=1:subme=8 - Default - - anamorphic - - autocrop - - chapter_markers - - container - mp4 - deblock - 0 - deinterlace - none - denoise - none - detelecine - - framerate - source - grayscale - - keep_aspect - - large_mp4 - - max_height - 0 - max_width - 960 - pref_audio_list + AudioList - audio_bitrate + AudioBitrate 160 - audio_codec - faac - audio_drc - 1 - audio_mix - dpl2 - audio_rate + AudioEncoder + AAC (faac) + AudioMixdown + Dolby Pro Logic II + AudioSamplerate 48 + AudioTrack + 1 + AudioTrackDRCSlider + 1 + AudioTrackDescription + - audio_bitrate + AudioBitrate 160 - audio_codec - ac3 - audio_drc + AudioEncoder + AC3 Passthru + AudioMixdown + AC3 Passthru + AudioSamplerate + Auto + AudioTrack + 1 + AudioTrackDRCSlider 1 - audio_mix - none - audio_rate - source + AudioTrackDescription + - preset_description + ChapterMarkers + + Default + + FileFormat + MP4 file + Folder + + Mp4LargeFile + + PictureAutoCrop + + PictureBottomCrop + 0 + PictureDeblock + 0 + PictureDeinterlace + 0 + PictureDenoise + 0 + PictureDetelecine + + PictureHeight + 0 + PictureKeepRatio + + PictureLeftCrop + 0 + PicturePAR + 2 + PictureRightCrop + 0 + PictureTopCrop + 0 + PictureWidth + 960 + PresetDescription 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. - preset_name + PresetName AppleTV - preset_type + Subtitles + None + Type 0 - round_dimensions + UsesPictureFilters - subtitle_lang - none - two_pass - - video_bitrate + UsesPictureSettings + 1 + VideoAvgBitrate 2500 - video_codec - x264 - video_quality - 59 - video_target_size + VideoEncoder + H.264 (x264) + VideoFramerate + Same as source + VideoGrayScale + + VideoQualitySlider + 0.5899999737739563 + VideoQualityType + 2 + VideoTargetSize 700 - vquality_type_bitrate + VideoTwoPass - vquality_type_constant - - vquality_type_target - - x264_options + x264Option 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 - preset_folder + ChildrenArray + AudioList + + + AudioBitrate + 160 + AudioEncoder + AAC (faac) + AudioMixdown + Dolby Pro Logic II + AudioSamplerate + 48 + AudioTrack + 1 + AudioTrackDRCSlider + 1 + AudioTrackDescription + + + + ChapterMarkers + Default - anamorphic - - autocrop + FileFormat + MP4 file + Mp4iPodCompatible - chapter_markers + PictureAutoCrop - container - mp4 - deblock + PictureBottomCrop 0 - deinterlace - none - denoise - none - detelecine - - framerate - source - grayscale + PictureDeblock + 0 + PictureDeinterlace + 0 + PictureDenoise + 0 + PictureDetelecine - ipod_file - - keep_aspect + PictureHeight + 0 + PictureKeepRatio - max_height + PictureLeftCrop + 0 + PicturePAR + 0 + PictureRightCrop 0 - max_width + PictureTopCrop + 0 + PictureWidth 320 - pref_audio_list - - - audio_bitrate - 160 - audio_codec - faac - audio_drc - 1 - audio_mix - dpl2 - audio_rate - 48 - - - preset_description + PresetDescription HandBrake's low resolution settings for the iPod. Optimized for great playback on the iPod screen, with smaller file size. - preset_name + PresetName iPod Classic & iPod Nano - preset_type + Subtitles + None + Type 0 - round_dimensions - - subtitle_lang - none - two_pass + UsesMaxPictureSettings - video_bitrate - 700 - video_codec - x264 - video_quality - 65 - video_target_size - 700 - vquality_type_bitrate + UsesPictureFilters - vquality_type_constant + UsesPictureSettings + 1 + VideoAvgBitrate + 700 + VideoEncoder + H.264 (x264) + VideoFramerate + Same as source + VideoGrayScale - vquality_type_target + VideoQualitySlider + 0.64709997177124023 + VideoQualityType + 1 + VideoTargetSize + 700 + VideoTwoPass - x264_options + x264Option level=30:bframes=0:cabac=0:ref=1:vbv-maxrate=768:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1 + AudioList + + + AudioBitrate + 128 + AudioEncoder + AAC (faac) + AudioMixdown + Dolby Pro Logic II + AudioSamplerate + 48 + AudioTrack + 1 + AudioTrackDRCSlider + 1 + AudioTrackDescription + + + + ChapterMarkers + Default - anamorphic - - autocrop + FileFormat + MP4 file + Mp4iPodCompatible - chapter_markers + PictureAutoCrop - container - mp4 - deblock + PictureBottomCrop 0 - deinterlace - none - denoise - none - detelecine - - framerate - source - grayscale + PictureDeblock + 0 + PictureDeinterlace + 0 + PictureDenoise + 0 + PictureDetelecine - ipod_file - - keep_aspect + PictureHeight + 0 + PictureKeepRatio - max_height + PictureLeftCrop 0 - max_width + PicturePAR + 0 + PictureRightCrop + 0 + PictureTopCrop + 0 + PictureWidth 480 - pref_audio_list - - - audio_bitrate - 128 - audio_codec - faac - audio_drc - 1 - audio_mix - dpl2 - audio_rate - 48 - - - preset_description + PresetDescription HandBrake's settings for the iPhone and iPod Touch. - preset_name + PresetName iPhone & iPod Touch - preset_type + Subtitles + None + Type 0 - round_dimensions - - subtitle_lang - none - two_pass + UsesMaxPictureSettings - video_bitrate - 960 - video_codec - x264 - video_quality - 65 - video_target_size - 700 - vquality_type_bitrate + UsesPictureFilters - vquality_type_constant + UsesPictureSettings + 1 + VideoAvgBitrate + 960 + VideoEncoder + H.264 (x264) + VideoFramerate + Same as source + VideoGrayScale - vquality_type_target + VideoQualitySlider + 0.64709997177124023 + VideoQualityType + 1 + VideoTargetSize + 700 + VideoTwoPass - x264_options + x264Option level=30:cabac=0:ref=1:analyse=all:me=umh:no-fast-pskip=1:trellis=1 + AudioList + + + AudioBitrate + 160 + AudioEncoder + AAC (faac) + AudioMixdown + Dolby Pro Logic II + AudioSamplerate + 48 + AudioTrack + 1 + AudioTrackDRCSlider + 1 + AudioTrackDescription + + + + ChapterMarkers + Default - anamorphic - - autocrop + FileFormat + MP4 file + Mp4iPodCompatible - chapter_markers + PictureAutoCrop - container - mp4 - deblock + PictureBottomCrop 0 - deinterlace - none - denoise - none - detelecine - - framerate - source - grayscale + PictureDeblock + 0 + PictureDeinterlace + 0 + PictureDenoise + 0 + PictureDetelecine - ipod_file - - keep_aspect + PictureHeight + 0 + PictureKeepRatio - max_height + PictureLeftCrop + 0 + PicturePAR + 0 + PictureRightCrop + 0 + PictureTopCrop 0 - max_width + PictureWidth 640 - pref_audio_list - - - audio_bitrate - 160 - audio_codec - faac - audio_drc - 1 - audio_mix - dpl2 - audio_rate - 48 - - - preset_description + PresetDescription HandBrake's high resolution settings for older 5 and 5.5G iPods. Good video quality, great for viewing on a TV using your iPod - preset_name + PresetName iPod Legacy - preset_type + Subtitles + None + Type 0 - round_dimensions - - subtitle_lang - none - two_pass + UsesMaxPictureSettings - video_bitrate - 1500 - video_codec - x264 - video_quality - 65 - video_target_size - 700 - vquality_type_bitrate + UsesPictureFilters - vquality_type_constant + UsesPictureSettings + 1 + VideoAvgBitrate + 1500 + VideoEncoder + H.264 (x264) + VideoFramerate + Same as source + VideoGrayScale - vquality_type_target + VideoQualitySlider + 0.64709997177124023 + VideoQualityType + 1 + VideoTargetSize + 700 + VideoTwoPass - x264_options + x264Option level=30:bframes=0:cabac=0:ref=1:vbv-maxrate=1500:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1 - preset_name + Folder + + PresetName iPod & iPhone - preset_type - 2 + Type + 0 + AudioList + + + AudioBitrate + 160 + AudioEncoder + AAC (faac) + AudioMixdown + Dolby Pro Logic II + AudioSamplerate + Auto + AudioTrack + 1 + AudioTrackDRCSlider + 1 + AudioTrackDescription + + + + ChapterMarkers + Default - anamorphic - - autocrop + FileFormat + MP4 file + PictureAutoCrop - autoscale - - chapter_markers - - container - mp4 - deblock - 0 - deinterlace - none - denoise - none - detelecine - - framerate - source - grayscale + PictureBottomCrop + 0 + PictureDeblock + 0 + PictureDeinterlace + 0 + PictureDenoise + 0 + PictureDetelecine - keep_aspect + PictureHeight + 0 + PictureKeepRatio - max_height + PictureLeftCrop 0 - max_width + PicturePAR + 1 + PictureRightCrop 0 - pref_audio_list - - - audio_bitrate - 160 - audio_codec - faac - audio_drc - 1 - audio_mix - dpl2 - audio_rate - source - - - preset_description + PictureTopCrop + 0 + PictureWidth + 0 + PresetDescription 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. - preset_name + PresetName QuickTime - preset_type + Subtitles + None + Type 0 - round_dimensions - - subtitle_lang - none - turbo + UsesMaxPictureSettings - two_pass + UsesPictureFilters - video_bitrate + UsesPictureSettings + 1 + VideoAvgBitrate 1800 - video_codec - x264 - video_quality - 65 - video_target_size + VideoEncoder + H.264 (x264) + VideoFramerate + Same as source + VideoGrayScale + + VideoQualitySlider + 0.64709997177124023 + VideoQualityType + 1 + VideoTargetSize 700 - vquality_type_bitrate + VideoTurboTwoPass - vquality_type_constant - - vquality_type_target - - x264_options + VideoTwoPass + + x264Option 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 - preset_name + Folder + + PresetName Apple - preset_type - 2 + Type + 0 - preset_folder + ChildrenArray - Default - - anamorphic - - autocrop + AudioList + + + AudioBitrate + 160 + AudioEncoder + AAC (faac) + AudioMixdown + Dolby Pro Logic II + AudioSamplerate + Auto + AudioTrack + 1 + AudioTrackDRCSlider + 1 + AudioTrackDescription + + + + ChapterMarkers - autoscale + Default - chapter_markers + FileFormat + MP4 file + PictureAutoCrop - container - mp4 - deblock - 0 - deinterlace - none - denoise - none - detelecine - - framerate - source - grayscale + PictureBottomCrop + 0 + PictureDeblock + 0 + PictureDeinterlace + 0 + PictureDenoise + 0 + PictureDetelecine - keep_aspect + PictureHeight + 0 + PictureKeepRatio - max_height + PictureLeftCrop 0 - max_width + PicturePAR + 1 + PictureRightCrop 0 - pref_audio_list - - - audio_bitrate - 160 - audio_codec - faac - audio_drc - 1 - audio_mix - dpl2 - audio_rate - source - - - preset_description + PictureTopCrop + 0 + PictureWidth + 0 + PresetDescription HandBrake's normal, default settings. - preset_name + PresetName Normal - preset_type + Subtitles + None + Type 0 - round_dimensions - - subtitle_lang - none - turbo + UsesMaxPictureSettings - two_pass + UsesPictureFilters - video_bitrate + UsesPictureSettings + 1 + VideoAvgBitrate 1500 - video_codec - x264 - video_quality - 65 - video_target_size + VideoEncoder + H.264 (x264) + VideoFramerate + Same as source + VideoGrayScale + + VideoQualitySlider + 0.64709997177124023 + VideoQualityType + 1 + VideoTargetSize 700 - vquality_type_bitrate + VideoTurboTwoPass - vquality_type_constant - - vquality_type_target - - x264_options + VideoTwoPass + + x264Option ref=2:bframes=2:me=umh - Default + AudioList + + + AudioBitrate + 160 + AudioEncoder + AAC (faac) + AudioMixdown + Dolby Pro Logic II + AudioSamplerate + Auto + AudioTrack + 1 + AudioTrackDRCSlider + 1 + AudioTrackDescription + + + + ChapterMarkers - anamorphic + Default - autocrop - - autoscale + FileFormat + MP4 file + PictureAutoCrop - chapter_markers - - container - mp4 - deblock - 0 - deinterlace - none - denoise - none - detelecine - - framerate - source - grayscale + PictureBottomCrop + 0 + PictureDeblock + 0 + PictureDeinterlace + 0 + PictureDenoise + 0 + PictureDetelecine - keep_aspect + PictureHeight + 0 + PictureKeepRatio - max_height + PictureLeftCrop 0 - max_width + PicturePAR 0 - pref_audio_list - - - audio_bitrate - 160 - audio_codec - faac - audio_drc - 1 - audio_mix - dpl2 - audio_rate - source - - - preset_description + PictureRightCrop + 0 + PictureTopCrop + 0 + PictureWidth + 0 + PresetDescription HandBrake's traditional, faster, lower-quality settings. - preset_name + PresetName Classic - preset_type + Subtitles + None + Type 0 - round_dimensions + UsesMaxPictureSettings - subtitle_lang - none - two_pass - - video_bitrate + UsesPictureFilters + + UsesPictureSettings + 1 + VideoAvgBitrate 1000 - video_codec - ffmpeg - video_quality - 65 - video_target_size + VideoEncoder + MPEG-4 (FFmpeg) + VideoFramerate + Same as source + VideoGrayScale + + VideoQualitySlider + 0.64709997177124023 + VideoQualityType + 1 + VideoTargetSize 700 - vquality_type_bitrate - - vquality_type_constant - - vquality_type_target + VideoTwoPass - x264_options + x264Option - preset_name + Folder + + PresetName Basic - preset_type - 2 + Type + 0 - preset_folder + ChildrenArray + AudioList + + + AudioBitrate + 160 + AudioEncoder + AAC (faac) + AudioMixdown + Dolby Pro Logic II + AudioSamplerate + Auto + AudioTrack + 1 + AudioTrackDRCSlider + 1 + AudioTrackDescription + + + + ChapterMarkers + Default - anamorphic - - autocrop - - autoscale + FileFormat + MKV file + PictureAutoCrop - chapter_markers - - container - mkv - deblock + PictureBottomCrop + 0 + PictureDeblock 0 - decomb + PictureDecomb - deinterlace - none - denoise - none - detelecine + PictureDeinterlace + 0 + PictureDenoise + 0 + PictureDetelecine - framerate - source - grayscale - - keep_aspect + PictureHeight + 0 + PictureKeepRatio - max_height + PictureLeftCrop 0 - max_width + PicturePAR + 1 + PictureRightCrop 0 - pref_audio_list - - - audio_bitrate - 160 - audio_codec - faac - audio_drc - 1 - audio_mix - dpl2 - audio_rate - source - - - preset_description + PictureTopCrop + 0 + PictureWidth + 0 + PresetDescription HandBrake's settings for cartoons, anime, and CGI. - preset_name + PresetName Animation - preset_type + Subtitles + None + Type 0 - round_dimensions - - subtitle_lang - none - turbo + UsesMaxPictureSettings - two_pass + UsesPictureFilters - video_bitrate + UsesPictureSettings + 1 + VideoAvgBitrate 1000 - video_codec - x264 - video_quality - 65 - video_target_size + VideoEncoder + H.264 (x264) + VideoFramerate + Same as source + VideoGrayScale + + VideoQualitySlider + 0.64709997177124023 + VideoQualityType + 1 + VideoTargetSize 700 - vquality_type_bitrate + VideoTurboTwoPass - vquality_type_constant - - vquality_type_target - - x264_options + VideoTwoPass + + x264Option 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 + AudioList + + + AudioBitrate + 160 + AudioEncoder + AC3 Passthru + AudioMixdown + AC3 Passthru + AudioSamplerate + Auto + AudioTrack + 1 + AudioTrackDRCSlider + 1 + AudioTrackDescription + + + + ChapterMarkers + Default - anamorphic - - autocrop + FileFormat + MKV file + PictureAutoCrop - autoscale - - chapter_markers - - container - mkv - deblock - 0 - deinterlace - none - denoise - none - detelecine - - framerate - source - grayscale + PictureBottomCrop + 0 + PictureDeblock + 0 + PictureDeinterlace + 0 + PictureDenoise + 0 + PictureDetelecine - keep_aspect + PictureHeight + 0 + PictureKeepRatio - max_height + PictureLeftCrop 0 - max_width + PicturePAR + 1 + PictureRightCrop 0 - pref_audio_list - - - audio_bitrate - 160 - audio_codec - ac3 - audio_drc - 1 - audio_mix - none - audio_rate - source - - - preset_description + PictureTopCrop + 0 + PictureWidth + 0 + PresetDescription HandBrake's preset for consistently excellent quality in one pass, with the downside of entirely unpredictable file sizes and bitrates. - preset_name + PresetName Constant Quality Rate - preset_type + Subtitles + None + Type 0 - round_dimensions - - subtitle_lang - none - turbo - - two_pass - - video_bitrate + UsesMaxPictureSettings + + UsesPictureFilters + + UsesPictureSettings + 1 + VideoAvgBitrate 2000 - video_codec - x264 - video_quality - 60 - video_target_size + VideoEncoder + H.264 (x264) + VideoFramerate + Same as source + VideoGrayScale + + VideoQualitySlider + 0.60000002384185791 + VideoQualityType + 2 + VideoTargetSize 700 - vquality_type_bitrate + VideoTurboTwoPass - vquality_type_constant - - vquality_type_target + VideoTwoPass - x264_options + x264Option 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 + AudioList + + + AudioBitrate + 160 + AudioEncoder + AC3 Passthru + AudioMixdown + AC3 Passthru + AudioSamplerate + Auto + AudioTrack + 1 + AudioTrackDRCSlider + 1 + AudioTrackDescription + + + + ChapterMarkers + Default - anamorphic - - autocrop - - autoscale + FileFormat + MKV file + PictureAutoCrop - chapter_markers - - container - mkv - deblock - 0 - deinterlace - none - denoise - none - detelecine - - framerate - source - grayscale + PictureBottomCrop + 0 + PictureDeblock + 0 + PictureDeinterlace + 0 + PictureDenoise + 0 + PictureDetelecine - keep_aspect + PictureHeight + 0 + PictureKeepRatio - max_height + PictureLeftCrop 0 - max_width + PicturePAR + 1 + PictureRightCrop 0 - pref_audio_list - - - audio_bitrate - 160 - audio_codec - ac3 - audio_drc - 1 - audio_mix - none - audio_rate - source - - - preset_description + PictureTopCrop + 0 + PictureWidth + 0 + PresetDescription HandBrake's preset for feature films. - preset_name + PresetName Film - preset_type + Subtitles + None + Type 0 - round_dimensions - - subtitle_lang - none - turbo + UsesMaxPictureSettings - two_pass + UsesPictureFilters - video_bitrate + UsesPictureSettings + 1 + VideoAvgBitrate 1800 - video_codec - x264 - video_quality - 65 - video_target_size + VideoEncoder + H.264 (x264) + VideoFramerate + Same as source + VideoGrayScale + + VideoQualitySlider + 0.64709997177124023 + VideoQualityType + 1 + VideoTargetSize 700 - vquality_type_bitrate + VideoTurboTwoPass - vquality_type_constant - - vquality_type_target - - x264_options + VideoTwoPass + + x264Option 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 + AudioList + + + AudioBitrate + 160 + AudioEncoder + AAC (faac) + AudioMixdown + Dolby Pro Logic II + AudioSamplerate + Auto + AudioTrack + 1 + AudioTrackDRCSlider + 1 + AudioTrackDescription + + + + ChapterMarkers + Default - anamorphic - - autocrop - - autoscale + FileFormat + MKV file + PictureAutoCrop - chapter_markers - - container - mkv - deblock + PictureBottomCrop + 0 + PictureDeblock 0 - decomb + PictureDecomb - deinterlace - none - denoise - none - detelecine + PictureDeinterlace + 0 + PictureDenoise + 0 + PictureDetelecine - framerate - source - grayscale - - keep_aspect + PictureHeight + 0 + PictureKeepRatio - max_height + PictureLeftCrop 0 - max_width + PicturePAR + 1 + PictureRightCrop 0 - pref_audio_list - - - audio_bitrate - 160 - audio_codec - faac - audio_drc - 1 - audio_mix - dpl2 - audio_rate - source - - - preset_description + PictureTopCrop + 0 + PictureWidth + 0 + PresetDescription HandBrake's settings for video from television. - preset_name + PresetName Television - preset_type + Subtitles + None + Type 0 - round_dimensions - - subtitle_lang - none - turbo + UsesMaxPictureSettings - two_pass + UsesPictureFilters - video_bitrate + UsesPictureSettings + 1 + VideoAvgBitrate 1300 - video_codec - x264 - video_quality - 65 - video_target_size + VideoEncoder + H.264 (x264) + VideoFramerate + Same as source + VideoGrayScale + + VideoQualitySlider + 0.64709997177124023 + VideoQualityType + 1 + VideoTargetSize 700 - vquality_type_bitrate + VideoTurboTwoPass - vquality_type_constant - - vquality_type_target - - x264_options + VideoTwoPass + + x264Option 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 - preset_name + Folder + + PresetName High Profile - preset_type - 2 + Type + 0 - preset_folder + ChildrenArray - Default - - anamorphic - - autocrop - - chapter_markers - - container - mp4 - deblock - 0 - deinterlace - none - denoise - none - detelecine - - framerate - source - grayscale - - keep_aspect - - max_height - 208 - max_width - 368 - pref_audio_list + AudioList - audio_bitrate + AudioBitrate 128 - audio_codec - faac - audio_drc - 1 - audio_mix - dpl2 - audio_rate + AudioEncoder + AAC (faac) + AudioMixdown + Dolby Pro Logic II + AudioSamplerate 48 + AudioTrack + 1 + AudioTrackDRCSlider + 1 + AudioTrackDescription + - preset_description + ChapterMarkers + + Default + + FileFormat + MP4 file + PictureAutoCrop + + PictureBottomCrop + 0 + PictureDeblock + 0 + PictureDeinterlace + 0 + PictureDenoise + 0 + PictureDetelecine + + PictureHeight + 208 + PictureKeepRatio + + PictureLeftCrop + 0 + PicturePAR + 0 + PictureRightCrop + 0 + PictureTopCrop + 0 + PictureWidth + 368 + PresetDescription HandBrake's settings for the Sony PlayStation Portable. - preset_name + PresetName PSP - preset_type + Subtitles + None + Type 0 - round_dimensions - - subtitle_lang - none - two_pass + UsesMaxPictureSettings - video_bitrate + UsesPictureFilters + + UsesPictureSettings + 1 + VideoAvgBitrate 1024 - video_codec - ffmpeg - video_quality - 65 - video_target_size + VideoEncoder + MPEG-4 (FFmpeg) + VideoFramerate + Same as source + VideoGrayScale + + VideoQualitySlider + 0.64709997177124023 + VideoQualityType + 1 + VideoTargetSize 700 - vquality_type_bitrate - - vquality_type_constant - - vquality_type_target + VideoTwoPass - x264_options + x264Option - Default - - anamorphic - - autocrop + AudioList + + + AudioBitrate + 160 + AudioEncoder + AAC (faac) + AudioMixdown + Dolby Pro Logic II + AudioSamplerate + 48 + AudioTrack + 1 + AudioTrackDRCSlider + 1 + AudioTrackDescription + + + + ChapterMarkers - autoscale - - chapter_markers + Default - container - mp4 - deblock - 0 - deinterlace - none - denoise - none - detelecine + FileFormat + MP4 file + PictureAutoCrop - framerate - source - grayscale + PictureBottomCrop + 0 + PictureDeblock + 0 + PictureDeinterlace + 0 + PictureDenoise + 0 + PictureDetelecine - keep_aspect + PictureHeight + 0 + PictureKeepRatio - max_height + PictureLeftCrop 0 - max_width + PicturePAR + 1 + PictureRightCrop 0 - pref_audio_list - - - audio_bitrate - 160 - audio_codec - faac - audio_drc - 1 - audio_mix - dpl2 - audio_rate - 48 - - - preset_description + PictureTopCrop + 0 + PictureWidth + 0 + PresetDescription HandBrake's settings for the Sony PlayStation 3. - preset_name + PresetName PS3 - preset_type + Subtitles + None + Type 0 - round_dimensions - - subtitle_lang - none - two_pass - - video_bitrate + UsesMaxPictureSettings + + UsesPictureFilters + + UsesPictureSettings + 1 + VideoAvgBitrate 2500 - video_codec - x264 - video_quality - 65 - video_target_size + VideoEncoder + H.264 (x264) + VideoFramerate + Same as source + VideoGrayScale + + VideoQualitySlider + 0.64709997177124023 + VideoQualityType + 1 + VideoTargetSize 700 - vquality_type_bitrate - - vquality_type_constant - - vquality_type_target + VideoTwoPass - x264_options + x264Option level=41:me=umh - Default - - anamorphic - - autoscale - - chapter_markers - - container - mp4 - deblock - 0 - deinterlace - none - denoise - none - detelecine - - framerate - source - grayscale - - keep_aspect - - max_height - 0 - max_width - 0 - pref_audio_list + AudioList - audio_bitrate + AudioBitrate 160 - audio_codec - faac - audio_drc - 1 - audio_mix - dpl2 - audio_rate + AudioEncoder + AAC (faac) + AudioMixdown + Dolby Pro Logic II + AudioSamplerate 48 + AudioTrack + 1 + AudioTrackDRCSlider + 1 + AudioTrackDescription + - preset_description - HandBrake's settings for the Microsoft Xbox 360. - preset_name - Xbox 360 - preset_type + ChapterMarkers + + Default + + FileFormat + MP4 file + PictureBottomCrop 0 - round_dimensions + PictureDeblock + 0 + PictureDeinterlace + 0 + PictureDenoise + 0 + PictureDetelecine - subtitle_lang - none - two_pass + PictureHeight + 0 + PictureKeepRatio - video_bitrate + PictureLeftCrop + 0 + PicturePAR + 1 + PictureRightCrop + 0 + PictureTopCrop + 0 + PictureWidth + 0 + PresetDescription + HandBrake's settings for the Microsoft Xbox 360. + PresetName + Xbox 360 + Subtitles + None + Type + 0 + UsesMaxPictureSettings + + UsesPictureFilters + + UsesPictureSettings + 1 + VideoAvgBitrate 2000 - video_codec - x264 - video_quality - 65 - video_target_size + VideoEncoder + H.264 (x264) + VideoFramerate + Same as source + VideoGrayScale + + VideoQualitySlider + 0.64709997177124023 + VideoQualityType + 1 + VideoTargetSize 700 - vquality_type_bitrate - - vquality_type_constant - - vquality_type_target + VideoTwoPass - x264_options + x264Option 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 - preset_name + Folder + + PresetName Gaming Consoles - preset_type - 2 + Type + 0 diff --git a/gtk/src/values.c b/gtk/src/values.c index 4124b0a2..d8dd7433 100644 --- a/gtk/src/values.c +++ b/gtk/src/values.c @@ -683,16 +683,23 @@ ghb_array_len(const GValue *gval) static void xform_string_int(const GValue *sval, GValue *ival) { + gchar *end; + const gchar *str = g_value_get_string(sval); - gint val = g_strtod(str, NULL); + gint val = g_strtod(str, &end); + if (*end) + val = ~0>>1; g_value_set_int(ival, val); } static void xform_string_int64(const GValue *sval, GValue *ival) { + gchar *end; const gchar *str = g_value_get_string(sval); - gint64 val = g_strtod(str, NULL); + gint64 val = g_strtod(str, &end); + if (*end) + val = ~0L>>1; g_value_set_int64(ival, val); } diff --git a/gtk/src/widget_deps b/gtk/src/widget_deps index c7150471..eb9ef27d 100644 --- a/gtk/src/widget_deps +++ b/gtk/src/widget_deps @@ -2,47 +2,58 @@ - anamorphic + AudioEncoder - keep_aspect - scale_height + AudioBitrate + AudioSamplerate + AudioMixdown + AudioTrackDRCSlider - audio_codec + ChapterMarkers - audio_bitrate - audio_rate - audio_mix - audio_drc + chapters_list - autocrop + FileFormat - crop_top - crop_bottom - crop_left - crop_right + Mp4LargeFile + Mp4HttpOptimize + Mp4iPodCompatible - autoscale + PictureAutoCrop + + PictureTopCrop + PictureBottomCrop + PictureLeftCrop + PictureRightCrop + + PictureDecomb + + PictureDeinterlace + tweak_PictureDeinterlace + + PictureKeepRatio - scale_width scale_height - chapter_markers + VideoEncoder - chapters_list + x264_tab + x264_tab_label + Mp4iPodCompatible + directqp - container + VideoTwoPass - large_mp4 - http_optimize_mp4 - ipod_file + VideoTurboTwoPass - decomb + anamorphic - deinterlace - tweak_deinterlace + PictureKeepRatio + scale_height - keep_aspect + autoscale + scale_width scale_height title @@ -60,34 +71,24 @@ start_chapter end_chapter - two_pass - - turbo - use_source_name chapters_in_destination - video_codec - - x264_tab - x264_tab_label - ipod_file - vquality_type_bitrate - video_bitrate + VideoAvgBitrate vquality_type_constant - video_quality + VideoQualitySlider constant_rate_factor - two_pass - turbo + VideoTwoPass + VideoTurboTwoPass vquality_type_target - video_target_size + VideoTargetSize x264_bframes diff --git a/gtk/src/widget_reverse_deps b/gtk/src/widget_reverse_deps index bae2d8e0..fa9c804c 100644 --- a/gtk/src/widget_reverse_deps +++ b/gtk/src/widget_reverse_deps @@ -2,119 +2,169 @@ - audio_bitrate + AudioBitrate - audio_codec + AudioEncoder ac3 - audio_drc + AudioMixdown - audio_codec + AudioEncoder ac3 - audio_mix + AudioSamplerate - audio_codec + AudioEncoder ac3 - audio_rate + AudioTrackDRCSlider - audio_codec + AudioEncoder ac3 - chapters_in_destination + Mp4HttpOptimize - use_source_name - TRUE + FileFormat + mp4|m4v - chapters_label + Mp4LargeFile - title - none - + FileFormat + mp4|m4v + - chapters_list + Mp4iPodCompatible - chapter_markers - TRUE + FileFormat + mp4|m4v + + + + VideoEncoder + x264 - chapters_tab + PictureBottomCrop - title - none - + PictureAutoCrop + FALSE + - constant_rate_factor + PictureDeinterlace - vquality_type_constant + PictureDecomb TRUE - + - crop_bottom + PictureKeepRatio - autocrop + anamorphic FALSE - crop_left + PictureLeftCrop - autocrop + PictureAutoCrop FALSE - crop_right + PictureRightCrop - autocrop + PictureAutoCrop FALSE - crop_top + PictureTopCrop - autocrop + PictureAutoCrop FALSE - deinterlace + VideoAvgBitrate - decomb + vquality_type_bitrate + TRUE + + + + VideoQualitySlider + + + vquality_type_constant + TRUE + + + + VideoTargetSize + + + vquality_type_target + TRUE + + + + VideoTurboTwoPass + + + vquality_type_constant TRUE + + VideoTwoPass + TRUE + + - end_chapter + VideoTwoPass + + + vquality_type_constant + TRUE + + + + chapters_in_destination + + + use_source_name + TRUE + + + + chapters_label title @@ -122,41 +172,44 @@ - http_optimize_mp4 + chapters_list - container - mp4|m4v + ChapterMarkers + TRUE - ipod_file + chapters_tab - container - mp4|m4v - + title + none + + + constant_rate_factor + - video_codec - x264 + vquality_type_constant + TRUE - keep_aspect + directqp - anamorphic - FALSE + VideoEncoder + x264|ffmpeg - large_mp4 + end_chapter - container - mp4|m4v - + title + none + picture_label @@ -220,7 +273,7 @@ - keep_aspect + PictureKeepRatio FALSE @@ -257,59 +310,14 @@ - turbo - - - vquality_type_constant - TRUE - - - - two_pass - TRUE - - - - tweak_deinterlace + tweak_PictureDeinterlace - decomb + PictureDecomb TRUE - two_pass - - - vquality_type_constant - TRUE - - - - video_bitrate - - - vquality_type_bitrate - TRUE - - - - video_quality - - - vquality_type_constant - TRUE - - - - video_target_size - - - vquality_type_target - TRUE - - - x264_bpyramid @@ -345,7 +353,7 @@ x264_tab - video_codec + VideoEncoder x264 @@ -353,7 +361,7 @@ x264_tab_label - video_codec + VideoEncoder x264 diff --git a/gtk/src/x264handler.c b/gtk/src/x264handler.c index 1ff2c414..154defbb 100644 --- a/gtk/src/x264handler.c +++ b/gtk/src/x264handler.c @@ -48,9 +48,9 @@ x264_entry_changed_cb(GtkWidget *widget, signal_user_data_t *ud) GtkWidget *textview; gchar *options; - textview = GTK_WIDGET(GHB_WIDGET(ud->builder, "x264_options")); + textview = GTK_WIDGET(GHB_WIDGET(ud->builder, "x264Option")); ghb_widget_to_setting(ud->settings, textview); - options = ghb_settings_get_string(ud->settings, "x264_options"); + options = ghb_settings_get_string(ud->settings, "x264Option"); ignore_options_update = TRUE; ghb_x264_parse_options(ud, options); if (!GTK_WIDGET_HAS_FOCUS(textview)) @@ -58,7 +58,7 @@ x264_entry_changed_cb(GtkWidget *widget, signal_user_data_t *ud) gchar *sopts; sopts = sanitize_x264opts(ud, options); - ghb_ui_update(ud, "x264_options", ghb_string_value(sopts)); + ghb_ui_update(ud, "x264Option", ghb_string_value(sopts)); ghb_x264_parse_options(ud, sopts); g_free(sopts); } @@ -74,12 +74,12 @@ x264_focus_out_cb(GtkWidget *widget, GdkEventFocus *event, gchar *options, *sopts; ghb_widget_to_setting(ud->settings, widget); - options = ghb_settings_get_string(ud->settings, "x264_options"); + options = ghb_settings_get_string(ud->settings, "x264Option"); sopts = sanitize_x264opts(ud, options); ignore_options_update = TRUE; if (sopts != NULL) { - ghb_ui_update(ud, "x264_options", ghb_string_value(sopts)); + ghb_ui_update(ud, "x264Option", ghb_string_value(sopts)); ghb_x264_parse_options(ud, sopts); } g_free(options); @@ -415,7 +415,7 @@ x264_opt_update(signal_user_data_t *ud, GtkWidget *widget) gint ii; gboolean foundit = FALSE; - options = ghb_settings_get_string(ud->settings, "x264_options"); + options = ghb_settings_get_string(ud->settings, "x264Option"); if (options) { split = g_strsplit(options, ":", -1); @@ -505,7 +505,7 @@ x264_opt_update(signal_user_data_t *ud, GtkWidget *widget) if (len > 0) result[len - 1] = 0; gchar *sopts; sopts = sanitize_x264opts(ud, result); - ghb_ui_update(ud, "x264_options", ghb_string_value(sopts)); + ghb_ui_update(ud, "x264Option", ghb_string_value(sopts)); ghb_x264_parse_options(ud, sopts); g_free(sopts); g_free(result); -- 2.11.0