slavavdovichenko / MediaLibDemos

98 stars 25 forks source link

How to store video in Iphone while publishig video with RTMPStreamPublisher? #14

Open BhavikKama opened 10 years ago

BhavikKama commented 10 years ago

Hi, 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??

inal commented 9 years ago

Hi,

I also want to do the same thing. Can u help??

slavavdovichenko commented 9 years ago

Hi,

BroadcastStreamClient class has @property (nonatomic, assign) id delegate; MPIMediaStreamEvent protocol has optional method -(void)pixelBufferShouldBePublished:(CVPixelBufferRef)pixelBuffer timestamp:(int)timestamp; which is invoked every time when the video frame have been sent to the server.

You can set the delegate property with instance implementing pixelBufferShouldBePublished: method - and save the CVPixelBufferRef frames to file (for example, as it made in AVCam or RosyWriter samples from Apple iOS Developer Library).