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

support for alpha channel when transferring canvas. #2920

Open
jimmywarting opened this issue Jan 7, 2024 · 4 comments
Open

support for alpha channel when transferring canvas. #2920

jimmywarting opened this issue Jan 7, 2024 · 4 comments

Comments

@jimmywarting
Copy link

jimmywarting commented Jan 7, 2024

RTCPeerConnection does not seem to support the alpha channel.
is there any trick into choosing a encoder / codec that supports alpha channel also?

the video i'm capturing is coming from a canvas.captureStream() and it dose not have a background.
and the receiver instead sees a solid black background.

it's evident on demos such as:

it's unfortunately that we have to resort to solutions such as:
https://github.com/webrtcHacks/transparent-virtual-background

there should be a way with webrtc to transfer video with alpha channels

@fippo
Copy link
Contributor

fippo commented Jan 8, 2024

Support for alpha channel (or lack thereof) is a long standing issue (as you found out in the samples repository)

https://bugs.chromium.org/p/chromium/issues/detail?id=1395218 is the most recent incarnation in Chrome, maybe @rosetta-jpn knows whether it is supposed to work.

@rosetta-jpn
Copy link

@jimmywarting Could you file an issue in Chromium (https://crbug.com) ccing folks in the above metioned issue tracker?
This is not what I can make a decision on my own.
We have been alive in the manner of dropping alpha channel in RTCPeerConnection for a long time for the sake of better performance.
Changing it needs the disucission.

Thanks!

@rosetta-jpn
Copy link

By the way, does the Firefox work in the same manner?

@jimmywarting
Copy link
Author

By the way, does the Firefox work in the same manner?

Firefox and safari both also display black backgrounds

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

No branches or pull requests

3 participants