summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xscripts/manicure.rb50
-rw-r--r--test/test.c47
2 files changed, 26 insertions, 71 deletions
diff --git a/scripts/manicure.rb b/scripts/manicure.rb
index 6b86f0a65..7417a22f9 100755
--- a/scripts/manicure.rb
+++ b/scripts/manicure.rb
@@ -248,7 +248,7 @@ class Display
(depth+1).times do
commandString << "<"
end
- commandString << " " << hash["PresetName"] << "\n\n"
+ commandString << " " << hash["PresetName"] << "\n"
puts commandString
end
@@ -260,7 +260,7 @@ class Display
(depth+1).times do
commandString << ">"
end
- commandString << "\n\n"
+ commandString << "\n"
puts commandString
end
@@ -599,10 +599,6 @@ class Display
# That's it, print to screen now
puts commandString
-
- #puts "*" * @columnWidth
-
- puts "\n"
end
def generateCLIFolderParse( hash, depth ) # Shows the folder for wrappers to parse
@@ -613,7 +609,7 @@ class Display
(depth+1).times do
commandString << "<"
end
- commandString << " " << hash["PresetName"] << "\n\n"
+ commandString << " " << hash["PresetName"] << "\n"
puts commandString
end
@@ -625,7 +621,7 @@ class Display
(depth+1).times do
commandString << ">"
end
- commandString << "\n\n"
+ commandString << "\n"
puts commandString
end
@@ -956,10 +952,6 @@ class Display
# That's it, print to screen now
puts commandString
-
- #puts "*" * @columnWidth
-
- puts "\n"
end
def generateAPIcalls(hash) # Makes a C version of the preset ready for coding into the CLI
@@ -1323,17 +1315,28 @@ class Display
end
#Booleans
- if hash["ChapterMarkers"] == 1 then commandString << "job->chapter_markers = 1;\n " end
- if hash["VideoGrayScale"] == 1 then commandString << "job->grayscale = 1;\n " end
- if hash["VideoTwoPass"] == 1 then commandString << "twoPass = 1;\n " end
- if hash["VideoTurboTwoPass"] == 1 then commandString << "turbo_opts_enabled = 1;\n" end
- commandString << "\n"
- commandString << "}"
-
+ if hash["ChapterMarkers"] == 1
+ commandString << "job->chapter_markers = 1;\n "
+ end
+
+ if hash["VideoGrayScale"] == 1
+ commandString << "job->grayscale = 1;\n "
+ end
+
+ if hash["VideoTwoPass"] == 1
+ commandString << "twoPass = 1;\n "
+ end
+
+ if hash["VideoTurboTwoPass"] == 1
+ commandString << "turbo_opts_enabled = 1;\n "
+ end
+
+ #Finish
+ commandString = commandString.rstrip
+ commandString << "\n}"
+
# That's it, print to screen now
puts commandString
- #puts "*" * @columnWidth
- puts "\n"
end
def generateAPIFolderList( hash, depth )
@@ -1347,7 +1350,7 @@ class Display
commandString << "<"
end
commandString << " " << hash["PresetName"]
- commandString << "\\n\");\n\n"
+ commandString << "\\n\");\n"
puts commandString
end
@@ -1361,7 +1364,7 @@ class Display
(depth+1).times do
commandString << ">"
end
- commandString << "\\n\");\n\n"
+ commandString << "\\n\");\n"
puts commandString
end
@@ -1696,7 +1699,6 @@ class Display
# That's it, print to screen now
puts commandString
- puts "\n"
end
end
diff --git a/test/test.c b/test/test.c
index f82adc52f..bf0c086b4 100644
--- a/test/test.c
+++ b/test/test.c
@@ -732,9 +732,7 @@ static int HandleEvents( hb_handle_t * h )
anamorphic_mode = 2;
}
job->chapter_markers = 1;
-
}
-
if (!strcmp(preset_name, "iPod"))
{
if( !mux )
@@ -774,9 +772,7 @@ static int HandleEvents( hb_handle_t * h )
advanced_opts = strdup("level=30:bframes=0:weightp=0:cabac=0:ref=1:vbv-maxrate=768:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1:subme=6:8x8dct=0:trellis=0");
}
job->chapter_markers = 1;
-
}
-
if (!strcmp(preset_name, "iPhone & iPod Touch"))
{
if( !mux )
@@ -815,9 +811,7 @@ static int HandleEvents( hb_handle_t * h )
advanced_opts = strdup("cabac=0:ref=2:me=umh:bframes=0:weightp=0:subme=6:8x8dct=0:trellis=0");
}
job->chapter_markers = 1;
-
}
-
if (!strcmp(preset_name, "iPhone 4"))
{
if( !mux )
@@ -859,9 +853,7 @@ static int HandleEvents( hb_handle_t * h )
anamorphic_mode = 2;
}
job->chapter_markers = 1;
-
}
-
if (!strcmp(preset_name, "iPad"))
{
if( !mux )
@@ -903,9 +895,7 @@ static int HandleEvents( hb_handle_t * h )
anamorphic_mode = 2;
}
job->chapter_markers = 1;
-
}
-
if (!strcmp(preset_name, "AppleTV"))
{
if( !mux )
@@ -949,9 +939,7 @@ static int HandleEvents( hb_handle_t * h )
anamorphic_mode = 2;
}
job->chapter_markers = 1;
-
}
-
if (!strcmp(preset_name, "AppleTV 2"))
{
if( !mux )
@@ -993,9 +981,7 @@ static int HandleEvents( hb_handle_t * h )
anamorphic_mode = 2;
}
job->chapter_markers = 1;
-
}
-
if (!strcmp(preset_name, "AppleTV 3"))
{
if( !mux )
@@ -1044,9 +1030,7 @@ static int HandleEvents( hb_handle_t * h )
}
modulus = 2;
job->chapter_markers = 1;
-
}
-
if (!strcmp(preset_name, "Android Mid"))
{
if( !mux )
@@ -1086,9 +1070,7 @@ static int HandleEvents( hb_handle_t * h )
{
advanced_opts = strdup("cabac=0:ref=2:me=umh:bframes=0:weightp=0:subme=6:8x8dct=0:trellis=0");
}
-
}
-
if (!strcmp(preset_name, "Android High"))
{
if( !mux )
@@ -1132,9 +1114,7 @@ static int HandleEvents( hb_handle_t * h )
{
anamorphic_mode = 2;
}
-
}
-
if (!strcmp(preset_name, "Normal"))
{
if( !mux )
@@ -1176,9 +1156,7 @@ static int HandleEvents( hb_handle_t * h )
anamorphic_mode = 1;
}
job->chapter_markers = 1;
-
}
-
if (!strcmp(preset_name, "High Profile"))
{
if( !mux )
@@ -1222,9 +1200,7 @@ static int HandleEvents( hb_handle_t * h )
anamorphic_mode = 2;
}
job->chapter_markers = 1;
-
}
-
if (!strcmp(preset_name, "Classic"))
{
if( !mux )
@@ -1256,9 +1232,7 @@ static int HandleEvents( hb_handle_t * h )
{
dynamic_range_compression = strdup("0.0");
}
-
}
-
if (!strcmp(preset_name, "iPod Legacy"))
{
if( !mux )
@@ -1298,9 +1272,7 @@ static int HandleEvents( hb_handle_t * h )
advanced_opts = strdup("level=30:bframes=0:weightp=0:cabac=0:ref=1:vbv-maxrate=1500:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1:psy-rd=0,0:subme=6:8x8dct=0:trellis=0");
}
job->chapter_markers = 1;
-
}
-
}
if ( chapter_markers )
@@ -3087,43 +3059,24 @@ 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 -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 -m -x cabac=0:ref=2:me=umh:bframes=0:weightp=0:8x8dct=0:trellis=0:subme=6\n");
-
printf("\n + iPod: -e x264 -b 700 -a 1 -E faac -B 160 -6 dpl2 -R Auto -D 0.0 -f mp4 -I -X 320 -m -x level=30:bframes=0:weightp=0:cabac=0:ref=1:vbv-maxrate=768:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1:subme=6:8x8dct=0:trellis=0\n");
-
printf("\n + iPhone & iPod Touch: -e x264 -q 20.0 -a 1 -E faac -B 128 -6 dpl2 -R Auto -D 0.0 -f mp4 -X 480 -m -x cabac=0:ref=2:me=umh:bframes=0:weightp=0:subme=6:8x8dct=0:trellis=0\n");
-
printf("\n + iPhone 4: -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 960 --loose-anamorphic -m\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 -m\n");
-
printf("\n + AppleTV: -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 -X 960 --loose-anamorphic -m -x cabac=0:ref=2:me=umh:b-pyramid=none:b-adapt=2:weightb=0:trellis=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 -m\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 -x b-adapt=2\n");
-
printf("\n + Android Mid: -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 480 -x cabac=0:ref=2:me=umh:bframes=0:weightp=0:subme=6:8x8dct=0:trellis=0\n");
-
printf("\n + Android High: -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 -x weightp=0:cabac=0\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 --strict-anamorphic -m -x ref=1:weightp=1:subq=2:rc-lookahead=10:trellis=0:8x8dct=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 -m -x b-adapt=2:rc-lookahead=50\n");
-
printf("\n>\n");
-
printf("\n< Legacy\n");
-
printf("\n + Classic: -b 1000 -a 1 -E faac -B 160 -6 dpl2 -R Auto -D 0.0 -f mp4\n");
-
printf("\n + iPod Legacy: -e x264 -b 1500 -a 1 -E faac -B 160 -6 dpl2 -R Auto -D 0.0 -f mp4 -I -X 640 -m -x level=30:bframes=0:weightp=0:cabac=0:ref=1:vbv-maxrate=1500:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1:psy-rd=0,0:subme=6:8x8dct=0:trellis=0\n");
-
printf("\n>\n");
}