Tìm kiếm hỗ trợ

Tránh các lừa đảo về hỗ trợ. Chúng tôi sẽ không bao giờ yêu cầu bạn gọi hoặc nhắn tin đến số điện thoại hoặc chia sẻ thông tin cá nhân. Vui lòng báo cáo hoạt động đáng ngờ bằng cách sử dụng tùy chọn "Báo cáo lạm dụng".

Learn More

MediaRecorder does not resample Opus input audio

  • 3 trả lời
  • 1 gặp vấn đề này
  • 7 lượt xem
  • Trả lời mới nhất được viết bởi 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?

Tất cả các câu trả lời (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!