Intel® Collaboration Suite for WebRTC
Community support and discussions on the Intel® Collaboration Suite for WebRTC (Intel® CS for WebRTC).
1149 Discussions

simulcast problem -- publish three streams and often receive two streams

Lin__Can
Beginner
472 Views

Hello,

     Our team want to develop conference system base on owt. I found that h.264 simulcast is supported by owt now.But when I test the demo, this func seems to exist some problems. After joining the room success, I set three rids('12345111','12345222','12345333') for simulcast publish. But often only two streams are  received(rid:'12345222' and '12345333').
     And then I'll unpublish and publish again, Something different happened,three streams will be both received.
     This kind of phenomenon is very strange, excuse me have understanding person.
    
     The following code is where I set simulcast with h264.

    int videoMaxBitrate = width * height * 3;

    VideoCodecParameters codec_params3;
    codec_params3.name = owt::base::VideoCodec::kH264;
    VideoEncodingParameters encoding_params3(codec_params3, videoMaxBitrate, true);
    
#ifdef TEST_SIMULCAST
    
    RtpEncodingParameters rtpEcParm1;
    rtpEcParm1.scale_resolution_down_by = 1;
    rtpEcParm1.rid = "12345111";
    rtpEcParm1.max_bitrate_bps = videoMaxBitrate;
    rtpEcParm1.max_framerate = 15;

    RtpEncodingParameters rtpEcParm2;
    rtpEcParm2.scale_resolution_down_by = 2;
    rtpEcParm2.rid = "12345222";
    rtpEcParm2.max_bitrate_bps = videoMaxBitrate / 4;
    rtpEcParm2.max_framerate = 15;

    RtpEncodingParameters rtpEcParm3;
    rtpEcParm3.scale_resolution_down_by = 4;
    rtpEcParm3.rid = "12345333";
    rtpEcParm3.max_bitrate_bps = videoMaxBitrate / 16;
    rtpEcParm3.max_framerate = 15;

    encoding_params3.rtp_encoding_parameters.push_back(rtpEcParm1);
    encoding_params3.rtp_encoding_parameters.push_back(rtpEcParm2);
    encoding_params3.rtp_encoding_parameters.push_back(rtpEcParm3);
#endif
    options.video.push_back(encoding_params3);

#if 1
    GetDlgItemText(IDC_EDIT_AUDIO_MAX_BITRATE, m_strMaxBitrate);
    AudioEncodingParameters audio_params1;
    audio_params1.codec.name = owt::base::AudioCodec::kOpus;
    audio_params1.codec.clock_rate = _ttoi(m_strMaxBitrate.GetBuffer()) * 1024;
    options.audio.push_back(audio_params1);
#endif 
    local_stream_->AttachVideoRenderer(render_window_);
    room->Publish(local_stream_,
        options,
        [=](std::shared_ptr<ConferencePublication> publication) {

        ... .... 

   }

0 Kudos
0 Replies
Reply