gpt4 book ai didi

iphone - UIVideoEditorController 丢失视频分辨率

转载 作者:太空狗 更新时间:2023-10-30 03:22:26 33 4
gpt4 key购买 nike

我正在尝试使用 UIVideoEditorController 来编辑我的视频,但它似乎失去了我的视频分辨率。我的原始视频是 720 x 1280,但在使用 UIVideoEditorController 后,质量变成了 360 x 640

我尝试将 videoQuality 设置为 UIImagePickerControllerQualityTypeHigh 甚至 UIImagePickerControllerQualityTypeIFrame1280x720,但这没有帮助。

我在 iPad 上工作,这是我的代码:

self.editorController = [[[UIVideoEditorController alloc] init] autorelease];
self.editorController.videoPath = self.tempVideoPath;
self.editorController.delegate = self;
self.editorController.videoQuality = UIImagePickerControllerQualityTypeHigh;

CKLog(@"%d", self.editorController.videoQuality);

self.popOverController = [[[UIPopoverController alloc] initWithContentViewController:self.editorController] autorelease];
self.popOverController.delegate = self;
self.popOverController.popoverContentSize = CGSizeMake(700, 700);
[self.popOverController presentPopoverFromRect:CGRectMake(0, 0, 1, 1) inView:self.videoView permittedArrowDirections:UIPopoverArrowDirectionUp animated:YES];

最佳答案

根据 UIVideoEditorController 文档:

A UIVideoEditorController object, or video editor, manages the system-supplied user interface for trimming video frames from the start and end of a previously recorded movie as well as reencoding to lower quality...

UIVideoEditorController 类有一个名为 videoQuality 的属性。它允许我们在保存修剪后的视频时选择视频质量。 (默认值为 UIImagePickerControllerQualityTypeLow)

UIImagePickerControllerQualityTypeHigh 使用设备上事件相机支持的最高质量视频录制。它看起来好多了,但似乎仍然失去了一些原始分辨率。

关于iphone - UIVideoEditorController 丢失视频分辨率,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8686277/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com