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

Consider H264 as default codec for video #2373

Open
ndren opened this issue May 11, 2024 · 1 comment
Open

Consider H264 as default codec for video #2373

ndren opened this issue May 11, 2024 · 1 comment
Labels
A-Performance O-Uncommon Most users are unlikely to come across this or unexpected workflow T-Enhancement New features, changes in functionality, performance boosts, user-facing improvements

Comments

@ndren
Copy link

ndren commented May 11, 2024

Your use case

What would you like to do?

Replace VP8 with H264 as the default video codec.

Why would you like to do it?

This will reduce the CPU/power consumption and bitrate of video transmission in element call, especially on devices without hardware VP8 encoding/decoding, but also other devices as H264 is well-standardised and optimised as an older standard.

How would you like to achieve it?

Replace this in https://github.com/element-hq/element-call/blob/livekit/src/livekit/options.ts

Have you considered any alternatives?

Keep VP8 or use some other codec.

Additional context

Sending video is the highest difference in CPU usage (2x total usage, from 30% to over 60%) when using element-call for me, receiving video is negligible.

VP8 is not hardware decoded on my laptop according to about:support. I'm almost certain it's not hardware encoded either.

@ndren ndren added the T-Enhancement New features, changes in functionality, performance boosts, user-facing improvements label May 11, 2024
@robintown robintown added O-Uncommon Most users are unlikely to come across this or unexpected workflow A-Performance labels May 21, 2024
@toger5
Copy link
Contributor

toger5 commented May 21, 2024

Looking at:
https://livekit.io/webrtc/bitrate-guide

- H.264 VP8 VP9 AV1
1920x1080 2.70Mbps 2.00Mbps 1.20Mbps 900kbps
1280x720 1.25Mbps 1.00Mbps 700kbps 550kbps
960x540 700kbps 600kbps 450kbps 350kbps
640x360 400kbps 400kbps 270kbps 190kbps
384x216 170kbps 180kbps 120kbps 90kbps
320x180 140kbps 160kbps 90kbps 70kbps
160x90 50kbps 90kbps 35kbps 30kbps

At the resolutions we are using vp8 is better bandwidth wise then H.264. For lower resolutions it is not however.

Dependent on the hardware h264 might be less resource intensive. Thanks for the ticket so we have a place to discuss this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Performance O-Uncommon Most users are unlikely to come across this or unexpected workflow T-Enhancement New features, changes in functionality, performance boosts, user-facing improvements
Projects
None yet
Development

No branches or pull requests

3 participants