Sök i support

Akta dig för supportbedrägerier: Vi kommer aldrig att be dig att ringa eller skicka ett sms till ett telefonnummer eller dela personlig information. Rapportera misstänkt aktivitet med alternativet "Rapportera missbruk".

Läs mer

MediaRecorder does not resample Opus input audio

  • 3 svar
  • 1 har detta problem
  • 1 visning
  • Senaste svar av raycarino

more options

I'm on firefox 59. My microphone records audio at a sample rate of 44.1khz. Per OpusTrackEncoder https://github.com/mozilla/gecko-dev/blob/a341b32d064bafac5422f72fef6afe740045105c/dom/media/encoder/OpusTrackEncoder.cpp#L162 and this bug https://bugzilla.mozilla.org/show_bug.cgi?id=922247, I would have expected a MediaRecorder to emit ogg-opus audio at 48khz, but it's still 44.1khz after inspecting the ogg header.

Am I wrong in undrestanding that MediaRecorder should resample to 48khz if the microphone's sample rate is non-standard?

I'm on firefox 59. My microphone records audio at a sample rate of 44.1khz. Per OpusTrackEncoder https://github.com/mozilla/gecko-dev/blob/a341b32d064bafac5422f72fef6afe740045105c/dom/media/encoder/OpusTrackEncoder.cpp#L162 and this bug https://bugzilla.mozilla.org/show_bug.cgi?id=922247, I would have expected a MediaRecorder to emit ogg-opus audio at 48khz, but it's still 44.1khz after inspecting the ogg header. Am I wrong in undrestanding that MediaRecorder should resample to 48khz if the microphone's sample rate is non-standard?

Alla svar (3)

more options

Forgot to mention that I'm using the MediaRecorder like so: https://developer.mozilla.org/en-US/docs/Web/API/MediaRecorder#Example

more options

This topic might be beyond the expertise of this forum. There is a developer mailing list for media-related topics that might be a good place to try next:

https://lists.mozilla.org/listinfo/dev-media

more options

Thank you jscher2000!