2/9/2015

From SightCall Labs: Cloud Recording WebRTC to S3

Katie Smart's profile picture
Katie Smart Sr. Manager, Global Marketing Communications
SightCall makes it easy to include realtime video communications in your website or mobile app. But in some applications, it's important to be able to record a conversation or meeting for future reference. We often get this request from companies implementing Tele-Consultation types of applications. Whether it is for a HIPAA-compliant online medical consultation or online customer-service event, companies need to retain a record of the encounter for later referral. SightCall's recording architecture is designed to be implemented entirely in the cloud. While there are interesting uses for recording a WebRTC session from the browser of a user (see for instance https://www.webrtc-experiment.com/RecordRTC/), there are some negatives to this approach. Our recording architecture leverages our cloud-based Conference Bridge, or MCU (Multipoint Control Unit). When your application needs recording, it can schedule a video call using one of our virtual MCUs. As an option, our MCU can produce an output recording stream. The stream can be sent to one of your servers, or can be directed to our Cloud Recorder. [caption id="attachment_11403" align="aligncenter" width="720"]The Cloud Recorder receives the stream to create a movie The Cloud Recorder receives a Stream and stores a Movie in a Bucket[/caption]

How It Works

In the SightCall system, to schedule a conference call using an MCU, you first call createMeetingPoint. A meeting point is an object that represents a place where users congregate. A meeting point has a Host, who has elevated privileges. The host can invite Users on the fly, or Users can send the Host messages asking to join a Meeting Point. As Users gather around a Meeting Point they are placed in the list of those waiting to talk. This type of "invitation" messaging can begin even before the video of the session starts. When the Host is ready, he starts a video session by calling the host method to begin the call. This is the method that causes a virtual MCU to be allocated for the meeting. See below for a sketch of the Javascript.
meetingPoint = rtcc.CreateMeetingPoint();
meetingPoint.invite('john');
meetingPoint.invite('betty');
meetingPoint.host();
At any point before or during the conference call, the Host can start recording by calling a method on the RtccCall object created by the host operation.
rtccCall.recordStart(destination)
The destination is an HTTP endpoint that is configured to receive a SightCall recording stream. The stream contains information that the MCU has about the conference. It contains the audio mix-down of all participants, and the video stream from the Active Speaker. It may also include screen-share streams as well as video streams from the "non-Active" participants.

The Cloud Recorder

The job of the Cloud Recorder is to capture a raw stream and to create a movie. SightCall provides a basic Cloud Recording function for a fee, or you can use our source code to build your own and run it where you would like. The Cloud Recorder runs a background job to process the raw stream and perform the compositing. Compositing is the video process that arranges the video feeds on screen in a way that you like. You might prefer a 'Brady-Bunch' effect, where the heads of all participants are shown at all times, or your application may be better handled by a movie that composites Data and Screen-Share with the people off to the side. SightCall can get you started with a simple compositor from which you can build upon. Lastly, the Cloud Recorder moves the composited movie into an Amazon S3 bucket. The default policy with our CloudRecorder is to retain a movie for a few days in the SightCall Bucket. Alternatively, your account can be configured to store movies in your own S3 Bucket or Azure Container. [caption id="attachment_11404" align="alignnone" width="719"]Conference recordings benefit from application-specific compositing Conference Recordings benefit from Application-Specific Compositing[/caption]

See it in Action

Visit our demonstration "Video Help Desk" application using two people: one to be an Help Desk Agent, and one to be a website Visitor. Send the Agent to http://sightcall-helper.herokuapp.com and log in as "agent1" or "agent2". (See the Github Readme to get the passwords.) Send the Visitor to http://sightcall-helper.herokuapp.com/demo/plain and ask them to click on the "Video Assistance" link. From there, the an Agent can ask to Visitor to video chat and can record the encounter too.

Conclusion

SightCall's recording solution is simple enough that you can get started quickly, but open enough to allow you to create an archive movie appropriate for your application. We provide you all of the source code building blocks to get going quickly. Check out our demo apps running on Heroku and see how recordings works. See Also: Javascript MediaStream Recording API: http://www.w3.org/TR/mediastream-recording/ BlogGeek.me - Requested Features: Recording: https://bloggeek.me/webrtc-business-online/ch07/#_2

Next Up