Webrtc H.264 High Profile 不想在浏览器中播放

Webrtc H.264 High Profile 不想在浏览器中播放

当配置文件为 High(配置文件 640028)时,我在浏览器中观看 webrtc 视频时遇到问题,基线(配置文件 42802a)播放正常。SDP 完全没问题 - 如果我将摄像头与基线连接,我可以看到视频,更改为 high - 不,同一个应用程序在 Windows 和 Mac 上都可以正常工作。如果我通过控制台启动 Chrome 浏览器,使用 high 时将打印以下几行:

[25907:25:0608/151217.845878:ERROR:webrtc_video_engine.cc(810)] No video codecs supported.
[25907:23:0608/151217.846066:ERROR:sdp_offer_answer.cc(758)] Failed to set remote offer sdp: Failed to set remote video description send parameters for m-section with mid='video0'.

对于基线,没有打印任何内容。

两种情况的 SDP

基线:

"type": "offer", "sdp": "v=0\r\no=- 5058432143564541857 0 IN IP4 0.0.0.0\r\ns=-\r\nt=0 0\r\na=ice-options:trickle\r\na=group:BUNDLE video0 audio1\r\nm=video 9 UDP/TLS/RTP/SAVPF 96 98\r\nc=IN IP4 0.0.0.0\r\na=setup:actpass\r\na=ice-ufrag:DigYk+rar2YL1Kp48oyWABkX9zjWvoeK\r\na=ice-pwd:ruWLRvWzm4HAAF+BHbVqSTxkcuR65UZ/\r\na=rtcp-mux\r\na=rtcp-rsize\r\na=sendrecv\r\na=rtpmap:96 H264/90000\r\na=rtcp-fb:96 nack\r\na=rtcp-fb:96 nack pli\r\na=rtcp-fb:96 transport-cc\r\na=fmtp:96 x-google-max-bitrate=10000;x-google-min-bitrate=2000;x-google-start-bitrate=2000;packetization-mode=1;sprop-parameter-sets=Z0KAKtoB4Ah6UgoMDA2hQmo=,aM4G4g==;profile-level-id=42802a;level-asymmetry-allowed=1\r\na=framerate:30\r\na=rtpmap:98 rtx/90000\r\na=fmtp:98 apt=96\r\na=ssrc-group:FID 2987144007 3301415777\r\na=ssrc:2987144007 msid:user2440157610@host-ff63cc48 webrtctransceiver14\r\na=ssrc:2987144007 cname:user2440157610@host-ff63cc48\r\na=ssrc:3301415777 msid:user2440157610@host-ff63cc48 webrtctransceiver14\r\na=ssrc:3301415777 cname:user2440157610@host-ff63cc48\r\na=mid:video0\r\nb=AS:4000\r\na=fingerprint:sha-256 BF:D0:EC:78:0E:BC:ED:5E:17:02:1E:F0:35:61:36:A9:84:F5:62:37:94:36:98:50:6B:43:22:2E:05:37:42:75\r\na=rtcp-mux-only\r\nm=audio 9 UDP/TLS/RTP/SAVPF 97\r\nc=IN IP4 0.0.0.0\r\na=setup:actpass\r\na=ice-ufrag:DigYk+rar2YL1Kp48oyWABkX9zjWvoeK\r\na=ice-pwd:ruWLRvWzm4HAAF+BHbVqSTxkcuR65UZ/\r\na=rtcp-mux\r\na=rtcp-rsize\r\na=sendrecv\r\na=rtpmap:97 OPUS/48000/2\r\na=rtcp-fb:97 transport-cc\r\na=fmtp:97 sprop-stereo=1;sprop-maxcapturerate=48000\r\na=ssrc:1763966361 msid:user2440157610@host-ff63cc48 webrtctransceiver15\r\na=ssrc:1763966361 cname:user2440157610@host-ff63cc48\r\na=mid:audio1\r\nb=AS:192\r\na=fingerprint:sha-256 BF:D0:EC:78:0E:BC:ED:5E:17:02:1E:F0:35:61:36:A9:84:F5:62:37:94:36:98:50:6B:43:22:2E:05:37:42:75\r\na=rtcp-mux-only\r\n"

高的:

"type": "offer", "sdp": "v=0\r\no=- 2916326859838782633 0 IN IP4 0.0.0.0\r\ns=-\r\nt=0 0\r\na=ice-options:trickle\r\na=group:BUNDLE video0 audio1\r\nm=video 9 UDP/TLS/RTP/SAVPF 96 98\r\nc=IN IP4 0.0.0.0\r\na=setup:actpass\r\na=ice-ufrag:OkOt3agsVRErWCB2u5u0dxDYBj6j+3kY\r\na=ice-pwd:Kc9Cz1RlzQAtdUF8zyFCxTasCyns4cAP\r\na=rtcp-mux\r\na=rtcp-rsize\r\na=sendrecv\r\na=rtpmap:96 H264/90000\r\na=rtcp-fb:96 nack\r\na=rtcp-fb:96 nack pli\r\na=rtcp-fb:96 transport-cc\r\na=fmtp:96 x-google-max-bitrate=10000;x-google-min-bitrate=2000;x-google-start-bitrate=2000;packetization-mode=1;sprop-parameter-sets=Z2QAKKy0A8ARPyykFBgYG0KE1A==,aO4G4sA=;profile-level-id=640028;level-asymmetry-allowed=1\r\na=framerate:30\r\na=rtpmap:98 rtx/90000\r\na=fmtp:98 apt=96\r\na=ssrc-group:FID 744051065 3285388819\r\na=ssrc:744051065 msid:user599012961@host-c96ac52 webrtctransceiver16\r\na=ssrc:744051065 cname:user599012961@host-c96ac52\r\na=ssrc:3285388819 msid:user599012961@host-c96ac52 webrtctransceiver16\r\na=ssrc:3285388819 cname:user599012961@host-c96ac52\r\na=mid:video0\r\nb=AS:4000\r\na=fingerprint:sha-256 BF:D0:EC:78:0E:BC:ED:5E:17:02:1E:F0:35:61:36:A9:84:F5:62:37:94:36:98:50:6B:43:22:2E:05:37:42:75\r\na=rtcp-mux-only\r\nm=audio 9 UDP/TLS/RTP/SAVPF 97\r\nc=IN IP4 0.0.0.0\r\na=setup:actpass\r\na=ice-ufrag:OkOt3agsVRErWCB2u5u0dxDYBj6j+3kY\r\na=ice-pwd:Kc9Cz1RlzQAtdUF8zyFCxTasCyns4cAP\r\na=rtcp-mux\r\na=rtcp-rsize\r\na=sendrecv\r\na=rtpmap:97 OPUS/48000/2\r\na=rtcp-fb:97 transport-cc\r\na=fmtp:97 sprop-stereo=0;sprop-maxcapturerate=48000\r\na=ssrc:2982979766 msid:user599012961@host-c96ac52 webrtctransceiver17\r\na=ssrc:2982979766 cname:user599012961@host-c96ac52\r\na=mid:audio1\r\nb=AS:192\r\na=fingerprint:sha-256 BF:D0:EC:78:0E:BC:ED:5E:17:02:1E:F0:35:61:36:A9:84:F5:62:37:94:36:98:50:6B:43:22:2E:05:37:42:75\r\na=rtcp-mux-only\r\n"

我正在使用最新的 Chrome,但 Brave、Edge 等浏览器也有同样的行为。

我尝试了几种方法,但都不起作用。1)启用硬件加速chrome://gpu 2)将 openh264 更新到最新版本 3)更改加速设置

相关内容