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

Unable to pass bitrate to Media Recorder API on Safari #825

Open Baldur10 opened 1 year ago

Baldur10 commented 1 year ago

Tested on: Safari: ver. 16.1 (18614.2.9.1.12) Chrome: 107.0.5304.110 (Official Build) (arm64)

So my firm relies on RecordRTC for our video recording app. We noticed that the files being recorded on Safari were much larger than than those on Chrome due to having almost 5 times the bitrate. Upon further investigation, we narrowed the issue down to:

  1. Safari as of yet not supporting webm (18 Nov, 2022)

    image
  2. This throws an error

image
  1. Which is caught by the following statement
try {
       mediaRecorder = new MediaRecorder(mediaStream, recorderHints);
       // reset
       config.mimeType = recorderHints.mimeType;

    } catch (e) {
      // chrome-based fallback
      mediaRecorder = new MediaRecorder(mediaStream);
}
  1. Thus, the specified bitrate isn't passed to the Media Recorder API and default bitrate is selected. This behaviour can be observed in the live demo website as well.
geonyeong commented 8 months ago

해당 문제는 ios 15.x 버전(아마도 그 이하 버전들)에서 발생하는 문제입니다. 나는 여러 시도를 했지만, 해결법을 찾지는 못했습니다. 그냥 ios 버전을 17.x로 올리니까 해결이 되었습니다. 아마도 16.x버전으로 올려도 해결이 될 수 있을 겁니다. 사용자들에게 ios 버전을 업그레이드 하라고 메세지를 띄우는 것이 현명합니다. 다만, 녹화 옵션의 값을 조정해도 그것이 적용되지는 않습니다.

dosdemon commented 2 months ago

Tested on: Safari: ver. 16.1 (18614.2.9.1.12) Chrome: 107.0.5304.110 (Official Build) (arm64)

So my firm relies on RecordRTC for our video recording app. We noticed that the files being recorded on Safari were much larger than than those on Chrome due to having almost 5 times the bitrate. Upon further investigation, we narrowed the issue down to:

  1. Safari as of yet not supporting webm (18 Nov, 2022)
image
  1. This throws an error
image
  1. Which is caught by the following statement
try {
       mediaRecorder = new MediaRecorder(mediaStream, recorderHints);
       // reset
       config.mimeType = recorderHints.mimeType;

    } catch (e) {
      // chrome-based fallback
      mediaRecorder = new MediaRecorder(mediaStream);
}
  1. Thus, the specified bitrate isn't passed to the Media Recorder API and default bitrate is selected. This behaviour can be observed in the live demo website as well.

Did you find any solution for this issue?