Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

86
Views
Getting raw opus from MediaRecorder

Okay, I'm getting audio from the MediaRecorder as follows:

if (navigator.mediaDevices && navigator.mediaDevices.getUserMedia) {
    navigator.mediaDevices.getUserMedia(
    // constraints - only audio needed for this app
    {
        audio: 
        { sampleSize: 16, channelCount: 1, sampleRate: 16000 }
    })

    // Success callback
    .then(function (stream) {
        mediaRecorder = new MediaRecorder(stream);
        mediaRecorder.ondataavailable = function (e) {
            if(e.data)
                socket.send(e.data);
        }
        streamstart();
    }) ... 

As I understand, this data available in the callback contains a WebM audio format with opus encoding (Chrome). This I'm sending to my Win32 application in order to transfer the sound from the phone's microphone to it.

Now, I could use libebml to decode this information, but, is there any way to get the raw opus data bytes from it (i.e. to decode in JavaScript)? To avoid wasted bandwidth.

I believe that Opus Media Recorder can't help , it simply converts any sort of non-opus to Webm-based opus, not raw opus stream.

about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!