I use AVFoundation to record video.
I set video orientation: [captureConnection setVideoOrientation:AVCaptureVideoOrientationPortrait];
When i record video, the output video looks like this:
But then when I rotate my device it looks like this:
I want my video always like the first image even when rotate device. What I have to do? Thanks in advance
答案 0 :(得分:0)
答案 1 :(得分:0)
Did u try this:
if ([captureConnection isVideoOrientationSupported])
{
[captureConnection setVideoOrientation: AVCaptureVideoOrientationPortrait];
}
答案 2 :(得分:0)
相机捕获的像素缓冲区仍然以捕获它们的方向布局。许多视频播放器不会检查首选方向元数据标签,只会以原始像素方向播放文件。使用AVCaptureSession它可能会帮助你.. 请查看以下链接..
https://developer.apple.com/library/ios/qa/qa1744/_index.html