diff options
Diffstat (limited to 'scripts')
-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\");" |