Difference between various AVAssetExportPreset

2020-07-17 05:10发布

I am compressing video so i have come across following Export Presets

AVAssetExportPresetLowQuality
AVAssetExportPresetMediumQuality
AVAssetExportPresetHighestQuality

AVAssetExportPreset640x480
AVAssetExportPreset960x540
AVAssetExportPreset1280x720
AVAssetExportPreset1920x1080
AVAssetExportPreset3840x2160

I have read about all of them in apple documents and found that second list compressed in given fixed dimensions but found nothing about first list , i am confused that why it has 2 lists one with low, medium and high quality and other with fixed sizes and which one is better to use?

1条回答
▲ chillily
2楼-- · 2020-07-17 05:50

The AVAssetExportPreset containing below available preset names.

1. Export Preset Names for Device-Appropriate QuickTime Files

AVAssetExportPresetLowQuality - Specifies a low quality QuickTime file.
AVAssetExportPresetMediumQuality - Specifies a medium quality QuickTime file.
AVAssetExportPresetHighestQuality - Specifies a high quality QuickTime file.

You use these export options to produce QuickTime .mov files with video size appropriate to the current device.

2. Export Preset Names for QuickTime Files of a Given Size

AVAssetExportPreset640x480
AVAssetExportPreset960x540
AVAssetExportPreset1280x720
AVAssetExportPreset1920x1080
AVAssetExportPreset3840x2160

You use these export options to produce QuickTime .mov files with a specified video size.

3. Export Preset Name for iTunes Audio

AVAssetExportPresetAppleM4A

You use this export option to produce an audio-only .m4a file with appropriate iTunes gapless playback data.

4. Export Preset Name for Pass-Through

AVAssetExportPresetPassthrough

You use this export option to let all tracks pass through.This option does not show up in the allExportPresets() and exportPresets(compatibleWith:) methods.

查看更多
登录 后发表回答