hardman / AWLive

最简单的iOS 推流代码,视频捕获,软编码(faac,x264),硬编码(aac,h264),横屏直播,美颜,flv编码,rtmp协议,blog内陆续更新代码解析,你想学的知识这里都有,愿意懂直播技术的同学快来看!!
Apache License 2.0
696 stars 194 forks source link

With landscape rotation on screen, the pushed stream shows distortion as attached. #6

Closed jjksam closed 6 years ago

jjksam commented 7 years ago

With landscape rotation on screen, the pushed stream shows distortion as attached. I've change the init to this. _captureManager.videoConfig.orientation = UIInterfaceOrientationLandscapeRight;

Attached image is a black pencil on white desk.

rotate
jjksam commented 7 years ago

It's no need to rotate the image, it will be slower, we just need to set the [AVCaptureConnection setVideoOrientation:AVCaptureVideoOrientationLandscapeRight] or

//屏幕方向
if (self.videoConfig.orientation == UIInterfaceOrientationLandscapeRight) {
    _videoCamera.outputImageOrientation = UIInterfaceOrientationLandscapeRight;
} else {
    _videoCamera.outputImageOrientation = UIInterfaceOrientationPortrait;
}
hardman commented 6 years ago

已解决