Open zhuochun opened 11 years ago
RecordRTC's current mechanism is incapable to record both audio and video streams in a single file.
Audio is recorded using Web Audio APIs where onaudioprocess
is returning AudioBuffer
objects.
Video or GIF is recorded using Canvas2D; where canvas.toDataURL
is used to get the DataURL.
Using FileReader
API, we can get DataURL from audio buffers too; however it is not easy to merge two unique DataURLs to get appropriate result.
I am trying to edit based on your RecordRTC to support video and audio recording together. I want to ask is the setBlob
function always needed to get the real blob? It seems to do outputting as a temporary file only.
What I do now is just save the blob:
this.videoBlob = Whammy.fromImageArray(frames, 1000 / 60);
and
recorder.exportWAV(function(blob) {
this.audioBlob = blob;
}.bind(this));
The blob files uploaded to server do not have any images or sound in it.
There is a PHP-based solution (i.e. avconv
modules) that allows us merge WAV
/WebM
and output a single MKV
. I'll add that solution in this repository: MediaStreamRecorder.js
Please i'll be very grateful, i've been searching for that solution for a while, Muaz-khan thanks
Thanks @muaz-khan based on RecordRTC
and MediaStreamRecorder
, I created mine at record-rtc-together
Hi, muaz
Is there a way to record the video and audio together and output as one file?
Thanks.