RecordRTC: WebRTC audio/video recording ® Muaz Khan

Copyright © 2013 Muaz Khan<@muazkh> » @WebRTC Experiments » Google+ » What's New?

Record Audio

Record Video





Record video as animated gif image:

Feedback

Enter your email too; if you want "direct" reply!

You can record audio in wav/ogg file format; and video in either webm format or as animated GIF image.

How to use RecordRTC?

<script src="https://www.webrtc-experiment.com/RecordRTC.js"></script>

How to record audio using RecordRTC?

var recordRTC = RecordRTC(mediaStream);
recordRTC.startRecording();
recordRTC.stopRecording(function(audioURL) {
   window.open(audioURL);
});

How to record video using RecordRTC?

var options = {
   type: 'video',
   video: {
      width: 320,
      height: 240
   },
   canvas: {
      width: 320,
      height: 240
   }
};
var recordRTC = RecordRTC(mediaStream, options);
recordRTC.startRecording();
recordRTC.stopRecording(function(videoURL) {
   window.open(videoURL);
});

How to record animated GIF using RecordRTC?

var options = {
   type: 'gif',
   video: {
      width: 320,
      height: 240
   },
   canvas: {
      width: 320,
      height: 240
   },
   frameRate: 200,
   quality: 10
};
var recordRTC = RecordRTC(mediaStream, options);
recordRTC.startRecording();
recordRTC.stopRecording(function(gifURL) {
   window.open(gifURL);
});

Possible issues/failures:

The biggest issue is that RecordRTC is unable to record both audio and video streams in single file.

Do you know "RecordRTC" fails recording audio because following conditions fails:

  1. Sample rate and channel configuration must be the same for input and output sides on Windows i.e. audio input/output devices must match
  2. Only the Default microphone device can be used for capturing.
  3. The requesting scheme is must be one of the following: http, https, chrome, extension's, or file (only works with --allow-file-access-from-files)
  4. The browser must be able to create/initialize the metadata database for the API under the profile directory

RecordRTC is MIT licensed on Github! Documentation

Latest Updates