ossrs / srs

SRS is a simple, high-efficiency, real-time media server supporting RTMP, WebRTC, HLS, HTTP-FLV, HTTP-TS, SRT, MPEG-DASH, and GB28181.
https://ossrs.io
MIT License
25.7k stars 5.38k forks source link

RTC player cannot play #2426

Closed ly616187030 closed 3 years ago

ly616187030 commented 3 years ago

When deployed locally, RTC playback can function normally. When deployed on Tencent Cloud or Alibaba Cloud ECS, RTMP playback can function normally, but RTC playback cannot.

When deployed locally, RTC playback can function normally. When deployed on Tencent Cloud or Alibaba Cloud ECS, RTMP playback can function normally, but RTC playback cannot. I have opened ports 8000, 1935, 1985, and 8080 on my cloud host.

**1. SRS version: 4.0.123

  1. The logs for SRS are as follows:**
    root@VM_0_2_centos trunk]# ./objs/srs -c conf/rtc.conf
    [2021-06-22 11:35:24.145][Trace][23724][178t54qr] XCORE-SRS/4.0.123(Leo)
    [2021-06-22 11:35:24.146][Trace][23724][178t54qr] config parse complete
    [2021-06-22 11:35:24.146][Trace][23724][178t54qr] write log to console
    [2021-06-22 11:35:24.146][Trace][23724][178t54qr][MAIN] SRS/4.0.123(Leo), MIT
    [2021-06-22 11:35:24.146][Trace][23724][178t54qr] authors: Winlin,Wenjie,Runner365,John,B.P.Y,Lixin
    [2021-06-22 11:35:24.146][Trace][23724][178t54qr] contributors: winlin<winlin@vip.126.com> chengli.ycl<chengli.ycl@alibaba-inc.com> wenjie.zhao<740936897@qq.com> xiangcheng.liu<liuxc0116@foxmail.com> naijia.liu<youngcow@youngcow.net> alcoholyi<alcoholyi@qq.com> byteman<wangchen2011@gmail.com> chad.wang<chad.wang.cn@gmail.com> suhetao<suhetao@gmail.com> Johnny<fengjihu@163.com> karthikeyan<keyanmca@gmail.com> StevenLiu<lq@chinaffmpeg.org> zhengfl<zhengfl_1989@126.com> tufang14<breadbean1449@gmail.com> allspace<allspace@gmail.com> niesongsong<nie950@gmail.com> rudeb0t<nimrod@themanxgroup.tw> CallMeNP<np.liamg@gmail.com> synote<synote@qq.com> lovecat<littlefawn@163.com> panda1986<542638787@qq.com> YueHonghui<hongf.yue@hotmail.com> ThomasDreibholz<dreibh@simula.no> JuntaoLiu<juntliu@gmail.com> RocFang<fangpeng1986@gmail.com> MakarovYaroslav<yaroslav.makarov.97@mail.ru> MirkoVelic<mvelic@inoxx.net> HuiZhang(huzhang2)<huzhang2@cisco.com> OtterWa<simpleotter23@gmail.com> walkermi<172192667@qq.com> haofz<fuzhuang.hao@vhall.com> ME_Kun_Han<hanvskun@hotmail.com> ljx0305<ljx0305@gmail.com> cenxinwei<censhanhe@163.com> StarBrilliant<m13253@hotmail.com> xubin<xubin@chnvideo.com> intliang<yintiliang@gmail.com> flowerwrong<sysuyangkang@gmail.com> YLX<568414379@qq.com> J<guotaojiang@qq.com> Harlan<hailiang@gvrcraft.com> hankun<hankun@bravovcloud.com> JonathanBarratt<jonathan.barratt@gmail.com> KeeganH<keeganwharris@gmail.com> StevenLiu<lingjiujianke@gmail.com> liuxc0116<liuxc0116@gmail.com> ChengdongZhang<lmajzcd@sina.com> lovacat<lovecat@china.sina.com> qiang.li<qiang.li@verycdn.com.cn> HungMingWu<u9089000@gmail.com> Himer<xishizhaohua@qq.com> xialixin<xlx0625@163.com> alphonsetai<tyh_123@163.com> Michael.Ma<wnpllr@gmail.com> lam2003<linmin3@yy.com> runner365<shi.weibd@hotmail.com> XiaofengWang<wasphin@gmail.com> XiaLixin<xialx@yuntongxun.com> xiaozhihong<xiaozhihong8@gmail.com> HuyaJohn<xiaozhihong@huya.com> xiaozhihong<hondaxiao@tencent.com> yanghuiwen<cainiaodj@qq.com> Bepartofyou<309554135@qq.com> pengqiang.wpq<pengqiang.wpq@alibaba-inc.com> l<22312935+lam2003@github> xfalcon<x-falcon@github> chengh_math<chengh_math@126.com> jinxue.cgh<jinxue.cgh@alibaba-inc.com> lipeng19811218<lipeng19811218@gmail.com> mozhan.lp<mozhan.lp@alibaba-inc.com> yajun18<yajun18@staff.sina.com.cn> liulichuan<liulichuan@kuaishou.com> yapingcat<caoyapingneu@163.com> chenchengbin<chenchengbin@yy.com> chenhaibo<nmgchenhaibo@foxmail.com> jasongwq<jasongwq@gmail.com> xialixin<xialixin@kanzhun.com> yinjiaoyuan<yinjiaoyuan@163.com> PieerePi<pihuibin@hotmail.com> JesseXi<jesse.jinjin@wo.cn> PieerePi<40780488+PieerePi@github> ghostsf<ghost_sf@163.com> xbpeng121<53243357+xbpeng121@github> johzzy<hellojinqiang@gmail.com> stone<bluestn@163.com> cfw11<34058899+cfw11@github> louis.xia<68469352@qq.com>
    [2021-06-22 11:35:24.146][Trace][23724][178t54qr] cwd=/home/srs-4.0.123/trunk, work_dir=./, build: 2021-06-22 11:07:35, configure: --x86-x64, uname: Linux VM_0_2_centos 3.10.0-1062.9.1.el7.x86_64 #1 SMP Fri Dec 6 15:49:49 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux, osx: 0
    [2021-06-22 11:35:24.146][Trace][23724][178t54qr] configure detail: --prefix=/usr/local/srs --hls=on --hds=off --dvr=on --ssl=on --https=on --ssl-1-0=off --ssl-local=off --sys-ssl=off --transcode=on --ingest=on --stat=on --http-callback=on --http-server=on --stream-caster=on --http-api=on --utest=off --cherrypy=off --srt=off --rtc=on --simulator=off --gb28181=off --cxx11=off --cxx14=off --ffmpeg-fit=on --nasm=on --srtp-nasm=on --clean=on --gperf=off --gmc=off --gmd=off --gmp=off --gcp=off --gprof=off --static=off --use-shared-st=off --use-shared-srt=off --log-verbose=off --log-info=off --log-trace=on --gcov=off --debug=off --debug-stats=off --cross-build=off --cc=gcc --cxx=g++ --ar=ar --ld=ld --randlib=randlib
    [2021-06-22 11:35:24.146][Trace][23724][178t54qr] srs checking config...
    [2021-06-22 11:35:24.146][Trace][23724][178t54qr] ips, iface[0] eth0 ipv4 0x11043 172.21.0.2, iface[1] docker0 ipv4 0x11043 172.17.0.1, iface[2] br-24892bbac546 ipv4 0x11043 172.19.0.1, iface[3] br-76fd6e738fc4 ipv4 0x11043 172.18.0.1, iface[4] br-1484c23bbb2c ipv4 0x11043 172.20.0.1, iface[5] eth0 ipv6 0x11043 fe80::5054:ff:fefb:8f44%eth0, iface[6] docker0 ipv6 0x11043 fe80::42:d1ff:fec1:8f6f%docker0, iface[7] br-24892bbac546 ipv6 0x11043 fe80::42:8bff:fe07:cfa8%br-24892bbac546, iface[8] br-76fd6e738fc4 ipv6 0x11043 fe80::42:32ff:fe65:35ab%br-76fd6e738fc4, iface[9] veth4c38501 ipv6 0x11043 fe80::f86e:9cff:fe10:4611%veth4c38501, iface[10] veth3e15cfd ipv6 0x11043 fe80::78ff:b0ff:fe88:8920%veth3e15cfd, iface[11] vetha8dae70 ipv6 0x11043 fe80::c853:27ff:feb9:df5b%vetha8dae70, iface[12] veth81fc572 ipv6 0x11043 fe80::9892:7cff:fe0c:af4e%veth81fc572, iface[13] br-1484c23bbb2c ipv6 0x11043 fe80::42:e6ff:fef1:d3a1%br-1484c23bbb2c, iface[14] veth1c91507 ipv6 0x11043 fe80::50ae:6cff:fe7d:a379%veth1c91507, iface[15] veth6c49aa3 ipv6 0x11043 fe80::f475:30ff:fe86:5caa%veth6c49aa3, iface[16] vetha76dfc2 ipv6 0x11043 fe80::80b0:6ff:fefa:280%vetha76dfc2, iface[17] veth0fb1106 ipv6 0x11043 fe80::6c72:29ff:fe0a:4ab2%veth0fb1106, iface[18] veth0ea0f48 ipv6 0x11043 fe80::94e7:63ff:fe06:3ac4%veth0ea0f48, iface[19] veth8e1fd3d ipv6 0x11043 fe80::1470:edff:fe06:a2c4%veth8e1fd3d
    [2021-06-22 11:35:24.146][Trace][23724][178t54qr] devices, intranet eth0 172.21.0.2, intranet docker0 172.17.0.1, intranet br-24892bbac546 172.19.0.1, intranet br-76fd6e738fc4 172.18.0.1, intranet br-1484c23bbb2c 172.20.0.1, intranet eth0 fe80::5054:ff:fefb:8f44%eth0, intranet docker0 fe80::42:d1ff:fec1:8f6f%docker0, intranet br-24892bbac546 fe80::42:8bff:fe07:cfa8%br-24892bbac546, intranet br-76fd6e738fc4 fe80::42:32ff:fe65:35ab%br-76fd6e738fc4, intranet veth4c38501 fe80::f86e:9cff:fe10:4611%veth4c38501, intranet veth3e15cfd fe80::78ff:b0ff:fe88:8920%veth3e15cfd, intranet vetha8dae70 fe80::c853:27ff:feb9:df5b%vetha8dae70, intranet veth81fc572 fe80::9892:7cff:fe0c:af4e%veth81fc572, intranet br-1484c23bbb2c fe80::42:e6ff:fef1:d3a1%br-1484c23bbb2c, intranet veth1c91507 fe80::50ae:6cff:fe7d:a379%veth1c91507, intranet veth6c49aa3 fe80::f475:30ff:fe86:5caa%veth6c49aa3, intranet vetha76dfc2 fe80::80b0:6ff:fefa:280%vetha76dfc2, intranet veth0fb1106 fe80::6c72:29ff:fe0a:4ab2%veth0fb1106, intranet veth0ea0f48 fe80::94e7:63ff:fe06:3ac4%veth0ea0f48, intranet veth8e1fd3d fe80::1470:edff:fe06:a2c4%veth8e1fd3d
    [2021-06-22 11:35:24.146][Warn][23724][178t54qr][22] stats network use index=0, ip=172.21.0.2, ifname=eth0
    [2021-06-22 11:35:24.146][Warn][23724][178t54qr][22] stats disk not configed, disk iops disabled.
    [2021-06-22 11:35:24.146][Trace][23724][178t54qr] write log to console
    [2021-06-22 11:35:24.146][Trace][23724][178t54qr] features, rch:on, dash:on, hls:on, hds:off, srt:off, hc:on, ha:on, hs:on, hp:on, dvr:on, trans:on, inge:on, stat:on, sc:on
    [2021-06-22 11:35:24.146][Trace][23724][178t54qr] SRS on  amd64 x86_64, conf:conf/rtc.conf, limit:1000, writev:1024, encoding:little-endian, HZ:100
    [2021-06-22 11:35:24.146][Trace][23724][178t54qr] mw sleep:350ms. mr enabled:on, default:0, sleep:350ms
    [2021-06-22 11:35:24.146][Trace][23724][178t54qr] gc:on, pq:30000ms, cscc:[0,16), csa:on, tn:on(may hurts performance), ss:auto(guess by merged write)
    [2021-06-22 11:35:24.146][Trace][23724][178t54qr] system default latency(ms): mw(0-350) + mr(0-350) + play-queue(0-30000)
    [2021-06-22 11:35:24.146][Warn][23724][178t54qr][22] SRS/4.0.123 is not stable
    [2021-06-22 11:35:24.151][Trace][23724][178t54qr] fingerprint=EC:F5:0B:63:F6:98:79:1D:A3:39:6B:B6:00:61:08:EC:F2:28:33:DF:30:1B:E8:68:10:45:28:67:07:46:3B:A2
    [2021-06-22 11:35:24.151][Trace][23724][178t54qr] CircuitBreaker: enabled=1, high=2x90, critical=1x95, dying=5x99
    [2021-06-22 11:35:24.151][Trace][23724][178t54qr] http flv live stream, vhost=__defaultVhost__, mount=[vhost]/[app]/[stream].flv
    [2021-06-22 11:35:24.151][Trace][23724][178t54qr] http: root mount to ./objs/nginx/html
    [2021-06-22 11:35:24.151][Trace][23724][178t54qr] server main cid=178t54qr, pid=23724, ppid=1394, asprocess=0
    [2021-06-22 11:35:24.151][Trace][23724][178t54qr] write pid=23724 to ./objs/srs.pid success!
    [2021-06-22 11:35:24.151][Trace][23724][178t54qr] RTMP listen at tcp://0.0.0.0:1935, fd=7
    [2021-06-22 11:35:24.151][Trace][23724][178t54qr] HTTP-API listen at tcp://0.0.0.0:1985, fd=8
    [2021-06-22 11:35:24.151][Trace][23724][178t54qr] HTTP-Server listen at tcp://0.0.0.0:8080, fd=9
    [2021-06-22 11:35:24.151][Trace][23724][178t54qr] signal installed, reload=1, reopen=10, fast_quit=15, grace_quit=3
    [2021-06-22 11:35:24.151][Trace][23724][178t54qr] http: api mount /console to ./objs/nginx/html/console
    [2021-06-22 11:35:24.151][Trace][23724][178t54qr] rtc listen at udp://0.0.0.0:8000, fd=10
    [2021-06-22 11:35:24.151][Trace][23724][k68n9c75] Hybrid cpu=0.00%,8MB
    [2021-06-22 11:35:24.152][Trace][23724][2zv5y849] TCP: connection manager run, conns=0
    [2021-06-22 11:35:24.152][Trace][23724][1h252m6k] UDP #10 LISTEN at 0.0.0.0:8000, SO_SNDBUF(default=212992, expect=10485760, actual=425984, r0=0), SO_RCVBUF(default=212992, expect=10485760, actual=425984, r0=0)
    [2021-06-22 11:35:24.152][Trace][23724][lv40vz3b] RTC: connection manager run, conns=0
    [2021-06-22 11:35:29.144][Trace][23724][k68n9c75] Hybrid cpu=2.00%,8MB
    [2021-06-22 11:35:34.145][Trace][23724][k68n9c75] Hybrid cpu=0.00%,8MB
    [2021-06-22 11:35:36.927][Trace][23724][p1wb5l73] RTMP client ip=111.126.65.230:12317, fd=11
    [2021-06-22 11:35:36.974][Trace][23724][p1wb5l73] simple handshake success.
    [2021-06-22 11:35:36.974][Trace][23724][p1wb5l73] connect app, tcUrl=rtmp://49.233.191.90/live, pageUrl=, swfUrl=, schema=rtmp, vhost=49.233.191.90, port=1935, app=live, args=null
    [2021-06-22 11:35:36.974][Trace][23724][p1wb5l73] protocol in.buffer=0, in.ack=0, out.ack=0, in.chunk=128, out.chunk=128
    [2021-06-22 11:35:37.034][Trace][23724][p1wb5l73] client identified, type=fmle-publish, vhost=49.233.191.90, app=live, stream=livestream, param=, duration=0ms
    [2021-06-22 11:35:37.034][Trace][23724][p1wb5l73] connected stream, tcUrl=rtmp://49.233.191.90/live, pageUrl=, swfUrl=, schema=rtmp, vhost=__defaultVhost__, port=1935, app=live, stream=livestream, param=, args=null
    [2021-06-22 11:35:37.034][Trace][23724][p1wb5l73] new source, stream_url=/live/livestream
    [2021-06-22 11:35:37.035][Trace][23724][p1wb5l73] source url=/live/livestream, ip=111.126.65.230, cache=1, is_edge=0, source_id=/
    [2021-06-22 11:35:37.083][Trace][23724][p1wb5l73] new source, stream_url=/live/livestream
    [2021-06-22 11:35:37.085][Trace][23724][p1wb5l73] RTC bridge from RTMP, discard_aac=0, discard_bframe=1, merge_nalus=0
    [2021-06-22 11:35:37.085][Trace][23724][p1wb5l73] ignore disabled exec for vhost=__defaultVhost__
    [2021-06-22 11:35:37.085][Trace][23724][p1wb5l73] http: mount flv stream for sid=/live/livestream, mount=/live/livestream.flv
    [2021-06-22 11:35:37.085][Trace][23724][p1wb5l73] start publish mr=0/350, p1stpt=20000, pnt=5000, tcp_nodelay=0
    [2021-06-22 11:35:37.138][Trace][23724][p1wb5l73] got metadata, width=768, height=320, vcodec=7, acodec=10
    [2021-06-22 11:35:37.138][Trace][23724][p1wb5l73] 46B video sh,  codec(7, profile=High, level=3.2, 768x320, 0kbps, 0.0fps, 0.0s)
    [2021-06-22 11:35:37.138][Trace][23724][p1wb5l73] 4B audio sh, codec(10, profile=LC, 2channels, 0kbps, 44100HZ), flv(16bits, 2channels, 44100HZ)
    [2021-06-22 11:35:39.145][Trace][23724][k68n9c75] Hybrid cpu=2.00%,11MB, cid=2,1, timer=63,0,0, clock=0,48,1,0,0,0,0,0,0, objs=(pkt:8,raw:7,fua:1,msg:28,oth:1,buf:6)
    [2021-06-22 11:35:43.084][Trace][23724][018r5cpm] HTTP #0 144.34.179.220:51232 OPTIONS http://49.233.191.90:1985/rtc/v1/play/?eip=49.233.191.90, content-length=-1
    [2021-06-22 11:35:43.456][Trace][23724][018r5cpm] HTTP #1 144.34.179.220:51232 POST http://49.233.191.90:1985/rtc/v1/play/?eip=49.233.191.90, content-length=5719
    [2021-06-22 11:35:43.811][Trace][23724][018r5cpm] RTC play webrtc://49.233.191.90/live/livestream?eip=49.233.191.90, api=http://49.233.191.90:1985/rtc/v1/play/?eip=49.233.191.90, tid=15d7a65, clientip=, app=live, stream=livestream, offer=5211B, eip=49.233.191.90, codec=, srtp=, dtls=
    [2021-06-22 11:35:43.812][Trace][23724][018r5cpm] ignore attribute=, value=
    [2021-06-22 11:35:43.813][Trace][23724][018r5cpm] RTC player nack=1, nnc=1
    [2021-06-22 11:35:43.813][Trace][23724][018r5cpm] RTC connection player gcc=0
    [2021-06-22 11:35:43.813][Trace][23724][018r5cpm] RTC: Init tracks {track: video-w4hcy8b7, is_active: 0=>1},{track: audio-70w13902, is_active: 0=>1}, ok
    [2021-06-22 11:35:43.813][Trace][23724][018r5cpm] RTC: Use candidate mock_eip 49.233.191.90 as 49.233.191.90:8000
    [2021-06-22 11:35:43.815][Trace][23724][018r5cpm] RTC init session, user=0n1gjj25:lgwe, url=/live/livestream, encrypt=1/1, DTLS(role=passive, version=auto), timeout=30000ms, nack=1
    [2021-06-22 11:35:43.815][Trace][23724][018r5cpm] RTC username=0n1gjj25:lgwe, dtls=1, srtp=1, offer=5211B, answer=1259B
    [2021-06-22 11:35:43.815][Trace][23724][018r5cpm] RTC remote offer: v=0\r\no=- 5297521421648581008 2 IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\na=group:BUNDLE 0 1\r\na=extmap-allow-mixed\r\na=msid-semantic: WMS\r\nm=audio 9 UDP/TLS/RTP/SAVPF 111 103 104 9 0 8 106 105 13 110 112 113 126\r\nc=IN IP4 0.0.0.0\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=ice-ufrag:lgwe\r\na=ice-pwd:ub/K2Em/ZC0J38sW3TWA1Xq2\r\na=ice-options:trickle\r\na=fingerprint:sha-256 5C:6C:DA:B0:52:BB:2B:DB:1E:2E:2A:74:8B:4F:57:4B:E2:DF:49:48:E7:9D:00:ED:D3:B4:72:13:8A:9E:62:3B\r\na=setup:actpass\r\na=mid:0\r\na=extmap:1 urn:ietf:params:rtp-hdrext:ssrc-audio-level\r\na=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\na=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\na=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid\r\na=extmap:5 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id\r\na=extmap:6 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id\r\na=recvonly\r\na=rtcp-mux\r\na=rtpmap:111 opus/48000/2\r\na=rtcp-fb:111 transport-cc\r\na=fmtp:111 minptime=10;useinbandfec=1\r\na=rtpmap:103 ISAC/16000\r\na=rtpmap:104 ISAC/32000\r\na=rtpmap:9 G722/8000\r\na=rtpmap:0 PCMU/8000\r\na=rtpmap:8 PCMA/8000\r\na=rtpmap:106 CN/32000\r\na=rtpmap:105 CN/16000\r\na=rtpmap:13 CN/8000\r\na=rtpmap:110 telephone-event/48000\r\na=rtpmap:112 telephone-event/32000\r\na=rtpmap:113 telephone-event/16000\r\na=rtpmap:126 telephone-event/8000\r\nm=video 9 UDP/TLS/RTP/SAVPF 96 97 98 99 100 101 122 102 121 127 120 125 107 108 109 35 36 124 119 123 118 114 115 116 37\r\nc=IN IP4 0.0.0.0\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=ice-ufrag:lgwe\r\na=ice-pwd:ub/K2Em/ZC0J38sW3TWA1Xq2\r\na=ice-options:trickle\r\na=fingerprint:sha-256 5C:6C:DA:B0:52:BB:2B:DB:1E:2E:2A:74:8B:4F:57:4B:E2:DF:49:48:E7:9D:00:ED:D3:B4:72:13:8A:9E:62:3B\r\na=setup:actpass\r\na=mid:1\r\na=extmap:14 urn:ietf:params:rtp-hdrext:toffset\r\na=extmap:2 http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time\r\na=extmap:13 urn:3gpp:video-orientation\r\na=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\na=extmap:12 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay\r\na=extmap:11 http://www.webrtc.org/experiments/rtp-hdrext/video-content-type\r\na=extmap:7 http://www.webrtc.org/experiments/rtp-hdrext/video-timing\r\na=extmap:8 http://www.webrtc.org/experiments/rtp-hdrext/color-space\r\na=extmap:4 urn:ietf:params:rtp-hdrext:sdes:mid\r\na=extmap:5 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id\r\na=extmap:6 urn:ietf:params:rtp-hdrext:sdes:repaired-rtp-stream-id\r\na=recvonly\r\na=rtcp-mux\r\na=rtcp-rsize\r\na=rtpmap:96 VP8/90000\r\na=rtcp-fb:96 goog-remb\r\na=rtcp-fb:96 transport-cc\r\na=rtcp-fb:96 ccm fir\r\na=rtcp-fb:96 nack\r\na=rtcp-fb:96 nack pli\r\na=rtpmap:97 rtx/90000\r\na=fmtp:97 apt=96\r\na=rtpmap:98 VP9/90000\r\na=rtcp-fb:98 goog-remb\r\na=rtcp-fb:98 transport-cc\r\na=rtcp-fb:98 ccm fir\r\na=rtcp-fb:98 nack\r\na=rtcp-fb:98 nack pli\r\na=fmtp:98 profile-id=0\r\na=rtpmap:99 rtx/90000\r\na=fmtp:99 apt=98\r\na=rtpmap:100 VP9/90000\r\na=rtcp-fb:100 goog-remb\r\na=rtcp-fb:100 transport-cc\r\na=rtcp-fb:100 ccm fir\r\na=rtcp-fb:100 nack\r\na=rtcp-fb:100 nack pli\r\na=fmtp:100 profile-id=2\r\na=rtpmap:101 rtx/90000\r\na=fmtp:101 apt=100\r\na=rtpmap:122 VP9/90000\r\na=rtcp-fb:122 goog-remb\r\na=rtcp-fb:122 transport-cc\r\na=rtcp-fb:122 ccm fir\r\na=rtcp-fb:122 nack\r\na=rtcp-fb:122 nack pli\r\na=fmtp:122 profile-id=1\r\na=rtpmap:102 H264/90000\r\na=rtcp-fb:102 goog-remb\r\na=rtcp-fb:102 transport-cc\r\na=rtcp-fb:102 ccm fir\r\na=rtcp-fb:102 nack\r\na=rtcp-fb:102 nack pli\r\na=fmtp:102 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42001f\r\na=rtpmap:121 rtx/90000\r\na=fmtp:121 apt=102\r\na=rtpmap:127 H264/90000\r\na=rtcp-fb:127 goog-remb\r\na=rtcp-fb:127 transport-cc\r\na=rtcp-fb:127 ccm fir\r\na=rtcp-fb:127 nack\r\na=rtcp-fb:127 nack pli\r\na=fmtp:127 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42001f\r\na=rtpmap:120 rtx/90000\r\na=fmtp:120 apt=127\r\na=rtpmap:125 H264/90000\r\na=rtcp-fb:125 goog-remb\r\na=rtcp-fb:125 transport-cc\r\na=rtcp-fb:125 ccm fir\r\na=rtcp-fb:125 nack\r\na=rtcp-fb:125 nack pli\r\na=fmtp:125 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f\r\na=rtpmap:107 rtx/90000\r\na=fmtp:107 apt=125\r\na=rtpmap:108 H264/90000\r\na=rtcp-fb:108 goog-remb\r\na=rtcp-fb:108 transport-cc\r\na=rtcp-fb:108 ccm fir\r\na=rtcp-fb:108 nack\r\na=rtcp-fb:108 nack pli\r\na=fmtp:108 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=42e01f\r\na=rtpmap:109 rtx/90000\r\na=fmtp:109 apt=108\r\na=rtpmap:35 AV1X/90000\r\na=rtcp-fb:35 goog-remb\r\na=rtcp-fb:35 transport-cc\r\na=rtcp-fb:35 ccm fir\r\na=rtcp-fb:35 nack\r\na=rtcp-fb:35 nack pli\r\na=rtpmap:36 rtx/90000\r\na=fmtp:36 apt=35\r\na=rtpmap:124 H264/90000\r\na=rtcp-fb:124 goog-remb\r\na=rtcp-fb:124 transport-cc\r\na=rtcp-fb:124 ccm fir\r\na=rtcp-fb:124 nack\r\na=rtcp-fb:124 nack pli\r\na=fmtp:124 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=4d0032\r\na=rtpmap:119 rtx/90000\r\na=fmtp:119 apt=124\r\na=rtpmap:123 H264/90000\r\na=rtcp-fb:123 goog-remb\r\na=rtcp-fb:123 transport-cc\r\na=rtcp-fb:123 ccm fir\r\na=rtcp-fb:123 nack\r\na=rtcp-fb:123 nack pli\r\na=fmtp:123 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=640032\r\na=rtpmap:118 rtx/90000\r\na=fmtp:118 apt=123\r\na=rtpmap:114 red/90000\r\na=rtpmap:115 rtx/90000\r\na=fmtp:115 apt=114\r\na=rtpmap:116 ulpfec/90000\r\na=rtpmap:37 flexfec-03/90000\r\na=rtcp-fb:37 goog-remb\r\na=rtcp-fb:37 transport-cc\r\na=fmtp:37 repair-window=10000000\r\n
    [2021-06-22 11:35:43.815][Trace][23724][018r5cpm] RTC local answer: v=0\r\no=SRS/4.0.123(Leo) 25388080 2 IN IP4 0.0.0.0\r\ns=SRSPlaySession\r\nt=0 0\r\na=ice-lite\r\na=group:BUNDLE 0 1\r\na=msid-semantic: WMS live/livestream\r\nm=audio 9 UDP/TLS/RTP/SAVPF 111\r\nc=IN IP4 0.0.0.0\r\na=ice-ufrag:0n1gjj25\r\na=ice-pwd:bn506v866632834108rr35481951968u\r\na=fingerprint:sha-256 EC:F5:0B:63:F6:98:79:1D:A3:39:6B:B6:00:61:08:EC:F2:28:33:DF:30:1B:E8:68:10:45:28:67:07:46:3B:A2\r\na=setup:passive\r\na=mid:0\r\na=sendonly\r\na=rtcp-mux\r\na=rtcp-rsize\r\na=rtpmap:111 opus/48000/2\r\na=ssrc:239636127 cname:x1466443p55n4011\r\na=ssrc:239636127 label:audio-70w13902\r\na=candidate:0 1 udp 2130706431 49.233.191.90 8000 typ host generation 0\r\nm=video 9 UDP/TLS/RTP/SAVPF 125\r\nc=IN IP4 0.0.0.0\r\na=ice-ufrag:0n1gjj25\r\na=ice-pwd:bn506v866632834108rr35481951968u\r\na=fingerprint:sha-256 EC:F5:0B:63:F6:98:79:1D:A3:39:6B:B6:00:61:08:EC:F2:28:33:DF:30:1B:E8:68:10:45:28:67:07:46:3B:A2\r\na=setup:passive\r\na=mid:1\r\na=sendonly\r\na=rtcp-mux\r\na=rtcp-rsize\r\na=rtpmap:125 H264/90000\r\na=fmtp:125 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=42e01f\r\na=ssrc:239636128 cname:x1466443p55n4011\r\na=ssrc:239636128 label:video-w4hcy8b7\r\na=candidate:0 1 udp 2130706431 49.233.191.90 8000 typ host generation 0\r\n
    [2021-06-22 11:35:44.146][Trace][23724][k68n9c75] Hybrid cpu=3.00%,11MB, cid=2,1, timer=63,0,0, clock=0,48,1,0,0,0,0,0,0, objs=(pkt:8,raw:7,fua:1,msg:28,oth:1,buf:6)
    [2021-06-22 11:35:44.146][Trace][23724][k68n9c75] RTC: Server conns=1
    [2021-06-22 11:35:44.903][Trace][23724][018r5cpm] TCP: before dispose resource(HttpConn)(0x179f5d0), conns=2, zombies=0, ign=0, inz=0, ind=0
    [2021-06-22 11:35:44.903][Warn][23724][018r5cpm][104] client disconnect peer. ret=1007
    [2021-06-22 11:35:44.903][Trace][23724][2zv5y849] TCP: clear zombies=1 resources, conns=2, removing=0, unsubs=0
    [2021-06-22 11:35:44.903][Trace][23724][018r5cpm] TCP: disposing #0 resource(HttpConn)(0x179f5d0), conns=2, disposing=1, zombies=0
    [2021-06-22 11:35:49.147][Trace][23724][k68n9c75] Hybrid cpu=2.00%,12MB, cid=2,1, timer=62,0,26, clock=0,46,2,0,0,0,0,0,0, free=1, objs=(pkt:84,raw:55,fua:27,msg:220,oth:1,buf:50)
    [2021-06-22 11:35:49.147][Trace][23724][k68n9c75] RTC: Server conns=1
    [2021-06-22 11:35:54.148][Trace][23724][k68n9c75] Hybrid cpu=2.00%,12MB, cid=2,1, timer=62,0,26, clock=0,46,2,0,0,0,0,0,0, free=1, objs=(pkt:84,raw:55,fua:27,msg:220,oth:1,buf:50)
    [2021-06-22 11:35:54.149][Trace][23724][k68n9c75] RTC: Server conns=1
    [2021-06-22 11:35:59.148][Trace][23724][k68n9c75] Hybrid cpu=3.00%,12MB, cid=2,1, timer=62,0,26, clock=0,46,2,0,0,0,0,0,0, free=1, objs=(pkt:84,raw:55,fua:27,msg:220,oth:1,buf:50)
    [2021-06-22 11:35:59.148][Trace][23724][k68n9c75] RTC: Server conns=1
    [2021-06-22 11:36:02.084][Trace][23724][p1wb5l73] <- CPB time=19982946, okbps=1,0,0, ikbps=283,0,0, mr=0/350, p1stpt=20000, pnt=5000
    [2021-06-22 11:36:04.149][Trace][23724][k68n9c75] Hybrid cpu=3.00%,12MB, cid=1,0, timer=62,0,48, clock=0,45,2,0,0,0,0,0,0, objs=(pkt:79,raw:57,fua:21,msg:214,oth:1,buf:50)
    [2021-06-22 11:36:04.149][Trace][23724][k68n9c75] RTC: Server conns=1
    [2021-06-22 11:36:09.149][Trace][23724][k68n9c75] Hybrid cpu=2.00%,12MB, cid=1,0, timer=62,0,48, clock=0,45,2,0,0,0,0,0,0, objs=(pkt:79,raw:57,fua:21,msg:214,oth:1,buf:50)
    [2021-06-22 11:36:09.149][Trace][23724][k68n9c75] RTC: Server conns=1
    [2021-06-22 11:36:12.086][Trace][23724][p1wb5l73] <- CPB time=29983921, okbps=0,0,0, ikbps=272,279,0, mr=0/350, p1stpt=20000, pnt=5000
    [2021-06-22 11:36:14.150][Trace][23724][k68n9c75] Hybrid cpu=2.00%,12MB, cid=1,0, timer=62,0,49, clock=0,46,2,0,0,0,0,0,0, objs=(pkt:75,raw:56,fua:17,msg:212,oth:1,buf:50)
    [2021-06-22 11:36:14.150][Trace][23724][018r5cpm] RTC: session destroy by timeout, username=0n1gjj25:lgwe
    [2021-06-22 11:36:14.150][Trace][23724][018r5cpm] RTC: before dispose resource(RtcConn)(0x1836430), conns=1, zombies=0, ign=0, inz=0, ind=0
    [2021-06-22 11:36:14.150][Trace][23724][018r5cpm] RTC: session detach from [018r5cpm](RtcConn), disposing=1
    [2021-06-22 11:36:14.150][Trace][23724][lv40vz3b] RTC: clear zombies=1 resources, conns=1, removing=0, unsubs=0
    [2021-06-22 11:36:14.150][Trace][23724][018r5cpm] RTC: disposing #0 resource(RtcConn)(0x1836430), conns=1, disposing=1, zombies=0
    [2021-06-22 11:36:14.150][Warn][23724][018r5cpm][11][DTLS_HANG] DTLS: Hang, done=0, version=-1, arq=0
    [2021-06-22 11:36:19.151][Trace][23724][k68n9c75] Hybrid cpu=2.00%,12MB, cid=1,0, timer=62,0,49, clock=0,46,2,0,0,0,0,0,0, objs=(pkt:75,raw:56,fua:17,msg:212,oth:1,buf:50)
    [2021-06-22 11:36:22.087][Trace][23724][p1wb5l73] <- CPB time=39987603, okbps=0,0,0, ikbps=266,279,0, mr=0/350, p1stpt=20000, pnt=5000
    [2021-06-22 11:36:24.151][Trace][23724][k68n9c75] Hybrid cpu=2.00%,12MB, cid=1,0, timer=62,0,49, clock=0,46,2,0,0,0,0,0,0, objs=(pkt:75,raw:56,fua:17,msg:212,oth:1,buf:50)
    [2021-06-22 11:36:29.152][Trace][23724][k68n9c75] Hybrid cpu=4.00%,12MB, cid=1,1, timer=62,0,0, clock=0,45,3,0,0,0,0,0,0, free

    1. The configuration for SRS is as follows:

listen 1935; max_connections 1000; daemon off; srs_log_tank console;

http_server { enabled on; listen 8080; dir ./objs/nginx/html; }

http_api { enabled on; listen 1985; } stats { network 0; } rtc_server { enabled on;

Listen at udp://8000

listen 8000;
#
# The $CANDIDATE means fetch from env, if not configed, use * as default.
#
# The * means retrieving server IP automatically, from all network interfaces,
# @see https://github.com/ossrs/srs/wiki/v4_CN_RTCWiki#config-candidate
candidate 49.233.191.90;

}

vhost defaultVhost { rtc { enabled on; } http_remux { enabled on; mount [vhost]/[app]/[stream].flv; } }



**Replay**

**How to replay bug?**

> Steps to reproduce the bug

**Steps to reproduce the bug:**

1. I use ffmpeg for streaming.
1. RTMP can be played, but RTC cannot be played.
1. Open `chrome://webrtc-internals/`, setRemoteDescription (type: "answer", 3 sections), and the candidate is the public IP of the server.

**Expected behavior:**

Make sure to maintain the markdown structure.

**Expected behavior:**

> I hope to deploy on Tencent Cloud or Alibaba Cloud ECS, and be able to use RTC for playback.

`TRANS_BY_GPT3`
xiaozhihong commented 3 years ago

The DTLS request did not come up. Port 8000 is a UDP port. Confirm the protocol, is it misconfigured?

TRANS_BY_GPT3

ly616187030 commented 3 years ago

DTLS request did not come up, port 8000 is a UDP port, confirm the protocol, did I open it incorrectly?

Thank you, it's resolved now. It turned out to be the security rules of the security group. After opening the port, I set it to TCP:8000, but changing it to UDP:8000 allowed normal playback. Thank you very much for your help!

TRANS_BY_GPT3