streamana icon indicating copy to clipboard operation
streamana copied to clipboard

Combine multiple video streams in to canvas

Open congthang1 opened this issue 3 years ago • 3 comments

Hi, Any suggestion for implementing combination multiple stream into canvas before streaming? For example we can combine camera and screen sharing into a canvas. This should be on shaders and setTexture of gl_canvas? Thanks.

congthang1 avatar Oct 16 '22 05:10 congthang1

Hi @congthang1 yes that's the idea, to use WebGL. I haven't had time to provide an example. Also related to https://github.com/davedoesdev/streamana/issues/9 (which is really for separate screen sharing stream).

Probably an interesting thing to do, would require some WebGL compositing but a good way to learn (for me at least).

davedoesdev avatar Oct 16 '22 07:10 davedoesdev

Hi @davedoesdev I have tried with canvas using context.drawImage to draw multiple stream to a canvas but then when trying to captureStream this canvas the fps become low and cannot send to livestream server. Seems gl_canvas can help to not drop fps with a single video, can be with multiple videos too

congthang1 avatar Oct 17 '22 01:10 congthang1

Did you find any solution?

matbrgz avatar Jan 14 '24 05:01 matbrgz