openvidu icon indicating copy to clipboard operation
openvidu copied to clipboard

Allow users to publish several streams at the same time

Open micaelgallego opened this issue 6 years ago • 19 comments

Allow users (connections) to publish several streams at the same time in the same session.

micaelgallego avatar May 24 '18 04:05 micaelgallego

Hi @micaelgallego. Do you have any update on this? I'm thinking if I publish to 2 streams, let say one audio and one video, then if I change only video steam by camera or screen share. is there any possibility to encounter sync issue with audio and video? Do you have any better way to do this?

krish-dev avatar Sep 06 '18 13:09 krish-dev

Hi @micaelgallego any update over this feature. thanks

abhi021 avatar Aug 28 '19 21:08 abhi021

One user can publish several streams at the same time "hacking" openvidu-browser and creating two objects of OpenVidu class to simulate two users connecting at the same time from one user's browser.

In the future we plan to add this feature natively in openvidu-browser.

micaelgallego avatar Aug 28 '19 22:08 micaelgallego

Any timeline when this feature will be implemented

mouhsinelonly avatar Sep 12 '19 08:09 mouhsinelonly

when I attempt to create two clients, one for a camera, one for a screen recording, the screen recording is always empty. So I guess a +1 from me on this feature.

jeremysmitherman avatar Oct 11 '19 20:10 jeremysmitherman

Until the feature is implemented, you can use a hack creating two OpenVidu instances (one for camera and another one for screen share). We use it in OpenVidu Call application.

micaelgallego avatar Oct 11 '19 21:10 micaelgallego

Hi @micaelgallego any news regarding this issue?

francescogatto avatar Jul 08 '20 10:07 francescogatto

The hack is create two OpenVidu objects and simulate two participants in the same session.

It is in our roadmap, but we are working hard in other areas of the product.

micaelgallego avatar Jul 08 '20 15:07 micaelgallego

I think having multiple publishers in single OpenVide instance is a good addition. +1 for this

franziz avatar Aug 03 '20 07:08 franziz

@micaelgallego Could you link snippet or anything for this hack? I've been looking around and no luck.

ash0x0 avatar Apr 19 '21 15:04 ash0x0

You have to create several instances of OpenVidu object.

Every OpenVidu object can manage one publisher at a time.

micaelgallego avatar Apr 19 '21 21:04 micaelgallego

Ok so after some digging I managed to find video-room.component.ts, which is basically openvidu-webrtc.service.ts which uses two completely separate OpenVidu objects like you say. Not sessions, not publishers, not users. This makes it extremely inefficient in terms of everything, but more importantly probably bandwidth use. So I'm wondering how to get a PR started on this. If you can point me in the right direction where the root change needs to be to make it possible to have a shared session I can take this on. Is this just OpenVidu or Kurento as well? How deep does the change need to be to get this working and where can I get started on it?

ash0x0 avatar Apr 19 '21 21:04 ash0x0

Well, it is not extremely inefficient. The only duplication is the web socket.

To allow reusing the same websocket connection between two publishers you will have to change openvidu-browser, openvidu-browser and possible the web socket protocol used to communicate between them.

It is not easy, for that reason is not already implemented.

micaelgallego avatar Apr 19 '21 22:04 micaelgallego

The issue I have with it at the moment is the increased usage at server-side. Having a screen + video feed for every user cuts the number of users the sever can support by half, and the server does not scale at all. Would it help matters on the server-side + bandwidth if this enhancement is done? Would it be worth it if these two items are the only goal?

Also, this workaround makes composed recordings almost impossible, but they're very heavy to begin with.

ash0x0 avatar Apr 20 '21 02:04 ash0x0

Sending two streams with the same OpenVidu websocket connection wont make the server much more scalable.

The scalability bootle-neck is in the media. In any option (one or two websockets) the media sent (and received) will be the same.

This workaround has nothing to do with COMPOSED vs INDIVIDUAL recording. COMPOSED recording records all streams in a call togheter. INDIVIDUAL recording records every stream in its own file. Regardless how to manage websockets you will have the exact number of streams.

micaelgallego avatar Apr 20 '21 09:04 micaelgallego

Hi there, just wondering if there is any news regarding this feature? Is the recommend solution for now to just use the "hack" suggested in the messages above? Or is there an alternative solution that might be coming somewhat soon?

We'd like to add this feature to our app (simultaneous webcam/screenshare) and we're debating whether we should pursue other features first (and wait for a potential non-hacky solution to this issue) or just implement this feature now using the method suggested above.

Thanks!

unicornsoftwareinc avatar Oct 04 '21 21:10 unicornsoftwareinc

Hi @micaelgallego, not trying to hassle you or your team but it's been about 9 months since my last check in on this. As a paying enterprise user, it'd be nice if we could get some sort of timeline or update on this? Is OpenVidu still planning to add this feature natively to OpenVidu-browser?

I'm aware of the "hack" to implement this functionality but I'm not loving the idea of the putting in the dev work to implement that and then a few months later the native solution is released.

Thanks!

unicornsoftwareinc avatar Jun 26 '22 21:06 unicornsoftwareinc

I understand this will be a useful feature to have. But, a we have a hack available, we are prioritizing other useful features.

Also, if you are using OpenVidu Components to build the UI, the hack is hidden to you.

The main issue is maintaining the API backwards compatible and simple enough.

We do not plan to implement the feature in the near future.

micaelgallego avatar Jun 27 '22 10:06 micaelgallego

image

redbin1024 avatar Dec 17 '22 09:12 redbin1024