Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can't save as h264 #163

Open
oa495 opened this issue Jun 19, 2018 · 1 comment
Open

can't save as h264 #163

oa495 opened this issue Jun 19, 2018 · 1 comment

Comments

@oa495
Copy link

oa495 commented Jun 19, 2018

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

@rogerbage
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants