{"id":2520,"date":"2021-12-06T19:26:46","date_gmt":"2021-12-06T11:26:46","guid":{"rendered":"https:\/\/1vr.cn\/?p=2520"},"modified":"2021-12-06T19:26:46","modified_gmt":"2021-12-06T11:26:46","slug":"ue4-26%e7%9a%84pixelstreaming%e5%83%8f%e7%b4%a0%e6%b5%81%e9%80%81%e5%b4%a9%e6%ba%83%e9%97%ae%e9%a2%98","status":"publish","type":"post","link":"https:\/\/1vr.cn\/?p=2520","title":{"rendered":"UE4.26\u7684PixelStreaming\u50cf\u7d20\u6d41\u9001\u5d29\u6e83\u95ee\u9898"},"content":{"rendered":"\n<p>UE4\u7684PixelStreaming\u7684\u5185\u7f51\u6d4b\u8bd5\u73af\u5883\u642d\u5efa\u8fd8\u662f\u6bd4\u8f83\u7b80\u5355\u7684,\u6309\u7167\u865a\u5e7b\u5b98\u65b9\u6587\u6863\u4e00\u6b65\u6b65\u64cd\u4f5c\u5373\u53ef(<a rel=\"noreferrer noopener\" href=\"https:\/\/docs.unrealengine.com\/4.27\/en-US\/SharingAndReleasing\/PixelStreaming\/PixelStreamingIntro\/\" target=\"_blank\">https:\/\/docs.unrealengine.com\/4.27\/en-US\/SharingAndReleasing\/PixelStreaming\/PixelStreamingIntro\/<\/a>).<\/p>\n\n\n\n<p>\u642d\u5efa\u597d\u4e4b\u540e,\u5728\u4f7f\u7528\u8f83\u65b0\u7684\u6d4f\u89c8\u5668\u6d4f\u89c8,\u53ef\u4ee5\u8fde\u63a5,\u70b9\u51fbStart\u540e\u53ef\u80fd\u4f1a\u51fa\u73b0\u7c7b\u4f3c&#8221;Player 101 not found&#8221;\u7684\u5d29\u6e83\u9519\u8bef.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"944\" height=\"602\" src=\"\/wp-content\/uploads\/2021\/12\/image.png\" alt=\"\" class=\"wp-image-2521\" srcset=\"\/wp-content\/uploads\/2021\/12\/image.png 944w, \/wp-content\/uploads\/2021\/12\/image-300x191.png 300w, \/wp-content\/uploads\/2021\/12\/image-768x490.png 768w, \/wp-content\/uploads\/2021\/12\/image-596x380.png 596w\" sizes=\"auto, (max-width: 944px) 100vw, 944px\" \/><\/figure>\n\n\n\n<p><code><strong>Assertion failed: Player [File:D:\/Build\/++UE4\/Sync\/Engine\/Plugins\/Media\/PixelStreaming\/Source\/PixelStreaming\/Private\/Streamer.cpp] [Line: 173]<br>player 101 not found<\/strong><\/code><\/p>\n\n\n\n<!--more-->\n\n\n\n<p>\u5728\u547d\u4ee4\u884c\u4f1a\u770b\u5230Failed to parse anser&#8217;s SDP\u7684\u5b57\u6837,\u8fd9\u4e2a\u9519\u8bef\u662f\u56e0\u4e3a\u4f1a\u8bdd\u4e2d\u7684extmap-allow-mixed\u5c5e\u6027\u5bfc\u81f4,\u5728\u65b0\u7248\u7684\u6d4f\u89c8\u5668\u9ed8\u8ba4\u5f00\u59cb\u4e86\u8fd9\u4e2a\u5c5e\u6027\u53ca\u5141\u8bb8\u6df7\u5408\u4f7f\u7528\u5355\u5b57\u8282\u548c\u53cc\u5b57\u8282\u7684RTP\u6807\u5934.UE\u5f15\u64ce\u4ece4.27\u7248\u5f00\u59cb\u624d\u9ed8\u8ba4\u5728\u5176PixelStreaming\u670d\u52a1\u5668\u7684\u811a\u672c\u4e2d\u8fdb\u884c\u4e86\u5bf9\u8be5\u5c5e\u6027\u7684\u5904\u7406,\u5982\u679c\u4f7f\u75284.26\u53ca\u4ee5\u524d\u7684UE\u7248\u672c\u5219\u4f1a\u5bfc\u81f4\u8fd9\u4e2a\u95ee\u9898.<\/p>\n\n\n\n<p>\u53ef\u4ee5\u5bf9<strong>UE_4.26\\Engine\\Source\\Programs\\PixelStreaming\\WebServers\\SignallingWebServer\\scripts\\<em>webRtcPlayer.js<\/em><\/strong>\u6587\u4ef6\u8fdb\u884c\u7f16\u8f91(\u8bb0\u5f97\u53d6\u6d88\u8be5\u6587\u4ef6\u7684\u53ea\u8bfb\u5c5e\u6027),\u5728125\u884c<\/p>\n\n\n\n<p><code>offer.sdp = offer.sdp.replace(\/(a=fmtp:\\d+ .<em>level-asymmetry-allowed=.<\/em>)\\r\\n\/gm, \"$1;x-google-start-bitrate=10000;x-google-max-bitrate=20000\\r\\n\");<\/code><\/p>\n\n\n\n<p>\u6dfb\u52a0\u4e0b\u9762\u8fd9\u884c\u4ee3\u7801:<\/p>\n\n\n\n<p><code>offer.sdp = offer.sdp.replace(\/(a=extmap-allow-mixed)\\r\\n\/gm, \u201c\u201d);<\/code><\/p>\n\n\n\n<p>\u5982\u4e0b\u56fe:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"904\" height=\"309\" src=\"\/wp-content\/uploads\/2021\/12\/image-1.png\" alt=\"\" class=\"wp-image-2522\" srcset=\"\/wp-content\/uploads\/2021\/12\/image-1.png 904w, \/wp-content\/uploads\/2021\/12\/image-1-300x103.png 300w, \/wp-content\/uploads\/2021\/12\/image-1-768x263.png 768w\" sizes=\"auto, (max-width: 904px) 100vw, 904px\" \/><\/figure>\n\n\n\n<p>\u7136\u540e\u91cd\u65b0\u8fd0\u884c\u50cf\u7d20\u6d41\u9001\u7684\u670d\u52a1\u5668\u5373\u53ef.<\/p>\n\n\n\n<p>\u5982\u679c\u662f\u66f4\u8001\u7684\u7248\u672c,\u5982UE 4.24\u7248,\u5176\u811a\u672c\u4e0d\u652f\u6301offer\u7279\u6027,\u5219\u53ef\u4ee5\u7528\u4e0b\u5217\u4ee3\u7801\u81ea\u52a8\u5220\u9664\u6240\u6709extmap-allow-mixed\u6807\u7b7e:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><code>\/\/\u627e\u5230\u201cPixelStreaming\\SignallingWebServer\\scripts\\app.js\u201d\u7684382\u884c\uff08\u884c\u6570\u662f\u5b98\u65b9\u539f\u7248\u672c\u884c\u6570\uff09\n\nwebRtcPlayerObj.onWebRtcOffer = function (offer) {\n   if (ws &amp;&amp; ws.readyState === WS_OPEN_STATE) {\n\n      removeExtmapAllowMixed(offer);\/\/\u6dfb\u52a0\u4e00\u884c\n      let offerStr = JSON.stringify(offer);\n      console.log(`-> SS: offer:\\n${offerStr}`);\n      ws.send(offerStr);\n  }\n};\n\/\/\u6dfb\u52a0\u4e00\u4e2a\u51fd\u6570\n\nfunction removeExtmapAllowMixed(desc) {\n  \/* remove a=extmap-allow-mixed for webrtc.org &lt; M71 *\/\n  if (!window.RTCPeerConnection) {\n      return;\n   }\n  if(desc.sdp.indexOf(\u2019\\na=extmap-allow-mixed\u2019) !== -1){\n  const sdp = desc.sdp.split(\u2019\\n\u2019).filter((line) => {\n  return line.trim() !== \u2018a=extmap-allow-mixed\u2019;\n  }).join(\u2019\\n\u2019);\n  desc.sdp = sdp;\n  return sdp;\n}<\/code><\/code><\/pre>\n\n\n\n<p>\u53c2\u8003:<br><a href=\"https:\/\/blog.csdn.net\/gigiwotou\/article\/details\/120705539\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/blog.csdn.net\/gigiwotou\/article\/details\/120705539<\/a><br><a href=\"https:\/\/blog.csdn.net\/u012538729\/article\/details\/117993641\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/blog.csdn.net\/u012538729\/article\/details\/117993641<\/a><br><\/p>\n\n\n\n<p>\u597d\u4e86,\u5148\u5199\u5230\u8fd9\u91cc,\u56de\u89c1!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>UE4\u7684PixelStreaming\u7684\u5185\u7f51\u6d4b\u8bd5\u73af\u5883\u642d\u5efa\u8fd8\u662f\u6bd4\u8f83\u7b80\u5355\u7684,\u6309\u7167\u865a\u5e7b\u5b98\u65b9\u6587\u6863\u4e00\u6b65\u6b65\u64cd\u4f5c\u5373\u53ef(http &hellip; <a href=\"https:\/\/1vr.cn\/?p=2520\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">UE4.26\u7684PixelStreaming\u50cf\u7d20\u6d41\u9001\u5d29\u6e83\u95ee\u9898<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[267,265,266],"class_list":["post-2520","post","type-post","status-publish","format-standard","hentry","category-5","tag-pixelstreaming","tag-player-101-not-found","tag-266","without-featured-image"],"_links":{"self":[{"href":"https:\/\/1vr.cn\/index.php?rest_route=\/wp\/v2\/posts\/2520","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/1vr.cn\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/1vr.cn\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/1vr.cn\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/1vr.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2520"}],"version-history":[{"count":1,"href":"https:\/\/1vr.cn\/index.php?rest_route=\/wp\/v2\/posts\/2520\/revisions"}],"predecessor-version":[{"id":2523,"href":"https:\/\/1vr.cn\/index.php?rest_route=\/wp\/v2\/posts\/2520\/revisions\/2523"}],"wp:attachment":[{"href":"https:\/\/1vr.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2520"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/1vr.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2520"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/1vr.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2520"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}