Right now am using RTMPStreamPublisher
to publish the video at wowzaserver its uploading there successfully but can anyone tell me …how can i store the same video at iphone while uploading at server .i need to store at iphone as well as at wowzaserver at same time??
I am using this GitHub Project https://github.com/slavavdovichenko/MediaLibDemos
but there is no much documentation available .if i can just retrieve the data which they sending for publishing then even my work will be successful…
following is the method they using to upload the stream but cant find option from which i can store the same video to my iphone device…
// ACTIONS
-(void)doConnect {
#if 0 // use ffmpeg rtmp
NSString *url = [NSString stringWithFormat:@"%@/%@", hostTextField.text, streamTextField.text];
upstream = [[BroadcastStreamClient alloc] init:url resolution:RESOLUTION_LOW];
upstream.delegate = self;
upstream.encoder = [MPMediaEncoder new];
[upstream start];
socket = [[RTMPClient alloc] init:host]
btnConnect.title = @"Disconnect";
return;
#endif
#if 0 // use inside RTMPClient instance
upstream = [[BroadcastStreamClient alloc] init:hostTextField.text resolution:RESOLUTION_LOW];
//upstream = [[BroadcastStreamClient alloc] initOnlyAudio:hostTextField.text];
//upstream = [[BroadcastStreamClient alloc] initOnlyVideo:hostTextField.text resolution:RESOLUTION_LOW];
#else // use outside RTMPClient instance
if (!socket) {
socket = [[RTMPClient alloc] init:hostTextField.text];
if (!socket) {
[self showAlert:@"Socket has not be created"];
return;
}
[socket spawnSocketThread];
}
upstream = [[BroadcastStreamClient alloc] initWithClient:socket resolution:RESOLUTION_LOW];
#endif
[upstream setVideoOrientation:AVCaptureVideoOrientationLandscapeRight];
//[upstream setVideoOrientation:AVCaptureVideoOrientationLandscapeLeft];
//[upstream setVideoBitrate:512000];
upstream.delegate = self;
[upstream stream:streamTextField.text publishType:PUBLISH_LIVE];
//[upstream stream:streamTextField.text publishType:PUBLISH_RECORD];
//[upstream stream:streamTextField.text publishType:PUBLISH_APPEND];
btnConnect.title = @"Disconnect";
}
///One thing i found taht with instance of BroadcastStreamClient
named as upstream i can get the AVCaptureSession
with the following line
[upstream getCaptureSession]
so can anybody now guide me how to use this AVCaptureSession
for recording the video on iphone
Please guide me…