Comments (7)
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.
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.
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.
Have you had any luck with this?
from apprtc-ios.
Any updates, did anyone find a way to store the session locally ? @wumbo @theiosdevguy @coolwr
from apprtc-ios.
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.
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)
- IOS Native App for WebRTC
- Error posting data: The network connection was lost.
- Xcode 10 issue with -lstdc++.6 HOT 3
- Call freezed then ended automatically
- [__NSSingleEntryDictionaryI length]: unrecognized selector sent to instance 0x281de6360 ??
- Voice is not exchanging between peers with CallKit
- Thread 1: EXC_BAD_ACCESS (code=1, address=0x0) When add stream to peerconnection
- Unknown selected data source for Port Speaker (type: Speaker)
- Failed to set remote video description send parameters HOT 1
- project successfully build but doesn't run HOT 3
- iceRestart option in createOffer
- I want to remove Echo and Noise, but didn't success
- failed to create session description webrtc in ios
- Local video doesn't be rendered. It doesn't be sent to remote machine on IOS 13 HOT 23
- How to capture a local vidoe stream apply filter and and share with peer
- How to use this project on the Swift? HOT 4
- local and remote video not call delegate function HOT 1
- how can i run this code HOT 4
- Can I use this to chat with ordinary pictures and texts at the same time
- one-to-one videos
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from apprtc-ios.