Swift video recording settings video compression quality, resolution examples

Source: Internet
Author: User


In previous small video recording articles, we used avassetexportsession to compress the merged video output into a final video file. High-quality compression (avassetexportpresethighestquality) was used at that time.


Let exporter = avassetexportsession (Asset:composition,
presetname:avassetexportpresethighestquality)!

Of course, in addition to avassetexportpresethighestquality, there are many other settings video resolution (Export preset) for us to choose to use. For example, in order to facilitate transmission, save bandwidth, you can turn the video into a low resolution.

1, fixed resolution preset properties

(1) avassetexportpreset640x480: Set video resolution 640x480
(2) avassetexportpreset960x540: Set video resolution 960X540
(3) avassetexportpreset1280x720: Set video resolution 1280X720
(4) avassetexportpreset1920x1080: Set video resolution 1920x1080
(5) avassetexportpreset3840x2160: Set video resolution 3840X2160

2, relative quality preset properties

(1) avassetexportpresetlowquality: Low quality
(2) Avassetexportpresetmediumquality: Medium quality
(3) Avassetexportpresethighestquality: High quality

This setting means that the resulting video resolution is related to the specific shooting device. Like IPhone6 's video:
Using Avassetexportpresethighestquality, the video resolution is 1920x1080 (not compressed).
Avassetexportpresetmediumquality Video resolution is 568x320
Avassetexportpresetlowquality Video resolution is 224x128

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.