summaryrefslogtreecommitdiffstats
path: root/macosx/HBPresets.m
diff options
context:
space:
mode:
Diffstat (limited to 'macosx/HBPresets.m')
-rw-r--r--macosx/HBPresets.m200
1 files changed, 200 insertions, 0 deletions
diff --git a/macosx/HBPresets.m b/macosx/HBPresets.m
index 9cf4af211..1c58b7707 100644
--- a/macosx/HBPresets.m
+++ b/macosx/HBPresets.m
@@ -61,8 +61,10 @@
[childrenArray addObject:[self createAppleUniversalPreset]];
[childrenArray addObject:[self createIpodLowPreset]];
[childrenArray addObject:[self createiPhonePreset]];
+ [childrenArray addObject:[self createiPhone4Preset]];
[childrenArray addObject:[self createiPadPreset]];
[childrenArray addObject:[self createAppleTVPreset]];
+ [childrenArray addObject:[self createAppleTv2Preset]];
[preset setObject:[NSMutableArray arrayWithArray: childrenArray] forKey:@"ChildrenArray"];
@@ -583,6 +585,204 @@
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:@"700" forKey:@"VideoTargetSize"];
+ [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:[NSNumber numberWithInt:1] forKey:@"VideoFrameratePFR"];
+
+ /* 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
+{
+ NSMutableDictionary *preset = [[NSMutableDictionary alloc] init];
+
+ /* Get the New Preset Name from the field in the AddPresetPanel */
+ [preset setObject:@"Apple Tv 2" 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 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"];
+
+ /* 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:@"700" forKey:@"VideoTargetSize"];
+ [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:[NSNumber numberWithInt:1] forKey:@"VideoFrameratePFR"];
+
+ /* 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:1280] 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 *)createClassicPreset
{
NSMutableDictionary *preset = [[NSMutableDictionary alloc] init];