summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authordynaflash <[email protected]>2012-06-28 16:25:40 +0000
committerdynaflash <[email protected]>2012-06-28 16:25:40 +0000
commit38003632793c6e8f2e1f1288ff656eeb8a9bb219 (patch)
treee3e1cebb311da8c4be2a6f9b597bacd583a35ece /macosx
parent81ecb92344230ef406196db55bae58e4f1a2bae4 (diff)
MacGui: Merge AppleTV 3 Preset into bugfix branch.
git-svn-id: svn://svn.handbrake.fr/HandBrake/branches/0.9.x@4787 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx')
-rw-r--r--macosx/HBPresets.h9
-rw-r--r--macosx/HBPresets.m560
2 files changed, 346 insertions, 223 deletions
diff --git a/macosx/HBPresets.h b/macosx/HBPresets.h
index b2baafbc8..be8014350 100644
--- a/macosx/HBPresets.h
+++ b/macosx/HBPresets.h
@@ -1,8 +1,8 @@
/* HBPresets.h $
-
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr/>.
- It may be used under the terms of the GNU General Public License. */
+
+ This file is part of the HandBrake source code.
+ Homepage: <http://handbrake.fr/>.
+ It may be used under the terms of the GNU General Public License. */
#import <Cocoa/Cocoa.h>
@@ -21,6 +21,7 @@
- (NSDictionary *)createiPhone4Preset;
- (NSDictionary *)createAppleTv2Preset;
- (NSDictionary *)createAppleTVPreset;
+- (NSDictionary *)createAppleTv3Preset;
- (NSDictionary *)createAppleUniversalPreset;
- (NSDictionary *)createClassicPreset;
- (NSDictionary *)createiPhonePreset;
diff --git a/macosx/HBPresets.m b/macosx/HBPresets.m
index fc37c1acf..daf8ee5b0 100644
--- a/macosx/HBPresets.m
+++ b/macosx/HBPresets.m
@@ -1,8 +1,8 @@
/* HBPresets.m $
-
- This file is part of the HandBrake source code.
- Homepage: <http://handbrake.fr/>.
- It may be used under the terms of the GNU General Public License. */
+
+ This file is part of the HandBrake source code.
+ Homepage: <http://handbrake.fr/>.
+ It may be used under the terms of the GNU General Public License. */
#import "HBPresets.h"
@@ -10,7 +10,7 @@
- (id)init
{
self = [super init];
- return self;
+ return self;
}
/* Called by -addFactoryPresets in Controller.mm */
@@ -40,16 +40,16 @@
- (NSDictionary *)createDevicesPresetFolder
{
NSMutableDictionary *preset = [[NSMutableDictionary alloc] init];
-/*Set whether or not this is a folder, 1 is bool for folder*/
+ /*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"];
@@ -65,15 +65,16 @@
[childrenArray addObject:[self createiPadPreset]];
[childrenArray addObject:[self createAppleTVPreset]];
[childrenArray addObject:[self createAppleTv2Preset]];
+ [childrenArray addObject:[self createAppleTv3Preset]];
[childrenArray addObject:[self createAndroidMidPreset]];
[childrenArray addObject:[self createAndroidHighPreset]];
-
+
[preset setObject:[NSMutableArray arrayWithArray: childrenArray] forKey:@"ChildrenArray"];
[childrenArray autorelease];
-
-
-
+
+
+
[preset autorelease];
return preset;
}
@@ -81,16 +82,16 @@
- (NSDictionary *)createRegularPresetFolder
{
NSMutableDictionary *preset = [[NSMutableDictionary alloc] init];
-/*Set whether or not this is a folder, 1 is bool for folder*/
+ /*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"];
@@ -104,9 +105,9 @@
[preset setObject:[NSMutableArray arrayWithArray: childrenArray] forKey:@"ChildrenArray"];
[childrenArray autorelease];
-
-
-
+
+
+
[preset autorelease];
return preset;
}
@@ -114,16 +115,16 @@
- (NSDictionary *)createLegacyPresetFolder
{
NSMutableDictionary *preset = [[NSMutableDictionary alloc] init];
-/*Set whether or not this is a folder, 1 is bool for folder*/
+ /*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"];
@@ -137,9 +138,9 @@
[preset setObject:[NSMutableArray arrayWithArray: childrenArray] forKey:@"ChildrenArray"];
[childrenArray autorelease];
-
-
-
+
+
+
[preset autorelease];
return preset;
}
@@ -155,53 +156,53 @@
- (NSDictionary *)createAppleTVPreset
{
NSMutableDictionary *preset = [[NSMutableDictionary alloc] init];
-
+
/* Get the New Preset Name from the field in the AddPresetPanel */
[preset setObject:@"AppleTV" 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 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"];
-
+
/* Chapter Markers*/
- [preset setObject:[NSNumber numberWithInt:1] forKey:@"ChapterMarkers"];
-
+ [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:@"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"];
-
+
/* 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:@"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:1] forKey:@"UsesPictureSettings"];
@@ -209,7 +210,7 @@
[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"];
@@ -217,7 +218,7 @@
[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"];
@@ -225,7 +226,7 @@
[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];
@@ -240,7 +241,7 @@
[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"];
@@ -254,12 +255,12 @@
[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;
}
@@ -267,53 +268,53 @@
- (NSDictionary *)createAppleUniversalPreset
{
NSMutableDictionary *preset = [[NSMutableDictionary alloc] init];
-
+
/* Get the New Preset Name from the field in the AddPresetPanel */
[preset setObject:@"Universal" 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 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"];
-
+
/* Chapter Markers*/
- [preset setObject:[NSNumber numberWithInt:1] forKey:@"ChapterMarkers"];
-
+ [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:@"cabac=0:ref=2:me=umh:bframes=0:weightp=0:8x8dct=0:trellis=0:subme=6" 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:@"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:1] forKey:@"UsesPictureSettings"];
@@ -321,7 +322,7 @@
[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"];
@@ -329,7 +330,7 @@
[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"];
@@ -337,7 +338,7 @@
[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];
@@ -352,7 +353,7 @@
[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"];
@@ -366,12 +367,12 @@
[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;
}
@@ -379,53 +380,53 @@
- (NSDictionary *)createiPadPreset
{
NSMutableDictionary *preset = [[NSMutableDictionary alloc] init];
-
+
/* Get the New Preset Name from the field in the AddPresetPanel */
[preset setObject:@"iPad" 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 iPad (1st gen) is optimized for viewing on its 1024x768 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"];
-
+ [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"];
@@ -433,7 +434,7 @@
[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"];
@@ -441,7 +442,7 @@
[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"];
@@ -449,7 +450,7 @@
[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];
@@ -464,12 +465,12 @@
[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;
}
@@ -685,51 +686,172 @@
return preset;
}
-- (NSDictionary *)createClassicPreset
+- (NSDictionary *)createAppleTv3Preset
{
NSMutableDictionary *preset = [[NSMutableDictionary alloc] init];
+
+ /* Get the New Preset Name from the field in the AddPresetPanel */
+ [preset setObject:@"AppleTV 3" 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 (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"];
+
+ /* 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:@"b-adapt=2" 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:@"30" 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:1920] forKey:@"PictureWidth"];
+ [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureHeight"];
+ [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureKeepRatio"];
+
+ /* We use Loose Anamorphic with a Modulus of 2 */
+ [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:1] forKey:@"PictureDecombDeinterlace"];
+ [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeinterlace"];
+ [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDenoise"];
+ [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeblock"];
+ [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDetelecine"];
+ /* Note: decided to use Fast Decomb. This makes this the only device preset using
+ * decomb that we have. Fast Decomb is better than no decomb imo and has basically no
+ * speed hit on progressive sources. Once Default decomb is sped up, we can switch */
+ [preset setObject:[NSNumber numberWithInt:3] forKey:@"PictureDecomb"];
+
+ /* 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:@"None" 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 *)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"];
-
+ [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"];
@@ -737,7 +859,7 @@
[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"];
@@ -745,7 +867,7 @@
[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"];
@@ -767,12 +889,12 @@
[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;
}
@@ -780,53 +902,53 @@
- (NSDictionary *)createHighProfilePreset
{
NSMutableDictionary *preset = [[NSMutableDictionary alloc] init];
-
+
/* Get the New Preset Name from the field in the AddPresetPanel */
[preset setObject:@"High Profile" 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 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"];
-
+
/* Chapter Markers*/
- [preset setObject:[NSNumber numberWithInt:1] forKey:@"ChapterMarkers"];
-
+ [preset setObject:[NSNumber numberWithInt:1] forKey:@"ChapterMarkers"];
+
/* Video encoder */
[preset setObject:@"H.264 (x264)" forKey:@"VideoEncoder"];
-
+
/* x264 Option String */
[preset setObject:@"b-adapt=2:rc-lookahead=50" forKey:@"x264Option"];
-
+
/* Video quality */
[preset setObject:[NSNumber numberWithInt:2] forKey:@"VideoQualityType"];
[preset setObject:@"1800" forKey:@"VideoAvgBitrate"];
[preset setObject:[NSNumber numberWithFloat:20.0] forKey:@"VideoQualitySlider"];
-
+
/* 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"];
[preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoTurboTwoPass"];
-
+
/*Picture Settings*/
/* Use Max Picture settings for whatever the dvd is.*/
[preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureAutoCrop"];
@@ -834,23 +956,23 @@
[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:1] forKey:@"PictureDecombDeinterlace"];
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeinterlace"];
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDenoise"];
[preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeblock"];
- [preset setObject:[NSNumber numberWithInt:2] forKey:@"PictureDetelecine"];
+ [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDetelecine"];
[preset setObject:[NSNumber numberWithInt:2] forKey:@"PictureDecomb"];
-
+
/* 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];
@@ -865,7 +987,7 @@
[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"];
@@ -879,12 +1001,12 @@
[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;
}
@@ -892,56 +1014,56 @@
- (NSDictionary *)createiPhonePreset
{
NSMutableDictionary *preset = [[NSMutableDictionary alloc] init];
-
+
/* Get the New Preset Name from the field in the AddPresetPanel */
[preset setObject:@"iPhone & iPod Touch" forKey:@"PresetName"];
-
+
/*Set whether or not this is a user preset or factory 0 is factory, 1 is user*/
[preset setObject:[NSNumber numberWithInt:0] forKey:@"Type"];
-
+
/*Set whether or not this is default, at creation set to 0*/
[preset setObject:[NSNumber numberWithInt:0] forKey:@"Default"];
-
+
/*Get the whether or not to apply pic settings in the AddPresetPanel*/
[preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureSettings"];
-
+
/* Get the New Preset Description from the field in the AddPresetPanel */
[preset setObject:@"HandBrake's settings for all iPhones and iPod Touches going back to the original iPhone 2G." forKey:@"PresetDescription"];
-
+
/* File Format */
[preset setObject:@"MP4 file" forKey:@"FileFormat"];
-
+
/* Chapter Markers*/
- [preset setObject:[NSNumber numberWithInt:1] forKey:@"ChapterMarkers"];
-
+ [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"];
-
+
/* Video quality */
[preset setObject:[NSNumber numberWithInt:2] forKey:@"VideoQualityType"];
[preset setObject:@"960" forKey:@"VideoAvgBitrate"];
[preset setObject:[NSNumber numberWithFloat:20.0] forKey:@"VideoQualitySlider"];
-
+
/* 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 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"];
@@ -949,7 +1071,7 @@
[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"];
@@ -957,7 +1079,7 @@
[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];
@@ -972,12 +1094,12 @@
[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;
}
@@ -985,55 +1107,55 @@
- (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*/
[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"];
-
+ [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: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"];
@@ -1041,7 +1163,7 @@
[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"];
@@ -1049,7 +1171,7 @@
[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];
@@ -1064,12 +1186,12 @@
[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;
}
@@ -1077,48 +1199,48 @@
- (NSDictionary *)createIpodLowPreset
{
NSMutableDictionary *preset = [[NSMutableDictionary alloc] init];
-
+
/* Get the New Preset Name from the field in the AddPresetPanel */
[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"];
-
+
/*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 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"];
-
+
/* Chapter Markers*/
- [preset setObject:[NSNumber numberWithInt:1] forKey:@"ChapterMarkers"];
-
+ [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"];
-
+
/* Video quality */
[preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoQualityType"];
[preset setObject:@"700" 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 320 for the iPod screen */
[preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureAutoCrop"];
@@ -1126,7 +1248,7 @@
[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"];
@@ -1134,14 +1256,14 @@
[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];
@@ -1156,12 +1278,12 @@
[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;
}
@@ -1169,50 +1291,50 @@
- (NSDictionary *)createNormalPreset
{
NSMutableDictionary *preset = [[NSMutableDictionary alloc] init];
-
+
/* Get the New Preset Name from the field in the AddPresetPanel */
[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:1] 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 normal, default settings." forKey:@"PresetDescription"];
-
+
/* File Format */
[preset setObject:@"MP4 file" forKey:@"FileFormat"];
-
+
/* Chapter Markers*/
- [preset setObject:[NSNumber numberWithInt:1] forKey:@"ChapterMarkers"];
-
+ [preset setObject:[NSNumber numberWithInt:1] forKey:@"ChapterMarkers"];
+
/* Video encoder */
[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"];
-
+
/* Video quality */
[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"];
[preset setObject:@"vfr" 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.*/
[preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureAutoCrop"];
@@ -1220,7 +1342,7 @@
[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"];
@@ -1228,14 +1350,14 @@
[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];
@@ -1250,12 +1372,12 @@
[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;
}