MediaStreamRecorder icon indicating copy to clipboard operation
MediaStreamRecorder copied to clipboard

can't save as h264

Open oa495 opened this issue 7 years ago • 1 comments

function startRecording() {
    try {
      var stream = canvas.elt.captureStream(); // frames per second
      mediaRecorder = new MediaStreamRecorder(stream);
      mediaRecorder.mimeType = format; 
    } catch (e) {
      console.error('Exception while creating MediaRecorder: ' + e);
      alert('Exception while creating MediaRecorder: '
        + e + '. mimeType: ');
      return;
    }
    mediaRecorder.onstop = handleStop;
    mediaRecorder.ondataavailable = handleDataAvailable;
    mediaRecorder.start(5000); // collect 10ms of data
    console.log('MediaRecorder started', mediaRecorder);
}

function download() {
  mediaRecorder.save();
}

I've tried format = 'video/mp4', format = 'video/mp4; codecs="avc1.42E01E, mp4a.40.2"' and format="video/mp4;codecs=H264"

won't open on twitter or quicktime

oa495 avatar Jun 19 '18 15:06 oa495

Hi. MediaRecorder on Firefox an Chrome don't have support do mp4. I have the same issue. You can save as a mp4, sending to blob as mp4, but when you see de metadatas of the file, is Webm. But Iphone with Safari don't play mp4. That's my problem. Do you find any solution to this?

rogerbage avatar Feb 22 '23 22:02 rogerbage