summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libhb/preset.c2
-rw-r--r--libhb/preset_builtin.h (renamed from libhb/builtin_presets.h)8
-rw-r--r--preset/preset_builtin.json (renamed from libhb/preset_builtin.json)4
-rw-r--r--preset/preset_builtin.list (renamed from libhb/libhb_presets.list)2
-rw-r--r--preset/preset_template.json (renamed from libhb/preset_template.json)2
-rwxr-xr-xscripts/build-presets.sh30
-rw-r--r--test/test.c20
-rw-r--r--win/CS/HandBrakeWPF/Properties/Resources.Designer.cs4
-rw-r--r--win/CS/HandBrakeWPF/Properties/Resources.resx4
9 files changed, 46 insertions, 30 deletions
diff --git a/libhb/preset.c b/libhb/preset.c
index 11e82e071..1164485ee 100644
--- a/libhb/preset.c
+++ b/libhb/preset.c
@@ -7,7 +7,7 @@
For full terms see the file COPYING file or visit http://www.gnu.org/licenses/gpl-2.0.html
*/
-#include "builtin_presets.h"
+#include "preset_builtin.h"
#include "hb.h"
#include "hb_dict.h"
#include "plist.h"
diff --git a/libhb/builtin_presets.h b/libhb/preset_builtin.h
index 120249ebc..85e05a776 100644
--- a/libhb/builtin_presets.h
+++ b/libhb/preset_builtin.h
@@ -2971,7 +2971,7 @@ const char hb_builtin_presets_json[] =
" \"PictureTopCrop\": 0, \n"
" \"PictureWidth\": 1280, \n"
" \"PresetDescription\": \"H.264 video (up to 720p30) and AAC stereo audio, in an MP4 container. Compatible with Playstation Vita TV.\", \n"
-" \"PresetName\": \"Playstation Vita TV 720p30\", \n"
+" \"PresetName\": \"Playstation 720p30\", \n"
" \"SubtitleAddCC\": false, \n"
" \"SubtitleAddForeignAudioSearch\": true, \n"
" \"SubtitleAddForeignAudioSubtitle\": false, \n"
@@ -3067,7 +3067,7 @@ const char hb_builtin_presets_json[] =
" \"PictureTopCrop\": 0, \n"
" \"PictureWidth\": 960, \n"
" \"PresetDescription\": \"H.264 video (up to 540p30) and AAC stereo audio, in an MP4 container. Compatible with Playstation Vita.\", \n"
-" \"PresetName\": \"Playstation Vita 540p30\", \n"
+" \"PresetName\": \"Playstation 540p30\", \n"
" \"SubtitleAddCC\": false, \n"
" \"SubtitleAddForeignAudioSearch\": true, \n"
" \"SubtitleAddForeignAudioSubtitle\": false, \n"
@@ -6720,13 +6720,13 @@ const char hb_builtin_presets_json[] =
" \"VideoQualitySlider\": 20.0, \n"
" \"VideoQualityType\": 2, \n"
" \"VideoScaler\": \"swscale\", \n"
-" \"VideoTune\": \"none\", \n"
+" \"VideoTune\": \"\", \n"
" \"VideoTurboTwoPass\": false, \n"
" \"VideoTwoPass\": false, \n"
" \"x264Option\": \"\", \n"
" \"x264UseAdvancedOptions\": false\n"
" }, \n"
-" \"VersionMajor\": 17, \n"
+" \"VersionMajor\": 18, \n"
" \"VersionMicro\": 0, \n"
" \"VersionMinor\": 0\n"
" }\n"
diff --git a/libhb/preset_builtin.json b/preset/preset_builtin.json
index a9d5cc579..e3fc40ced 100644
--- a/libhb/preset_builtin.json
+++ b/preset/preset_builtin.json
@@ -3055,7 +3055,7 @@
"PictureForceHeight": 0,
"PictureForceWidth": 0,
"PresetDescription": "H.264 video (up to 720p30) and AAC stereo audio, in an MP4 container. Compatible with Playstation Vita TV.",
- "PresetName": "Playstation Vita TV 720p30",
+ "PresetName": "Playstation 720p30",
"Type": 0,
"UsesPictureFilters": true,
"UsesPictureSettings": 1,
@@ -3154,7 +3154,7 @@
"PictureForceHeight": 0,
"PictureForceWidth": 0,
"PresetDescription": "H.264 video (up to 540p30) and AAC stereo audio, in an MP4 container. Compatible with Playstation Vita.",
- "PresetName": "Playstation Vita 540p30",
+ "PresetName": "Playstation 540p30",
"Type": 0,
"UsesPictureFilters": true,
"UsesPictureSettings": 1,
diff --git a/libhb/libhb_presets.list b/preset/preset_builtin.list
index fc57ffc24..9bccfc536 100644
--- a/libhb/libhb_presets.list
+++ b/preset/preset_builtin.list
@@ -1,6 +1,6 @@
<resources>
<section name="PresetTemplate">
- <integer name="VersionMajor" value="17" />
+ <integer name="VersionMajor" value="18" />
<integer name="VersionMinor" value="0" />
<integer name="VersionMicro" value="0" />
<json name="Preset" file="preset_template.json" />
diff --git a/libhb/preset_template.json b/preset/preset_template.json
index d45335ecf..531ef40d5 100644
--- a/libhb/preset_template.json
+++ b/preset/preset_template.json
@@ -92,7 +92,7 @@
"VideoGrayScale": false,
"VideoScaler": "swscale",
"VideoPreset": "medium",
- "VideoTune": "none",
+ "VideoTune": "",
"VideoProfile": "auto",
"VideoLevel": "auto",
"VideoOptionExtra": "",
diff --git a/scripts/build-presets.sh b/scripts/build-presets.sh
index da729dd5b..1ea5c2dca 100755
--- a/scripts/build-presets.sh
+++ b/scripts/build-presets.sh
@@ -2,25 +2,29 @@
# usage: build-presets
SELF="${BASH_SOURCE[0]}"
-BASE_DIR=$(cd $(dirname "${BASH_SOURCE[0]}") && pwd -P)
-BASE_DIR="${BASE_DIR:-$(pwd)}"
-LIBHB_DIR="${BASE_DIR}/../libhb"
+SELF_DIR=$(cd $(dirname "${SELF}") && pwd -P)
+SELF_DIR="${SELF_DIR:-$(pwd)}"
+LIBHB_DIR="${SELF_DIR}/../libhb"
+PRESETS_DIR="${SELF_DIR}/../preset"
-if ! cd "${LIBHB_DIR}"; then
+if ! cd "${PRESETS_DIR}"; then
+ echo "unable to access directory: ${PRESETS_DIR}" >2
exit 1
fi
-JSON_TEMP=$(mktemp hb_builtin_presets.json.XXX)
-C_TEMP=$(mktemp hb_builtin_presets.h.XXX)
+JSON_TEMP=$(mktemp preset_builtin.json.XXX)
+C_TEMP=$(mktemp preset_builtin.h.XXX)
if [[ "${JSON_TEMP:-}" == "" ]] || [[ "${C_TEMP:-}" == "" ]]; then
- echo "unable to create temporary file" >2
+ echo "unable to create temporary files" >2
exit 1
fi
-"${BASE_DIR}/create_resources.py" libhb_presets.list "${JSON_TEMP}" \
-&& echo 'const char hb_builtin_presets_json[] =' > "${C_TEMP}" \
-&& "${BASE_DIR}/quotestring.py" "${JSON_TEMP}" >> "${C_TEMP}" \
-&& echo ';' >> "${C_TEMP}" \
-&& cp "${C_TEMP}" builtin_presets.h
-rm "${JSON_TEMP}" "${C_TEMP}"
+
+trap "rm ${JSON_TEMP} ${C_TEMP}" EXIT INT TERM
+
+"${SELF_DIR}/create_resources.py" preset_builtin.list "${JSON_TEMP}"
+echo 'const char hb_builtin_presets_json[] =' > "${C_TEMP}"
+"${SELF_DIR}/quotestring.py" "${JSON_TEMP}" >> "${C_TEMP}"
+echo ';' >> "${C_TEMP}"
+cp "${C_TEMP}" "${LIBHB_DIR}/preset_builtin.h"
exit 0
diff --git a/test/test.c b/test/test.c
index 317cc41ab..8972896e7 100644
--- a/test/test.c
+++ b/test/test.c
@@ -62,7 +62,7 @@ static int titlescan = 0;
static int main_feature = 0;
static char * native_language = NULL;
static int native_dub = 0;
-static int twoPass = 0;
+static int twoPass = -1;
static int pad_disable = 0;
static char * pad = NULL;
static int deinterlace_disable = 0;
@@ -145,7 +145,7 @@ static char * encoder_level = NULL;
static char * advanced_opts = NULL;
static int maxHeight = 0;
static int maxWidth = 0;
-static int fastfirstpass = 0;
+static int fastfirstpass = -1;
static char * preset_export_name = NULL;
static char * preset_export_desc = NULL;
static char * preset_export_file = NULL;
@@ -1254,9 +1254,11 @@ static void ShowHelp()
" -q, --quality <number> Set video quality\n"
" -b, --vb <kb/s> Set video bitrate (default: 1000)\n"
" -2, --two-pass Use two-pass mode\n"
+" --no-two-pass Disable two-pass mode\n"
" -T, --turbo When using 2-pass use \"turbo\" options on the\n"
" 1st pass to improve speed\n"
" (works with x264 and x265)\n"
+" --no-turbo Disable 2-pass mode's \"turbo\" 1st pass\n"
" -r, --rate Set video framerate\n"
" (" );
rate = NULL;
@@ -1941,6 +1943,7 @@ static int ParseOptions( int argc, char ** argv )
{ "encoder", required_argument, NULL, 'e' },
{ "aencoder", required_argument, NULL, 'E' },
{ "two-pass", no_argument, NULL, '2' },
+ { "no-two-pass", no_argument, &twoPass, 0 },
{ "deinterlace", optional_argument, NULL, 'd' },
{ "no-deinterlace", no_argument, &deinterlace_disable, 1 },
{ "deblock", optional_argument, NULL, '7' },
@@ -2009,6 +2012,7 @@ static int ParseOptions( int argc, char ** argv )
{ "rate", required_argument, NULL, 'r' },
{ "arate", required_argument, NULL, 'R' },
{ "turbo", no_argument, NULL, 'T' },
+ { "no-turbo", no_argument, &fastfirstpass, 0 },
{ "maxHeight", required_argument, NULL, 'Y' },
{ "maxWidth", required_argument, NULL, 'X' },
{ "preset", required_argument, NULL, 'Z' },
@@ -3505,14 +3509,22 @@ static hb_dict_t * PreparePreset(const char *preset_name)
{
hb_dict_set(preset, "VideoQualityType", hb_value_int(1));
hb_dict_set(preset, "VideoAvgBitrate", hb_value_int(vbitrate));
- if (twoPass)
+ if (twoPass == 1)
{
hb_dict_set(preset, "VideoTwoPass", hb_value_bool(1));
}
- if (fastfirstpass)
+ else if (twoPass == 0)
+ {
+ hb_dict_set(preset, "VideoTwoPass", hb_value_bool(0));
+ }
+ if (fastfirstpass == 1)
{
hb_dict_set(preset, "VideoTurboTwoPass", hb_value_bool(1));
}
+ else if (fastfirstpass == 0)
+ {
+ hb_dict_set(preset, "VideoTurboTwoPass", hb_value_bool(0));
+ }
}
const char *vrate_preset;
const char *cfr_preset;
diff --git a/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs b/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs
index ce0ed2cbd..52004dcd6 100644
--- a/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs
+++ b/win/CS/HandBrakeWPF/Properties/Resources.Designer.cs
@@ -1071,7 +1071,7 @@ namespace HandBrakeWPF.Properties {
}
/// <summary>
- /// Looks up a localized string similar to Encoding: Pass {0} of {1}, {2:00.00}%, FPS: {3:000.0}, Avg FPS: {4:000.0}, Time Remaining: {5}, Elapsed: {6:hh\:mm\:ss}.
+ /// Looks up a localized string similar to Encoding: Pass {0} of {1}, {2:00.00}%, FPS: {3:000.0}, Avg FPS: {4:000.0}, Time Remaining: {5}, Elapsed: {6:d\:hh\:mm\:ss}.
/// </summary>
public static string MainViewModel_EncodeStatusChanged_StatusLabel {
get {
@@ -1525,7 +1525,7 @@ namespace HandBrakeWPF.Properties {
}
/// <summary>
- /// Looks up a localized string similar to Encoding: Pass {0} of {1}, {2:00.00}%, FPS: {3:000.0}, Avg FPS: {4:000.0}, Time Remaining: {5}, Elapsed: {6:hh\:mm\:ss}.
+ /// Looks up a localized string similar to Encoding: Pass {0} of {1}, {2:00.00}%, FPS: {3:000.0}, Avg FPS: {4:000.0}, Time Remaining: {5}, Elapsed: {6:d\:hh\:mm\:ss}.
/// </summary>
public static string QueueViewModel_QueueStatusDisplay {
get {
diff --git a/win/CS/HandBrakeWPF/Properties/Resources.resx b/win/CS/HandBrakeWPF/Properties/Resources.resx
index 446e9f3a6..ab209f268 100644
--- a/win/CS/HandBrakeWPF/Properties/Resources.resx
+++ b/win/CS/HandBrakeWPF/Properties/Resources.resx
@@ -548,7 +548,7 @@ The Activity log may have further information.</value>
<value>Are you sure you want to delete the preset: </value>
</data>
<data name="MainViewModel_EncodeStatusChanged_StatusLabel" xml:space="preserve">
- <value>Encoding: Pass {0} of {1}, {2:00.00}%, FPS: {3:000.0}, Avg FPS: {4:000.0}, Time Remaining: {5}, Elapsed: {6:hh\:mm\:ss}</value>
+ <value>Encoding: Pass {0} of {1}, {2:00.00}%, FPS: {3:000.0}, Avg FPS: {4:000.0}, Time Remaining: {5}, Elapsed: {6:d\:hh\:mm\:ss}</value>
</data>
<data name="AddPresetViewModel_PresetMustProvideName" xml:space="preserve">
<value>A Preset must have a Name. Please fill out the Preset Name field.</value>
@@ -674,7 +674,7 @@ The Activity log may have further information.</value>
<value>Queue Started</value>
</data>
<data name="QueueViewModel_QueueStatusDisplay" xml:space="preserve">
- <value>Encoding: Pass {0} of {1}, {2:00.00}%, FPS: {3:000.0}, Avg FPS: {4:000.0}, Time Remaining: {5}, Elapsed: {6:hh\:mm\:ss}</value>
+ <value>Encoding: Pass {0} of {1}, {2:00.00}%, FPS: {3:000.0}, Avg FPS: {4:000.0}, Time Remaining: {5}, Elapsed: {6:d\:hh\:mm\:ss}</value>
</data>
<data name="ShellViewModel_CanClose" xml:space="preserve">
<value>An Encode is currently running. Exiting HandBrake will stop this encode.