Kërkoni te Asistenca

Shmangni karremëzime gjoja asistence. S’do t’ju kërkojmë kurrë të bëni një thirrje apo të dërgoni tekst te një numër telefoni, apo të na jepni të dhëna personale. Ju lutemi, raportoni veprimtari të dyshimtë duke përdorur mundësinë “Raportoni Abuzim”.

Learn More

MediaRecorder does not resample Opus input audio

  • 3 përgjigje
  • 1 e ka hasur këtë problem
  • 11 parje
  • Përgjigjja më e re nga 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?

Krejt Përgjigjet (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!