diff options
author | jbrjake <[email protected]> | 2009-06-04 17:37:43 +0000 |
---|---|---|
committer | jbrjake <[email protected]> | 2009-06-04 17:37:43 +0000 |
commit | 2c5699a0b597b55a6c6f7cc663e473dd4a7345e1 (patch) | |
tree | ffcae844907629e77f2bf514b97ab521b4e40b9b | |
parent | 69f7bd110eed1c513bdcf4495751d11aaeb57b57 (diff) |
MacGui and CLI: New built-in presets. The list has been much pared down, and a stronger emphasis has been given to quality-based encoding. Video game console presets are gone because supporting them is an endlessly frustrating experience. Either they work with the Normal preset's vanilla main profile H.264 in a standard MP4 container, or they don't. The high profile presets have been condensed down into a single one. Many presets have been sped up. The AppleTV preset is now High Profile and uses better B-frame decisions. MacGui presets also now use the AudioList array.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2481 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r-- | macosx/HBPresets.h | 13 | ||||
-rw-r--r-- | macosx/HBPresets.m | 1010 | ||||
-rw-r--r-- | test/test.c | 529 |
3 files changed, 369 insertions, 1183 deletions
diff --git a/macosx/HBPresets.h b/macosx/HBPresets.h index 71a516066..d8ea61a2e 100644 --- a/macosx/HBPresets.h +++ b/macosx/HBPresets.h @@ -14,27 +14,18 @@ /* Built-In Preset Dictionaries (one for each built in preset) */ - (NSDictionary *)createApplePresetFolder; -- (NSDictionary *)createBasicPresetFolder; -- (NSDictionary *)createGamingConsolesPresetFolder; -- (NSDictionary *)createHiProfilePresetFolder; +- (NSDictionary *)createRegularPresetFolder; - (NSDictionary *)createLegacyPresetFolder; -- (NSDictionary *)create360Preset; -- (NSDictionary *)createAnimationPreset; - (NSDictionary *)createAppleTVPreset; - (NSDictionary *)createAppleTVLegacyPreset; - (NSDictionary *)createAppleUniversalPreset; - (NSDictionary *)createClassicPreset; -- (NSDictionary *)createCRFPreset; -- (NSDictionary *)createFilmPreset; - (NSDictionary *)createiPhonePreset; - (NSDictionary *)createiPhoneLegacyPreset; - (NSDictionary *)createIpodHighPreset; - (NSDictionary *)createIpodLowPreset; - (NSDictionary *)createNormalPreset; -- (NSDictionary *)createPSPPreset; -- (NSDictionary *)createPSThreePreset; -- (NSDictionary *)createQuickTimePreset; -- (NSDictionary *)createTelevisionPreset; +- (NSDictionary *)createHighProfilePreset; @end diff --git a/macosx/HBPresets.m b/macosx/HBPresets.m index 933cba38a..56d643030 100644 --- a/macosx/HBPresets.m +++ b/macosx/HBPresets.m @@ -24,9 +24,8 @@ */ /* Built in preset folders at the root of the hierarchy */ [UserPresets addObject:[self createApplePresetFolder]]; - [UserPresets addObject:[self createBasicPresetFolder]]; - [UserPresets addObject:[self createHiProfilePresetFolder]]; - [UserPresets addObject:[self createGamingConsolesPresetFolder]]; + [UserPresets addObject:[self createRegularPresetFolder]]; + [UserPresets addObject:[self createLegacyPresetFolder]]; /* Independent presets at the root hierarchy level would go here */ @@ -63,8 +62,6 @@ [childrenArray addObject:[self createIpodLowPreset]]; [childrenArray addObject:[self createiPhonePreset]]; [childrenArray addObject:[self createAppleTVPreset]]; - [childrenArray addObject:[self createQuickTimePreset]]; - [childrenArray addObject:[self createLegacyPresetFolder]]; [preset setObject:[NSMutableArray arrayWithArray: childrenArray] forKey:@"ChildrenArray"]; @@ -76,7 +73,7 @@ return preset; } -- (NSDictionary *)createGamingConsolesPresetFolder +- (NSDictionary *)createRegularPresetFolder { NSMutableDictionary *preset = [[NSMutableDictionary alloc] init]; /*Set whether or not this is a folder, 1 is bool for folder*/ @@ -84,42 +81,7 @@ /* Get the New Preset Name from the field in the AddPresetPanel */ - [preset setObject:@"Gaming Consoles" forKey:@"PresetName"]; - - /*Set whether or not this is a user preset where 0 is factory, 1 is user*/ - [preset setObject:[NSNumber numberWithInt:0] forKey:@"Type"]; - - /*Set whether or not this is default, at creation set to 0*/ - [preset setObject:[NSNumber numberWithInt:0] forKey:@"Default"]; - - /* Lets initalize the child array of dictionaries for folders, this - is an array of dictionaries much like the root level of presets and - may contain folders and presets alike, etc.*/ - NSMutableArray *childrenArray = [[NSMutableArray alloc] init]; - /* we actually call the methods for the nests here */ - [childrenArray addObject:[self createPSPPreset]]; - [childrenArray addObject:[self createPSThreePreset]]; - [childrenArray addObject:[self create360Preset]]; - [preset setObject:[NSMutableArray arrayWithArray: childrenArray] forKey:@"ChildrenArray"]; - - [childrenArray autorelease]; - - - - [preset autorelease]; - return preset; -} - - -- (NSDictionary *)createBasicPresetFolder -{ - NSMutableDictionary *preset = [[NSMutableDictionary alloc] init]; -/*Set whether or not this is a folder, 1 is bool for folder*/ - [preset setObject:[NSNumber numberWithBool: YES] forKey:@"Folder"]; - - - /* Get the New Preset Name from the field in the AddPresetPanel */ - [preset setObject:@"Basic" forKey:@"PresetName"]; + [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"]; @@ -133,7 +95,7 @@ NSMutableArray *childrenArray = [[NSMutableArray alloc] init]; /* we actually call the methods for the nests here */ [childrenArray addObject:[self createNormalPreset]]; - [childrenArray addObject:[self createClassicPreset]]; + [childrenArray addObject:[self createHighProfilePreset]]; [preset setObject:[NSMutableArray arrayWithArray: childrenArray] forKey:@"ChildrenArray"]; [childrenArray autorelease]; @@ -144,38 +106,6 @@ return preset; } -- (NSDictionary *)createHiProfilePresetFolder -{ - NSMutableDictionary *preset = [[NSMutableDictionary alloc] init]; -/*Set whether or not this is a folder, 1 is bool for folder*/ - [preset setObject:[NSNumber numberWithBool: YES] forKey:@"Folder"]; - - - /* Get the New Preset Name from the field in the AddPresetPanel */ - [preset setObject:@"High Profile" forKey:@"PresetName"]; - - /*Set whether or not this is a user preset where 0 is factory, 1 is user*/ - [preset setObject:[NSNumber numberWithInt:0] forKey:@"Type"]; - - /*Set whether or not this is default, at creation set to 0*/ - [preset setObject:[NSNumber numberWithInt:0] forKey:@"Default"]; - - /* Lets initalize the child array of dictionaries for folders, this - is an array of dictionaries much like the root level of presets and - may contain folders and presets alike, etc.*/ - NSMutableArray *childrenArray = [[NSMutableArray alloc] init]; - /* we actually call the methods for the nests here */ - [childrenArray addObject:[self createAnimationPreset]]; - [childrenArray addObject:[self createCRFPreset]]; - [childrenArray addObject:[self createFilmPreset]]; - [childrenArray addObject:[self createTelevisionPreset]]; - [preset setObject:[NSMutableArray arrayWithArray: childrenArray] forKey:@"ChildrenArray"]; - - [childrenArray autorelease]; - [preset autorelease]; - return preset; -} - - (NSDictionary *)createLegacyPresetFolder { NSMutableDictionary *preset = [[NSMutableDictionary alloc] init]; @@ -197,6 +127,7 @@ may contain folders and presets alike, etc.*/ NSMutableArray *childrenArray = [[NSMutableArray alloc] init]; /* we actually call the methods for the nests here */ + [childrenArray addObject:[self createClassicPreset]]; [childrenArray addObject:[self createAppleTVLegacyPreset]]; [childrenArray addObject:[self createiPhoneLegacyPreset]]; [childrenArray addObject:[self createIpodHighPreset]]; @@ -218,184 +149,6 @@ /* These NSDictionary Buit-In Preset definitions contain all of the settings for one built in preset */ /* Note: For now, you can no longer have reference to any main window fields in your key values */ -- (NSDictionary *)create360Preset -{ - NSMutableDictionary *preset = [[NSMutableDictionary alloc] init]; - - /* Get the New Preset Name from the field in the AddPresetPanel */ - [preset setObject:@"Xbox 360" 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:1] forKey:@"UsesPictureSettings"]; - - /* Get the New Preset Description from the field in the AddPresetPanel */ - [preset setObject:@"HandBrake's settings for the Microsoft Xbox 360." forKey:@"PresetDescription"]; - - /* File Format */ - [preset setObject:@"MP4 file" forKey:@"FileFormat"]; - - /* Chapter Markers*/ - [preset setObject:[NSNumber numberWithInt:0] forKey:@"ChapterMarkers"]; - - /* Video encoder */ - [preset setObject:@"H.264 (x264)" forKey:@"VideoEncoder"]; - - /* x264 Option String */ - [preset setObject:@"level=40:ref=2:mixed-refs:bframes=3:weightb:subme=9:direct=auto:b-pyramid:me=umh:analyse=all:no-fast-pskip:filter=-2,-1" forKey:@"x264Option"]; - - /* Video quality */ - [preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoQualityType"]; - [preset setObject:@"700" forKey:@"VideoTargetSize"]; - [preset setObject:@"2000" forKey:@"VideoAvgBitrate"]; - [preset setObject:[NSNumber numberWithFloat:0.6471] forKey:@"VideoQualitySlider"]; - - /* Video framerate */ - [preset setObject:@"Same as source" forKey:@"VideoFramerate"]; - - /* 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:@"UsesMaxPictureSettings"]; - [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: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 */ - - /* Track 1 */ - [preset setObject:[NSNumber numberWithInt:1] forKey:@"Audio1Track"]; - [preset setObject:@"AAC (faac)" forKey:@"Audio1Encoder"]; - [preset setObject:@"Dolby Pro Logic II" forKey:@"Audio1Mixdown"]; - [preset setObject:@"48" forKey:@"Audio1Samplerate"]; - [preset setObject:@"160" forKey:@"Audio1Bitrate"]; - [preset setObject:[NSNumber numberWithFloat:1.0] forKey:@"Audio1TrackDRCSlider"]; - - /* Subtitles*/ - [preset setObject:@"None" forKey:@"Subtitles"]; - - [preset autorelease]; - return preset; -} - -- (NSDictionary *)createAnimationPreset -{ - NSMutableDictionary *preset = [[NSMutableDictionary alloc] init]; - - /* Get the New Preset Name from the field in the AddPresetPanel */ - [preset setObject:@"Animation" 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 cartoons, anime, and CGI." forKey:@"PresetDescription"]; - - /* File Format */ - [preset setObject:@"MKV file" forKey:@"FileFormat"]; - - /* Chapter Markers*/ - [preset setObject:[NSNumber numberWithInt:1] forKey:@"ChapterMarkers"]; - - /* Video encoder */ - [preset setObject:@"H.264 (x264)" forKey:@"VideoEncoder"]; - - /* x264 Option String */ - [preset setObject:@"ref=5:mixed-refs:bframes=6:weightb:direct=auto:b-pyramid:me=umh:analyse=all:8x8dct:trellis=1:nr=150:no-fast-pskip:filter=2,2:psy-rd=1,1:subme=9" forKey:@"x264Option"]; - - /* Video quality */ - [preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoQualityType"]; - [preset setObject:@"700" forKey:@"VideoTargetSize"]; - [preset setObject:@"1000" forKey:@"VideoAvgBitrate"]; - [preset setObject:[NSNumber numberWithFloat:0.6471] forKey:@"VideoQualitySlider"]; - - /* Video framerate */ - [preset setObject:@"Same as source" forKey:@"VideoFramerate"]; - - /* GrayScale */ - [preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoGrayScale"]; - - /* 2 Pass Encoding */ - [preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoTwoPass"]; - [preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoTurboTwoPass"]; - - /*Picture Settings*/ - /* Basic Picture Settings */ - /* Use Max Picture settings for whatever the dvd is.*/ - [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesMaxPictureSettings"]; - [preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureAutoCrop"]; - [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureWidth"]; - [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureHeight"]; - [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureKeepRatio"]; - [preset setObject:[NSNumber numberWithInt:1] forKey:@"PicturePAR"]; - - /* Filters. For animation, use slower deinterlacing. */ - [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureFilters"]; - [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeinterlace"]; - [preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureDecomb"]; - [preset setObject:[NSNumber numberWithInt:0] forKey:@"VFR"]; - [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDenoise"]; - [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeblock"]; - [preset setObject:[NSNumber numberWithInt:1] 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 */ - - /* Track 1 */ - [preset setObject:[NSNumber numberWithInt:1] forKey:@"Audio1Track"]; - [preset setObject:@"AAC (faac)" forKey:@"Audio1Encoder"]; - [preset setObject:@"Dolby Pro Logic II" forKey:@"Audio1Mixdown"]; - [preset setObject:@"Auto" forKey:@"Audio1Samplerate"]; - [preset setObject:@"160" forKey:@"Audio1Bitrate"]; - [preset setObject:[NSNumber numberWithFloat:1.0] forKey:@"Audio1TrackDRCSlider"]; - - /* Subtitles*/ - [preset setObject:@"None" forKey:@"Subtitles"]; - - [preset autorelease]; - return preset; -} - - (NSDictionary *)createAppleTVPreset { NSMutableDictionary *preset = [[NSMutableDictionary alloc] init]; @@ -414,7 +167,7 @@ [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, including Dolby Digital 5.1 AC3 sound. Provides a good balance between quality and file size, and optimizes performance." forKey:@"PresetDescription"]; + [preset setObject:@"HandBrake's settings for the AppleTV, including Dolby Digital 5.1 AC3 sound. Provides a good balance between quality and file size, and pushes the AppleTV to its limits." forKey:@"PresetDescription"]; /* File Format */ [preset setObject:@"MP4 file" forKey:@"FileFormat"]; @@ -429,13 +182,13 @@ [preset setObject:@"H.264 (x264)" forKey:@"VideoEncoder"]; /* x264 Option String (We can use this to tweak the appleTV output)*/ - [preset setObject:@"level=30:cabac=0:ref=3:mixed-refs=1:bframes=6:weightb=1:direct=auto:no-fast-pskip=1:me=umh:subq=7:analyse=all" forKey:@"x264Option"]; + [preset setObject:@"cabac=0:ref=2:mixed-refs=1:bframes=3:me=umh:subme=7:b-adapt=2:8x8dct=1" 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:0.59] forKey:@"VideoQualitySlider"]; + [preset setObject:[NSNumber numberWithFloat:20.0] forKey:@"VideoQualitySlider"]; /* Video framerate */ [preset setObject:@"Same as source" forKey:@"VideoFramerate"]; @@ -472,25 +225,34 @@ /* 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 */ - [preset setObject:[NSNumber numberWithInt:1] forKey:@"Audio1Track"]; - [preset setObject:@"AAC (faac)" forKey:@"Audio1Encoder"]; - [preset setObject:@"Dolby Pro Logic II" forKey:@"Audio1Mixdown"]; - [preset setObject:@"48" forKey:@"Audio1Samplerate"]; - [preset setObject:@"160" forKey:@"Audio1Bitrate"]; - [preset setObject:[NSNumber numberWithFloat:1.0] forKey:@"Audio1TrackDRCSlider"]; + /* 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:@"48" forKey:@"AudioSamplerate"]; + [audioTrack1Array setObject:@"160" forKey:@"AudioBitrate"]; + [audioTrack1Array setObject:[NSNumber numberWithFloat:0.0] forKey:@"AudioTrackDRCSlider"]; + [audioTrack1Array autorelease]; + [audioListArray addObject:audioTrack1Array]; /* Track 2 */ - [preset setObject:[NSNumber numberWithInt:1] forKey:@"Audio2Track"]; - [preset setObject:@"AC3 Passthru" forKey:@"Audio2Encoder"]; - [preset setObject:@"AC3 Passthru" forKey:@"Audio2Mixdown"]; - [preset setObject:@"Auto" forKey:@"Audio2Samplerate"]; + 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 */ - [preset setObject:@"160" forKey:@"Audio2Bitrate"]; - [preset setObject:[NSNumber numberWithFloat:1.0] forKey:@"Audio2TrackDRCSlider"]; + [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"]; @@ -531,7 +293,7 @@ [preset setObject:@"H.264 (x264)" forKey:@"VideoEncoder"]; /* x264 Option String (We can use this to tweak the appleTV output)*/ - [preset setObject:@"bframes=3:ref=1:subme=5:me=umh:no-fast-pskip=1:trellis=1:cabac=0" forKey:@"x264Option"]; + [preset setObject:@"bframes=3:ref=1:subme=5:me=umh:no-fast-pskip=1:cabac=0" forKey:@"x264Option"]; /* Video quality */ [preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoQualityType"]; @@ -574,25 +336,34 @@ /* 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 */ - - /* Track 1 */ - [preset setObject:[NSNumber numberWithInt:1] forKey:@"Audio1Track"]; - [preset setObject:@"AAC (faac)" forKey:@"Audio1Encoder"]; - [preset setObject:@"Dolby Pro Logic II" forKey:@"Audio1Mixdown"]; - [preset setObject:@"48" forKey:@"Audio1Samplerate"]; - [preset setObject:@"160" forKey:@"Audio1Bitrate"]; - [preset setObject:[NSNumber numberWithFloat:1.0] forKey:@"Audio1TrackDRCSlider"]; + 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:@"48" forKey:@"AudioSamplerate"]; + [audioTrack1Array setObject:@"160" forKey:@"AudioBitrate"]; + [audioTrack1Array setObject:[NSNumber numberWithFloat:0.0] forKey:@"AudioTrackDRCSlider"]; + [audioTrack1Array autorelease]; + [audioListArray addObject:audioTrack1Array]; /* Track 2 */ - [preset setObject:[NSNumber numberWithInt:1] forKey:@"Audio2Track"]; - [preset setObject:@"AC3 Passthru" forKey:@"Audio2Encoder"]; - [preset setObject:@"AC3 Passthru" forKey:@"Audio2Mixdown"]; - [preset setObject:@"Auto" forKey:@"Audio2Samplerate"]; + 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 */ - [preset setObject:@"160" forKey:@"Audio2Bitrate"]; - [preset setObject:[NSNumber numberWithFloat:1.0] forKey:@"Audio2TrackDRCSlider"]; + [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"]; @@ -619,7 +390,7 @@ [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, iPhone, AppleTV, and Macs" forKey:@"PresetDescription"]; + [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"]; @@ -634,13 +405,13 @@ [preset setObject:@"H.264 (x264)" forKey:@"VideoEncoder"]; /* x264 Option String (We can use this to tweak the appleTV output)*/ - [preset setObject:@"level=30:cabac=0:ref=3:mixed-refs=1:analyse=all:me=umh:no-fast-pskip=1" forKey:@"x264Option"]; + [preset setObject:@"cabac=0:ref=2:mixed-refs=1:me=umh" 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:0.59] forKey:@"VideoQualitySlider"]; + [preset setObject:[NSNumber numberWithFloat:20.0] forKey:@"VideoQualitySlider"]; /* Video framerate */ [preset setObject:@"Same as source" forKey:@"VideoFramerate"]; @@ -677,25 +448,34 @@ /* 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 */ - [preset setObject:[NSNumber numberWithInt:1] forKey:@"Audio1Track"]; - [preset setObject:@"AAC (faac)" forKey:@"Audio1Encoder"]; - [preset setObject:@"Dolby Pro Logic II" forKey:@"Audio1Mixdown"]; - [preset setObject:@"48" forKey:@"Audio1Samplerate"]; - [preset setObject:@"160" forKey:@"Audio1Bitrate"]; - [preset setObject:[NSNumber numberWithFloat:1.0] forKey:@"Audio1TrackDRCSlider"]; + /* 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:@"48" forKey:@"AudioSamplerate"]; + [audioTrack1Array setObject:@"160" forKey:@"AudioBitrate"]; + [audioTrack1Array setObject:[NSNumber numberWithFloat:0.0] forKey:@"AudioTrackDRCSlider"]; + [audioTrack1Array autorelease]; + [audioListArray addObject:audioTrack1Array]; /* Track 2 */ - [preset setObject:[NSNumber numberWithInt:1] forKey:@"Audio2Track"]; - [preset setObject:@"AC3 Passthru" forKey:@"Audio2Encoder"]; - [preset setObject:@"AC3 Passthru" forKey:@"Audio2Mixdown"]; - [preset setObject:@"Auto" forKey:@"Audio2Samplerate"]; + 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 */ - [preset setObject:@"160" forKey:@"Audio2Bitrate"]; - [preset setObject:[NSNumber numberWithFloat:1.0] forKey:@"Audio2TrackDRCSlider"]; + [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"]; @@ -776,14 +556,20 @@ /* 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 */ - [preset setObject:[NSNumber numberWithInt:1] forKey:@"Audio1Track"]; - [preset setObject:@"AAC (faac)" forKey:@"Audio1Encoder"]; - [preset setObject:@"Dolby Pro Logic II" forKey:@"Audio1Mixdown"]; - [preset setObject:@"Auto" forKey:@"Audio1Samplerate"]; - [preset setObject:@"160" forKey:@"Audio1Bitrate"]; - [preset setObject:[NSNumber numberWithFloat:1.0] forKey:@"Audio1TrackDRCSlider"]; + /* 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:@"48" 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"]; @@ -792,12 +578,12 @@ return preset; } -- (NSDictionary *)createCRFPreset +- (NSDictionary *)createHighProfilePreset { NSMutableDictionary *preset = [[NSMutableDictionary alloc] init]; /* Get the New Preset Name from the field in the AddPresetPanel */ - [preset setObject:@"Constant Quality Rate" forKey:@"PresetName"]; + [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"]; @@ -809,10 +595,10 @@ [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureSettings"]; /* Get the New Preset Description from the field in the AddPresetPanel */ - [preset setObject:@"HandBrake's preset for consistently excellent quality in one pass, with the downside of entirely unpredictable file sizes and bitrates." forKey:@"PresetDescription"]; + [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:@"MKV file" forKey:@"FileFormat"]; + [preset setObject:@"MP4 file" forKey:@"FileFormat"]; /* Chapter Markers*/ [preset setObject:[NSNumber numberWithInt:1] forKey:@"ChapterMarkers"]; @@ -821,13 +607,13 @@ [preset setObject:@"H.264 (x264)" forKey:@"VideoEncoder"]; /* x264 Option String */ - [preset setObject:@"ref=3:mixed-refs:bframes=3:b-pyramid:weightb:filter=-2,-1:trellis=1:analyse=all:8x8dct:me=umh:subme=9:psy-rd=1,1" forKey:@"x264Option"]; + [preset setObject:@"ref=3:mixed-refs:bframes=3:weightb:b-pyramid:b-adapt=2:me=umh:subme=9:analyse=all:8x8dct" forKey:@"x264Option"]; /* Video quality */ [preset setObject:[NSNumber numberWithInt:2] forKey:@"VideoQualityType"]; [preset setObject:@"700" forKey:@"VideoTargetSize"]; - [preset setObject:@"2000" forKey:@"VideoAvgBitrate"]; - [preset setObject:[NSNumber numberWithFloat:0.60] forKey:@"VideoQualitySlider"]; + [preset setObject:@"1800" forKey:@"VideoAvgBitrate"]; + [preset setObject:[NSNumber numberWithFloat:20.0] forKey:@"VideoQualitySlider"]; /* Video framerate */ [preset setObject:@"Same as source" forKey:@"VideoFramerate"]; @@ -846,15 +632,15 @@ [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureWidth"]; [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureHeight"]; [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureKeepRatio"]; - [preset setObject:[NSNumber numberWithInt:1] forKey:@"PicturePAR"]; + [preset setObject:[NSNumber numberWithInt:2] forKey:@"PicturePAR"]; /* 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"]; + [preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureDetelecine"]; + [preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureDecomb"]; /* Set crop settings here */ /* The Auto Crop Matrix in the Picture Window autodetects differences in crop settings */ @@ -865,109 +651,34 @@ /* 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 */ - [preset setObject:[NSNumber numberWithInt:1] forKey:@"Audio1Track"]; - [preset setObject:@"AC3 Passthru" forKey:@"Audio1Encoder"]; - [preset setObject:@"AC3 Passthru" forKey:@"Audio1Mixdown"]; - [preset setObject:@"Auto" forKey:@"Audio1Samplerate"]; - /* 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 */ - [preset setObject:@"160" forKey:@"Audio1Bitrate"]; - [preset setObject:[NSNumber numberWithFloat:1.0] forKey:@"Audio1TrackDRCSlider"]; + /* 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:@"48" forKey:@"AudioSamplerate"]; + [audioTrack1Array setObject:@"160" forKey:@"AudioBitrate"]; + [audioTrack1Array setObject:[NSNumber numberWithFloat:0.0] forKey:@"AudioTrackDRCSlider"]; + [audioTrack1Array autorelease]; + [audioListArray addObject:audioTrack1Array]; - /* Subtitles*/ - [preset setObject:@"None" forKey:@"Subtitles"]; - - [preset autorelease]; - return preset; -} - -- (NSDictionary *)createFilmPreset -{ - NSMutableDictionary *preset = [[NSMutableDictionary alloc] init]; - - /* Get the New Preset Name from the field in the AddPresetPanel */ - [preset setObject:@"Film" 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 preset for feature films." forKey:@"PresetDescription"]; - - /* File Format */ - [preset setObject:@"MKV file" forKey:@"FileFormat"]; - - /* Chapter Markers*/ - [preset setObject:[NSNumber numberWithInt:1] forKey:@"ChapterMarkers"]; - - /* Video encoder */ - [preset setObject:@"H.264 (x264)" forKey:@"VideoEncoder"]; - - /* x264 Option String */ - [preset setObject:@"ref=3:mixed-refs:bframes=6:weightb:direct=auto:b-pyramid:me=umh:subme=9:analyse=all:8x8dct:trellis=1:no-fast-pskip:psy-rd=1,1" forKey:@"x264Option"]; - - /* Video quality */ - [preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoQualityType"]; - [preset setObject:@"700" forKey:@"VideoTargetSize"]; - [preset setObject:@"1800" forKey:@"VideoAvgBitrate"]; - [preset setObject:[NSNumber numberWithFloat:0.6471] forKey:@"VideoQualitySlider"]; - - /* Video framerate */ - [preset setObject:@"Same as source" forKey:@"VideoFramerate"]; - - /* GrayScale */ - [preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoGrayScale"]; - - /* 2 Pass Encoding */ - [preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoTwoPass"]; - [preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoTurboTwoPass"]; - - /*Picture Settings*/ - /* Use Max Picture settings for whatever the dvd is.*/ - [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesMaxPictureSettings"]; - [preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureAutoCrop"]; - [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureWidth"]; - [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureHeight"]; - [preset setObject:[NSNumber numberWithInt: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: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 */ - - /* Track 1 */ - [preset setObject:[NSNumber numberWithInt:1] forKey:@"Audio1Track"]; - [preset setObject:@"AC3 Passthru" forKey:@"Audio1Encoder"]; - [preset setObject:@"AC3 Passthru" forKey:@"Audio1Mixdown"]; - [preset setObject:@"Auto" forKey:@"Audio1Samplerate"]; + /* 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 */ - [preset setObject:@"160" forKey:@"Audio1Bitrate"]; - [preset setObject:[NSNumber numberWithFloat:1.0] forKey:@"Audio1TrackDRCSlider"]; + [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"]; @@ -1005,13 +716,13 @@ [preset setObject:@"H.264 (x264)" forKey:@"VideoEncoder"]; [preset setObject:[NSNumber numberWithInt:0] forKey:@"Mp4iPodCompatible"]; /* x264 Option String */ - [preset setObject:@"level=30:cabac=0:ref=2:mixed-refs:analyse=all:me=umh:no-fast-pskip=1" forKey:@"x264Option"]; + [preset setObject:@"cabac=0:ref=2:mixed-refs:me=umh" forKey:@"x264Option"]; /* Video quality */ [preset setObject:[NSNumber numberWithInt:2] forKey:@"VideoQualityType"]; [preset setObject:@"700" forKey:@"VideoTargetSize"]; [preset setObject:@"960" forKey:@"VideoAvgBitrate"]; - [preset setObject:[NSNumber numberWithFloat:0.59] forKey:@"VideoQualitySlider"]; + [preset setObject:[NSNumber numberWithFloat:20.0] forKey:@"VideoQualitySlider"]; /* Video framerate */ [preset setObject:@"Same as source" forKey:@"VideoFramerate"]; @@ -1048,14 +759,20 @@ /* 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 */ - [preset setObject:[NSNumber numberWithInt:1] forKey:@"Audio1Track"]; - [preset setObject:@"AAC (faac)" forKey:@"Audio1Encoder"]; - [preset setObject:@"Dolby Pro Logic II" forKey:@"Audio1Mixdown"]; - [preset setObject:@"48" forKey:@"Audio1Samplerate"]; - [preset setObject:@"128" forKey:@"Audio1Bitrate"]; - [preset setObject:[NSNumber numberWithFloat:1.0] forKey:@"Audio1TrackDRCSlider"]; + /* 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:@"48" 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"]; @@ -1093,7 +810,7 @@ [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:trellis=1" forKey:@"x264Option"]; + [preset setObject:@"level=30:cabac=0:ref=1:analyse=all:me=umh:no-fast-pskip=1:psy-rd=0,0" forKey:@"x264Option"]; /* Video quality */ [preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoQualityType"]; @@ -1136,14 +853,20 @@ /* 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 */ - [preset setObject:[NSNumber numberWithInt:1] forKey:@"Audio1Track"]; - [preset setObject:@"AAC (faac)" forKey:@"Audio1Encoder"]; - [preset setObject:@"Dolby Pro Logic II" forKey:@"Audio1Mixdown"]; - [preset setObject:@"48" forKey:@"Audio1Samplerate"]; - [preset setObject:@"128" forKey:@"Audio1Bitrate"]; - [preset setObject:[NSNumber numberWithFloat:1.0] forKey:@"Audio1TrackDRCSlider"]; + /* 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:@"48" 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"]; @@ -1181,7 +904,7 @@ [preset setObject:@"H.264 (x264)" forKey:@"VideoEncoder"]; [preset setObject:[NSNumber numberWithInt:1] forKey:@"Mp4iPodCompatible"]; /* x264 Option String */ - [preset setObject:@"level=30:bframes=0:cabac=0:ref=1:vbv-maxrate=1500:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1" forKey:@"x264Option"]; + [preset setObject:@"level=30:bframes=0:cabac=0:ref=1:vbv-maxrate=1500:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1:psy-rd=0,0" forKey:@"x264Option"]; /* Video quality */ [preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoQualityType"]; @@ -1224,14 +947,20 @@ /* 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 */ - [preset setObject:[NSNumber numberWithInt:1] forKey:@"Audio1Track"]; - [preset setObject:@"AAC (faac)" forKey:@"Audio1Encoder"]; - [preset setObject:@"Dolby Pro Logic II" forKey:@"Audio1Mixdown"]; - [preset setObject:@"48" forKey:@"Audio1Samplerate"]; - [preset setObject:@"160" forKey:@"Audio1Bitrate"]; - [preset setObject:[NSNumber numberWithFloat:1.0] forKey:@"Audio1TrackDRCSlider"]; + /* 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:@"48" 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"]; @@ -1257,7 +986,7 @@ [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. Optimized for great playback on the iPod screen, with smaller file size." 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"]; @@ -1312,14 +1041,20 @@ /* 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 */ - [preset setObject:[NSNumber numberWithInt:1] forKey:@"Audio1Track"]; - [preset setObject:@"AAC (faac)" forKey:@"Audio1Encoder"]; - [preset setObject:@"Dolby Pro Logic II" forKey:@"Audio1Mixdown"]; - [preset setObject:@"48" forKey:@"Audio1Samplerate"]; - [preset setObject:@"160" forKey:@"Audio1Bitrate"]; - [preset setObject:[NSNumber numberWithFloat:1.0] forKey:@"Audio1TrackDRCSlider"]; + /* 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:@"48" 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"]; @@ -1360,187 +1095,10 @@ [preset setObject:@"ref=2:bframes=2:me=umh" forKey:@"x264Option"]; /* Video quality */ - [preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoQualityType"]; + [preset setObject:[NSNumber numberWithInt:2] forKey:@"VideoQualityType"]; [preset setObject:@"700" forKey:@"VideoTargetSize"]; [preset setObject:@"1500" forKey:@"VideoAvgBitrate"]; - [preset setObject:[NSNumber numberWithFloat:0.6471] forKey:@"VideoQualitySlider"]; - - /* Video framerate */ - [preset setObject:@"Same as source" forKey:@"VideoFramerate"]; - - /* GrayScale */ - [preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoGrayScale"]; - - /* 2 Pass Encoding */ - [preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoTwoPass"]; - [preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoTurboTwoPass"]; - - /*Picture Settings*/ - /* Use Max Picture settings for whatever the dvd is.*/ - [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesMaxPictureSettings"]; - [preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureAutoCrop"]; - [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureWidth"]; - [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureHeight"]; - [preset setObject:[NSNumber numberWithInt: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: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 */ - - /* Track 1 */ - [preset setObject:[NSNumber numberWithInt:1] forKey:@"Audio1Track"]; - [preset setObject:@"AAC (faac)" forKey:@"Audio1Encoder"]; - [preset setObject:@"Dolby Pro Logic II" forKey:@"Audio1Mixdown"]; - [preset setObject:@"Auto" forKey:@"Audio1Samplerate"]; - [preset setObject:@"160" forKey:@"Audio1Bitrate"]; - [preset setObject:[NSNumber numberWithFloat:1.0] forKey:@"Audio1TrackDRCSlider"]; - - /* Subtitles*/ - [preset setObject:@"None" forKey:@"Subtitles"]; - - [preset autorelease]; - return preset; -} - -- (NSDictionary *)createPSPPreset -{ - NSMutableDictionary *preset = [[NSMutableDictionary alloc] init]; - - /* Get the New Preset Name from the field in the AddPresetPanel */ - [preset setObject:@"PSP" 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:1] forKey:@"UsesPictureSettings"]; - - /* Get the New Preset Description from the field in the AddPresetPanel */ - [preset setObject:@"HandBrake's settings for the Sony PlayStation Portable." forKey:@"PresetDescription"]; - - /* File Format */ - [preset setObject:@"MP4 file" forKey:@"FileFormat"]; - - /* Chapter Markers*/ - [preset setObject:[NSNumber numberWithInt:1] forKey:@"ChapterMarkers"]; - - /* Video encoder */ - [preset setObject:@"MPEG-4 (FFmpeg)" forKey:@"VideoEncoder"]; - - /* x264 Option String (We can use this to tweak the appleTV output)*/ - [preset setObject:@"" forKey:@"x264Option"]; - - /* Video quality */ - [preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoQualityType"]; - [preset setObject:@"700" forKey:@"VideoTargetSize"]; - [preset setObject:@"1024" forKey:@"VideoAvgBitrate"]; - [preset setObject:[NSNumber numberWithFloat:0.6471] forKey:@"VideoQualitySlider"]; - - /* Video framerate */ - [preset setObject:@"Same as source" forKey:@"VideoFramerate"]; - - /* GrayScale */ - [preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoGrayScale"]; - - /* 2 Pass Encoding */ - [preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoTwoPass"]; - - /*Picture Settings*/ - /* Use dimensions of 368*208 for robust PSP compatibility */ - [preset setObject:[NSNumber numberWithInt:0] forKey:@"UsesMaxPictureSettings"]; - [preset setObject:@"368" forKey:@"PictureWidth"]; - [preset setObject:@"208" forKey:@"PictureHeight"]; - [preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureKeepRatio"]; - [preset setObject:[NSNumber numberWithInt:0] forKey:@"PicturePAR"]; - - /* Explicitly set the filters for built-in presets */ - [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureFilters"]; - [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeinterlace"]; - [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDenoise"]; - [preset setObject:[NSNumber numberWithInt:0] forKey:@"VFR"]; - [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeblock"]; - [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDetelecine"]; - - /* Set crop settings here */ - /* The Auto Crop Matrix in the Picture Window autodetects differences in crop settings */ - [preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureAutoCrop"]; - [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureTopCrop"]; - [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureBottomCrop"]; - [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureLeftCrop"]; - [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureRightCrop"]; - - /* Audio - Is done on a track by track basis, ONLY specifiy the tracks we want set as any track - * not listed will be set to "None" and not encoded */ - - /* Track 1 */ - [preset setObject:[NSNumber numberWithInt:1] forKey:@"Audio1Track"]; - [preset setObject:@"AAC (faac)" forKey:@"Audio1Encoder"]; - [preset setObject:@"Dolby Pro Logic II" forKey:@"Audio1Mixdown"]; - [preset setObject:@"48" forKey:@"Audio1Samplerate"]; - [preset setObject:@"128" forKey:@"Audio1Bitrate"]; - [preset setObject:[NSNumber numberWithFloat:1.0] forKey:@"Audio1TrackDRCSlider"]; - - /* Subtitles*/ - [preset setObject:@"None" forKey:@"Subtitles"]; - - [preset autorelease]; - return preset; -} - -- (NSDictionary *)createPSThreePreset -{ - NSMutableDictionary *preset = [[NSMutableDictionary alloc] init]; - - /* Get the New Preset Name from the field in the AddPresetPanel */ - [preset setObject:@"PS3" 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:1] forKey:@"UsesPictureSettings"]; - - /* Get the New Preset Description from the field in the AddPresetPanel */ - [preset setObject:@"HandBrake's settings for the Sony PlayStation 3." forKey:@"PresetDescription"]; - - /* File Format */ - [preset setObject:@"MP4 file" forKey:@"FileFormat"]; - - /* 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 appleTV output)*/ - [preset setObject:@"level=41:me=umh" forKey:@"x264Option"]; - - /* Video quality */ - [preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoQualityType"]; - [preset setObject:@"700" forKey:@"VideoTargetSize"]; - [preset setObject:@"2500" forKey:@"VideoAvgBitrate"]; - [preset setObject:[NSNumber numberWithFloat:0.6471] forKey:@"VideoQualitySlider"]; + [preset setObject:[NSNumber numberWithFloat:20.0] forKey:@"VideoQualitySlider"]; /* Video framerate */ [preset setObject:@"Same as source" forKey:@"VideoFramerate"]; @@ -1550,95 +1108,7 @@ /* 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:@"UsesMaxPictureSettings"]; - [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:0] 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 */ - - /* Track 1 */ - [preset setObject:[NSNumber numberWithInt:1] forKey:@"Audio1Track"]; - [preset setObject:@"AAC (faac)" forKey:@"Audio1Encoder"]; - [preset setObject:@"Dolby Pro Logic II" forKey:@"Audio1Mixdown"]; - [preset setObject:@"48" forKey:@"Audio1Samplerate"]; - [preset setObject:@"160" forKey:@"Audio1Bitrate"]; - [preset setObject:[NSNumber numberWithFloat:1.0] forKey:@"Audio1TrackDRCSlider"]; - - /* Subtitles*/ - [preset setObject:@"None" forKey:@"Subtitles"]; - - [preset autorelease]; - return preset; -} - -- (NSDictionary *)createQuickTimePreset -{ - NSMutableDictionary *preset = [[NSMutableDictionary alloc] init]; - - /* Get the New Preset Name from the field in the AddPresetPanel */ - [preset setObject:@"QuickTime" 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 profile settings for use with QuickTime. It can be slow, so use it when the Normal preset doesn't look good enough." forKey:@"PresetDescription"]; - - /* File Format */ - [preset setObject:@"MP4 file" forKey:@"FileFormat"]; - - /* Chapter Markers*/ - [preset setObject:[NSNumber numberWithInt:1] forKey:@"ChapterMarkers"]; - - /* Video encoder */ - [preset setObject:@"H.264 (x264)" forKey:@"VideoEncoder"]; - - /* x264 Option String */ - [preset setObject:@"ref=3:mixed-refs:bframes=3:weightb:direct=auto:me=umh:subme=7:analyse=all:8x8dct:trellis=1:no-fast-pskip=1:psy-rd=1,1" forKey:@"x264Option"]; - - /* Video quality */ - [preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoQualityType"]; - [preset setObject:@"700" forKey:@"VideoTargetSize"]; - [preset setObject:@"1800" forKey:@"VideoAvgBitrate"]; - [preset setObject:[NSNumber numberWithFloat:0.6471] forKey:@"VideoQualitySlider"]; - - /* Video framerate */ - [preset setObject:@"Same as source" forKey:@"VideoFramerate"]; - - /* GrayScale */ - [preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoGrayScale"]; - - /* 2 Pass Encoding */ - [preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoTwoPass"]; - [preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoTurboTwoPass"]; + [preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoTurboTwoPass"]; /*Picture Settings*/ /* Use Max Picture settings for whatever the dvd is.*/ @@ -1666,14 +1136,20 @@ /* 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 */ - [preset setObject:[NSNumber numberWithInt:1] forKey:@"Audio1Track"]; - [preset setObject:@"AAC (faac)" forKey:@"Audio1Encoder"]; - [preset setObject:@"Dolby Pro Logic II" forKey:@"Audio1Mixdown"]; - [preset setObject:@"Auto" forKey:@"Audio1Samplerate"]; - [preset setObject:@"160" forKey:@"Audio1Bitrate"]; - [preset setObject:[NSNumber numberWithFloat:1.0] forKey:@"Audio1TrackDRCSlider"]; + /* 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:@"48" 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"]; @@ -1682,93 +1158,5 @@ return preset; } -- (NSDictionary *)createTelevisionPreset -{ - NSMutableDictionary *preset = [[NSMutableDictionary alloc] init]; - - /* Get the New Preset Name from the field in the AddPresetPanel */ - [preset setObject:@"Television" 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 video from television." forKey:@"PresetDescription"]; - - /* File Format */ - [preset setObject:@"MKV file" forKey:@"FileFormat"]; - - /* Chapter Markers*/ - [preset setObject:[NSNumber numberWithInt:1] forKey:@"ChapterMarkers"]; - - /* Video encoder */ - [preset setObject:@"H.264 (x264)" forKey:@"VideoEncoder"]; - - /* x264 Option String */ - [preset setObject:@"ref=3:mixed-refs:bframes=6:weightb:direct=auto:b-pyramid:me=umh:subme=9:analyse=all:8x8dct:trellis=1:nr=150:no-fast-pskip=1:psy-rd=1,1" forKey:@"x264Option"]; - - /* Video quality */ - [preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoQualityType"]; - [preset setObject:@"700" forKey:@"VideoTargetSize"]; - [preset setObject:@"1300" forKey:@"VideoAvgBitrate"]; - [preset setObject:[NSNumber numberWithFloat:0.6471] forKey:@"VideoQualitySlider"]; - - /* Video framerate */ - [preset setObject:@"Same as source" forKey:@"VideoFramerate"]; - - /* GrayScale */ - [preset setObject:[NSNumber numberWithInt:0] forKey:@"VideoGrayScale"]; - - /* 2 Pass Encoding */ - [preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoTwoPass"]; - [preset setObject:[NSNumber numberWithInt:1] forKey:@"VideoTurboTwoPass"]; - - /*Picture Settings*/ - /* Use Max Picture settings for whatever the dvd is.*/ - [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesMaxPictureSettings"]; - [preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureAutoCrop"]; - [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureWidth"]; - [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureHeight"]; - [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureKeepRatio"]; - [preset setObject:[NSNumber numberWithInt:1] forKey:@"PicturePAR"]; - - [preset setObject:[NSNumber numberWithInt:1] forKey:@"UsesPictureFilters"]; - [preset setObject:[NSNumber numberWithInt:0] forKey:@"PictureDeinterlace"]; - [preset setObject:[NSNumber numberWithInt:1] forKey:@"PictureDecomb"]; - [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:1] 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 */ - - /* Track 1 */ - [preset setObject:[NSNumber numberWithInt:1] forKey:@"Audio1Track"]; - [preset setObject:@"AAC (faac)" forKey:@"Audio1Encoder"]; - [preset setObject:@"Dolby Pro Logic II" forKey:@"Audio1Mixdown"]; - [preset setObject:@"Auto" forKey:@"Audio1Samplerate"]; - [preset setObject:@"160" forKey:@"Audio1Bitrate"]; - [preset setObject:[NSNumber numberWithFloat:1.0] forKey:@"Audio1TrackDRCSlider"]; - - /* Subtitles*/ - [preset setObject:@"None" forKey:@"Subtitles"]; - - [preset autorelease]; - return preset; -} @end diff --git a/test/test.c b/test/test.c index fc915d45e..e88dbb143 100644 --- a/test/test.c +++ b/test/test.c @@ -516,34 +516,41 @@ static int HandleEvents( hb_handle_t * h ) if (!strcmp(preset_name, "Universal")) { - mux = HB_MUX_MP4; + if( !mux ) + { + mux = HB_MUX_MP4; + } vcodec = HB_VCODEC_X264; - job->vquality = 0.589999973773956; + job->vquality = 20.0; job->crf = 1; if( !atracks ) { atracks = strdup("1,1"); } + if( !acodecs ) + { + acodecs = strdup("faac,ac3"); + } if( !abitrates ) { - abitrates = strdup("160,auto"); + abitrates = strdup("160,160"); } - if( !arates ) + if( !mixdowns ) { - arates = strdup("48,Auto"); + mixdowns = strdup("dpl2,auto"); } - if( !acodecs ) + if( !arates ) { - acodecs = strdup("faac,ac3"); + arates = strdup("48,Auto"); } - if( !mixdowns ) + if( !dynamic_range_compression ) { - mixdowns = strdup("dpl2,auto"); + dynamic_range_compression = strdup("0.0,0.0"); } maxWidth = 720; if( !x264opts ) { - x264opts = strdup("level=30:cabac=0:ref=3:mixed-refs=1:analyse=all:me=umh:no-fast-pskip=1"); + x264opts = strdup("cabac=0:ref=2:mixed-refs=1:me=umh"); } pixelratio = 2; job->chapter_markers = 1; @@ -551,7 +558,10 @@ static int HandleEvents( hb_handle_t * h ) if (!strcmp(preset_name, "iPod")) { - mux = HB_MUX_MP4; + if( !mux ) + { + mux = HB_MUX_MP4; + } job->ipod_atom = 1; vcodec = HB_VCODEC_X264; job->vbitrate = 700; @@ -559,21 +569,25 @@ static int HandleEvents( hb_handle_t * h ) { atracks = strdup("1"); } + if( !acodecs ) + { + acodecs = strdup("faac"); + } if( !abitrates ) { abitrates = strdup("160"); } - if( !arates ) + if( !mixdowns ) { - arates = strdup("48"); + mixdowns = strdup("dpl2"); } - if( !acodecs ) + if( !arates ) { - acodecs = strdup("faac"); + arates = strdup("48"); } - if( !mixdowns ) + if( !dynamic_range_compression ) { - mixdowns = strdup("dpl2"); + dynamic_range_compression = strdup("0.0"); } maxWidth = 320; if( !x264opts ) @@ -585,235 +599,120 @@ static int HandleEvents( hb_handle_t * h ) if (!strcmp(preset_name, "iPhone & iPod Touch")) { - mux = HB_MUX_MP4; + if( !mux ) + { + mux = HB_MUX_MP4; + } vcodec = HB_VCODEC_X264; - job->vquality = 0.589999973773956; + job->vquality = 20.0; job->crf = 1; if( !atracks ) { atracks = strdup("1"); } + if( !acodecs ) + { + acodecs = strdup("faac"); + } if( !abitrates ) { abitrates = strdup("128"); } - if( !arates ) + if( !mixdowns ) { - arates = strdup("48"); + mixdowns = strdup("dpl2"); } - if( !acodecs ) + if( !arates ) { - acodecs = strdup("faac"); + arates = strdup("48"); } - if( !mixdowns ) + if( !dynamic_range_compression ) { - mixdowns = strdup("dpl2"); + dynamic_range_compression = strdup("0.0"); } maxWidth = 480; if( !x264opts ) { - x264opts = strdup("level=30:cabac=0:ref=2:mixed-refs:analyse=all:me=umh:no-fast-pskip=1"); + x264opts = strdup("cabac=0:ref=2:mixed-refs:me=umh"); } job->chapter_markers = 1; } if (!strcmp(preset_name, "AppleTV")) { - mux = HB_MUX_MP4; + if( !mux ) + { + mux = HB_MUX_MP4; + } job->largeFileSize = 1; vcodec = HB_VCODEC_X264; - job->vquality = 0.589999973773956; + job->vquality = 20.0; job->crf = 1; if( !atracks ) { atracks = strdup("1,1"); } - if( !abitrates ) - { - abitrates = strdup("160,auto"); - } - if( !arates ) - { - arates = strdup("48,Auto"); - } if( !acodecs ) { acodecs = strdup("faac,ac3"); } - if( !mixdowns ) - { - mixdowns = strdup("dpl2,auto"); - } - maxWidth = 960; - if( !x264opts ) - { - x264opts = strdup("level=30:cabac=0:ref=3:mixed-refs=1:bframes=6:weightb=1:direct=auto:no-fast-pskip=1:me=umh:subq=7:analyse=all"); - } - pixelratio = 2; - job->chapter_markers = 1; - } - - if (!strcmp(preset_name, "QuickTime")) - { - mux = HB_MUX_MP4; - vcodec = HB_VCODEC_X264; - job->vbitrate = 1800; - if( !atracks ) - { - atracks = strdup("1"); - } if( !abitrates ) { - abitrates = strdup("160"); - } - if( !arates ) - { - arates = strdup("Auto"); - } - if( !acodecs ) - { - acodecs = strdup("faac"); + abitrates = strdup("160,160"); } if( !mixdowns ) { - mixdowns = strdup("dpl2"); - } - if( !x264opts ) - { - x264opts = strdup("ref=3:mixed-refs:bframes=3:weightb:direct=auto:me=umh:subme=7:analyse=all:8x8dct:trellis=1:no-fast-pskip=1:psy-rd=1,1"); - } - pixelratio = 1; - job->chapter_markers = 1; - twoPass = 1; - turbo_opts_enabled = 1; - } - - if (!strcmp(preset_name, "AppleTV Legacy")) - { - mux = HB_MUX_MP4; - job->largeFileSize = 1; - vcodec = HB_VCODEC_X264; - job->vbitrate = 2500; - if( !atracks ) - { - atracks = strdup("1,1"); - } - if( !abitrates ) - { - abitrates = strdup("160,auto"); + mixdowns = strdup("dpl2,auto"); } if( !arates ) { arates = strdup("48,Auto"); } - if( !acodecs ) - { - acodecs = strdup("faac,ac3"); - } - if( !mixdowns ) + if( !dynamic_range_compression ) { - mixdowns = strdup("dpl2,auto"); + dynamic_range_compression = strdup("0.0,0.0"); } + maxWidth = 960; if( !x264opts ) { - x264opts = strdup("bframes=3:ref=1:subme=5:me=umh:no-fast-pskip=1:trellis=1:cabac=0"); + x264opts = strdup("cabac=0:ref=2:mixed-refs=1:bframes=3:me=umh:subme=7:b-adapt=2:8x8dct=1"); } - pixelratio = 1; + pixelratio = 2; job->chapter_markers = 1; } - if (!strcmp(preset_name, "iPhone Legacy")) + if (!strcmp(preset_name, "Normal")) { - mux = HB_MUX_MP4; - job->ipod_atom = 1; + if( !mux ) + { + mux = HB_MUX_MP4; + } vcodec = HB_VCODEC_X264; - job->vbitrate = 960; + job->vquality = 20.0; + job->crf = 1; if( !atracks ) { atracks = strdup("1"); } - if( !abitrates ) - { - abitrates = strdup("128"); - } - if( !arates ) - { - arates = strdup("48"); - } if( !acodecs ) { acodecs = strdup("faac"); } - if( !mixdowns ) - { - mixdowns = strdup("dpl2"); - } - maxWidth = 480; - if( !x264opts ) - { - x264opts = strdup("level=30:cabac=0:ref=1:analyse=all:me=umh:no-fast-pskip=1:trellis=1"); - } - job->chapter_markers = 1; - } - - if (!strcmp(preset_name, "iPod Legacy")) - { - mux = HB_MUX_MP4; - job->ipod_atom = 1; - vcodec = HB_VCODEC_X264; - job->vbitrate = 1500; - if( !atracks ) - { - atracks = strdup("1"); - } if( !abitrates ) { abitrates = strdup("160"); } - if( !arates ) - { - arates = strdup("48"); - } - if( !acodecs ) - { - acodecs = strdup("faac"); - } if( !mixdowns ) { mixdowns = strdup("dpl2"); } - maxWidth = 640; - if( !x264opts ) - { - x264opts = strdup("level=30:bframes=0:cabac=0:ref=1:vbv-maxrate=1500:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1"); - } - job->chapter_markers = 1; - } - - if (!strcmp(preset_name, "Normal")) - { - mux = HB_MUX_MP4; - vcodec = HB_VCODEC_X264; - job->vbitrate = 1500; - if( !atracks ) - { - atracks = strdup("1"); - } - if( !abitrates ) - { - abitrates = strdup("160"); - } if( !arates ) { - arates = strdup("Auto"); - } - if( !acodecs ) - { - acodecs = strdup("faac"); + arates = strdup("48"); } - if( !mixdowns ) + if( !dynamic_range_compression ) { - mixdowns = strdup("dpl2"); + dynamic_range_compression = strdup("0.0"); } if( !x264opts ) { @@ -821,275 +720,206 @@ static int HandleEvents( hb_handle_t * h ) } pixelratio = 1; job->chapter_markers = 1; - twoPass = 1; - turbo_opts_enabled = 1; } - if (!strcmp(preset_name, "Classic")) + if (!strcmp(preset_name, "High Profile")) { - mux = HB_MUX_MP4; - job->vbitrate = 1000; - if( !atracks ) - { - atracks = strdup("1"); - } - if( !abitrates ) + if( !mux ) { - abitrates = strdup("160"); + mux = HB_MUX_MP4; } - if( !arates ) + vcodec = HB_VCODEC_X264; + job->vquality = 20.0; + job->crf = 1; + if( !atracks ) { - arates = strdup("Auto"); + atracks = strdup("1,1"); } if( !acodecs ) { - acodecs = strdup("faac"); - } - if( !mixdowns ) - { - mixdowns = strdup("dpl2"); - } - } - - if (!strcmp(preset_name, "Animation")) - { - mux = HB_MUX_MKV; - vcodec = HB_VCODEC_X264; - job->vbitrate = 1000; - if( !atracks ) - { - atracks = strdup("1"); + acodecs = strdup("faac,ac3"); } if( !abitrates ) { - abitrates = strdup("160"); + abitrates = strdup("160,160"); } - if( !arates ) + if( !mixdowns ) { - arates = strdup("Auto"); + mixdowns = strdup("dpl2,auto"); } - if( !acodecs ) + if( !arates ) { - acodecs = strdup("faac"); + arates = strdup("48,Auto"); } - if( !mixdowns ) + if( !dynamic_range_compression ) { - mixdowns = strdup("dpl2"); + dynamic_range_compression = strdup("0.0,0.0"); } if( !x264opts ) { - x264opts = strdup("ref=5:mixed-refs:bframes=6:weightb:direct=auto:b-pyramid:me=umh:analyse=all:8x8dct:trellis=1:nr=150:no-fast-pskip:filter=2,2:psy-rd=1,1:subme=9"); + x264opts = strdup("ref=3:mixed-refs:bframes=3:weightb:b-pyramid:b-adapt=2:me=umh:subme=9:analyse=all:8x8dct"); } detelecine = 1; decomb = 1; - pixelratio = 1; + pixelratio = 2; job->chapter_markers = 1; - twoPass = 1; - turbo_opts_enabled = 1; } - if (!strcmp(preset_name, "Constant Quality Rate")) + if (!strcmp(preset_name, "Classic")) { - mux = HB_MUX_MKV; - vcodec = HB_VCODEC_X264; - job->vquality = 0.600000023841858; - job->crf = 1; + if( !mux ) + { + mux = HB_MUX_MP4; + } + job->vbitrate = 1000; if( !atracks ) { atracks = strdup("1"); } - if( !abitrates ) + if( !acodecs ) { - abitrates = strdup("auto"); + acodecs = strdup("faac"); } - if( !arates ) + if( !abitrates ) { - arates = strdup("Auto"); + abitrates = strdup("160"); } - if( !acodecs ) + if( !mixdowns ) { - acodecs = strdup("ac3"); + mixdowns = strdup("dpl2"); } - if( !mixdowns ) + if( !arates ) { - mixdowns = strdup("auto"); + arates = strdup("48"); } - if( !x264opts ) + if( !dynamic_range_compression ) { - x264opts = strdup("ref=3:mixed-refs:bframes=3:b-pyramid:weightb:filter=-2,-1:trellis=1:analyse=all:8x8dct:me=umh:subme=9:psy-rd=1,1"); + dynamic_range_compression = strdup("0.0"); } - pixelratio = 1; - job->chapter_markers = 1; } - if (!strcmp(preset_name, "Film")) + if (!strcmp(preset_name, "AppleTV Legacy")) { - mux = HB_MUX_MKV; + if( !mux ) + { + mux = HB_MUX_MP4; + } + job->largeFileSize = 1; vcodec = HB_VCODEC_X264; - job->vbitrate = 1800; + job->vbitrate = 2500; if( !atracks ) { - atracks = strdup("1"); + atracks = strdup("1,1"); + } + if( !acodecs ) + { + acodecs = strdup("faac,ac3"); } if( !abitrates ) { - abitrates = strdup("auto"); + abitrates = strdup("160,160"); } - if( !arates ) + if( !mixdowns ) { - arates = strdup("Auto"); + mixdowns = strdup("dpl2,auto"); } - if( !acodecs ) + if( !arates ) { - acodecs = strdup("ac3"); + arates = strdup("48,Auto"); } - if( !mixdowns ) + if( !dynamic_range_compression ) { - mixdowns = strdup("auto"); + dynamic_range_compression = strdup("0.0,0.0"); } if( !x264opts ) { - x264opts = strdup("ref=3:mixed-refs:bframes=6:weightb:direct=auto:b-pyramid:me=umh:subme=9:analyse=all:8x8dct:trellis=1:no-fast-pskip:psy-rd=1,1"); + x264opts = strdup("bframes=3:ref=1:subme=5:me=umh:no-fast-pskip=1:cabac=0"); } pixelratio = 1; job->chapter_markers = 1; - twoPass = 1; - turbo_opts_enabled = 1; } - if (!strcmp(preset_name, "Television")) + if (!strcmp(preset_name, "iPhone Legacy")) { - mux = HB_MUX_MKV; + if( !mux ) + { + mux = HB_MUX_MP4; + } + job->ipod_atom = 1; vcodec = HB_VCODEC_X264; - job->vbitrate = 1300; + job->vbitrate = 960; if( !atracks ) { atracks = strdup("1"); } - if( !abitrates ) - { - abitrates = strdup("160"); - } - if( !arates ) - { - arates = strdup("Auto"); - } if( !acodecs ) { acodecs = strdup("faac"); } - if( !mixdowns ) - { - mixdowns = strdup("dpl2"); - } - if( !x264opts ) - { - x264opts = strdup("ref=3:mixed-refs:bframes=6:weightb:direct=auto:b-pyramid:me=umh:subme=9:analyse=all:8x8dct:trellis=1:nr=150:no-fast-pskip=1:psy-rd=1,1"); - } - detelecine = 1; - decomb = 1; - pixelratio = 1; - job->chapter_markers = 1; - twoPass = 1; - turbo_opts_enabled = 1; - } - - if (!strcmp(preset_name, "PSP")) - { - mux = HB_MUX_MP4; - job->vbitrate = 1024; - if( !atracks ) - { - atracks = strdup("1"); - } if( !abitrates ) { abitrates = strdup("128"); } - if( !arates ) - { - arates = strdup("48"); - } - if( !acodecs ) - { - acodecs = strdup("faac"); - } if( !mixdowns ) { mixdowns = strdup("dpl2"); } - maxWidth = 368; - maxHeight = 208; - job->chapter_markers = 1; - } - - if (!strcmp(preset_name, "PS3")) - { - mux = HB_MUX_MP4; - vcodec = HB_VCODEC_X264; - job->vbitrate = 2500; - if( !atracks ) - { - atracks = strdup("1"); - } - if( !abitrates ) - { - abitrates = strdup("160"); - } if( !arates ) { arates = strdup("48"); } - if( !acodecs ) + if( !dynamic_range_compression ) { - acodecs = strdup("faac"); - } - if( !mixdowns ) - { - mixdowns = strdup("dpl2"); + dynamic_range_compression = strdup("0.0"); } - job->crop[0] = 0; - job->crop[1] = 0; - job->crop[2] = 0; - job->crop[4] - 0; + maxWidth = 480; if( !x264opts ) { - x264opts = strdup("level=41:me=umh"); + x264opts = strdup("level=30:cabac=0:ref=1:analyse=all:me=umh:no-fast-pskip=1:psy-rd=0,0"); } - pixelratio = 1; + job->chapter_markers = 1; } - if (!strcmp(preset_name, "Xbox 360")) + if (!strcmp(preset_name, "iPod Legacy")) { - mux = HB_MUX_MP4; + if( !mux ) + { + mux = HB_MUX_MP4; + } + job->ipod_atom = 1; vcodec = HB_VCODEC_X264; - job->vbitrate = 2000; + job->vbitrate = 1500; if( !atracks ) { atracks = strdup("1"); } + if( !acodecs ) + { + acodecs = strdup("faac"); + } if( !abitrates ) { abitrates = strdup("160"); } - if( !arates ) + if( !mixdowns ) { - arates = strdup("48"); + mixdowns = strdup("dpl2"); } - if( !acodecs ) + if( !arates ) { - acodecs = strdup("faac"); + arates = strdup("48"); } - if( !mixdowns ) + if( !dynamic_range_compression ) { - mixdowns = strdup("dpl2"); + dynamic_range_compression = strdup("0.0"); } + maxWidth = 640; if( !x264opts ) { - x264opts = strdup("level=40:ref=2:mixed-refs:bframes=3:weightb:subme=9:direct=auto:b-pyramid:me=umh:analyse=all:no-fast-pskip:filter=-2,-1"); - } - pixelratio = 1; + x264opts = strdup("level=30:bframes=0:cabac=0:ref=1:vbv-maxrate=1500:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1:psy-rd=0,0"); } + job->chapter_markers = 1; + } } if ( chapter_markers ) @@ -2102,58 +1932,35 @@ static void ShowPresets() { printf("\n< Apple\n"); - printf("\n + Universal: -e x264 -q 0.589999973773956 -a 1,1 -E faac,ac3 -B 160,auto -R 48,Auto -6 dpl2,auto -f mp4 -X 720 -P -m -x level=30:cabac=0:ref=3:mixed-refs=1:analyse=all:me=umh:no-fast-pskip=1\n"); - - printf("\n + iPod: -e x264 -b 700 -a 1 -E faac -B 160 -R 48 -6 dpl2 -f mp4 -I -X 320 -m -x level=30:bframes=0:cabac=0:ref=1:vbv-maxrate=768:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1\n"); - - printf("\n + iPhone & iPod Touch: -e x264 -q 0.589999973773956 -a 1 -E faac -B 128 -R 48 -6 dpl2 -f mp4 -X 480 -m -x level=30:cabac=0:ref=2:mixed-refs:analyse=all:me=umh:no-fast-pskip=1\n"); + printf("\n + Universal: -e x264 -q 20.0 -a 1,1 -E faac,ac3 -B 160,160 -6 dpl2,auto -R 48,Auto -D 0.0,0.0 -f mp4 -X 720 -P -m -x cabac=0:ref=2:mixed-refs=1:me=umh\n"); - printf("\n + AppleTV: -e x264 -q 0.589999973773956 -a 1,1 -E faac,ac3 -B 160,auto -R 48,Auto -6 dpl2,auto -f mp4 -4 -X 960 -P -m -x level=30:cabac=0:ref=3:mixed-refs=1:bframes=6:weightb=1:direct=auto:no-fast-pskip=1:me=umh:subq=7:analyse=all\n"); + printf("\n + iPod: -e x264 -b 700 -a 1 -E faac -B 160 -6 dpl2 -R 48 -D 0.0 -f mp4 -I -X 320 -m -x level=30:bframes=0:cabac=0:ref=1:vbv-maxrate=768:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1\n"); - printf("\n + QuickTime: -e x264 -b 1800 -a 1 -E faac -B 160 -R Auto -6 dpl2 -f mp4 -p -m -2 -T -x ref=3:mixed-refs:bframes=3:weightb:direct=auto:me=umh:subme=7:analyse=all:8x8dct:trellis=1:no-fast-pskip=1:psy-rd=1,1\n"); + printf("\n + iPhone & iPod Touch: -e x264 -q 20.0 -a 1 -E faac -B 128 -6 dpl2 -R 48 -D 0.0 -f mp4 -X 480 -m -x cabac=0:ref=2:mixed-refs:me=umh\n"); - printf("\n << Legacy\n"); - - printf("\n + AppleTV Legacy: -e x264 -b 2500 -a 1,1 -E faac,ac3 -B 160,auto -R 48,Auto -6 dpl2,auto -f mp4 -4 -p -m -x bframes=3:ref=1:subme=5:me=umh:no-fast-pskip=1:trellis=1:cabac=0\n"); - - printf("\n + iPhone Legacy: -e x264 -b 960 -a 1 -E faac -B 128 -R 48 -6 dpl2 -f mp4 -I -X 480 -m -x level=30:cabac=0:ref=1:analyse=all:me=umh:no-fast-pskip=1:trellis=1\n"); - - printf("\n + iPod Legacy: -e x264 -b 1500 -a 1 -E faac -B 160 -R 48 -6 dpl2 -f mp4 -I -X 640 -m -x level=30:bframes=0:cabac=0:ref=1:vbv-maxrate=1500:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1\n"); - - printf("\n >>\n"); + printf("\n + AppleTV: -e x264 -q 20.0 -a 1,1 -E faac,ac3 -B 160,160 -6 dpl2,auto -R 48,Auto -D 0.0,0.0 -f mp4 -4 -X 960 -P -m -x cabac=0:ref=2:mixed-refs=1:bframes=3:me=umh:subme=7:b-adapt=2:8x8dct=1\n"); printf("\n>\n"); - printf("\n< Basic\n"); + printf("\n< Regular\n"); - printf("\n + Normal: -e x264 -b 1500 -a 1 -E faac -B 160 -R Auto -6 dpl2 -f mp4 -p -m -2 -T -x ref=2:bframes=2:me=umh\n"); + printf("\n + Normal: -e x264 -q 20.0 -a 1 -E faac -B 160 -6 dpl2 -R 48 -D 0.0 -f mp4 -p -m -x ref=2:bframes=2:me=umh\n"); - printf("\n + Classic: -b 1000 -a 1 -E faac -B 160 -R Auto -6 dpl2 -f mp4\n"); + printf("\n + High Profile: -e x264 -q 20.0 -a 1,1 -E faac,ac3 -B 160,160 -6 dpl2,auto -R 48,Auto -D 0.0,0.0 -f mp4 --detelecine --decomb -P -m -x ref=3:mixed-refs:bframes=3:weightb:b-pyramid:b-adapt=2:me=umh:subme=9:analyse=all:8x8dct\n"); printf("\n>\n"); - printf("\n< High Profile\n"); + printf("\n< Legacy\n"); - printf("\n + Animation: -e x264 -b 1000 -a 1 -E faac -B 160 -R Auto -6 dpl2 -f mkv --detelecine --decomb -p -m -2 -T -x ref=5:mixed-refs:bframes=6:weightb:direct=auto:b-pyramid:me=umh:analyse=all:8x8dct:trellis=1:nr=150:no-fast-pskip:filter=2,2:psy-rd=1,1:subme=9\n"); + printf("\n + Classic: -b 1000 -a 1 -E faac -B 160 -6 dpl2 -R 48 -D 0.0 -f mp4\n"); - printf("\n + Constant Quality Rate: -e x264 -q 0.600000023841858 -a 1 -E ac3 -B 160 -R Auto -6 auto -f mkv -p -m -x ref=3:mixed-refs:bframes=3:b-pyramid:weightb:filter=-2,-1:trellis=1:analyse=all:8x8dct:me=umh:subme=9:psy-rd=1,1\n"); + printf("\n + AppleTV Legacy: -e x264 -b 2500 -a 1,1 -E faac,ac3 -B 160,160 -6 dpl2,auto -R 48,Auto -D 0.0,0.0 -f mp4 -4 -p -m -x bframes=3:ref=1:subme=5:me=umh:no-fast-pskip=1:cabac=0\n"); - printf("\n + Film: -e x264 -b 1800 -a 1 -E ac3 -B 160 -R Auto -6 auto -f mkv -p -m -2 -T -x ref=3:mixed-refs:bframes=6:weightb:direct=auto:b-pyramid:me=umh:subme=9:analyse=all:8x8dct:trellis=1:no-fast-pskip:psy-rd=1,1\n"); + printf("\n + iPhone Legacy: -e x264 -b 960 -a 1 -E faac -B 128 -6 dpl2 -R 48 -D 0.0 -f mp4 -I -X 480 -m -x level=30:cabac=0:ref=1:analyse=all:me=umh:no-fast-pskip=1:psy-rd=0,0\n"); - printf("\n + Television: -e x264 -b 1300 -a 1 -E faac -B 160 -R Auto -6 dpl2 -f mkv --detelecine --decomb -p -m -2 -T -x ref=3:mixed-refs:bframes=6:weightb:direct=auto:b-pyramid:me=umh:subme=9:analyse=all:8x8dct:trellis=1:nr=150:no-fast-pskip=1:psy-rd=1,1\n"); + printf("\n + iPod Legacy: -e x264 -b 1500 -a 1 -E faac -B 160 -6 dpl2 -R 48 -D 0.0 -f mp4 -I -X 640 -m -x level=30:bframes=0:cabac=0:ref=1:vbv-maxrate=1500:vbv-bufsize=2000:analyse=all:me=umh:no-fast-pskip=1:psy-rd=0,0\n"); printf("\n>\n"); - - printf("\n< Gaming Consoles\n"); - - printf("\n + PSP: -b 1024 -a 1 -E faac -B 128 -R 48 -6 dpl2 -f mp4 -X 368 -Y 208 -m\n"); - - printf("\n + PS3: -e x264 -b 2500 -a 1 -E faac -B 160 -R 48 -6 dpl2 -f mp4 --crop 0:0:0:0 -p -x level=41:me=umh\n"); - - printf("\n + Xbox 360: -e x264 -b 2000 -a 1 -E faac -B 160 -R 48 -6 dpl2 -f mp4 -p -x level=40:ref=2:mixed-refs:bframes=3:weightb:subme=9:direct=auto:b-pyramid:me=umh:analyse=all:no-fast-pskip:filter=-2,-1\n"); - - printf("\n>\n"); - } /**************************************************************************** |