diff options
author | Rodeo <[email protected]> | 2013-01-26 13:45:14 +0000 |
---|---|---|
committer | Rodeo <[email protected]> | 2013-01-26 13:45:14 +0000 |
commit | d1bb73fbe199809f37ac17da3b104f9e2c97880f (patch) | |
tree | 43030e0108e69f19923121922ffbd39d1416305d | |
parent | bc06ad5c0c680bafa490fdf6e2650c6ef85069e0 (diff) |
manicure: bugfixes.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5204 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rwxr-xr-x | scripts/manicure.rb | 180 | ||||
-rw-r--r-- | test/test.c | 22 |
2 files changed, 103 insertions, 99 deletions
diff --git a/scripts/manicure.rb b/scripts/manicure.rb index ae6346622..f0fa0d184 100755 --- a/scripts/manicure.rb +++ b/scripts/manicure.rb @@ -592,26 +592,27 @@ class Display if hash["VideoTurboTwoPass"] == 1 then commandString << " -T" end #Advanced Options - if hash["x264Preset"] != nil && hash["x264Preset"] != "" && hash["x264Preset"] != "custom" + if hash["x264UseAdvancedOptions"] != 1 + if hash["x264Preset"] != "" 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 + end + if hash["x264Tune"] != "" && hash["x264Tune"] != "none" + commandString << " --x264-tune " + commandString << hash["x264Tune"] + end + if hash["h264Profile"] != "" && hash["h264Profile"] != "auto" + commandString << " --h264-profile " + commandString << hash["h264Profile"] + end + if hash["h264Level"] != "" && hash["h264Level"] != "auto" + commandString << " --h264-level " + commandString << hash["h264Level"] + end + if hash["x264OptionExtra"] != "" + commandString << " -x " + commandString << hash["x264OptionExtra"] + end elsif hash["x264Option"] != "" commandString << " -x " commandString << hash["x264Option"] @@ -965,26 +966,27 @@ class Display if hash["VideoTurboTwoPass"] == 1 then commandString << " -T" end #Advanced Options - if hash["x264Preset"] != nil && hash["x264Preset"] != "" && hash["x264Preset"] != "custom" + if hash["x264UseAdvancedOptions"] != 1 + if hash["x264Preset"] != "" 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 + end + if hash["x264Tune"] != "" && hash["x264Tune"] != "none" + commandString << " --x264-tune " + commandString << hash["x264Tune"] + end + if hash["h264Profile"] != "" && hash["h264Profile"] != "auto" + commandString << " --h264-profile " + commandString << hash["h264Profile"] + end + if hash["h264Level"] != "" && hash["h264Level"] != "auto" + commandString << " --h264-level " + commandString << hash["h264Level"] + end + if hash["x264OptionExtra"] != "" + commandString << " -x " + commandString << hash["x264OptionExtra"] + end elsif hash["x264Option"] != "" commandString << " -x " commandString << hash["x264Option"] @@ -1263,42 +1265,43 @@ class Display end #Advanced Options - if hash["x264Preset"] != nil && hash["x264Preset"] != "" && hash["x264Preset"] != "custom" + if hash["x264UseAdvancedOptions"] != 1 + if hash["x264Preset"] != "" 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 + end + 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["h264Profile"] != "" && hash["h264Profile"] != "auto" + commandString << "if (x264_profile == NULL)\n " + commandString << "{\n " + commandString << " x264_profile = strdup(\"" + commandString << hash["h264Profile"] << "\");\n " + commandString << "}\n " + end + if hash["h264Level"] != "" && hash["h264Level"] != "auto" + commandString << "if (h264_level == NULL)\n " + commandString << "{\n " + commandString << " h264_level = strdup(\"" + commandString << hash["h264Level"] << "\");\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 " @@ -1765,30 +1768,31 @@ class Display if hash["VideoTwoPass"] == 1 then commandString << " -2" end if hash["VideoTurboTwoPass"] == 1 then commandString << " -T" end - #Advanced Options - if hash["x264Preset"] != nil && hash["x264Preset"] != "" && hash["x264Preset"] != "custom" + #Advanced Options + if hash["x264UseAdvancedOptions"] != 1 + if hash["x264Preset"] != "" 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"] != "" + end + if hash["x264Tune"] != "" && hash["x264Tune"] != "none" + commandString << " --x264-tune " + commandString << hash["x264Tune"] + end + if hash["h264Profile"] != "" && hash["h264Profile"] != "auto" + commandString << " --h264-profile " + commandString << hash["h264Profile"] + end + if hash["h264Level"] != "" && hash["h264Level"] != "auto" + commandString << " --h264-level " + commandString << hash["h264Level"] + end + if hash["x264OptionExtra"] != "" commandString << " -x " - commandString << hash["x264Option"] + commandString << hash["x264OptionExtra"] + end + elsif hash["x264Option"] != "" + commandString << " -x " + commandString << hash["x264Option"] end commandString << "\\n\");" diff --git a/test/test.c b/test/test.c index 365a21a16..ac031c5fc 100644 --- a/test/test.c +++ b/test/test.c @@ -3070,19 +3070,19 @@ static void ShowPresets() fprintf( stderr, "%s - %s - %s\n", HB_PROJECT_TITLE, HB_PROJECT_BUILD_TITLE, HB_PROJECT_URL_WEBSITE ); printf("\n< Devices\n"); - printf("\n + Universal: -e x264 -q 20.0 -r 30 --pfr -a 1,1 -E faac,copy:ac3 -B 160,160 -6 dpl2,auto -R Auto,Auto -D 0.0,0.0 -f mp4 -X 720 --loose-anamorphic --modulus 2 -m --x264-preset fast --x264-profile baseline --h264-level 3.0\n"); - printf("\n + iPod: -e x264 -q 22.0 -r 30 --pfr -a 1 -E faac -B 160 -6 dpl2 -R Auto -D 0.0 -f mp4 -I -X 320 --modulus 2 -m --x264-preset medium --x264-profile baseline --h264-level 1.3\n"); - printf("\n + iPhone & iPod Touch: -e x264 -q 22.0 -r 29.97 --pfr -a 1 -E faac -B 160 -6 dpl2 -R Auto -D 0.0 -f mp4 -4 -X 960 --loose-anamorphic --modulus 2 -m --x264-preset medium --x264-profile high --h264-level 3.1\n"); - printf("\n + iPad: -e x264 -q 20.0 -r 29.97 --pfr -a 1 -E faac -B 160 -6 dpl2 -R Auto -D 0.0 -f mp4 -4 -X 1280 --loose-anamorphic --modulus 2 -m --x264-preset medium --x264-profile high --h264-level 3.1\n"); - printf("\n + AppleTV: -e x264 -q 20.0 -r 30 --pfr -a 1,1 -E faac,copy:ac3 -B 160,160 -6 dpl2,auto -R Auto,Auto -D 0.0,0.0 -f mp4 -4 -X 960 --loose-anamorphic --modulus 2 -m --x264-preset medium --x264-profile high --h264-level 3.1 -x cabac=0:ref=2:b-pyramid=none:weightb=0:weightp=0:vbv-maxrate=9500:vbv-bufsize=9500\n"); - printf("\n + AppleTV 2: -e x264 -q 20.0 -r 29.97 --pfr -a 1,1 -E faac,copy:ac3 -B 160,160 -6 dpl2,auto -R Auto,Auto -D 0.0,0.0 -f mp4 -4 -X 1280 --loose-anamorphic --modulus 2 -m --x264-preset medium --x264-profile high --h264-level 3.1\n"); - printf("\n + AppleTV 3: -e x264 -q 20.0 -r 30 --pfr -a 1,1 -E faac,copy:ac3 -B 160,160 -6 dpl2,auto -R Auto,Auto -D 0.0,0.0 -f mp4 -4 -X 1920 --decomb=fast --loose-anamorphic --modulus 2 -m --x264-preset medium --x264-profile high --h264-level 4.0\n"); - printf("\n + Android: -e x264 -q 22.0 -r 29.97 --pfr -a 1 -E faac -B 128 -6 dpl2 -R Auto -D 0.0 -f mp4 -X 720 --loose-anamorphic --modulus 2 --x264-preset medium --x264-profile main --h264-level 2.2\n"); - printf("\n + Android Tablet: -e x264 -q 22.0 -r 29.97 --pfr -a 1 -E faac -B 128 -6 dpl2 -R Auto -D 0.0 -f mp4 -X 1280 --loose-anamorphic --modulus 2 --x264-preset medium --x264-profile main --h264-level 3.1\n"); + printf("\n + Universal: -e x264 -q 20.0 -r 30 --pfr -a 1,1 -E faac,copy:ac3 -B 160,160 -6 dpl2,auto -R Auto,Auto -D 0.0,0.0 -f mp4 -X 720 --loose-anamorphic --modulus 2 -m --x264-preset fast --h264-profile baseline --h264-level 3.0\n"); + printf("\n + iPod: -e x264 -q 22.0 -r 30 --pfr -a 1 -E faac -B 160 -6 dpl2 -R Auto -D 0.0 -f mp4 -I -X 320 --modulus 2 -m --x264-preset medium --h264-profile baseline --h264-level 1.3\n"); + printf("\n + iPhone & iPod Touch: -e x264 -q 22.0 -r 29.97 --pfr -a 1 -E faac -B 160 -6 dpl2 -R Auto -D 0.0 -f mp4 -4 -X 960 --loose-anamorphic --modulus 2 -m --x264-preset medium --h264-profile high --h264-level 3.1\n"); + printf("\n + iPad: -e x264 -q 20.0 -r 29.97 --pfr -a 1 -E faac -B 160 -6 dpl2 -R Auto -D 0.0 -f mp4 -4 -X 1280 --loose-anamorphic --modulus 2 -m --x264-preset medium --h264-profile high --h264-level 3.1\n"); + printf("\n + AppleTV: -e x264 -q 20.0 -r 30 --pfr -a 1,1 -E faac,copy:ac3 -B 160,160 -6 dpl2,auto -R Auto,Auto -D 0.0,0.0 -f mp4 -4 -X 960 --loose-anamorphic --modulus 2 -m --x264-preset medium --h264-profile high --h264-level 3.1 -x cabac=0:ref=2:b-pyramid=none:weightb=0:weightp=0:vbv-maxrate=9500:vbv-bufsize=9500\n"); + printf("\n + AppleTV 2: -e x264 -q 20.0 -r 29.97 --pfr -a 1,1 -E faac,copy:ac3 -B 160,160 -6 dpl2,auto -R Auto,Auto -D 0.0,0.0 -f mp4 -4 -X 1280 --loose-anamorphic --modulus 2 -m --x264-preset medium --h264-profile high --h264-level 3.1\n"); + printf("\n + AppleTV 3: -e x264 -q 20.0 -r 30 --pfr -a 1,1 -E faac,copy:ac3 -B 160,160 -6 dpl2,auto -R Auto,Auto -D 0.0,0.0 -f mp4 -4 -X 1920 --decomb=fast --loose-anamorphic --modulus 2 -m --x264-preset medium --h264-profile high --h264-level 4.0\n"); + printf("\n + Android: -e x264 -q 22.0 -r 29.97 --pfr -a 1 -E faac -B 128 -6 dpl2 -R Auto -D 0.0 -f mp4 -X 720 --loose-anamorphic --modulus 2 --x264-preset medium --h264-profile main --h264-level 2.2\n"); + printf("\n + Android Tablet: -e x264 -q 22.0 -r 29.97 --pfr -a 1 -E faac -B 128 -6 dpl2 -R Auto -D 0.0 -f mp4 -X 1280 --loose-anamorphic --modulus 2 --x264-preset medium --h264-profile main --h264-level 3.1\n"); printf("\n>\n"); printf("\n< Regular\n"); - printf("\n + Normal: -e x264 -q 20.0 -a 1 -E faac -B 160 -6 dpl2 -R Auto -D 0.0 -f mp4 --loose-anamorphic --modulus 2 -m --x264-preset veryfast --x264-profile main --h264-level 4.0\n"); - printf("\n + High Profile: -e x264 -q 20.0 -a 1,1 -E faac,copy:ac3 -B 160,160 -6 dpl2,auto -R Auto,Auto -D 0.0,0.0 -f mp4 -4 --decomb --loose-anamorphic --modulus 2 -m --x264-preset medium --x264-profile high --h264-level 4.1\n"); + printf("\n + Normal: -e x264 -q 20.0 -a 1 -E faac -B 160 -6 dpl2 -R Auto -D 0.0 -f mp4 --loose-anamorphic --modulus 2 -m --x264-preset veryfast --h264-profile main --h264-level 4.0\n"); + printf("\n + High Profile: -e x264 -q 20.0 -a 1,1 -E faac,copy:ac3 -B 160,160 -6 dpl2,auto -R Auto,Auto -D 0.0,0.0 -f mp4 -4 --decomb --loose-anamorphic --modulus 2 -m --x264-preset medium --h264-profile high --h264-level 4.1\n"); printf("\n>\n"); } |