Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update MediaRecorder preferences #99

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

davekiss
Copy link
Contributor

@davekiss davekiss commented Mar 3, 2022

After consulting with @philcluff @gkatsev and @cjpillsbury -- this is the consensus for the recommended mimeType stack for MediaRecorder for our use case.

  • It provides greatest compatibility across recording devices
  • It's a fair tradeoff for the resulting file quality vs vp9
  • It has good compatibility for uploading to and hosting by Mux
      const preferredOptions = { mimeType: 'video/mp4;codecs=avc1' };
      const backupOptions = { mimeType: 'video/webm;codecs=vp9' };
      const lastResortOptions = { mimeType: 'video/webm;codecs=vp8,opus' };

@vercel
Copy link

vercel bot commented Mar 3, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/mux/stream-new/2vYsoTKE5iBuuAHd2PnZKYPZuBqd
✅ Preview: https://stream-new-git-dk-media-recorder-codecs-mux.vercel.app

@eropple eropple requested review from aminamos and dylanjha and removed request for aminamos March 17, 2022 01:42
@eropple
Copy link

eropple commented Mar 17, 2022

I'm curious (this is outside my wheelhouse) - why is opus a last-resort audio codec? (or is it implied by the other codec options?)

Copy link
Collaborator

@dylanjha dylanjha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a question -- assuming that is addressed then go ahead and 🚢 , all the other changes look 👌🏼

* MediaRecorder.isTypeSupported is not a thing in safari,
* good thing safari supports the preferredOptions
*/
if (typeof MediaRecorder.isTypeSupported === 'function') {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it okay to get rid of this check?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dylanjha
Copy link
Collaborator

dylanjha commented Jun 7, 2022

@davekiss is this good to merge?

@vercel
Copy link

vercel bot commented Jun 14, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated
stream-new ✅ Ready (Inspect) Visit Preview Jun 14, 2022 at 7:35PM (UTC)

@davekiss
Copy link
Contributor Author

@dylanjha This should be g2g, can you try a recording on your end to sanity check?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants