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

MediaRecorder iOS does not obey the bitrate #793

Open
maxcodefaster opened this issue Dec 25, 2021 · 1 comment
Open

MediaRecorder iOS does not obey the bitrate #793

maxcodefaster opened this issue Dec 25, 2021 · 1 comment

Comments

@maxcodefaster
Copy link

I'm using MediaRecorder to record video from webcam and in case of safari (or iOS Chrome) output is mp4 file. The issue is that video from iOS chrome has huge bitrate.

Using recordrtc library, this code:

this.recorder = new RecordRTCPromisesHandler(new MediaStream([
      this.ownStream.getVideoTracks()[0],
      this.ownStream.getAudioTracks()[0]
    ]), {
      type: 'video',
      mimeType: 'video/mp4',
      recorderType: MediaStreamRecorder,
      audioBitsPerSecond: 48 * 1024,
      videoBitsPerSecond: 384 * 1024,
    });
await this.recorder.startRecording();

creates mp4 successfully, but result bitrate of output video is 92643 kb/s for 10 FPS video!

Full ffprobe output:

Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'input.mp4': Metadata: major_brand : iso5 minor_version : 1 compatible_brands: isomiso5hlsf creation_time : 2021-12-14T14:52:28.000000Z Duration: 00:00:00.59, start: 0.000000, bitrate: 92643 kb/s Stream #0:0(und): Video: h264 (Baseline) (avc1 / 0x31637661), yuvj420p(pc), 640x480, 97341 kb/s, 10.14 fps, 20 tbr, 600 tbn, 1200 tbc (default) Metadata: rotate : 90 creation_time : 2021-12-14T14:52:28.000000Z handler_name : Core Media Video Side data: displaymatrix: rotation of -90.00 degrees Stream #0:1(und): Audio: aac (LC) (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 2552 kb/s (default) Metadata: creation_time : 2021-12-14T14:52:28.000000Z handler_name : Core Media Audio

@dosdemon
Copy link

dosdemon commented May 1, 2024

Did you find any solution for it?

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