如何在ios中录制时上传视频

时间:2015-11-10 09:26:19

标签: ios iphone video rtmp live-streaming

您好我正在开发基于广播的应用程序我能够使用videocore和vcsimplesession使用以下代码捕获视频

 _session = [[VCSimpleSession alloc] initWithVideoSize:CGSizeMake(320, 258) frameRate:30 bitrate:200000 useInterfaceOrientation:NO cameraState:_session.cameraState];
[self.previewView addSubview:_session.previewView];
_session.previewView.frame = self.previewView.bounds;
_session.delegate = self;

switch(_session.rtmpSessionState)
{
    case VCSessionStateNone:[_session continuousAutofocus];
    case VCSessionStatePreviewStarted:
    case VCSessionStateEnded:
    case VCSessionStateError:
        NSLog(@"///////////////////////////////////////////////vcsession error%ld",(long)VCSessionStateError);
        [_session startRtmpSessionWithURL:@"rtmp://zzz.tv"
                             andStreamKey:@"sA"];
        //[self bitrate];
        break;
    default:
        [_session endRtmpSession];
        break;

}

我通过wowza服务器使用广播的RTMP 但我希望上传该视频,同时录制到php服务器那里我会得到广播的网址我提到了一些链接,如cmsamplerbuffer但我不知道如何逐帧上传视频,所以可以任何身体请告诉我

0 个答案:

没有答案