某些浏览器中的视频方向不正确

时间:2014-02-27 22:31:20

标签: ios objective-c ios7

我正在使用UIImagePickerController捕获视频,然后将其上传到网站。问题是,如果我以除左下方向之外的任何方向录制它,视频会在除Safari之外的每个浏览器上以不同的方向显示。所以我认为这是一个元数据问题。

是否有办法在录制视频之前或之后重新编码或旋转整个视频?

UIImagePickerController *videoPickerController = [[UIImagePickerController alloc] init];
                [videoPickerController setSourceType:UIImagePickerControllerSourceTypeCamera];
                [videoPickerController setDelegate:self];
                [videoPickerController setModalPresentationStyle:UIModalPresentationFullScreen];
                [videoPickerController setMediaTypes:[[NSArray alloc] initWithObjects: (NSString *) kUTTypeMovie, nil]];
                [videoPickerController setAllowsEditing:YES];

                [self presentViewController:videoPickerController animated:YES completion:nil];

要获取我使用的视频

- (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info
{
    self.videoURL = info[UIImagePickerControllerMediaURL];
}

0 个答案:

没有答案