summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjbrjake <[email protected]>2007-08-13 18:14:28 +0000
committerjbrjake <[email protected]>2007-08-13 18:14:28 +0000
commit6c72d52ad7292740514b97c919f84970124f6b8a (patch)
treea36f254ffab190eac68715e7c6c54dc3aca30f8d
parent9d03e655fbc53a95e56ebd28d367175a0202a8c6 (diff)
MacGui: nerfs the presets, as collapsible triangle folder thingies are waiting for the next release. Also adds one for CRF (shamelessly ripped from Sharktooth's CQ-ASP_Q2_eq(crf) profile for MEGui.) Hopefully I watered the presets down enough, but who knows...they might still encode too slowly for the masses.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@801 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--macosx/Controller.h1
-rw-r--r--macosx/Controller.mm88
2 files changed, 80 insertions, 9 deletions
diff --git a/macosx/Controller.h b/macosx/Controller.h
index 68df8913b..c6d4a493e 100644
--- a/macosx/Controller.h
+++ b/macosx/Controller.h
@@ -318,6 +318,7 @@
- (NSDictionary *)CreateDeuxSixQuatrePreset;
- (NSDictionary *)CreateBrokePreset;
- (NSDictionary *)CreateBlindPreset;
+- (NSDictionary *)CreateCRFPreset;
- (IBAction) RevertPictureSizeToMax:(id)sender;
diff --git a/macosx/Controller.mm b/macosx/Controller.mm
index 2c59450b0..8e3ad9edf 100644
--- a/macosx/Controller.mm
+++ b/macosx/Controller.mm
@@ -3523,6 +3523,7 @@ the user is using "Custom" settings by determining the sender*/
[UserPresets addObject:[self CreateDeuxSixQuatrePreset]];
[UserPresets addObject:[self CreateBrokePreset]];
[UserPresets addObject:[self CreateBlindPreset]];
+ [UserPresets addObject:[self CreateCRFPreset]];
[self AddPreset];
}
@@ -4068,7 +4069,7 @@ the user is using "Custom" settings by determining the sender*/
/* Video encoder */
[preset setObject:@"x264 (h.264 Main)" forKey:@"VideoEncoder"];
/* x264 Option String */
- [preset setObject:@"ref=2:mixed-refs:bframes=3:weightb:bime:direct=auto:subme=5:me=umh:trellis=1" forKey:@"x264Option"];
+ [preset setObject:@"ref=2:bframes=2:subme=5:me=umh" forKey:@"x264Option"];
/* Video quality */
[preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoQualityType"];
[preset setObject:[fVidTargetSizeField stringValue] forKey:@"VideoTargetSize"];
@@ -4205,7 +4206,7 @@ the user is using "Custom" settings by determining the sender*/
/* Video encoder */
[preset setObject:@"x264 (h.264 Main)" forKey:@"VideoEncoder"];
/* x264 Option String */
- [preset setObject:@"ref=6:mixed-refs:bframes=3:bime:weightb:b-rdo:direct=auto:b-pyramid:me=umh:subme=7:me-range=24:analyse=all:8x8dct:trellis=2:no-fast-pskip" forKey:@"x264Option"];
+ [preset setObject:@"ref=3:mixed-refs:bframes=3:bime:weightb:b-rdo:direct=auto:b-pyramid:me=umh:subme=6:analyse=all:8x8dct:trellis=1:no-fast-pskip" forKey:@"x264Option"];
/* Video quality */
[preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoQualityType"];
[preset setObject:[fVidTargetSizeField stringValue] forKey:@"VideoTargetSize"];
@@ -4274,7 +4275,7 @@ the user is using "Custom" settings by determining the sender*/
/* Video encoder */
[preset setObject:@"x264 (h.264 Main)" forKey:@"VideoEncoder"];
/* x264 Option String */
- [preset setObject:@"ref=3:mixed-refs:bframes=9:bime:weightb:direct=auto:b-pyramid:me=umh:subme=6:me-range=24:analyse=all:8x8dct:trellis=2:nr=150:no-fast-pskip" forKey:@"x264Option"];
+ [preset setObject:@"ref=3:mixed-refs:bframes=6:bime:weightb:direct=auto:b-pyramid:me=umh:subme=6:analyse=all:8x8dct:trellis=1:nr=150:no-fast-pskip" forKey:@"x264Option"];
/* Video quality */
[preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoQualityType"];
[preset setObject:[fVidTargetSizeField stringValue] forKey:@"VideoTargetSize"];
@@ -4343,7 +4344,7 @@ the user is using "Custom" settings by determining the sender*/
/* Video encoder */
[preset setObject:@"x264 (h.264 Main)" forKey:@"VideoEncoder"];
/* x264 Option String */
- [preset setObject:@"ref=9:mixed-refs:bframes=13:bime:weightb:b-rdo:direct=auto:b-pyramid:me=umh:subme=7:me-range=24:analyse=all:8x8dct:trellis=2:nr=150:no-fast-pskip:filter=2,2" forKey:@"x264Option"];
+ [preset setObject:@"ref=6:mixed-refs:bframes=6:bime:weightb:b-rdo:direct=auto:b-pyramid:me=umh:subme=6:analyse=all:8x8dct:trellis=1:nr=150:no-fast-pskip:filter=2,2" forKey:@"x264Option"];
/* Video quality */
[preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoQualityType"];
[preset setObject:[fVidTargetSizeField stringValue] forKey:@"VideoTargetSize"];
@@ -4412,7 +4413,7 @@ the user is using "Custom" settings by determining the sender*/
/* Video encoder */
[preset setObject:@"x264 (h.264 Main)" forKey:@"VideoEncoder"];
/* x264 Option String */
- [preset setObject:@"ref=6:mixed-refs:bframes=3:bime:weightb:b-rdo:direct-auto:me=umh:subme=7:me-range=24:analyse=all:8x8dct:trellis=2:no-fast-pskip" forKey:@"x264Option"];
+ [preset setObject:@"ref=6:mixed-refs:bframes=3:bime:weightb:b-rdo:direct-auto:me=umh:subme=6:analyse=all:8x8dct:trellis=2:no-fast-pskip" forKey:@"x264Option"];
/* Video quality */
[preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoQualityType"];
[preset setObject:[fVidTargetSizeField stringValue] forKey:@"VideoTargetSize"];
@@ -4481,7 +4482,7 @@ the user is using "Custom" settings by determining the sender*/
/* Video encoder */
[preset setObject:@"x264 (h.264 Main)" forKey:@"VideoEncoder"];
/* x264 Option String */
- [preset setObject:@"ref=16:mixed-refs:bframes=13:bime:weightb:b-rdo:direct=auto:b-pyramid:me=umh:subme=7:me-range=64:analyse=all:8x8dct:trellis=2:no-fast-pskip:no-dct-decimate:filter=-2,-1" forKey:@"x264Option"];
+ [preset setObject:@"ref=16:mixed-refs:bframes=6:bime:weightb:b-rdo:direct=auto:b-pyramid:me=umh:subme=7:me-range=64:analyse=all:8x8dct:trellis=2:no-fast-pskip:no-dct-decimate:filter=-2,-1" forKey:@"x264Option"];
/* Video quality */
[preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoQualityType"];
[preset setObject:[fVidTargetSizeField stringValue] forKey:@"VideoTargetSize"];
@@ -4550,7 +4551,7 @@ the user is using "Custom" settings by determining the sender*/
/* Video encoder */
[preset setObject:@"x264 (h.264 iPod)" forKey:@"VideoEncoder"];
/* x264 Option String */
- [preset setObject:@"cabac=0:ref=1:analyse=all:me=umh:subme=6:no-fast-pskip=1:trellis=2" forKey:@"x264Option"];
+ [preset setObject:@"cabac=0:ref=1:analyse=all:me=umh:subme=6:no-fast-pskip=1:trellis=1" forKey:@"x264Option"];
/* Video quality */
[preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoQualityType"];
[preset setObject:[fVidTargetSizeField stringValue] forKey:@"VideoTargetSize"];
@@ -4687,7 +4688,7 @@ the user is using "Custom" settings by determining the sender*/
/* Video encoder */
[preset setObject:@"x264 (h.264 Main)" forKey:@"VideoEncoder"];
/* x264 Option String */
- [preset setObject:@"ref=3:mixed-refs:bframes=9:bime:weightb:b-rdo:b-pyramid::direct=auto:me=umh:subme=6:trellis=1:analyse=all:8x8dct:no-fast-pskip" forKey:@"x264Option"];
+ [preset setObject:@"ref=3:mixed-refs:bframes=6:bime:weightb:b-rdo:b-pyramid::direct=auto:me=umh:subme=6:trellis=1:analyse=all:8x8dct:no-fast-pskip" forKey:@"x264Option"];
/* Video quality */
[preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoQualityType"];
[preset setObject:@"695" forKey:@"VideoTargetSize"];
@@ -4708,7 +4709,7 @@ the user is using "Custom" settings by determining the sender*/
/* Use Max Picture settings for whatever the dvd is.*/
[preset setObject:[NSNumber numberWithInt:0] forKey:@"UsesMaxPictureSettings"];
[preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureAutoCrop"];
- [preset setObject:[NSNumber numberWithInt:720] forKey:@"PictureWidth"];
+ [preset setObject:[NSNumber numberWithInt:640] forKey:@"PictureWidth"];
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureHeight"];
[preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureKeepRatio"];
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeinterlace"];
@@ -4803,6 +4804,75 @@ the user is using "Custom" settings by determining the sender*/
}
+- (NSDictionary *)CreateCRFPreset
+{
+ NSMutableDictionary *preset = [[NSMutableDictionary alloc] init];
+ /* Get the New Preset Name from the field in the AddPresetPanel */
+ [preset setObject:@"Constant Quality Rate" forKey:@"PresetName"];
+ /*Set whether or not this is a user preset or factory 0 is factory, 1 is user*/
+ [preset setObject:[NSNumber numberWithInt:0] forKey:@"Type"];
+ /*Set whether or not this is default, at creation set to 0*/
+ [preset setObject:[NSNumber numberWithInt:0] forKey:@"Default"];
+ /*Get the whether or not to apply pic settings in the AddPresetPanel*/
+ [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureSettings"];
+ /* Get the New Preset Description from the field in the AddPresetPanel */
+ [preset setObject:@"HandBrake's preset for consistently excellent quality in one pass, with the downside of entirely unpredictable file sizes and bitrates." forKey:@"PresetDescription"];
+ /* File Format */
+ [preset setObject:@"MKV file" forKey:@"FileFormat"];
+ /* Chapter Markers*/
+ [preset setObject:[NSNumber numberWithInt:1] forKey:@"ChapterMarkers"];
+ /* Codecs */
+ [preset setObject:@"AVC/H.264 Video / AC-3 Audio" forKey:@"FileCodecs"];
+ /* Video encoder */
+ [preset setObject:@"x264 (h.264 Main)" forKey:@"VideoEncoder"];
+ /* x264 Option String */
+ [preset setObject:@"ref=3:mixed-refs:bframes=3:b-pyramid:b-rdo:bime:weightb:filter=-2,-1:subme=6:trellis=1:analyse=all:8x8dct:me=umh" forKey:@"x264Option"];
+ /* Video quality */
+ [preset setObject:[NSNumber numberWithInt:2] forKey:@"VideoQualityType"];
+ [preset setObject:[fVidTargetSizeField stringValue] forKey:@"VideoTargetSize"];
+ [preset setObject:@"2000" forKey:@"VideoAvgBitrate"];
+ [preset setObject:[NSNumber numberWithFloat:0.6471] forKey:@"VideoQualitySlider"];
+
+ /* Video framerate */
+ [preset setObject:@"Same as source" forKey:@"VideoFramerate"];
+ /* GrayScale */
+ [preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoGrayScale"];
+ /* 2 Pass Encoding */
+ [preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoTwoPass"];
+ [preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoTurboTwoPass"];
+
+ /*Picture Settings*/
+ //hb_job_t * job = fTitle->job;
+ /* Basic Picture Settings */
+ /* Use Max Picture settings for whatever the dvd is.*/
+ [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesMaxPictureSettings"];
+ [preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureAutoCrop"];
+ [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureWidth"];
+ [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureHeight"];
+ [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureKeepRatio"];
+ [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeinterlace"];
+ [preset setObject:[NSNumber numberWithInt:1] forKey:@"PicturePAR"];
+ /* Set crop settings here */
+ /* The Auto Crop Matrix in the Picture Window autodetects differences in crop settings */
+ [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureTopCrop"];
+ [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureBottomCrop"];
+ [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureLeftCrop"];
+ [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureRightCrop"];
+
+ /*Audio*/
+ /* Audio Sample Rate*/
+ [preset setObject:@"48" forKey:@"AudioSampleRate"];
+ /* Audio Bitrate Rate*/
+ [preset setObject:@"160" forKey:@"AudioBitRate"];
+ /* Subtitles*/
+ [preset setObject:@"None" forKey:@"Subtitles"];
+
+
+ [preset autorelease];
+ return preset;
+
+}
+
- (IBAction)DeletePreset:(id)sender
{