Giter Club home page Giter Club logo

Comments (7)

theiosdevguy avatar theiosdevguy commented on September 24, 2024 1

Thanks @coolwr . I tried fetching the captureSession from RTCAVFoundationVideoSource.h. But strangely, the code below in createLocalVideoTrack of class ARDAppClient shows different objects of videoSource.

RTCAVFoundationVideoSource *videoSource = [[RTCAVFoundationVideoSource alloc] initWithFactory:_factory constraints:mediaConstraints];

localVideoTrack = [_factory videoTrackWithID:@"ARDAMSv0" source:videoSource];

In the code above, you will notice that localVideoTrack.source is different object than videoSource. This ideally should not be the case. Or please let me know if I am missing something here.

from apprtc-ios.

theiosdevguy avatar theiosdevguy commented on September 24, 2024 1

I somehow hacked the above mentioned problem using KVC. But now the main issue is that I am unable to add output to AVCaptureSession. Reason [_session canAddOutput:self.videoDataOutput] always return false. And also if I change the videoOutput, how will the video stream

from apprtc-ios.

coolwr avatar coolwr commented on September 24, 2024

In the RTCAVFoundationVideoSource.h you'll find a reference to the AVCaptureSession. Using the captureSession property you'll be able to call addOutput to an AVCaptureVideoDataOutput object that would allow you to write to a file to record video. You can do the same with audio.

There are a number of tutorials online related to camera video recording that you should be able to integrate with this WebRTC implementation that uses the above AVFoundation references. I hope that helps.

from apprtc-ios.

wumbo avatar wumbo commented on September 24, 2024

Have you had any luck with this?

from apprtc-ios.

saifdj avatar saifdj commented on September 24, 2024

Any updates, did anyone find a way to store the session locally ? @wumbo @theiosdevguy @coolwr

from apprtc-ios.

wumbo avatar wumbo commented on September 24, 2024

Yes, have a look at my fork here. In ARTCVideoChatViewController.m you can see that I call [self.localVideoTrack addRenderer:self.videoProcessor];

VideoProcessor is a custom class that implements the RTCVideoRenderer protocol. Its -(void) renderFrame:(RTCI420Frame *)frame method will get called every time there's a new frame.

Here you'll get the frame in RTCI420Frame format which uses the YUV color space. I used OpenCV to convert the frame to a cv::Mat in RGB color space, because I was using it to do some image processing. I also used OpenCV to convert it to a UIImage afterwards.

Obviously this just gives you all the frames as images, not as a video, but I don't imagine it would be too difficult to convert them to a video.

from apprtc-ios.

saifdj avatar saifdj commented on September 24, 2024

Thanks for your quick response @wumbo ,

As you said we could get frames from VideoProcessor, which are series of images i guess.

but i need to save only audio file of the conversation. (not video). Please let me know if you have done it before.

from apprtc-ios.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.