summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsr55 <[email protected]>2010-11-30 19:26:49 +0000
committersr55 <[email protected]>2010-11-30 19:26:49 +0000
commit60fe82832616bdf993f1f35ac9be308b445addbd (patch)
tree826075971fb79bcc78b5df178a2feb113c63beea
parentfcd3cde47deaa4d65d064f50df0f4c332064720f (diff)
ATV2 and iP4 presets based on the iPad one. These may need tweaking, so provide feedback on the forums if you have problems
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3692 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--macosx/HBPresets.m200
-rw-r--r--macosx/HandBrake.xcodeproj/project.pbxproj7
2 files changed, 207 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];
diff --git a/macosx/HandBrake.xcodeproj/project.pbxproj b/macosx/HandBrake.xcodeproj/project.pbxproj
index 660787ae1..c53bca2ef 100644
--- a/macosx/HandBrake.xcodeproj/project.pbxproj
+++ b/macosx/HandBrake.xcodeproj/project.pbxproj
@@ -540,7 +540,14 @@
};
buildConfigurationList = 4D4E7BC4087804870051572B /* Build configuration list for PBXProject "HandBrake" */;
compatibilityVersion = "Xcode 3.1";
+ developmentRegion = English;
hasScannedForEncodings = 1;
+ knownRegions = (
+ English,
+ Japanese,
+ French,
+ German,
+ );
mainGroup = 29B97314FDCFA39411CA2CEA /* HandBrake */;
projectDirPath = "";
projectRoot = "";