muaz-khan / RecordRTC

RecordRTC is WebRTC JavaScript library for audio/video as well as screen activity recording. It supports Chrome, Firefox, Opera, Android, and Microsoft Edge. Platforms: Linux, Mac and Windows.
https://www.webrtc-experiment.com/RecordRTC/
MIT License
6.46k stars 1.75k forks source link

Using Chrome on Mac it always records the file as video/x-matroska #806

Closed brayann closed 2 years ago

brayann commented 2 years ago

I am specifying the type to be video/mp4 but it always generates the file as video/x-matroska, I also tried with mpeg and got same results. Any ideas why?

    createRecorder (stream) {
      const options = {
        type: 'video',
        mimeType: 'video/mp4',
        timeSlice: 1000
      }
      // create and return a RecordRTC instance.
      return RecordRTC(stream, options)
    }

Here's the error on console:

Screen Shot 2022-06-05 at 21 51 42

Version is 5.6.1, I tried updating to 5.6.2 but it didn't change anything.

On Firefox it works normally.

brayann commented 2 years ago

Got it working by setting video/webm;codecs=vp8 as mimeType.