Webrtcsink: is 60Hz possible?

Hello,
I’m using the example from net/webrtc · main · GStreamer / gst-plugins-rs · GitLab to test webrtcsink.
I change the source from videotestsrc to v4l2src and it works fine, except that i cannot get 60HZ refresh rate.
My video on v4l2src is an HDMI port with 1080p60 live input on an SBC. My refresh rate for the remote stream in the browser window is about 30Hz.
Is it possible to obtain 60Hz with this webrtcsink method, or is it an inherent delay and cannot be improved?

1 Like

This is a very open question. I do not see any limitation of the framerate in webrtcsink when the network is sufficient.

However if the network is detected as too slow, then webrtcsink will halve the framerate which may be what you are seeing.

Thank you for this feedback, it is good to know.
In my experiment, I’m using “localhost” so there is no network involved.
Can you think of any other reason?

Check the debug logs of GST_DEBUG=webrtc*:9,rtpgccbwe:9. That should tell you what bandwidth is estimated and if webrtcsink is enabling one of the bandwidth restriction compensation strategies.

If webrtcsink actually sends out at 60fps then the problem is going to be on the Chrome side.

Thank you so much for this info. I tried it and got some useful data and learned a few things.
Here is a sample line from the debug:

0:00:45.349197931 e[35m 6196e[00m 0xffff84005300 e[37mDEBUG e[00m e[00m
webrtcstats gstwebrtcstats.c:787:_get_codec_stats_from_pad:<webrtcbin-4db171c0-8b59-4682-9059-5c5fc897429f:sink_0>e
[00m Pad caps are: application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)VP8,
payload=(int)96, max-fs=(string)12288, max-fr=(string)60, rtcp-fb-nack=(boolean)true, rtcp-fb-nack-pli=(boolean)true,
rtcp-fb-transport-cc=(boolean)true, extmap-1=(string)http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01,
ssrc=(uint)3946135370, timestamp-offset=(uint)4207112626, seqnum-offset=(uint)634, a-framerate=(string)120

I learned that webrtc is using VP8 encoding. This output also indicates 120 fps, which is puzzling to me, my source being 60fps.
How can I tell whether webrtcsink is enabling any form of bandwidth restriction?

thank you for your help, it is very much appreciated.

Can you provide full logs with GST_DEBUG=webrtc*:9,rtpgccbwe:9?

0:00:31.376807936 36228 0xffff9c005300 TRACE              webrtcbin gstwebrtcbin.c:4393:_find_transceiver_for_sdp_media:<webrtcbin-4e13fc95-55b7-4d3a-9be4-4277c919808f> Found transceiver <webrtctransceiver0>
0:00:31.376838268 36228 0xffff9c005300 DEBUG              webrtcbin gstwebrtcbin.c:5725:_set_description_task:<webrtcbin-4e13fc95-55b7-4d3a-9be4-4277c919808f> we are in ice controlling mode: true
0:00:31.376855476 36228 0xffff9c005300 TRACE              webrtcbin gstwebrtcbin.c:675:_find_transport_for_session:<webrtcbin-4e13fc95-55b7-4d3a-9be4-4277c919808f> Found transport <transportstream0> for session 0
0:00:31.376870059 36228 0xffff9c005300 DEBUG   webrtctransportsendbin transportsendbin.c:165:transport_send_bin_change_state:<transportsendbin0> changing state: PLAYING => PLAYING
0:00:31.376902142 36228 0xffff9c005300 DEBUG   webrtctransportreceivebin transportreceivebin.c:237:transport_receive_bin_change_state: changing state: PLAYING => PLAYING
0:00:31.376941224 36228 0xffff9c005300 DEBUG              webrtcbin gstwebrtcbin.c:4784:_update_transport_ptmap_from_media:<webrtcbin-4e13fc95-55b7-4d3a-9be4-4277c919808f> mapping sdp session level attributes to caps
0:00:31.376958432 36228 0xffff9c005300 DEBUG              webrtcbin gstwebrtcbin.c:4786:_update_transport_ptmap_from_media:<webrtcbin-4e13fc95-55b7-4d3a-9be4-4277c919808f> mapping sdp media level attributes to caps
0:00:31.376983223 36228 0xffff9c005300 DEBUG              webrtcbin gstwebrtcbin.c:4799:_update_transport_ptmap_from_media:<webrtcbin-4e13fc95-55b7-4d3a-9be4-4277c919808f>  looking at 0 pt: 96
0:00:31.377025513 36228 0xffff9c005300 DEBUG              webrtcbin gstwebrtcbin.c:4799:_update_transport_ptmap_from_media:<webrtcbin-4e13fc95-55b7-4d3a-9be4-4277c919808f>  looking at 1 pt: 103
0:00:31.377051471 36228 0xffff9c005300 DEBUG              webrtcbin gstwebrtcbin.c:4799:_update_transport_ptmap_from_media:<webrtcbin-4e13fc95-55b7-4d3a-9be4-4277c919808f>  looking at 2 pt: 97
0:00:31.377087637 36228 0xffff9c005300 DEBUG              webrtcbin gstwebrtcbin.c:4799:_update_transport_ptmap_from_media:<webrtcbin-4e13fc95-55b7-4d3a-9be4-4277c919808f>  looking at 3 pt: 98
0:00:31.377117386 36228 0xffff9c005300 TRACE              webrtcbin gstwebrtcbin.c:675:_find_transport_for_session:<webrtcbin-4e13fc95-55b7-4d3a-9be4-4277c919808f> Found transport <transportstream0> for session 0
0:00:31.377477584 36228 0xffff9c005300 TRACE              webrtcbin gstwebrtcbin.c:675:_find_transport_for_session:<webrtcbin-4e13fc95-55b7-4d3a-9be4-4277c919808f> Found transport <transportstream0> for session 0
0:00:31.377510542 36228 0xffff9c005300 LOG                webrtcbin gstwebrtcbin.c:6549:on_rtpbin_request_aux_sender:<webrtcbin-4e13fc95-55b7-4d3a-9be4-4277c919808f> requesting aux sender for stream <transportstream0>
0:00:31.377519875 36228 0xffff9c005300 INFO               webrtcbin gstwebrtcbin.c:6565:on_rtpbin_request_aux_sender: creating AUX sender
0:00:31.377686412 36228 0xffff9c005300 LOG                webrtcbin gstwebrtcbin.c:4743:_set_rtx_ptmap_from_stream:<transportstream0> have 1 rtx payloads
0:00:31.377705370 36228 0xffff9c005300 LOG                webrtcbin gstwebrtcbin.c:4753:_set_rtx_ptmap_from_stream:<transportstream0> setting rtx mapping: 96 -> 103
0:00:31.377721119 36228 0xffff9c005300 DEBUG              webrtcbin gstwebrtcbin.c:4757:_set_rtx_ptmap_from_stream:<transportstream0> setting payload map on (NULL) : (NULL) and application/x-rtp-pt-map, 96=(uint)103;
0:00:31.377813284 36228 0xffff9c005300 WARN              webrtcsink net/webrtc/src/webrtcsink/imp.rs:2113:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::start_session::{{closure}}::{{closure}}: rtprtxsend doesn't have a `stuffing-kbps` property, stuffing disabled
0:00:31.378089193 36228 0xffff9c005300 TRACE              webrtcbin gstwebrtcbin.c:6435:on_rtpbin_pad_added:<webrtcbin-4e13fc95-55b7-4d3a-9be4-4277c919808f> new rtpbin pad send_rtp_src_0
0:00:31.378126233 36228 0xffff9c005300 TRACE              webrtcbin gstwebrtcbin.c:6435:on_rtpbin_pad_added:<webrtcbin-4e13fc95-55b7-4d3a-9be4-4277c919808f> new rtpbin pad send_rtp_sink_0
0:00:31.378175524 36228 0xffff9801ea30 TRACE    webrtcsrc-signaller net/webrtc/src/signaller/imp.rs:263:gstrswebrtc::signaller::imp::Signaller::handle_message:<GstWebRTCSignaller@0xaaaae29ee130> Received message {"type":"peer","sessionId":"4e13fc95-55b7-4d3a-9be4-4277c919808f","ice":{"candidate":"candidate:0 1 UDP 2122252543 b6862b8d-1329-4667-96a6-a4652894d4fe.local 57759 typ host","sdpMLineIndex":0}}
0:00:31.378242314 36228 0xffff9c005300 TRACE              webrtcbin gstwebrtcbin.c:4393:_find_transceiver_for_sdp_media:<webrtcbin-4e13fc95-55b7-4d3a-9be4-4277c919808f> Found transceiver <webrtctransceiver0>
0:00:31.378254563 36228 0xffff9c005300 TRACE              webrtcbin gstwebrtcbin.c:675:_find_transport_for_session:<webrtcbin-4e13fc95-55b7-4d3a-9be4-4277c919808f> Found transport <transportstream0> for session 0
0:00:31.378265646 36228 0xffff9c005300 DEBUG   webrtctransportsendbin transportsendbin.c:165:transport_send_bin_change_state:<transportsendbin0> changing state: PLAYING => PLAYING
0:00:31.378273521 36228 0xffff9801ea30 TRACE             webrtcsink net/webrtc/src/webrtcsink/imp.rs:2725:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::handle_ice: adding ice candidate for session 4e13fc95-55b7-4d3a-9be4-4277c919808f
0:00:31.378288104 36228 0xffff9c005300 DEBUG   webrtctransportreceivebin transportreceivebin.c:237:transport_receive_bin_change_state: changing state: PLAYING => PLAYING
0:00:31.378357227 36228 0xffff9801ea30 TRACE    webrtcsrc-signaller net/webrtc/src/signaller/imp.rs:263:gstrswebrtc::signaller::imp::Signaller::handle_message:<GstWebRTCSignaller@0xaaaae29ee130> Received message {"type":"peer","sessionId":"4e13fc95-55b7-4d3a-9be4-4277c919808f","ice":{"candidate":"candidate:2 1 TCP 2105524479 b6862b8d-1329-4667-96a6-a4652894d4fe.local 9 typ host tcptype active","sdpMLineIndex":0}}
0:00:31.378381435 36228 0xffff9c005300 LOG                webrtcbin gstwebrtcbin.c:4948:_update_transceiver_from_sdp_media:<webrtcbin-4e13fc95-55b7-4d3a-9be4-4277c919808f> marking stream 0xffff9c002810 as active
0:00:31.378408559 36228 0xffff9c005300 DEBUG              webrtcbin gstwebrtcbin.c:4963:_update_transceiver_from_sdp_media:<webrtcbin-4e13fc95-55b7-4d3a-9be4-4277c919808f> transceiver <webrtctransceiver0> direction change from none to sendonly
0:00:31.378419642 36228 0xffff9c005300 DEBUG              webrtcbin gstwebrtcbin.c:4996:_update_transceiver_from_sdp_media:<webrtcbin-4e13fc95-55b7-4d3a-9be4-4277c919808f> found existing send pad <webrtcbin-4e13fc95-55b7-4d3a-9be4-4277c919808f:sink_0> for transceiver <webrtctransceiver0>
0:00:31.378432183 36228 0xffff9c005300 LOG                webrtcbin gstwebrtcbin.c:4743:_set_rtx_ptmap_from_stream:<transportstream0> have 1 rtx payloads
0:00:31.378442391 36228 0xffff9c005300 LOG                webrtcbin gstwebrtcbin.c:4753:_set_rtx_ptmap_from_stream:<transportstream0> setting rtx mapping: 96 -> 103
0:00:31.378419934 36228 0xffff9801ea30 TRACE             webrtcsink net/webrtc/src/webrtcsink/imp.rs:2725:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::handle_ice: adding ice candidate for session 4e13fc95-55b7-4d3a-9be4-4277c919808f
0:00:31.378472432 36228 0xffff9c005300 DEBUG              webrtcbin gstwebrtcbin.c:4757:_set_rtx_ptmap_from_stream:<transportstream0> setting payload map on (NULL) : <rtprtxsend0> and application/x-rtp-pt-map, 96=(uint)103;
0:00:31.378550013 36228 0xffff9c005300 DEBUG   webrtctransportsendbin transportsendbin.c:301:_on_notify_dtls_client_status:<transportsendbin0> DTLS-SRTP encoder configured. Unlocking it and maybe changing state <dtlssrtpenc0>
0:00:31.378561680 36228 0xffff9c005300 LOG     webrtctransportsendbin transportsendbin.c:274:maybe_start_enc:<transportsendbin0> Can't start DTLS yet because ICE is not connected.
0:00:31.378576263 36228 0xffff9c005300 DEBUG   webrtctransportreceivebin transportreceivebin.c:119:transport_receive_bin_set_receive_state:<transportreceivebin0> Requested change of receive state to pass
0:00:31.378585887 36228 0xffff9c005300 LOG     webrtctransportreceivebin transportreceivebin.c:132:transport_receive_bin_set_receive_state:<transportreceivebin0> Can't unblock nicesrc yet because ICE is not connected, it is 0
0:00:31.378599012 36228 0xffff9c005300 LOG                webrtcbin gstwebrtcbin.c:5744:_set_description_task:<webrtcbin-4e13fc95-55b7-4d3a-9be4-4277c919808f:sink_0> has not received any caps yet. Skipping.
0:00:31.378608345 36228 0xffff9c005300 TRACE              webrtcbin gstwebrtcbin.c:675:_find_transport_for_session:<webrtcbin-4e13fc95-55b7-4d3a-9be4-4277c919808f> Found transport <transportstream0> for session 0
0:00:31.378618262 36228 0xffff9c005300 DEBUG   webrtctransportsendbin transportsendbin.c:165:transport_send_bin_change_state:<transportsendbin0> changing state: PLAYING => PLAYING
0:00:31.378637803 36228 0xffff9c005300 DEBUG   webrtctransportreceivebin transportreceivebin.c:237:transport_receive_bin_change_state: changing state: PLAYING => PLAYING
0:00:31.378673968 36228 0xffff9c005300 DEBUG              webrtcice gstwebrtcice.c:720:gst_webrtc_ice_set_remote_credentials:<webrtcbin-4e13fc95-55b7-4d3a-9be4-4277c919808f:ice> Setting remote ICE credentials on ICE stream 1 ufrag:a53f9ae7 pwd:36a633a4cc0df175b54c9371da240f31
0:00:31.378803173 36228 0xffff9c005300 DEBUG    webrtcnicetransport nicetransport.c:250:_on_component_state_changed:<webrtcnicetransport0> 1 1 connecting
0:00:31.378819798 36228 0xffff9c005300 LOG     webrtctransportsendbin transportsendbin.c:274:maybe_start_enc:<transportsendbin0> Can't start DTLS yet because ICE is not connected.
0:00:31.378833214 36228 0xffff9c005300 LOG     webrtctransportreceivebin transportreceivebin.c:132:transport_receive_bin_set_receive_state:<transportreceivebin0> Can't unblock nicesrc yet because ICE is not connected, it is 1
0:00:31.378851880 36228 0xffff9c005300 TRACE              webrtcbin gstwebrtcbin.c:5883:_set_description_task:<webrtcbin-4e13fc95-55b7-4d3a-9be4-4277c919808f> notify signaling-state from stable to stable
0:00:31.378862672 36228 0xffff9c005300 LOG                webrtcbin gstwebrtcbin.c:1513:_check_if_negotiation_is_needed:<webrtcbin-4e13fc95-55b7-4d3a-9be4-4277c919808f> checking if negotiation is needed
0:00:31.378876380 36228 0xffff9c005300 LOG                webrtcbin gstwebrtcbin.c:1663:_check_if_negotiation_is_needed:<webrtcbin-4e13fc95-55b7-4d3a-9be4-4277c919808f> no negotiation needed
0:00:31.378888629 36228 0xffff9c005300 DEBUG             webrtcsink net/webrtc/src/webrtcsink/imp.rs:2813:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::handle_sdp_answer::{{closure}}: received reply Ok(None)
0:00:31.378917795 36228 0xffff9c005300 INFO              webrtcsink net/webrtc/src/webrtcsink/imp.rs:1069:gstrswebrtc::webrtcsink::imp::Session::connect_input_stream:<webrtcsink0> Connecting input stream video_0 for consumer c79f22f1-fda6-4393-a72c-c0e90da03c24 and media 0
0:00:31.378926253 36228 0xffff9c005300 DEBUG             webrtcsink net/webrtc/src/webrtcsink/imp.rs:1090:gstrswebrtc::webrtcsink::imp::Session::connect_input_stream:<webrtcsink0> Picking codec from local offer
0:00:31.379111748 36228 0xffff9c005300 TRACE             webrtcsink net/webrtc/src/webrtcsink/imp.rs:671:gstrswebrtc::webrtcsink::imp::EncodingChainBuilder::build:<session-pipeline-4e13fc95-55b7-4d3a-9be4-4277c919808f> Setting up encoding, input caps: video/x-raw, format=(string)NV24, framerate=(fraction)120/1, width=(int)1920, height=(int)1080, interlace-mode=(string)progressive, output caps: ANY, codec: Codec { name: "VP8", caps: Caps(video/x-vp8(memory:SystemMemory)), stream_type: StreamType(VIDEO), payload_type: Some(96), decoding_info: Some(DecodingInfo { has_decoder: true }), encoding_info: Some(EncodingInfo { encoder: ElementFactory { inner: TypedObjectRef { inner: 0xaaaae27a25c0, type: GstElementFactory } }, payloader: ElementFactory { inner: TypedObjectRef { inner: 0xaaaae2854860, type: GstElementFactory } }, output_filter: None }) }, twcc: None
0:00:31.385747276 36228 0xffff9c005300 DEBUG             webrtcsink net/webrtc/src/webrtcsink/imp.rs:3612:<gstrswebrtc::webrtcsink::imp::BaseWebRTCSink as glib::subclass::object::ObjectImpl>::signals::SIGNALS::{{closure}}::{{closure}}:<webrtcsink0> applying default configuration on encoder Element { inner: TypedObjectRef { inner: 0xffff7c0fec20, type: GstVP8Enc } }
0:00:31.386042434 36228 0xffff9c005300 DEBUG              webrtcbin gstwebrtcbin.c:6960:gst_webrtc_bin_change_state: changing state: PLAYING => PLAYING
0:00:31.386089683 36228 0xffff9c005300 DEBUG   webrtctransportsendbin transportsendbin.c:165:transport_send_bin_change_state:<transportsendbin0> changing state: PLAYING => PLAYING
0:00:31.386059059 36228 0xffff9801ea30 INFO              webrtcsink net/webrtc/src/webrtcsink/imp.rs:2344:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::start_session::{{closure}}:<session-pipeline-4e13fc95-55b7-4d3a-9be4-4277c919808f> Recalculating latency
0:00:31.386141307 36228 0xffff9c005300 DEBUG   webrtctransportreceivebin transportreceivebin.c:237:transport_receive_bin_change_state: changing state: PLAYING => PLAYING
0:00:31.386230263 36228 0xffff9801ea30 LOG     webrtctransportsendbin transportsendbin.c:425:gst_transport_send_bin_element_query:<transportsendbin0> got query latency
0:00:31.386233179 36228 0xffff9c005300 DEBUG   webrtctransportsendbin transportsendbin.c:165:transport_send_bin_change_state:<transportsendbin0> changing state: PLAYING => PLAYING
0:00:31.386272261 36228 0xffff9801ea30 DEBUG   webrtctransportsendbin transportsendbin.c:432:gst_transport_send_bin_element_query:<transportsendbin0> handling latency query
0:00:31.386328552 36228 0xffff9c005300 DEBUG   webrtctransportreceivebin transportreceivebin.c:237:transport_receive_bin_change_state: changing state: PLAYING => PLAYING
0:00:31.386607961 36228 0xffff9801ea30 DEBUG   webrtctransportsendbin transportsendbin.c:444:gst_transport_send_bin_element_query:<transportsendbin0> got min latency 0:00:00.000000000
0:00:31.386697208 36228 0xffff9801ea30 WARN    webrtctransportsendbin transportsendbin.c:457:gst_transport_send_bin_element_query:<transportsendbin0> did not really configure latency of 0:00:00.000000000
0:00:31.386769248 36228 0xffff9801ea30 LOG     webrtctransportsendbin transportsendbin.c:478:gst_transport_send_bin_element_event:<transportsendbin0> got event latency
0:00:31.386800455 36228 0xffff9801ea30 DEBUG   webrtctransportsendbin transportsendbin.c:485:gst_transport_send_bin_element_event:<transportsendbin0> Ignoring latency event from parent
0:00:31.387976715 36228 0xffff9c005300 TRACE              webrtcbin gstwebrtcbin.c:570:_find_ice_stream_for_session:<webrtcbin-4e13fc95-55b7-4d3a-9be4-4277c919808f> Found ice stream id <webrtcicestream0> for session 0
0:00:31.388000923 36228 0xffff9c005300 LOG                webrtcbin gstwebrtcbin.c:4665:_add_ice_candidate:<webrtcbin-4e13fc95-55b7-4d3a-9be4-4277c919808f> adding ICE candidate with mline:0, a=candidate:0 1 UDP 2122252543 b6862b8d-1329-4667-96a6-a4652894d4fe.local 57759 typ host
0:00:31.388027755 36228 0xffff9c005300 DEBUG              webrtcice gstwebrtcice.c:286:_resolve_host:<webrtcbin-4e13fc95-55b7-4d3a-9be4-4277c919808f:ice> Resolving host b6862b8d-1329-4667-96a6-a4652894d4fe.local
0:00:31.397701492 36228 0xffff9801ea30 INFO              webrtcsink net/webrtc/src/webrtcsink/imp.rs:2344:gstrswebrtc::webrtcsink::imp::BaseWebRTCSink::start_session::{{closure}}:<session-pipeline-4e13fc95-55b7-4d3a-9be4-4277c919808f> Recalculating latency
0:00:31.397787531 36228 0xffff9801ea30 LOG     webrtctransportsendbin transportsendbin.c:425:gst_transport_send_bin_element_query:<transportsendbin0> got query latency
0:00:31.397798906 36228 0xffff9801ea30 DEBUG   webrtctransportsendbin transportsendbin.c:432:gst_transport_send_bin_element_query:<transportsendbin0> handling latency query
0:00:31.397893986 36228 0xffff9801ea30 DEBUG   webrtctransportsendbin transportsendbin.c:444:gst_transport_send_bin_element_query:<transportsendbin0> got min latency 0:00:00.000000000
0:00:31.397918486 36228 0xffff9801ea30 WARN    webrtctransportsendbin transportsendbin.c:457:gst_transport_send_bin_element_query:<transportsendbin0> did not really configure latency of 0:00:00.000000000
0:00:31.397937444 36228 0xffff9801ea30 LOG     webrtctransportsendbin transportsendbin.c:478:gst_transport_send_bin_element_event:<transportsendbin0> got event latency
0:00:31.397945318 36228 0xffff9801ea30 DEBUG   webrtctransportsendbin transportsendbin.c:485:gst_transport_send_bin_element_event:<transportsendbin0> Ignoring latency event from parent

That’s not the complete log unfortunately. We’d need the log from the very beginning up to the point where things are running and you actually observe the 30 fps inside Chrome.

You might also check the webrtc internals stats inside Chrome. Maybe it actually receives 60 fps but only renders less for its own reasons?

Thank you so much for your feedback, I greatly appreciate it! This platform does not allow me to send a large amount of data in a message so I need to put the entire log at a url address and send the link. In the meantime you made me think of this:

The drop from 60Hz to 30Hz might be caused by the fact that webrtc is using the “vp8enc” encoder. this is a software encoder and it probably cannot run at 60Hz on 1080P. My board is a Rock5B SBC, based on the Rockchip RK3588 device. It supports HW-accelerated video encoding with GStreamer plugins such as mpph264enc and mppvp8enc. When I enable these, I get an error from webrtc saying that “mppvp8enc” is not supported, and the stream does not even start.
I looked into the Rust code to see how to support mpvp8enc but could not figure out the solution. Do you know if it is possible at all to have Webrtc use the HW video encoders?

thanks again,
Pierre

You’d need to add support for those encoders, yes. Take a look at this MR for another MR that adds support for a new encoder (qsvh264enc in this case).

The drop from 60Hz to 30Hz might be caused by the fact that webrtc is using the “vp8enc” encoder. this is a software encoder and it probably cannot run at 60Hz on 1080P

That would also be an explanation, yes.

hi,
I had already added init code for “mppvp8enc”, but it is not working yet, I need further help from the Rockchip FAE for that!

One question please: I see in the code that many types of encoders are supported, but how do you specify the one to use? For example, I would like to use mpph264enc, and add it to the code. Is this possible? I thought of asking just in case.

thanks for all your help,
Pierre

The encoder is selected automatically based on the negotiated codec between both peers and the rank of the encoder. If the peer wants to actually do VP8 then you’d like to have mppvp8enc used instead of mpph264enc, for example.

You can limit the set of allowed codecs via properties.

hi,

Please see below the full log of my application with GST_DEBUG=webrtc*:9,rtpgccbwe:9.(https://drive.google.com/file/d/11_uOUMJTh1uQmw_0mF6eNM_1kanh1eUx/view?usp=sharing)

I hope it is useful!

thank you
Pierre

so how can I make it use mpph264enc then?
I tried by forcing the encoder with the “video-caps=video/x-h264” but it tried to find an H264 software encoder and could not find it, even though I have it present.

After I sent the last message I found out this: webrtcsink is actually looking for mpph264enc, after mppvp8enc. So I added support for mpph264enc in the source code (imp.rs), and it seems to run it now. Only problem is that it cannot set the bitrate property, but this is a question from Rockchip I believe.

thank you
Pierre