diff options
author | jstebbins <[email protected]> | 2012-12-27 22:52:04 +0000 |
---|---|---|
committer | jstebbins <[email protected]> | 2012-12-27 22:52:04 +0000 |
commit | 0dea09fd27e10f362a94897d993fd540eea5c79f (patch) | |
tree | f3632f1bcde7407c57fe001de2e6b57bbaa13d20 /scripts/manicure.rb | |
parent | d21a843f23df368e191925e2665caf4ecf7390b5 (diff) |
update presets for lingui and CLI
These new presets use x264 preset/tune/profile/level
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5111 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'scripts/manicure.rb')
-rwxr-xr-x | scripts/manicure.rb | 108 |
1 files changed, 102 insertions, 6 deletions
diff --git a/scripts/manicure.rb b/scripts/manicure.rb index 7417a22f9..ae6346622 100755 --- a/scripts/manicure.rb +++ b/scripts/manicure.rb @@ -592,7 +592,27 @@ class Display if hash["VideoTurboTwoPass"] == 1 then commandString << " -T" end #Advanced Options - if hash["x264Option"] != "" + if hash["x264Preset"] != nil && hash["x264Preset"] != "" && hash["x264Preset"] != "custom" + commandString << " --x264-preset " + commandString << hash["x264Preset"] + + if hash["x264Tune"] != "" && hash["x264Tune"] != "none" + commandString << " --x264-tune " + commandString << hash["x264Tune"] + end + if hash["x264Profile"] != "" && hash["x264Profile"] != "auto" + commandString << " --x264-profile " + commandString << hash["x264Profile"] + end + if hash["x264Level"] != "" && hash["x264Level"] != "auto" + commandString << " --h264-level " + commandString << hash["x264Level"] + end + if hash["x264OptionExtra"] != "" + commandString << " -x " + commandString << hash["x264OptionExtra"] + end + elsif hash["x264Option"] != "" commandString << " -x " commandString << hash["x264Option"] end @@ -945,7 +965,27 @@ class Display if hash["VideoTurboTwoPass"] == 1 then commandString << " -T" end #Advanced Options - if hash["x264Option"] != "" + if hash["x264Preset"] != nil && hash["x264Preset"] != "" && hash["x264Preset"] != "custom" + commandString << " --x264-preset " + commandString << hash["x264Preset"] + + if hash["x264Tune"] != "" && hash["x264Tune"] != "none" + commandString << " --x264-tune " + commandString << hash["x264Tune"] + end + if hash["x264Profile"] != "" && hash["x264Profile"] != "auto" + commandString << " --x264-profile " + commandString << hash["x264Profile"] + end + if hash["x264Level"] != "" && hash["x264Level"] != "auto" + commandString << " --h264-level " + commandString << hash["x264Level"] + end + if hash["x264OptionExtra"] != "" + commandString << " -x " + commandString << hash["x264OptionExtra"] + end + elsif hash["x264Option"] != "" commandString << " -x " commandString << hash["x264Option"] end @@ -1223,8 +1263,44 @@ class Display end #Advanced Options - if hash["x264Option"] != "" - commandString << "if( !advanced_opts )\n " + if hash["x264Preset"] != nil && hash["x264Preset"] != "" && hash["x264Preset"] != "custom" + commandString << "if (x264_preset == NULL)\n " + commandString << "{\n " + commandString << " x264_preset = strdup(\"" + commandString << hash["x264Preset"] << "\");\n " + commandString << "}\n " + + if hash["x264Tune"] != "" && hash["x264Tune"] != "none" + commandString << "if (x264_tune == NULL)\n " + commandString << "{\n " + commandString << " x264_tune = strdup(\"" + commandString << hash["x264Tune"] + commandString << "\");\n " + commandString << "}\n " + end + if hash["x264Profile"] != "" && hash["x264Profile"] != "auto" + commandString << "if (x264_profile == NULL)\n " + commandString << "{\n " + commandString << " x264_profile = strdup(\"" + commandString << hash["x264Profile"] << "\");\n " + commandString << "}\n " + end + if hash["x264Level"] != "" && hash["x264Level"] != "auto" + commandString << "if (h264_level == NULL)\n " + commandString << "{\n " + commandString << " h264_level = strdup(\"" + commandString << hash["x264Level"] << "\");\n " + commandString << "}\n " + end + if hash["x264OptionExtra"] != "" + commandString << "if (advanced_opts == NULL)\n " + commandString << "{\n " + commandString << " advanced_opts = strdup(\"" + commandString << hash["x264OptionExtra"] << "\");\n " + commandString << "}\n " + end + elsif hash["x264Option"] != "" + commandString << "if (advanced_opts == NULL)\n " commandString << "{\n " commandString << " advanced_opts = strdup(\"" commandString << hash["x264Option"] << "\");\n " @@ -1690,10 +1766,30 @@ class Display if hash["VideoTurboTwoPass"] == 1 then commandString << " -T" end #Advanced Options - if hash["x264Option"] != "" + if hash["x264Preset"] != nil && hash["x264Preset"] != "" && hash["x264Preset"] != "custom" + commandString << " --x264-preset " + commandString << hash["x264Preset"] + + if hash["x264Tune"] != "" && hash["x264Tune"] != "none" + commandString << " --x264-tune " + commandString << hash["x264Tune"] + end + if hash["x264Profile"] != "" && hash["x264Profile"] != "auto" + commandString << " --x264-profile " + commandString << hash["x264Profile"] + end + if hash["x264Level"] != "" && hash["x264Level"] != "auto" + commandString << " --h264-level " + commandString << hash["x264Level"] + end + if hash["x264OptionExtra"] != "" + commandString << " -x " + commandString << hash["x264OptionExtra"] + end + elsif hash["x264Option"] != "" commandString << " -x " commandString << hash["x264Option"] - end + end commandString << "\\n\");" |