Following this thread in the deprecated mailing list, and after some more testing and checks, here some conclusion about H264 encoder in Chrome:
OpenH264 encoder/decoder
mediasoup (v3) Router codec:
{
kind : 'video',
mimeType : 'video/h264',
clockRate : 90000,
parameters :
{
'packetization-mode' : 1,
'profile-level-id' : '42e01f',
'level-asymmetry-allowed' : 1
}
}
SDP answer m= section generated by mediasoup-client (v3):
m=video 44759 UDP/TLS/RTP/SAVPF 125 107
c=IN IP4 5.5.5.5
a=rtcp:9 IN IP4 0.0.0.0
a=candidate:udpcandidate 1 udp 1076302079 5.5.5.5 44759 typ host generation 0
a=ice-ufrag:dwm3pvlc52vmyixb
a=ice-pwd:y1zsaw216rozrr2c3mwhjdnivc9ogwjp
a=ice-options:renomination
a=fingerprint:sha-512 15:5A:74:F5:F3:CE:BA:33:87:E9:BC:D1:9D:4F:8A:63:FD:4D:B3:57:C8:F7:0B:9E:5A:74:C3:E3:30:A4:D6:EB:D0:96:3A:C5:FB:5A:CF:68:D8:AD:E4:F0:B6:24:62:3A:96:91:A1:3F:6A:3C:65:3D:63:7F:AB:36:03:80:65:BA
a=setup:active
a=mid:2
a=extmap:3 urn:ietf:params:rtp-hdrext:sdes:mid
a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id
a=extmap:5 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id
a=extmap:13 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:8 http://tools.ietf.org/html/draft-ietf-avtext-framemarking-07
a=extmap:12 urn:3gpp:video-orientation
a=extmap:14 urn:ietf:params:rtp-hdrext:toffset
a=recvonly
a=rtcp-mux
a=rtcp-rsize
a=rtpmap:125 H264/90000
a=rtcp-fb:125 goog-remb
a=rtcp-fb:125 ccm fir
a=rtcp-fb:125 nack
a=rtcp-fb:125 nack pli
a=fmtp:125 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f;x-google-start-bitrate=1000
a=rtpmap:107 rtx/90000
a=fmtp:107 apt=125
a=simulcast:recv r0;r1;r2
chrome://webrtc-stats (with “Legazy Non-Standard) getStats() API” enabled):
Statistics ssrc_2812663329_send
* codecImplementationName OpenH264
There is proper simulcast. This is, Chrome sends 3 H264 streams.
H264 ExternalEncoder (hardware encoder)
mediasoup (v3) Router codec:
{
kind : 'video',
mimeType : 'video/h264',
clockRate : 90000,
parameters :
{
'packetization-mode' : 1,
'profile-level-id' : '42001f',
'level-asymmetry-allowed' : 1
}
}
Create a Producer with simulcast in mediasoup-client (v3).
SDP answer generated by mediasoup-client:
m=audio 7 UDP/TLS/RTP/SAVPF 111
c=IN IP4 127.0.0.1
a=rtpmap:111 opus/48000/2
a=fmtp:111 stereo=1;usedtx=1
a=extmap:3 urn:ietf:params:rtp-hdrext:sdes:mid
a=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level
a=setup:active
a=mid:1
a=recvonly
a=ice-ufrag:5wy7xrdgt27ii6db
a=ice-pwd:qtvse4e5qjofzze4zm0x39rqfcxgo07l
a=candidate:udpcandidate 1 udp 1076302079 5.5.5.5 43975 typ host
a=end-of-candidates
a=ice-options:renomination
a=rtcp-mux
a=rtcp-rsize
m=video 7 UDP/TLS/RTP/SAVPF 102 122
c=IN IP4 127.0.0.1
a=rtpmap:102 H264/90000
a=rtpmap:122 rtx/90000
a=fmtp:102 packetization-mode=1;level-asymmetry-allowed=1;profile-level-id=42001f;x-google-start-bitrate=1000
a=fmtp:122 apt=102
a=rtcp-fb:102 goog-remb
a=rtcp-fb:102 ccm fir
a=rtcp-fb:102 nack
a=rtcp-fb:102 nack pli
a=extmap:3 urn:ietf:params:rtp-hdrext:sdes:mid
a=extmap:4 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id
a=extmap:5 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id
a=extmap:13 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
a=extmap:8 http://tools.ietf.org/html/draft-ietf-avtext-framemarking-07
a=extmap:12 urn:3gpp:video-orientation
a=extmap:14 urn:ietf:params:rtp-hdrext:toffset
a=setup:active
a=mid:2
a=recvonly
a=ice-ufrag:5wy7xrdgt27ii6db
a=ice-pwd:qtvse4e5qjofzze4zm0x39rqfcxgo07l
a=candidate:udpcandidate 1 udp 1076302079 5.5.5.5 43975 typ host
a=end-of-candidates
a=ice-options:renomination
a=rtcp-mux
a=rtcp-rsize
a=rid:r0 recv
a=rid:r1 recv
a=rid:r2 recv
a=simulcast:recv r0;r1;r2
chrome://webrtc-stats (with “Legazy Non-Standard) getStats() API” enabled):
Statistics ssrc_1264496030_send
* codecImplementationName ExternalEncoder
There is NOT simulcast. This is, Chrome just sends a single H264 stream (THIS IS NOT GOOD). Also, the remote Consumer cannot render it, probably due to a well known Chrome H264 issue. However it does not even work if the mediasoup-client Producer does not use simulcast, so here we have a separate issue (already reported in mediasoup issue tracker here).
Conclusion
Chrome enables H264 ExternalEncoder depending on the H264 parameters of the negotiated codec. For example, it uses ExternalEncoder if the remote SDP just enables an H264 codec with 'packetization-mode': 1, 'profile-level-id': '42001f'
. However, it does not produce simulcast streams.