# How to figure out supported MediaRecorder audio mimetypes?

**URL:** <https://discourse.mozilla.org/t/how-to-figure-out-supported-mediarecorder-audio-mimetypes/29422>\
**Category:** Firefox Development\
**Created:** [June 15, 2018, 6:19pm UTC](https://discourse.mozilla.org/t/how-to-figure-out-supported-mediarecorder-audio-mimetypes/29422 "2018-06-15T18:19:38Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![sh4dow](https://avatars.discourse-cdn.com/v4/letter/s/d6d6ee/32.png) [@sh4dow](https://discourse.mozilla.org/u/sh4dow)\
**Post date:** [June 15, 2018, 6:19pm UTC](https://discourse.mozilla.org/t/how-to-figure-out-supported-mediarecorder-audio-mimetypes/29422/1 "2018-06-15T18:19:38Z")

</div>

I’ve been doing trial & error but it’s quite annoying:

19:38:26.407 MediaRecorder.isTypeSupported(‘audio/webm’)  
19:38:26.369 false  
19:38:39.670 MediaRecorder.isTypeSupported(‘audio/webm;codecs=opus’)  
19:38:39.623 false  
19:39:09.886 MediaRecorder.isTypeSupported(‘audio/webm;codecs=opus’)  
19:39:09.848 false  
19:39:28.301 MediaRecorder.isTypeSupported(‘audio/webm;codecs=pcm’)  
19:39:28.260 false  
19:40:26.589 MediaRecorder.isTypeSupported(‘audio/ogg’)  
19:40:26.549 true  
19:42:13.451 MediaRecorder.isTypeSupported(‘audio/pcm’)  
19:42:13.405 false

Right now, I’m checking out the full firefox repo in the hopes that  
I’ll be able to find references to these container/codec  
specifications in the source somewhere. (But I guess you immediately  
split that string, so I will be out of luck when searching something  
like “audio/webm”…)

---

<div class="post-metadata">

**Author:** ![sh4dow](https://avatars.discourse-cdn.com/v4/letter/s/d6d6ee/32.png) [@sh4dow](https://discourse.mozilla.org/u/sh4dow)\
**Post date:** [June 15, 2018, 8:02pm UTC](https://discourse.mozilla.org/t/how-to-figure-out-supported-mediarecorder-audio-mimetypes/29422/2 "2018-06-15T20:02:37Z")

</div>

Did find it in the repo after all:  
[https://dxr.mozilla.org/mozilla-central/source/dom/media/MediaRecorder.cpp#1527](https://dxr.mozilla.org/mozilla-central/source/dom/media/MediaRecorder.cpp#1527)  
(gOggAudioEncoderCodecs)

So, apparently at least as of right now, MediaRecorder only supports vp8 for video and opus for audio.  
Which I’m not necessarily writing in a judgmental manner because ~264 kbit for recording crappy webcam audio is probably plenty for reencoding by Youtube.  
But I guess you might hear from audiophiles sooner or later if you haven’t already…
