diff options
-rw-r--r-- | macosx/HBPresets.h | 6 | ||||
-rw-r--r-- | macosx/HBPresets.m | 351 |
2 files changed, 175 insertions, 182 deletions
diff --git a/macosx/HBPresets.h b/macosx/HBPresets.h index 1a2cb3a56..b2baafbc8 100644 --- a/macosx/HBPresets.h +++ b/macosx/HBPresets.h @@ -13,7 +13,7 @@ - (NSMutableArray *) generateBuiltinPresets: (NSMutableArray *) UserPresets; /* Built-In Preset Dictionaries (one for each built in preset) */ -- (NSDictionary *)createApplePresetFolder; +- (NSDictionary *)createDevicesPresetFolder; - (NSDictionary *)createRegularPresetFolder; - (NSDictionary *)createLegacyPresetFolder; @@ -21,14 +21,14 @@ - (NSDictionary *)createiPhone4Preset; - (NSDictionary *)createAppleTv2Preset; - (NSDictionary *)createAppleTVPreset; -- (NSDictionary *)createAppleTVLegacyPreset; - (NSDictionary *)createAppleUniversalPreset; - (NSDictionary *)createClassicPreset; - (NSDictionary *)createiPhonePreset; -- (NSDictionary *)createiPhoneLegacyPreset; - (NSDictionary *)createIpodHighPreset; - (NSDictionary *)createIpodLowPreset; - (NSDictionary *)createNormalPreset; - (NSDictionary *)createHighProfilePreset; +- (NSDictionary *)createAndroidMidPreset; +- (NSDictionary *)createAndroidHighPreset; @end diff --git a/macosx/HBPresets.m b/macosx/HBPresets.m index eece430ee..49d154f22 100644 --- a/macosx/HBPresets.m +++ b/macosx/HBPresets.m @@ -23,7 +23,7 @@ * appear in the order you create them */ /* Built in preset folders at the root of the hierarchy */ - [UserPresets addObject:[self createApplePresetFolder]]; + [UserPresets addObject:[self createDevicesPresetFolder]]; [UserPresets addObject:[self createRegularPresetFolder]]; [UserPresets addObject:[self createLegacyPresetFolder]]; @@ -37,7 +37,7 @@ #pragma mark Built In Preset Folder Definitions -- (NSDictionary *)createApplePresetFolder +- (NSDictionary *)createDevicesPresetFolder { NSMutableDictionary *preset = [[NSMutableDictionary alloc] init]; /*Set whether or not this is a folder, 1 is bool for folder*/ @@ -45,7 +45,7 @@ /* Get the New Preset Name from the field in the AddPresetPanel */ - [preset setObject:@"Apple" forKey:@"PresetName"]; + [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"]; @@ -65,6 +65,8 @@ [childrenArray addObject:[self createiPadPreset]]; [childrenArray addObject:[self createAppleTVPreset]]; [childrenArray addObject:[self createAppleTv2Preset]]; + [childrenArray addObject:[self createAndroidMidPreset]]; + [childrenArray addObject:[self createAndroidHighPreset]]; [preset setObject:[NSMutableArray arrayWithArray: childrenArray] forKey:@"ChildrenArray"]; @@ -131,8 +133,6 @@ NSMutableArray *childrenArray = [[NSMutableArray alloc] init]; /* we actually call the methods for the nests here */ [childrenArray addObject:[self createClassicPreset]]; - [childrenArray addObject:[self createAppleTVLegacyPreset]]; - [childrenArray addObject:[self createiPhoneLegacyPreset]]; [childrenArray addObject:[self createIpodHighPreset]]; [preset setObject:[NSMutableArray arrayWithArray: childrenArray] forKey:@"ChildrenArray"]; @@ -264,115 +264,6 @@ return preset; } -- (NSDictionary *)createAppleTVLegacyPreset -{ - NSMutableDictionary *preset = [[NSMutableDictionary alloc] init]; - - /* Get the New Preset Name from the field in the AddPresetPanel */ - [preset setObject:@"AppleTV 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"]; - - /*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 deprecated settings for the AppleTV, including Dolby Digital 5.1 AC3 sound. Provides a good balance between quality and file size, and optimizes performance. This is the AppleTV preset from HandBrake 0.9.2, and while it is offered as a service to legacy users, it is no longer supported." 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 appleTV output)*/ - [preset setObject:@"ref=1:b-pyramid=none:weightp=0:subme=5:me=umh:no-fast-pskip=1:cabac=0:weightb=0:8x8dct=0:trellis=0" forKey:@"x264Option"]; - - /* Video quality */ - [preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoQualityType"]; - [preset setObject:@"2500" 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"]; - - /* Basic Picture Settings */ - /* Use Max Picture settings for whatever the dvd is.*/ - [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"]; - - /* 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]; - - /* Track 2 */ - NSMutableDictionary *audioTrack2Array = [[NSMutableDictionary alloc] init]; - [audioTrack2Array setObject:[NSNumber numberWithInt:1] forKey:@"AudioTrack"]; - [audioTrack2Array setObject:@"AC3 Passthru" forKey:@"AudioEncoder"]; - [audioTrack2Array setObject:@"AC3 Passthru" forKey:@"AudioMixdown"]; - [audioTrack2Array setObject:@"Auto" forKey:@"AudioSamplerate"]; - [audioTrack2Array setObject:@"160" forKey:@"AudioBitrate"]; - /* Note: we ignore specified bitrate for AC3 Passthru in libhb and use - * the sources bitrate, however we need to initially set the value to something so - * the macgui doesnt barf, so 160 seems as good as anything */ - [audioTrack2Array setObject:[NSNumber numberWithFloat:0.0] forKey:@"AudioTrackDRCSlider"]; - [audioTrack2Array autorelease]; - [audioListArray addObject:audioTrack2Array]; - - [preset setObject:[NSMutableArray arrayWithArray: audioListArray] forKey:@"AudioList"]; - - /* Subtitles*/ - [preset setObject:@"None" forKey:@"Subtitles"]; - - [preset autorelease]; - return preset; -} - - (NSDictionary *)createAppleUniversalPreset { NSMutableDictionary *preset = [[NSMutableDictionary alloc] init]; @@ -1091,12 +982,12 @@ return preset; } -- (NSDictionary *)createiPhoneLegacyPreset +- (NSDictionary *)createIpodHighPreset { NSMutableDictionary *preset = [[NSMutableDictionary alloc] init]; /* Get the New Preset Name from the field in the AddPresetPanel */ - [preset setObject:@"iPhone Legacy" forKey:@"PresetName"]; + [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"]; @@ -1108,7 +999,7 @@ [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureSettings"]; /* Get the New Preset Description from the field in the AddPresetPanel */ - [preset setObject:@"HandBrake's deprecated settings for the iPhone and iPod Touch. This is the iPhone preset from HandBrake 0.9.2, and while it is offered as a service to legacy users, it is no longer supported." forKey:@"PresetDescription"]; + [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"]; @@ -1120,11 +1011,11 @@ [preset setObject:@"H.264 (x264)" forKey:@"VideoEncoder"]; [preset setObject:[NSNumber numberWithInt:1] forKey:@"Mp4iPodCompatible"]; /* x264 Option String */ - [preset setObject:@"level=30:cabac=0:ref=1:analyse=all:me=umh:no-fast-pskip=1:psy-rd=0,0:bframes=0:weightp=0:subme=6:8x8dct=0:trellis=0" forKey:@"x264Option"]; + [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:@"960" forKey:@"VideoAvgBitrate"]; + [preset setObject:@"1500" forKey:@"VideoAvgBitrate"]; /* Video framerate */ [preset setObject:@"Same as source" forKey:@"VideoFramerate"]; @@ -1137,8 +1028,8 @@ [preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoTwoPass"]; /*Picture Settings*/ - /* Use a width of 480 for the iPhone*/ - [preset setObject:[NSNumber numberWithInt:480] forKey:@"PictureWidth"]; + /* Use a width of 640 for iPod TV-out */ + [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:@"PicturePAR"]; @@ -1169,7 +1060,7 @@ [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:@"160" forKey:@"AudioBitrate"]; [audioTrack1Array setObject:[NSNumber numberWithFloat:0.0] forKey:@"AudioTrackDRCSlider"]; [audioTrack1Array autorelease]; [audioListArray addObject:audioTrack1Array]; @@ -1183,12 +1074,12 @@ return preset; } -- (NSDictionary *)createIpodHighPreset +- (NSDictionary *)createIpodLowPreset { NSMutableDictionary *preset = [[NSMutableDictionary alloc] init]; /* Get the New Preset Name from the field in the AddPresetPanel */ - [preset setObject:@"iPod Legacy" forKey:@"PresetName"]; + [preset setObject:@"iPod" 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"]; @@ -1200,7 +1091,7 @@ [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"]; + [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"]; @@ -1212,11 +1103,11 @@ [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"]; + [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"]; /* Video quality */ [preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoQualityType"]; - [preset setObject:@"1500" forKey:@"VideoAvgBitrate"]; + [preset setObject:@"700" forKey:@"VideoAvgBitrate"]; /* Video framerate */ [preset setObject:@"Same as source" forKey:@"VideoFramerate"]; @@ -1229,8 +1120,9 @@ [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"]; + /* Use a width of 320 for the iPod screen */ + [preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureAutoCrop"]; + [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"]; @@ -1245,7 +1137,6 @@ /* 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"]; @@ -1275,24 +1166,24 @@ return preset; } -- (NSDictionary *)createIpodLowPreset +- (NSDictionary *)createNormalPreset { NSMutableDictionary *preset = [[NSMutableDictionary alloc] init]; /* Get the New Preset Name from the field in the AddPresetPanel */ - [preset setObject:@"iPod" forKey:@"PresetName"]; + [preset setObject:@"Normal" 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"]; + [preset setObject:[NSNumber numberWithInt:1] forKey:@"Default"]; /*Get the whether or not to apply pic settings in the AddPresetPanel*/ - [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureSettings"]; + [preset setObject:[NSNumber numberWithInt:2] forKey:@"UsesPictureSettings"]; /* 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"]; + [preset setObject:@"HandBrake's normal, default settings." forKey:@"PresetDescription"]; /* File Format */ [preset setObject:@"MP4 file" forKey:@"FileFormat"]; @@ -1302,13 +1193,14 @@ /* 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:@"ref=1:weightp=1:subq=2:rc-lookahead=10:trellis=0:8x8dct=0" forKey:@"x264Option"]; /* Video quality */ - [preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoQualityType"]; - [preset setObject:@"700" forKey:@"VideoAvgBitrate"]; + [preset setObject:[NSNumber numberWithInt:2] forKey:@"VideoQualityType"]; + [preset setObject:@"1500" forKey:@"VideoAvgBitrate"]; + [preset setObject:[NSNumber numberWithFloat:20.0] forKey:@"VideoQualitySlider"]; /* Video framerate */ [preset setObject:@"Same as source" forKey:@"VideoFramerate"]; @@ -1319,14 +1211,15 @@ /* 2 Pass Encoding */ [preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoTwoPass"]; + [preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoTurboTwoPass"]; /*Picture Settings*/ - /* Use a width of 320 for the iPod screen */ + /* Use Max Picture settings for whatever the dvd is.*/ [preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureAutoCrop"]; - [preset setObject:[NSNumber numberWithInt:320] forKey:@"PictureWidth"]; + [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"]; + [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureKeepRatio"]; + [preset setObject:[NSNumber numberWithInt:1] forKey:@"PicturePAR"]; /* Explicitly set the filters for built-in presets */ [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureFilters"]; @@ -1367,61 +1260,160 @@ return preset; } -- (NSDictionary *)createNormalPreset +- (NSDictionary *)createAndroidMidPreset { NSMutableDictionary *preset = [[NSMutableDictionary alloc] init]; - + /* Get the New Preset Name from the field in the AddPresetPanel */ - [preset setObject:@"Normal" forKey:@"PresetName"]; - + [preset setObject:@"Android Mid" 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:1] forKey:@"Default"]; - + [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 numberWithInt:1] forKey:@"UsesPictureSettings"]; + /* Get the New Preset Description from the field in the AddPresetPanel */ - [preset setObject:@"HandBrake's normal, default settings." forKey:@"PresetDescription"]; - + [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"]; + /* Chapter Markers*/ - [preset setObject:[NSNumber numberWithInt:1] forKey:@"ChapterMarkers"]; - + [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:@"ref=1:weightp=1:subq=2:rc-lookahead=10:trellis=0:8x8dct=0" forKey:@"x264Option"]; - + [preset setObject:@"cabac=0:ref=2:me=umh:bframes=0:weightp=0:subme=6:8x8dct=0:trellis=0" forKey:@"x264Option"]; + /* Video quality */ [preset setObject:[NSNumber numberWithInt:2] forKey:@"VideoQualityType"]; - [preset setObject:@"1500" forKey:@"VideoAvgBitrate"]; - [preset setObject:[NSNumber numberWithFloat:20.0] forKey:@"VideoQualitySlider"]; - + [preset setObject:@"960" forKey:@"VideoAvgBitrate"]; + [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"]; - + /* 2 Pass Encoding */ [preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoTwoPass"]; - [preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoTurboTwoPass"]; - + /*Picture Settings*/ - /* Use Max Picture settings for whatever the dvd is.*/ + /* 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:@"PictureWidth"]; + [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 *)createAndroidHighPreset +{ + NSMutableDictionary *preset = [[NSMutableDictionary alloc] init]; + + /* Get the New Preset Name from the field in the AddPresetPanel */ + [preset setObject:@"Android High" 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 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"]; + + /* Chapter Markers*/ + [preset setObject:[NSNumber numberWithInt:0] forKey:@"ChapterMarkers"]; + + /* Video encoder */ + [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"]; + + /* Video quality */ + [preset setObject:[NSNumber numberWithInt:2] forKey:@"VideoQualityType"]; + [preset setObject:@"2500" forKey:@"VideoAvgBitrate"]; + [preset setObject:[NSNumber numberWithFloat:22.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:720] 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"]; + /* Explicitly set the filters for built-in presets */ [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureFilters"]; [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeinterlace"]; @@ -1429,14 +1421,15 @@ [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]; @@ -1447,16 +1440,16 @@ [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:@"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; } |