versatica / mediasoup-client

mediasoup client side JavaScript library
https://mediasoup.org
ISC License
591 stars 237 forks source link

Allow producing with two different codecs at the same time #8

Closed ibc closed 6 years ago

ibc commented 6 years ago

Scenario (assuming the mediasoup room is configured with VP8 and H264 codecs in that order of preference):

  1. Client joins a room and streams its webcam video in two codecs (VP8/H264). To achieve that that:
    • Create two separate transports of type "send" and apply the preferred codec in them.
    • Create two separate producers of type "video" and apply the same video track to them.
  2. A remote Chrome consumer plays the VP8 track.
  3. A remote iOS Safari 11 consumer plays the H264 track.
ibc commented 6 years ago

This is feasible but requires some tuning. Will be eventually added (sooner than later).

However, from the point of view of the producer browser, take into account that having to encode a video stream with two different encodings (VP8 and H264) won't be very CPU friendly. Let's see how it goes.

ibc commented 6 years ago

Given that Safari is already adding VP8 support, this feature gets less important. It is not efficient at all anyway because it forces the client to encode twice the same source.

Let's close this.