0

I have a webapp. The client uses webrtc and recorder js to record video and audio. The javascript sends me the base64 version of the video and audio seperatly.

How should i proceed in create a video using just the base64 data of the seperate video and audio data.

I am using java in the server.

seshan
  • 99
  • 2
  • 11

1 Answers1

1

Using RecordRTC; you can get recorded "Blobs" that can be submitted to the server as XHR/FormData. See an example.

Then you can parse the request and write file to disk using System.out.println. See this answer for how to write posted-Blob to disk.

Community
  • 1
  • 1
Muaz Khan
  • 7,138
  • 9
  • 41
  • 77
  • Uncaught ReferenceError: blob is not defined – seshan Jan 20 '14 at 11:35
  • 1
    Did you get "Blob" like this? https://github.com/muaz-khan/WebRTC-Experiment/tree/master/RecordRTC#how-to-get-blob-object – Muaz Khan Jan 20 '14 at 13:00
  • It worked. My question to you goes like does Record-RTC together is also capable of capturing audio ?? My recording is set to go to a length of about 3-4 mins – seshan Jan 20 '14 at 13:35
  • You should try "MRecordRTC" which stands for multi-recordrtc; which records both audio/video and gif. https://github.com/muaz-khan/WebRTC-Experiment/tree/master/RecordRTC/MRecordRTC You'll face some sync issues though; you're suggested to try this demo: https://github.com/muaz-khan/WebRTC-Experiment/tree/master/RecordRTC/RecordRTC-to-Nodejs – Muaz Khan Jan 20 '14 at 13:52
  • but MRecordRTC saves the data to node.js. But in my case i just want the recorded file to get saved in a local server. so is is possible to send the the files seperately (as webm and wav) and just use your mergger.sh – seshan Jan 20 '14 at 14:10
  • You can see that both wav/webm blobs are submitted to PHP server as two unique XHR/JSON/FormData requests. You can easily use it with ruby, python, or locally within any platform: https://github.com/muaz-khan/WebRTC-Experiment/tree/master/RecordRTC/RecordRTC-to-PHP#javascript-code – Muaz Khan Jan 20 '14 at 15:14
  • All working good. One problen i find here again is the video blob stored on the disk pops up this error "Could not determine type of stream." – seshan Jan 21 '14 at 07:00