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

Improve codec/MIME-type selection #356

Merged

Conversation

LukasKalbertodt
Copy link
Member

@LukasKalbertodt LukasKalbertodt commented Jan 21, 2020

Fixes #243
Fixes #335
CC #84

This has several advantages and fixes a few things. It's probably a better default than having a list of arbitrary MIME-types and codecs that we choose from. The browser usually has way more knowledge to choose that.

This is still a draft PR as I need to test this on many devices to check if the browser-selected codec is fine.

For one, currently we prefer vp9 over other codecs. Chrome on Android
does support vp9, but encoding is very slow. This leads to ~2fps
recordings on non-powerful devices, which is obviously unacceptable.
Second, Safari only supports a few special MIME-types. We could special
case something for Safari, but we can also let the browser choose the
MIME-type. This is a good default.

We might want to add "expert settings" later with which advanced users
can tweak these things.
@LukasKalbertodt
Copy link
Member Author

With this PR, recording webcam with audio results in these files/codecs:

  • Ubuntu Firefox: webm VP8 Opus
  • Ubuntu Chrome: webm VP8 Opus
  • Win10 Edge: webm h264 opus
  • Win10 Chrome: webm h264 opus
  • Win10 Firefox: webm VP8 opus
  • iOS Safari: webm h264 (audio probably AAC)

I haven't tested bitrate and stuff like that as this PR doesn't change anything about that. This confirms my assumption: the browser selected codecs are fine. And as this solves some issues, I think we should merge this.

@LukasKalbertodt LukasKalbertodt marked this pull request as ready for review January 22, 2020 11:12
@luniki
Copy link
Member

luniki commented Jan 23, 2020

Looks good to me!

@LukasKalbertodt LukasKalbertodt merged commit 0eb5db1 into elan-ev:master Jan 23, 2020
@LukasKalbertodt LukasKalbertodt deleted the improve-codec-selection branch January 23, 2020 12:32
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.

Media recording broken Recording with Chrome on Android results in very low frame rate
2 participants