diff options
author | Rodeo <[email protected]> | 2013-01-26 17:36:50 +0000 |
---|---|---|
committer | Rodeo <[email protected]> | 2013-01-26 17:36:50 +0000 |
commit | ba0fe8ce2fd21992bbd26fc17bddc406eceb04f4 (patch) | |
tree | 470331483be4b30809de109b01aae72b8784fa79 /macosx | |
parent | 97d4f114df3e35c559e7f1564a542631b55f2845 (diff) |
MacGui: sync built-in presets with the other UIs.
Also make handling of max width/height more robust.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5207 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/Controller.m | 70 | ||||
-rw-r--r-- | macosx/HBPresets.h | 18 | ||||
-rw-r--r-- | macosx/HBPresets.m | 653 |
3 files changed, 227 insertions, 514 deletions
diff --git a/macosx/Controller.m b/macosx/Controller.m index 953b6a196..401c6c3d3 100644 --- a/macosx/Controller.m +++ b/macosx/Controller.m @@ -3102,19 +3102,30 @@ fWorkingCount = 0; job->modulus = [[queueToApply objectForKey:@"PictureModulus"] intValue]; - /* we check to make sure the presets width/height does not exceed the sources width/height */ - if (fTitle->width < [[queueToApply objectForKey:@"PictureWidth"] intValue] || fTitle->height < [[queueToApply objectForKey:@"PictureHeight"] intValue]) - { - /* if so, then we use the sources height and width to avoid scaling up */ - //job->width = fTitle->width; - //job->height = fTitle->height; + /* + * if the preset specifies neither max. width nor height + * (both are 0), use the max. picture size + * + * if the specified non-zero dimensions exceed those of the + * source, also use the max. picture size (no upscaling) + */ + if (([[queueToApply objectForKey:@"PictureWidth"] intValue] <= 0 && + [[queueToApply objectForKey:@"PictureHeight"] intValue] <= 0) || + ([[queueToApply objectForKey:@"PictureWidth"] intValue] > fTitle->width && + [[queueToApply objectForKey:@"PictureHeight"] intValue] > fTitle->height) || + ([[queueToApply objectForKey:@"PictureHeight"] intValue] <= 0 && + [[queueToApply objectForKey:@"PictureWidth"] intValue] > fTitle->width) || + ([[queueToApply objectForKey:@"PictureWidth"] intValue] <= 0 && + [[queueToApply objectForKey:@"PictureHeight"] intValue] > fTitle->height)) + { + /* use the source's width/height to avoid upscaling */ [self revertPictureSizeToMax:nil]; } - else // source width/height is >= the preset height/width + else // source width/height is >= preset width/height { - /* we can go ahead and use the presets values for height and width */ - job->width = [[queueToApply objectForKey:@"PictureWidth"] intValue]; - job->height = [[queueToApply objectForKey:@"PictureHeight"] intValue]; + /* use the preset values for width/height */ + job->width = [[queueToApply objectForKey:@"PictureWidth"] intValue]; + job->height = [[queueToApply objectForKey:@"PictureHeight"] intValue]; } job->keep_ratio = [[queueToApply objectForKey:@"PictureKeepRatio"] intValue]; if (job->keep_ratio == 1) @@ -6523,8 +6534,10 @@ return YES; job->modulus = 16; } - /* Check to see if the objectForKey:@"UsesPictureSettings is 2 which is "Use Max for the source */ - if ([[chosenPreset objectForKey:@"UsesPictureSettings"] intValue] == 2 || [[chosenPreset objectForKey:@"UsesMaxPictureSettings"] intValue] == 1) + /* Check to see if the objectForKey:@"UsesPictureSettings" is 2, + * which means "Use max. picture size for the source" */ + if ([[chosenPreset objectForKey:@"UsesPictureSettings"] intValue] == 2 || + [[chosenPreset objectForKey:@"UsesMaxPictureSettings"] intValue] == 1) { /* Use Max Picture settings for whatever the dvd is.*/ [self revertPictureSizeToMax:nil]; @@ -6540,21 +6553,34 @@ return YES; } job->anamorphic.mode = [[chosenPreset objectForKey:@"PicturePAR"] intValue]; } - else // /* If not 0 or 2 we assume objectForKey:@"UsesPictureSettings is 1 which is "Use picture sizing from when the preset was set" */ + /* If not 0 or 2 we assume objectForKey:@"UsesPictureSettings" is 1, + * which means "Use the picture size specified in the preset" */ + else { - /* we check to make sure the presets width/height does not exceed the sources width/height */ - if (fTitle->width < [[chosenPreset objectForKey:@"PictureWidth"] intValue] || fTitle->height < [[chosenPreset objectForKey:@"PictureHeight"] intValue]) + /* + * if the preset specifies neither max. width nor height + * (both are 0), use the max. picture size + * + * if the specified non-zero dimensions exceed those of the + * source, also use the max. picture size (no upscaling) + */ + if (([[chosenPreset objectForKey:@"PictureWidth"] intValue] <= 0 && + [[chosenPreset objectForKey:@"PictureHeight"] intValue] <= 0) || + ([[chosenPreset objectForKey:@"PictureWidth"] intValue] > fTitle->width && + [[chosenPreset objectForKey:@"PictureHeight"] intValue] > fTitle->height) || + ([[chosenPreset objectForKey:@"PictureHeight"] intValue] <= 0 && + [[chosenPreset objectForKey:@"PictureWidth"] intValue] > fTitle->width) || + ([[chosenPreset objectForKey:@"PictureWidth"] intValue] <= 0 && + [[chosenPreset objectForKey:@"PictureHeight"] intValue] > fTitle->height)) { - /* if so, then we use the sources height and width to avoid scaling up */ - //job->width = fTitle->width; - //job->height = fTitle->height; + /* use the source's width/height to avoid upscaling */ [self revertPictureSizeToMax:nil]; } - else // source width/height is >= the preset height/width + else // source width/height is >= preset width/height { - /* we can go ahead and use the presets values for height and width */ - job->width = [[chosenPreset objectForKey:@"PictureWidth"] intValue]; - job->height = [[chosenPreset objectForKey:@"PictureHeight"] intValue]; + /* use the preset values for width/height */ + job->width = [[chosenPreset objectForKey:@"PictureWidth"] intValue]; + job->height = [[chosenPreset objectForKey:@"PictureHeight"] intValue]; } job->keep_ratio = [[chosenPreset objectForKey:@"PictureKeepRatio"] intValue]; if (job->keep_ratio == 1) diff --git a/macosx/HBPresets.h b/macosx/HBPresets.h index 2b3708cbd..598971efa 100644 --- a/macosx/HBPresets.h +++ b/macosx/HBPresets.h @@ -15,21 +15,17 @@ /* Built-In Preset Dictionaries (one for each built in preset) */ - (NSDictionary *)createDevicesPresetFolder; - (NSDictionary *)createRegularPresetFolder; -- (NSDictionary *)createLegacyPresetFolder; - (NSDictionary *)createiPadPreset; -- (NSDictionary *)createiPhone4Preset; -- (NSDictionary *)createAppleTv2Preset; +- (NSDictionary *)createAppleTV2Preset; - (NSDictionary *)createAppleTVPreset; -- (NSDictionary *)createAppleTv3Preset; -- (NSDictionary *)createAppleUniversalPreset; -- (NSDictionary *)createClassicPreset; -- (NSDictionary *)createiPhonePreset; -- (NSDictionary *)createIpodHighPreset; -- (NSDictionary *)createIpodLowPreset; +- (NSDictionary *)createAppleTV3Preset; +- (NSDictionary *)createUniversalPreset; +- (NSDictionary *)createiPhoneiPodtouchPreset; +- (NSDictionary *)createiPodPreset; - (NSDictionary *)createNormalPreset; - (NSDictionary *)createHighProfilePreset; -- (NSDictionary *)createAndroidMidPreset; -- (NSDictionary *)createAndroidHighPreset; +- (NSDictionary *)createAndroidPreset; +- (NSDictionary *)createAndroidTabletPreset; @end diff --git a/macosx/HBPresets.m b/macosx/HBPresets.m index eaf496ccb..7d3aa0eac 100644 --- a/macosx/HBPresets.m +++ b/macosx/HBPresets.m @@ -25,7 +25,6 @@ /* Built in preset folders at the root of the hierarchy */ [UserPresets addObject:[self createDevicesPresetFolder]]; [UserPresets addObject:[self createRegularPresetFolder]]; - [UserPresets addObject:[self createLegacyPresetFolder]]; /* Independent presets at the root hierarchy level would go here */ @@ -40,34 +39,29 @@ - (NSDictionary *)createDevicesPresetFolder { NSMutableDictionary *preset = [[NSMutableDictionary alloc] init]; -/*Set whether or not this is a folder, 1 is bool for folder*/ - [preset setObject:[NSNumber numberWithBool: YES] forKey:@"Folder"]; - /* Get the New Preset Name from the field in the AddPresetPanel */ [preset setObject:@"Devices" forKey:@"PresetName"]; /*Set whether or not this is a user preset where 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"]; + [preset setObject:[NSNumber numberWithBool: YES] forKey:@"Folder"]; /* Lets initalize the child array of dictionaries for folders, this is an array of dictionaries much like the root level of presets and may contain folders and presets alike, etc.*/ NSMutableArray *childrenArray = [[NSMutableArray alloc] init]; /* we actually call the methods for the nests here */ - [childrenArray addObject:[self createAppleUniversalPreset]]; - [childrenArray addObject:[self createIpodLowPreset]]; - [childrenArray addObject:[self createiPhonePreset]]; - [childrenArray addObject:[self createiPhone4Preset]]; + [childrenArray addObject:[self createUniversalPreset]]; + [childrenArray addObject:[self createiPodPreset]]; + [childrenArray addObject:[self createiPhoneiPodtouchPreset]]; [childrenArray addObject:[self createiPadPreset]]; [childrenArray addObject:[self createAppleTVPreset]]; - [childrenArray addObject:[self createAppleTv2Preset]]; - [childrenArray addObject:[self createAppleTv3Preset]]; - [childrenArray addObject:[self createAndroidMidPreset]]; - [childrenArray addObject:[self createAndroidHighPreset]]; + [childrenArray addObject:[self createAppleTV2Preset]]; + [childrenArray addObject:[self createAppleTV3Preset]]; + [childrenArray addObject:[self createAndroidPreset]]; + [childrenArray addObject:[self createAndroidTabletPreset]]; [preset setObject:[NSMutableArray arrayWithArray: childrenArray] forKey:@"ChildrenArray"]; @@ -82,18 +76,14 @@ - (NSDictionary *)createRegularPresetFolder { NSMutableDictionary *preset = [[NSMutableDictionary alloc] init]; -/*Set whether or not this is a folder, 1 is bool for folder*/ - [preset setObject:[NSNumber numberWithBool: YES] forKey:@"Folder"]; - /* Get the New Preset Name from the field in the AddPresetPanel */ [preset setObject:@"Regular" forKey:@"PresetName"]; /*Set whether or not this is a user preset where 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"]; + [preset setObject:[NSNumber numberWithBool: YES] forKey:@"Folder"]; /* Lets initalize the child array of dictionaries for folders, this is an array of dictionaries much like the root level of presets and @@ -112,40 +102,6 @@ return preset; } -- (NSDictionary *)createLegacyPresetFolder -{ - NSMutableDictionary *preset = [[NSMutableDictionary alloc] init]; -/*Set whether or not this is a folder, 1 is bool for folder*/ - [preset setObject:[NSNumber numberWithBool: YES] forKey:@"Folder"]; - - - /* Get the New Preset Name from the field in the AddPresetPanel */ - [preset setObject:@"Legacy" forKey:@"PresetName"]; - - /*Set whether or not this is a user preset where 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"]; - - /* Lets initalize the child array of dictionaries for folders, this - is an array of dictionaries much like the root level of presets and - may contain folders and presets alike, etc.*/ - NSMutableArray *childrenArray = [[NSMutableArray alloc] init]; - /* we actually call the methods for the nests here */ - [childrenArray addObject:[self createClassicPreset]]; - [childrenArray addObject:[self createIpodHighPreset]]; - [preset setObject:[NSMutableArray arrayWithArray: childrenArray] forKey:@"ChildrenArray"]; - - [childrenArray autorelease]; - - - - [preset autorelease]; - return preset; -} - - #pragma mark - #pragma mark Built In Preset Definitions @@ -162,22 +118,16 @@ /*Set whether or not this is a user preset where 0 is factory, 1 is user*/ [preset setObject:[NSNumber numberWithInt:0] forKey:@"Type"]; - /*Set whether or not this is a folder, 1 is bool for folder*/ - [preset setObject:[NSNumber numberWithBool: NO] forKey:@"Folder"]; - /*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"]; + [preset setObject:[NSNumber numberWithBool: NO] forKey:@"Folder"]; /* Get the New Preset Description from the field in the AddPresetPanel */ [preset setObject:@"HandBrake's settings for the AppleTV and 2009's iPhone and iPod Touch lineup. Provides a good balance between quality and file size, and pushes the devices to their limits. Includes Dolby Digital 5.1 AC3 sound for the AppleTV." forKey:@"PresetDescription"]; /* File Format */ [preset setObject:@"MP4 file" forKey:@"FileFormat"]; - - /* 64-bit MP4 file */ [preset setObject:[NSNumber numberWithInt:1] forKey:@"Mp4LargeFile"]; + [preset setObject:[NSNumber numberWithInt:0] forKey:@"Mp4iPodCompatible"]; /* Chapter Markers*/ [preset setObject:[NSNumber numberWithInt:1] forKey:@"ChapterMarkers"]; @@ -186,16 +136,22 @@ [preset setObject:@"H.264 (x264)" forKey:@"VideoEncoder"]; /* x264 Option String (We can use this to tweak the appleTV output)*/ - [preset setObject:@"cabac=0:ref=2:me=umh:b-pyramid=none:b-adapt=2:weightb=0:trellis=0:weightp=0:vbv-maxrate=9500:vbv-bufsize=9500" forKey:@"x264Option"]; + [preset setObject:@"" forKey:@"x264Option"]; + [preset setObject:[NSNumber numberWithInt:0] forKey:@"x264UseAdvancedOptions"]; + [preset setObject:@"medium" forKey:@"x264Preset"]; + [preset setObject:@"" forKey:@"x264Tune"]; + [preset setObject:@"cabac=0:ref=2:b-pyramid=none:weightb=0:weightp=0:vbv-maxrate=9500:vbv-bufsize=9500" forKey:@"x264OptionExtra"]; + [preset setObject:@"high" forKey:@"h264Profile"]; + [preset setObject:@"3.1" forKey:@"h264Level"]; /* Video quality */ - [preset setObject:[NSNumber numberWithInt:2] forKey:@"VideoQualityType"]; [preset setObject:@"2500" forKey:@"VideoAvgBitrate"]; + [preset setObject:[NSNumber numberWithInt:2] forKey:@"VideoQualityType"]; [preset setObject:[NSNumber numberWithFloat:20.0] forKey:@"VideoQualitySlider"]; /* Video framerate */ - [preset setObject:@"Same as source" forKey:@"VideoFramerate"]; - [preset setObject:@"vfr" forKey:@"VideoFramerateMode"]; + [preset setObject:@"30" forKey:@"VideoFramerate"]; + [preset setObject:@"pfr" forKey:@"VideoFramerateMode"]; /* GrayScale */ [preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoGrayScale"]; @@ -210,12 +166,12 @@ [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureHeight"]; [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureKeepRatio"]; [preset setObject:[NSNumber numberWithInt:2] forKey:@"PicturePAR"]; + [preset setObject:[NSNumber numberWithInt:2] forKey:@"PictureModulus"]; /* Explicitly set the filters for built-in presets */ [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureFilters"]; [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeinterlace"]; [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDenoise"]; - [preset setObject:[NSNumber numberWithInt:0] forKey:@"VFR"]; [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeblock"]; [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDetelecine"]; @@ -265,7 +221,7 @@ return preset; } -- (NSDictionary *)createAppleUniversalPreset +- (NSDictionary *)createUniversalPreset { NSMutableDictionary *preset = [[NSMutableDictionary alloc] init]; @@ -274,22 +230,16 @@ /*Set whether or not this is a user preset where 0 is factory, 1 is user*/ [preset setObject:[NSNumber numberWithInt:0] forKey:@"Type"]; - /*Set whether or not this is a folder, 1 is bool for folder*/ - [preset setObject:[NSNumber numberWithBool: NO] forKey:@"Folder"]; - /*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"]; + [preset setObject:[NSNumber numberWithBool: NO] forKey:@"Folder"]; /* Get the New Preset Description from the field in the AddPresetPanel */ [preset setObject:@"HandBrake's universally compatible, full resolution settings for all current Apple devices: iPod (6G and up), iPhone, AppleTV, and Macs" forKey:@"PresetDescription"]; /* File Format */ [preset setObject:@"MP4 file" forKey:@"FileFormat"]; - - /* 64-bit MP4 file */ [preset setObject:[NSNumber numberWithInt:0] forKey:@"Mp4LargeFile"]; + [preset setObject:[NSNumber numberWithInt:0] forKey:@"Mp4iPodCompatible"]; /* Chapter Markers*/ [preset setObject:[NSNumber numberWithInt:1] forKey:@"ChapterMarkers"]; @@ -298,16 +248,22 @@ [preset setObject:@"H.264 (x264)" forKey:@"VideoEncoder"]; /* x264 Option String (We can use this to tweak the appleTV output)*/ - [preset setObject:@"cabac=0:ref=2:me=umh:bframes=0:weightp=0:8x8dct=0:trellis=0:subme=6" forKey:@"x264Option"]; + [preset setObject:@"" forKey:@"x264Option"]; + [preset setObject:[NSNumber numberWithInt:0] forKey:@"x264UseAdvancedOptions"]; + [preset setObject:@"fast" forKey:@"x264Preset"]; + [preset setObject:@"" forKey:@"x264Tune"]; + [preset setObject:@"" forKey:@"x264OptionExtra"]; + [preset setObject:@"baseline" forKey:@"h264Profile"]; + [preset setObject:@"3.0" forKey:@"h264Level"]; /* Video quality */ - [preset setObject:[NSNumber numberWithInt:2] forKey:@"VideoQualityType"]; [preset setObject:@"2500" forKey:@"VideoAvgBitrate"]; + [preset setObject:[NSNumber numberWithInt:2] forKey:@"VideoQualityType"]; [preset setObject:[NSNumber numberWithFloat:20.0] forKey:@"VideoQualitySlider"]; /* Video framerate */ - [preset setObject:@"Same as source" forKey:@"VideoFramerate"]; - [preset setObject:@"vfr" forKey:@"VideoFramerateMode"]; + [preset setObject:@"30" forKey:@"VideoFramerate"]; + [preset setObject:@"pfr" forKey:@"VideoFramerateMode"]; /* GrayScale */ [preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoGrayScale"]; @@ -322,12 +278,12 @@ [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureHeight"]; [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureKeepRatio"]; [preset setObject:[NSNumber numberWithInt:2] forKey:@"PicturePAR"]; + [preset setObject:[NSNumber numberWithInt:2] forKey:@"PictureModulus"]; /* Explicitly set the filters for built-in presets */ [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureFilters"]; [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeinterlace"]; [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDenoise"]; - [preset setObject:[NSNumber numberWithInt:0] forKey:@"VFR"]; [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeblock"]; [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDetelecine"]; @@ -386,22 +342,16 @@ /*Set whether or not this is a user preset where 0 is factory, 1 is user*/ [preset setObject:[NSNumber numberWithInt:0] forKey:@"Type"]; - /*Set whether or not this is a folder, 1 is bool for folder*/ - [preset setObject:[NSNumber numberWithBool: NO] forKey:@"Folder"]; - /*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"]; + [preset setObject:[NSNumber numberWithBool: NO] forKey:@"Folder"]; /* Get the New Preset Description from the field in the AddPresetPanel */ [preset setObject:@"HandBrake's preset for the iPad (all generations) is optimized for a good balance between quality and filesize." forKey:@"PresetDescription"]; /* File Format */ [preset setObject:@"MP4 file" forKey:@"FileFormat"]; - - /* 64-bit MP4 file */ [preset setObject:[NSNumber numberWithInt:1] forKey:@"Mp4LargeFile"]; + [preset setObject:[NSNumber numberWithInt:0] forKey:@"Mp4iPodCompatible"]; /* Chapter Markers*/ [preset setObject:[NSNumber numberWithInt:1] forKey:@"ChapterMarkers"]; @@ -411,10 +361,16 @@ /* x264 Option String (We can use this to tweak the output)*/ [preset setObject:@"" forKey:@"x264Option"]; + [preset setObject:[NSNumber numberWithInt:0] forKey:@"x264UseAdvancedOptions"]; + [preset setObject:@"medium" forKey:@"x264Preset"]; + [preset setObject:@"" forKey:@"x264Tune"]; + [preset setObject:@"" forKey:@"x264OptionExtra"]; + [preset setObject:@"high" forKey:@"h264Profile"]; + [preset setObject:@"3.1" forKey:@"h264Level"]; /* Video quality */ - [preset setObject:[NSNumber numberWithInt:2] forKey:@"VideoQualityType"]; [preset setObject:@"2500" forKey:@"VideoAvgBitrate"]; + [preset setObject:[NSNumber numberWithInt:2] forKey:@"VideoQualityType"]; [preset setObject:[NSNumber numberWithFloat:20.0] forKey:@"VideoQualitySlider"]; /* Video framerate */ @@ -434,12 +390,12 @@ [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureHeight"]; [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureKeepRatio"]; [preset setObject:[NSNumber numberWithInt:2] forKey:@"PicturePAR"]; + [preset setObject:[NSNumber numberWithInt:2] forKey:@"PictureModulus"]; /* Explicitly set the filters for built-in presets */ [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureFilters"]; [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeinterlace"]; [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDenoise"]; - [preset setObject:[NSNumber numberWithInt:0] forKey:@"VFR"]; [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeblock"]; [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDetelecine"]; @@ -475,105 +431,7 @@ return preset; } -- (NSDictionary *)createiPhone4Preset -{ - NSMutableDictionary *preset = [[NSMutableDictionary alloc] init]; - - /* Get the New Preset Name from the field in the AddPresetPanel */ - [preset setObject:@"iPhone 4" forKey:@"PresetName"]; - - /*Set whether or not this is a user preset where 0 is factory, 1 is user*/ - [preset setObject:[NSNumber numberWithInt:0] forKey:@"Type"]; - /*Set whether or not this is a folder, 1 is bool for folder*/ - [preset setObject:[NSNumber numberWithBool: NO] forKey:@"Folder"]; - /*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 the iPhone 4 is optimized for viewing on its 960x480 display." forKey:@"PresetDescription"]; - - /* File Format */ - [preset setObject:@"MP4 file" forKey:@"FileFormat"]; - - /* 64-bit MP4 file */ - [preset setObject:[NSNumber numberWithInt:1] forKey:@"Mp4LargeFile"]; - - /* Chapter Markers*/ - [preset setObject:[NSNumber numberWithInt:1] forKey:@"ChapterMarkers"]; - - /* Video encoder */ - [preset setObject:@"H.264 (x264)" forKey:@"VideoEncoder"]; - - /* x264 Option String (We can use this to tweak the output)*/ - [preset setObject:@"" forKey:@"x264Option"]; - - /* Video quality */ - [preset setObject:[NSNumber numberWithInt:2] forKey:@"VideoQualityType"]; - [preset setObject:@"2500" forKey:@"VideoAvgBitrate"]; - [preset setObject:[NSNumber numberWithFloat:20.0] forKey:@"VideoQualitySlider"]; - - /* Video framerate */ - [preset setObject:@"29.97 (NTSC Video)" forKey:@"VideoFramerate"]; - [preset setObject:@"pfr" forKey:@"VideoFramerateMode"]; - - /* GrayScale */ - [preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoGrayScale"]; - - /* 2 Pass Encoding */ - [preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoTwoPass"]; - - /* Basic Picture Settings */ - /* Use Max Picture settings for whatever the dvd is.*/ - [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureSettings"]; - [preset setObject:[NSNumber numberWithInt:960] forKey:@"PictureWidth"]; - [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureHeight"]; - [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureKeepRatio"]; - [preset setObject:[NSNumber numberWithInt:2] forKey:@"PicturePAR"]; - - /* Explicitly set the filters for built-in presets */ - [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureFilters"]; - [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeinterlace"]; - [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDenoise"]; - [preset setObject:[NSNumber numberWithInt:0] forKey:@"VFR"]; - [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeblock"]; - [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDetelecine"]; - - /* Set crop settings here */ - /* The Auto Crop Matrix in the Picture Window autodetects differences in crop settings */ - [preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureAutoCrop"]; - [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 - Is done on a track by track basis, ONLY specifiy the tracks we want set as any track - * not listed will be set to "None" and not encoded */ - NSMutableArray *audioListArray = [[NSMutableArray alloc] init]; - - /* Track 1 */ - NSMutableDictionary *audioTrack1Array = [[NSMutableDictionary alloc] init]; - [audioTrack1Array setObject:[NSNumber numberWithInt:1] forKey:@"AudioTrack"]; - [audioTrack1Array setObject:@"AAC (faac)" forKey:@"AudioEncoder"]; - [audioTrack1Array setObject:@"Dolby Pro Logic II" forKey:@"AudioMixdown"]; - [audioTrack1Array setObject:@"Auto" forKey:@"AudioSamplerate"]; - [audioTrack1Array setObject:@"160" forKey:@"AudioBitrate"]; - [audioTrack1Array setObject:[NSNumber numberWithFloat:0.0] forKey:@"AudioTrackDRCSlider"]; - [audioTrack1Array autorelease]; - [audioListArray addObject:audioTrack1Array]; - - [preset setObject:[NSMutableArray arrayWithArray: audioListArray] forKey:@"AudioList"]; - - /* Subtitles*/ - [preset setObject:@"None" forKey:@"Subtitles"]; - - [preset autorelease]; - return preset; -} - -- (NSDictionary *)createAppleTv2Preset +- (NSDictionary *)createAppleTV2Preset { NSMutableDictionary *preset = [[NSMutableDictionary alloc] init]; @@ -582,22 +440,16 @@ /*Set whether or not this is a user preset where 0 is factory, 1 is user*/ [preset setObject:[NSNumber numberWithInt:0] forKey:@"Type"]; - /*Set whether or not this is a folder, 1 is bool for folder*/ - [preset setObject:[NSNumber numberWithBool: NO] forKey:@"Folder"]; - /*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"]; + [preset setObject:[NSNumber numberWithBool: NO] forKey:@"Folder"]; /* Get the New Preset Description from the field in the AddPresetPanel */ [preset setObject:@"HandBrake's preset for the Apple TV (2nd gen) is optimized for viewing on its 1280x720 display." forKey:@"PresetDescription"]; /* File Format */ [preset setObject:@"MP4 file" forKey:@"FileFormat"]; - - /* 64-bit MP4 file */ - [preset setObject:[NSNumber numberWithInt:1] forKey:@"Mp4LargeFile"]; + [preset setObject:[NSNumber numberWithInt:1] forKey:@"Mp4LargeFile"]; + [preset setObject:[NSNumber numberWithInt:0] forKey:@"Mp4iPodCompatible"]; /* Chapter Markers*/ [preset setObject:[NSNumber numberWithInt:1] forKey:@"ChapterMarkers"]; @@ -607,10 +459,16 @@ /* x264 Option String (We can use this to tweak the output)*/ [preset setObject:@"" forKey:@"x264Option"]; + [preset setObject:[NSNumber numberWithInt:0] forKey:@"x264UseAdvancedOptions"]; + [preset setObject:@"medium" forKey:@"x264Preset"]; + [preset setObject:@"" forKey:@"x264Tune"]; + [preset setObject:@"" forKey:@"x264OptionExtra"]; + [preset setObject:@"high" forKey:@"h264Profile"]; + [preset setObject:@"3.1" forKey:@"h264Level"]; /* Video quality */ - [preset setObject:[NSNumber numberWithInt:2] forKey:@"VideoQualityType"]; [preset setObject:@"2500" forKey:@"VideoAvgBitrate"]; + [preset setObject:[NSNumber numberWithInt:2] forKey:@"VideoQualityType"]; [preset setObject:[NSNumber numberWithFloat:20.0] forKey:@"VideoQualitySlider"]; /* Video framerate */ @@ -630,12 +488,12 @@ [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureHeight"]; [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureKeepRatio"]; [preset setObject:[NSNumber numberWithInt:2] forKey:@"PicturePAR"]; + [preset setObject:[NSNumber numberWithInt:2] forKey:@"PictureModulus"]; /* Explicitly set the filters for built-in presets */ [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureFilters"]; [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeinterlace"]; [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDenoise"]; - [preset setObject:[NSNumber numberWithInt:0] forKey:@"VFR"]; [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeblock"]; [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDetelecine"]; @@ -686,7 +544,7 @@ return preset; } -- (NSDictionary *)createAppleTv3Preset +- (NSDictionary *)createAppleTV3Preset { NSMutableDictionary *preset = [[NSMutableDictionary alloc] init]; @@ -695,22 +553,16 @@ /*Set whether or not this is a user preset where 0 is factory, 1 is user*/ [preset setObject:[NSNumber numberWithInt:0] forKey:@"Type"]; - /*Set whether or not this is a folder, 1 is bool for folder*/ - [preset setObject:[NSNumber numberWithBool: NO] forKey:@"Folder"]; - /*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"]; + [preset setObject:[NSNumber numberWithBool: NO] forKey:@"Folder"]; /* Get the New Preset Description from the field in the AddPresetPanel */ [preset setObject:@"HandBrake's preset for the Apple TV (3rd gen) is optimized for up to 1080p playback." forKey:@"PresetDescription"]; /* File Format */ [preset setObject:@"MP4 file" forKey:@"FileFormat"]; - - /* 64-bit MP4 file */ - [preset setObject:[NSNumber numberWithInt:1] forKey:@"Mp4LargeFile"]; + [preset setObject:[NSNumber numberWithInt:1] forKey:@"Mp4LargeFile"]; + [preset setObject:[NSNumber numberWithInt:0] forKey:@"Mp4iPodCompatible"]; /* Chapter Markers*/ [preset setObject:[NSNumber numberWithInt:1] forKey:@"ChapterMarkers"]; @@ -719,11 +571,17 @@ [preset setObject:@"H.264 (x264)" forKey:@"VideoEncoder"]; /* x264 Option String (We can use this to tweak the output)*/ - [preset setObject:@"b-adapt=2" forKey:@"x264Option"]; + [preset setObject:@"" forKey:@"x264Option"]; + [preset setObject:[NSNumber numberWithInt:0] forKey:@"x264UseAdvancedOptions"]; + [preset setObject:@"medium" forKey:@"x264Preset"]; + [preset setObject:@"" forKey:@"x264Tune"]; + [preset setObject:@"" forKey:@"x264OptionExtra"]; + [preset setObject:@"high" forKey:@"h264Profile"]; + [preset setObject:@"4.0" forKey:@"h264Level"]; /* Video quality */ - [preset setObject:[NSNumber numberWithInt:2] forKey:@"VideoQualityType"]; [preset setObject:@"2500" forKey:@"VideoAvgBitrate"]; + [preset setObject:[NSNumber numberWithInt:2] forKey:@"VideoQualityType"]; [preset setObject:[NSNumber numberWithFloat:20.0] forKey:@"VideoQualitySlider"]; /* Video framerate */ @@ -806,99 +664,6 @@ return preset; } - -- (NSDictionary *)createClassicPreset -{ - NSMutableDictionary *preset = [[NSMutableDictionary alloc] init]; - - /* Get the New Preset Name from the field in the AddPresetPanel */ - [preset setObject:@"Classic" 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:2] forKey:@"UsesPictureSettings"]; - - /* Get the New Preset Description from the field in the AddPresetPanel */ - [preset setObject:@"HandBrake's traditional, faster, lower-quality settings." forKey:@"PresetDescription"]; - - /* File Format */ - [preset setObject:@"MP4 file" forKey:@"FileFormat"]; - - /* Chapter Markers*/ - [preset setObject:[NSNumber numberWithInt:0] forKey:@"ChapterMarkers"]; - - /* Video encoder */ - [preset setObject:@"MPEG-4 (FFmpeg)" forKey:@"VideoEncoder"]; - - /* x264 Option String */ - [preset setObject:@"" forKey:@"x264Option"]; - - /* Video quality */ - [preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoQualityType"]; - [preset setObject:@"1000" forKey:@"VideoAvgBitrate"]; - - /* Video framerate */ - [preset setObject:@"Same as source" forKey:@"VideoFramerate"]; - [preset setObject:@"vfr" forKey:@"VideoFramerateMode"]; - - /* GrayScale */ - [preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoGrayScale"]; - - /* 2 Pass Encoding */ - [preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoTwoPass"]; - - /*Picture Settings*/ - /* Use Max Picture settings for whatever the dvd is.*/ - [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:1] forKey:@"PictureKeepRatio"]; - [preset setObject:[NSNumber numberWithInt:0] forKey:@"PicturePAR"]; - - /* Explicitly set the filters for built-in presets */ - [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureFilters"]; - [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeinterlace"]; - [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDenoise"]; - [preset setObject:[NSNumber numberWithInt:0] forKey:@"VFR"]; - [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeblock"]; - [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDetelecine"]; - - /* 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 - Is done on a track by track basis, ONLY specifiy the tracks we want set as any track - * not listed will be set to "None" and not encoded */ - NSMutableArray *audioListArray = [[NSMutableArray alloc] init]; - - /* Track 1 */ - NSMutableDictionary *audioTrack1Array = [[NSMutableDictionary alloc] init]; - [audioTrack1Array setObject:[NSNumber numberWithInt:1] forKey:@"AudioTrack"]; - [audioTrack1Array setObject:@"AAC (faac)" forKey:@"AudioEncoder"]; - [audioTrack1Array setObject:@"Dolby Pro Logic II" forKey:@"AudioMixdown"]; - [audioTrack1Array setObject:@"Auto" forKey:@"AudioSamplerate"]; - [audioTrack1Array setObject:@"160" forKey:@"AudioBitrate"]; - [audioTrack1Array setObject:[NSNumber numberWithFloat:0.0] forKey:@"AudioTrackDRCSlider"]; - [audioTrack1Array autorelease]; - [audioListArray addObject:audioTrack1Array]; - - [preset setObject:[NSMutableArray arrayWithArray: audioListArray] forKey:@"AudioList"]; - - /* Subtitles*/ - [preset setObject:@"None" forKey:@"Subtitles"]; - - [preset autorelease]; - return preset; -} - - (NSDictionary *)createHighProfilePreset { NSMutableDictionary *preset = [[NSMutableDictionary alloc] init]; @@ -908,21 +673,16 @@ /*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:2] forKey:@"UsesPictureSettings"]; + [preset setObject:[NSNumber numberWithBool: NO] forKey:@"Folder"]; /* Get the New Preset Description from the field in the AddPresetPanel */ [preset setObject:@"HandBrake's general-purpose preset for High Profile H.264 video, with all the bells and whistles." forKey:@"PresetDescription"]; /* File Format */ [preset setObject:@"MP4 file" forKey:@"FileFormat"]; - - /* 64-bit MP4 file */ [preset setObject:[NSNumber numberWithInt:1] forKey:@"Mp4LargeFile"]; + [preset setObject:[NSNumber numberWithInt:0] forKey:@"Mp4iPodCompatible"]; /* Chapter Markers*/ [preset setObject:[NSNumber numberWithInt:1] forKey:@"ChapterMarkers"]; @@ -931,11 +691,17 @@ [preset setObject:@"H.264 (x264)" forKey:@"VideoEncoder"]; /* x264 Option String */ - [preset setObject:@"b-adapt=2:rc-lookahead=50" forKey:@"x264Option"]; + [preset setObject:@"" forKey:@"x264Option"]; + [preset setObject:[NSNumber numberWithInt:0] forKey:@"x264UseAdvancedOptions"]; + [preset setObject:@"medium" forKey:@"x264Preset"]; + [preset setObject:@"" forKey:@"x264Tune"]; + [preset setObject:@"" forKey:@"x264OptionExtra"]; + [preset setObject:@"high" forKey:@"h264Profile"]; + [preset setObject:@"4.1" forKey:@"h264Level"]; /* Video quality */ + [preset setObject:@"2500" forKey:@"VideoAvgBitrate"]; [preset setObject:[NSNumber numberWithInt:2] forKey:@"VideoQualityType"]; - [preset setObject:@"1800" forKey:@"VideoAvgBitrate"]; [preset setObject:[NSNumber numberWithFloat:20.0] forKey:@"VideoQualitySlider"]; /* Video framerate */ @@ -951,11 +717,12 @@ /*Picture Settings*/ /* Use Max Picture settings for whatever the dvd is.*/ - [preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureAutoCrop"]; + [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureSettings"]; [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:2] forKey:@"PicturePAR"]; + [preset setObject:[NSNumber numberWithInt:2] forKey:@"PictureModulus"]; /* Explicitly set the filters for built-in presets */ [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureFilters"]; @@ -968,6 +735,7 @@ /* Set crop settings here */ /* The Auto Crop Matrix in the Picture Window autodetects differences in crop settings */ + [preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureAutoCrop"]; [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureTopCrop"]; [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureBottomCrop"]; [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureLeftCrop"]; @@ -1011,7 +779,7 @@ return preset; } -- (NSDictionary *)createiPhonePreset +- (NSDictionary *)createiPhoneiPodtouchPreset { NSMutableDictionary *preset = [[NSMutableDictionary alloc] init]; @@ -1020,36 +788,40 @@ /*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"]; + [preset setObject:[NSNumber numberWithBool: NO] forKey:@"Folder"]; /* Get the New Preset Description from the field in the AddPresetPanel */ [preset setObject:@"HandBrake's settings for all iPhones and iPod Touches going back to the original iPhone 2G." forKey:@"PresetDescription"]; /* File Format */ [preset setObject:@"MP4 file" forKey:@"FileFormat"]; + [preset setObject:[NSNumber numberWithInt:1] forKey:@"Mp4LargeFile"]; + [preset setObject:[NSNumber numberWithInt:0] forKey:@"Mp4iPodCompatible"]; /* Chapter Markers*/ [preset setObject:[NSNumber numberWithInt:1] forKey:@"ChapterMarkers"]; /* Video encoder */ [preset setObject:@"H.264 (x264)" forKey:@"VideoEncoder"]; - [preset setObject:[NSNumber numberWithInt:0] forKey:@"Mp4iPodCompatible"]; + /* x264 Option String */ - [preset setObject:@"cabac=0:ref=2:me=umh:bframes=0:weightp=0:subme=6:8x8dct=0:trellis=0" forKey:@"x264Option"]; + [preset setObject:@"" forKey:@"x264Option"]; + [preset setObject:[NSNumber numberWithInt:0] forKey:@"x264UseAdvancedOptions"]; + [preset setObject:@"medium" forKey:@"x264Preset"]; + [preset setObject:@"" forKey:@"x264Tune"]; + [preset setObject:@"" forKey:@"x264OptionExtra"]; + [preset setObject:@"high" forKey:@"h264Profile"]; + [preset setObject:@"3.1" forKey:@"h264Level"]; /* Video quality */ + [preset setObject:@"2500" forKey:@"VideoAvgBitrate"]; [preset setObject:[NSNumber numberWithInt:2] forKey:@"VideoQualityType"]; - [preset setObject:@"960" forKey:@"VideoAvgBitrate"]; - [preset setObject:[NSNumber numberWithFloat:20.0] forKey:@"VideoQualitySlider"]; + [preset setObject:[NSNumber numberWithFloat:22.0] forKey:@"VideoQualitySlider"]; /* Video framerate */ - [preset setObject:@"Same as source" forKey:@"VideoFramerate"]; - [preset setObject:@"vfr" forKey:@"VideoFramerateMode"]; + [preset setObject:@"29.97 (NTSC Video)" forKey:@"VideoFramerate"]; + [preset setObject:@"pfr" forKey:@"VideoFramerateMode"]; /* GrayScale */ [preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoGrayScale"]; @@ -1058,109 +830,18 @@ [preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoTwoPass"]; /*Picture Settings*/ - /* Use a width of 480 for the iPhone*/ - [preset setObject:[NSNumber numberWithInt:480] forKey:@"PictureWidth"]; - [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureHeight"]; - [preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureKeepRatio"]; - [preset setObject:[NSNumber numberWithInt:0] forKey:@"PicturePAR"]; - - /* Explicitly set the filters for built-in presets */ - [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureFilters"]; - [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeinterlace"]; - [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDenoise"]; - [preset setObject:[NSNumber numberWithInt:0] forKey:@"VFR"]; - [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeblock"]; - [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDetelecine"]; - - /* Set crop settings here */ - /* The Auto Crop Matrix in the Picture Window autodetects differences in crop settings */ - [preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureAutoCrop"]; - [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 - Is done on a track by track basis, ONLY specifiy the tracks we want set as any track - * not listed will be set to "None" and not encoded */ - NSMutableArray *audioListArray = [[NSMutableArray alloc] init]; - - /* Track 1 */ - NSMutableDictionary *audioTrack1Array = [[NSMutableDictionary alloc] init]; - [audioTrack1Array setObject:[NSNumber numberWithInt:1] forKey:@"AudioTrack"]; - [audioTrack1Array setObject:@"AAC (faac)" forKey:@"AudioEncoder"]; - [audioTrack1Array setObject:@"Dolby Pro Logic II" forKey:@"AudioMixdown"]; - [audioTrack1Array setObject:@"Auto" forKey:@"AudioSamplerate"]; - [audioTrack1Array setObject:@"128" forKey:@"AudioBitrate"]; - [audioTrack1Array setObject:[NSNumber numberWithFloat:0.0] forKey:@"AudioTrackDRCSlider"]; - [audioTrack1Array autorelease]; - [audioListArray addObject:audioTrack1Array]; - - [preset setObject:[NSMutableArray arrayWithArray: audioListArray] forKey:@"AudioList"]; - - /* Subtitles*/ - [preset setObject:@"None" forKey:@"Subtitles"]; - - [preset autorelease]; - return preset; -} - -- (NSDictionary *)createIpodHighPreset -{ - NSMutableDictionary *preset = [[NSMutableDictionary alloc] init]; - - /* Get the New Preset Name from the field in the AddPresetPanel */ - [preset setObject:@"iPod Legacy" 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*/ + /* Use a width of 960 for the iPhone 4 and later */ [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureSettings"]; - - /* Get the New Preset Description from the field in the AddPresetPanel */ - [preset setObject:@"HandBrake's high resolution settings for older 5 and 5.5G iPods. Good video quality, great for viewing on a TV using your iPod. This is the iPod High-Rez preset from 0.9.2." forKey:@"PresetDescription"]; - - /* File Format */ - [preset setObject:@"MP4 file" forKey:@"FileFormat"]; - - /* Chapter Markers*/ - [preset setObject:[NSNumber numberWithInt:1] forKey:@"ChapterMarkers"]; - - /* Video encoder */ - [preset setObject:@"H.264 (x264)" forKey:@"VideoEncoder"]; - [preset setObject:[NSNumber numberWithInt:1] forKey:@"Mp4iPodCompatible"]; - /* x264 Option String */ - [preset setObject:@"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" forKey:@"x264Option"]; - - /* Video quality */ - [preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoQualityType"]; - [preset setObject:@"1500" forKey:@"VideoAvgBitrate"]; - - /* Video framerate */ - [preset setObject:@"Same as source" forKey:@"VideoFramerate"]; - [preset setObject:@"vfr" forKey:@"VideoFramerateMode"]; - - /* GrayScale */ - [preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoGrayScale"]; - - /* 2 Pass Encoding */ - [preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoTwoPass"]; - - /*Picture Settings*/ - /* Use a width of 640 for iPod TV-out */ - [preset setObject:[NSNumber numberWithInt:640] forKey:@"PictureWidth"]; + [preset setObject:[NSNumber numberWithInt:960] forKey:@"PictureWidth"]; [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureHeight"]; - [preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureKeepRatio"]; - [preset setObject:[NSNumber numberWithInt:0] forKey:@"PicturePAR"]; + [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureKeepRatio"]; + [preset setObject:[NSNumber numberWithInt:2] forKey:@"PicturePAR"]; + [preset setObject:[NSNumber numberWithInt:2] forKey:@"PictureModulus"]; /* Explicitly set the filters for built-in presets */ [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureFilters"]; [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeinterlace"]; [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDenoise"]; - [preset setObject:[NSNumber numberWithInt:0] forKey:@"VFR"]; [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeblock"]; [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDetelecine"]; @@ -1196,7 +877,7 @@ return preset; } -- (NSDictionary *)createIpodLowPreset +- (NSDictionary *)createiPodPreset { NSMutableDictionary *preset = [[NSMutableDictionary alloc] init]; @@ -1205,35 +886,40 @@ /*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"]; + [preset setObject:[NSNumber numberWithBool: NO] forKey:@"Folder"]; /* Get the New Preset Description from the field in the AddPresetPanel */ [preset setObject:@"HandBrake's low resolution settings for the iPod (5G and up). Optimized for great playback on the iPod screen, with smaller file size." forKey:@"PresetDescription"]; /* File Format */ [preset setObject:@"MP4 file" forKey:@"FileFormat"]; + [preset setObject:[NSNumber numberWithInt:0] forKey:@"Mp4LargeFile"]; + [preset setObject:[NSNumber numberWithInt:1] forKey:@"Mp4iPodCompatible"]; /* Chapter Markers*/ [preset setObject:[NSNumber numberWithInt:1] forKey:@"ChapterMarkers"]; /* Video encoder */ [preset setObject:@"H.264 (x264)" forKey:@"VideoEncoder"]; - [preset setObject:[NSNumber numberWithInt:1] forKey:@"Mp4iPodCompatible"]; + /* x264 Option String */ - [preset setObject:@"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" forKey:@"x264Option"]; + [preset setObject:@"" forKey:@"x264Option"]; + [preset setObject:[NSNumber numberWithInt:0] forKey:@"x264UseAdvancedOptions"]; + [preset setObject:@"medium" forKey:@"x264Preset"]; + [preset setObject:@"" forKey:@"x264Tune"]; + [preset setObject:@"" forKey:@"x264OptionExtra"]; + [preset setObject:@"baseline" forKey:@"h264Profile"]; + [preset setObject:@"1.3" forKey:@"h264Level"]; /* Video quality */ - [preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoQualityType"]; - [preset setObject:@"700" forKey:@"VideoAvgBitrate"]; + [preset setObject:@"2500" forKey:@"VideoAvgBitrate"]; + [preset setObject:[NSNumber numberWithInt:2] forKey:@"VideoQualityType"]; + [preset setObject:[NSNumber numberWithFloat:22.0] forKey:@"VideoQualitySlider"]; /* Video framerate */ - [preset setObject:@"Same as source" forKey:@"VideoFramerate"]; - [preset setObject:@"vfr" forKey:@"VideoFramerateMode"]; + [preset setObject:@"30" forKey:@"VideoFramerate"]; + [preset setObject:@"pfr" forKey:@"VideoFramerateMode"]; /* GrayScale */ [preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoGrayScale"]; @@ -1242,23 +928,23 @@ [preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoTwoPass"]; /*Picture Settings*/ - /* Use a width of 320 for the iPod screen */ - [preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureAutoCrop"]; + [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureSettings"]; [preset setObject:[NSNumber numberWithInt:320] forKey:@"PictureWidth"]; [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureHeight"]; [preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureKeepRatio"]; [preset setObject:[NSNumber numberWithInt:0] forKey:@"PicturePAR"]; + [preset setObject:[NSNumber numberWithInt:2] forKey:@"PictureModulus"]; /* Explicitly set the filters for built-in presets */ [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureFilters"]; [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeinterlace"]; [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDenoise"]; - [preset setObject:[NSNumber numberWithInt:0] forKey:@"VFR"]; [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeblock"]; [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDetelecine"]; /* Set crop settings here */ /* The Auto Crop Matrix in the Picture Window autodetects differences in crop settings */ + [preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureAutoCrop"]; [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureTopCrop"]; [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureBottomCrop"]; [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureLeftCrop"]; @@ -1297,18 +983,16 @@ /*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:1] forKey:@"Default"]; - - /*Get the whether or not to apply pic settings in the AddPresetPanel*/ - [preset setObject:[NSNumber numberWithInt:2] forKey:@"UsesPictureSettings"]; + [preset setObject:[NSNumber numberWithBool: NO] forKey:@"Folder"]; /* Get the New Preset Description from the field in the AddPresetPanel */ [preset setObject:@"HandBrake's normal, default settings." forKey:@"PresetDescription"]; /* File Format */ [preset setObject:@"MP4 file" forKey:@"FileFormat"]; + [preset setObject:[NSNumber numberWithInt:0] forKey:@"Mp4LargeFile"]; + [preset setObject:[NSNumber numberWithInt:0] forKey:@"Mp4iPodCompatible"]; /* Chapter Markers*/ [preset setObject:[NSNumber numberWithInt:1] forKey:@"ChapterMarkers"]; @@ -1317,11 +1001,17 @@ [preset setObject:@"H.264 (x264)" forKey:@"VideoEncoder"]; /* x264 Option String */ - [preset setObject:@"ref=1:weightp=1:subq=2:rc-lookahead=10:trellis=0:8x8dct=0" forKey:@"x264Option"]; + [preset setObject:@"" forKey:@"x264Option"]; + [preset setObject:[NSNumber numberWithInt:0] forKey:@"x264UseAdvancedOptions"]; + [preset setObject:@"veryfast" forKey:@"x264Preset"]; + [preset setObject:@"" forKey:@"x264Tune"]; + [preset setObject:@"" forKey:@"x264OptionExtra"]; + [preset setObject:@"main" forKey:@"h264Profile"]; + [preset setObject:@"4.0" forKey:@"h264Level"]; /* Video quality */ + [preset setObject:@"2500" forKey:@"VideoAvgBitrate"]; [preset setObject:[NSNumber numberWithInt:2] forKey:@"VideoQualityType"]; - [preset setObject:@"1500" forKey:@"VideoAvgBitrate"]; [preset setObject:[NSNumber numberWithFloat:20.0] forKey:@"VideoQualitySlider"]; /* Video framerate */ @@ -1337,22 +1027,23 @@ /*Picture Settings*/ /* Use Max Picture settings for whatever the dvd is.*/ - [preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureAutoCrop"]; + [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureSettings"]; [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:1] forKey:@"PicturePAR"]; + [preset setObject:[NSNumber numberWithInt:2] forKey:@"PicturePAR"]; + [preset setObject:[NSNumber numberWithInt:2] forKey:@"PictureModulus"]; /* Explicitly set the filters for built-in presets */ [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureFilters"]; [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeinterlace"]; [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDenoise"]; - [preset setObject:[NSNumber numberWithInt:0] forKey:@"VFR"]; [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeblock"]; [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDetelecine"]; /* Set crop settings here */ /* The Auto Crop Matrix in the Picture Window autodetects differences in crop settings */ + [preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureAutoCrop"]; [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureTopCrop"]; [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureBottomCrop"]; [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureLeftCrop"]; @@ -1382,43 +1073,44 @@ return preset; } -- (NSDictionary *)createAndroidMidPreset +- (NSDictionary *)createAndroidPreset { NSMutableDictionary *preset = [[NSMutableDictionary alloc] init]; /* Get the New Preset Name from the field in the AddPresetPanel */ - [preset setObject:@"Android Mid" forKey:@"PresetName"]; + [preset setObject:@"Android" 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"]; + [preset setObject:[NSNumber numberWithBool: NO] forKey:@"Folder"]; /* Get the New Preset Description from the field in the AddPresetPanel */ [preset setObject:@"HandBrake's settings for Mid-range Android 2.3 or better devices." forKey:@"PresetDescription"]; /* File Format */ [preset setObject:@"MP4 file" forKey:@"FileFormat"]; - - /* 64-bit MP4 file */ [preset setObject:[NSNumber numberWithInt:0] forKey:@"Mp4LargeFile"]; + [preset setObject:[NSNumber numberWithInt:0] forKey:@"Mp4iPodCompatible"]; /* Chapter Markers*/ [preset setObject:[NSNumber numberWithInt:0] forKey:@"ChapterMarkers"]; /* Video encoder */ [preset setObject:@"H.264 (x264)" forKey:@"VideoEncoder"]; - [preset setObject:[NSNumber numberWithInt:0] forKey:@"Mp4iPodCompatible"]; + /* x264 Option String */ - [preset setObject:@"cabac=0:ref=2:me=umh:bframes=0:weightp=0:subme=6:8x8dct=0:trellis=0" forKey:@"x264Option"]; + [preset setObject:@"" forKey:@"x264Option"]; + [preset setObject:[NSNumber numberWithInt:0] forKey:@"x264UseAdvancedOptions"]; + [preset setObject:@"medium" forKey:@"x264Preset"]; + [preset setObject:@"" forKey:@"x264Tune"]; + [preset setObject:@"" forKey:@"x264OptionExtra"]; + [preset setObject:@"main" forKey:@"h264Profile"]; + [preset setObject:@"2.2" forKey:@"h264Level"]; /* Video quality */ + [preset setObject:@"2500" forKey:@"VideoAvgBitrate"]; [preset setObject:[NSNumber numberWithInt:2] forKey:@"VideoQualityType"]; - [preset setObject:@"960" forKey:@"VideoAvgBitrate"]; [preset setObject:[NSNumber numberWithFloat:22.0] forKey:@"VideoQualitySlider"]; /* Video framerate */ @@ -1432,17 +1124,17 @@ [preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoTwoPass"]; /*Picture Settings*/ - /* Use a width of 480 for the iPhone*/ - [preset setObject:[NSNumber numberWithInt:480] forKey:@"PictureWidth"]; + [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureSettings"]; + [preset setObject:[NSNumber numberWithInt:720] forKey:@"PictureWidth"]; [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureHeight"]; - [preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureKeepRatio"]; - [preset setObject:[NSNumber numberWithInt:0] forKey:@"PicturePAR"]; + [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureKeepRatio"]; + [preset setObject:[NSNumber numberWithInt:2] forKey:@"PicturePAR"]; + [preset setObject:[NSNumber numberWithInt:2] forKey:@"PictureModulus"]; /* Explicitly set the filters for built-in presets */ [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureFilters"]; [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeinterlace"]; [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDenoise"]; - [preset setObject:[NSNumber numberWithInt:0] forKey:@"VFR"]; [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeblock"]; [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDetelecine"]; @@ -1478,31 +1170,25 @@ return preset; } -- (NSDictionary *)createAndroidHighPreset +- (NSDictionary *)createAndroidTabletPreset { NSMutableDictionary *preset = [[NSMutableDictionary alloc] init]; /* Get the New Preset Name from the field in the AddPresetPanel */ - [preset setObject:@"Android High" forKey:@"PresetName"]; + [preset setObject:@"Android Tablet" forKey:@"PresetName"]; /*Set whether or not this is a user preset where 0 is factory, 1 is user*/ [preset setObject:[NSNumber numberWithInt:0] forKey:@"Type"]; - /*Set whether or not this is a folder, 1 is bool for folder*/ - [preset setObject:[NSNumber numberWithBool: NO] forKey:@"Folder"]; - /*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"]; + [preset setObject:[NSNumber numberWithBool: NO] forKey:@"Folder"]; /* Get the New Preset Description from the field in the AddPresetPanel */ [preset setObject:@"HandBrake's preset for the Higher end Anroid 2.3 or better devices." forKey:@"PresetDescription"]; /* File Format */ [preset setObject:@"MP4 file" forKey:@"FileFormat"]; - - /* 64-bit MP4 file */ - [preset setObject:[NSNumber numberWithInt:0] forKey:@"Mp4LargeFile"]; + [preset setObject:[NSNumber numberWithInt:0] forKey:@"Mp4LargeFile"]; + [preset setObject:[NSNumber numberWithInt:0] forKey:@"Mp4iPodCompatible"]; /* Chapter Markers*/ [preset setObject:[NSNumber numberWithInt:0] forKey:@"ChapterMarkers"]; @@ -1511,11 +1197,17 @@ [preset setObject:@"H.264 (x264)" forKey:@"VideoEncoder"]; /* x264 Option String (We can use this to tweak the output)*/ - [preset setObject:@"weightp=0:cabac=0" forKey:@"x264Option"]; + [preset setObject:@"" forKey:@"x264Option"]; + [preset setObject:[NSNumber numberWithInt:0] forKey:@"x264UseAdvancedOptions"]; + [preset setObject:@"medium" forKey:@"x264Preset"]; + [preset setObject:@"" forKey:@"x264Tune"]; + [preset setObject:@"" forKey:@"x264OptionExtra"]; + [preset setObject:@"main" forKey:@"h264Profile"]; + [preset setObject:@"3.1" forKey:@"h264Level"]; /* Video quality */ - [preset setObject:[NSNumber numberWithInt:2] forKey:@"VideoQualityType"]; [preset setObject:@"2500" forKey:@"VideoAvgBitrate"]; + [preset setObject:[NSNumber numberWithInt:2] forKey:@"VideoQualityType"]; [preset setObject:[NSNumber numberWithFloat:22.0] forKey:@"VideoQualitySlider"]; /* Video framerate */ @@ -1529,18 +1221,17 @@ [preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoTwoPass"]; /* Basic Picture Settings */ - /* Use Max Picture settings for whatever the dvd is.*/ [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureSettings"]; - [preset setObject:[NSNumber numberWithInt:720] forKey:@"PictureWidth"]; + [preset setObject:[NSNumber numberWithInt:1280] forKey:@"PictureWidth"]; [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureHeight"]; [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureKeepRatio"]; [preset setObject:[NSNumber numberWithInt:2] forKey:@"PicturePAR"]; + [preset setObject:[NSNumber numberWithInt:2] forKey:@"PictureModulus"]; /* Explicitly set the filters for built-in presets */ [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureFilters"]; [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeinterlace"]; [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDenoise"]; - [preset setObject:[NSNumber numberWithInt:0] forKey:@"VFR"]; [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeblock"]; [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDetelecine"]; |