ossrs / srs

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

SRS/5.0.89 GB28181 Pulling stream Webrtc cannot play, Flv videos can be played normally. #3261

Closed online2311 closed 1 year ago

online2311 commented 1 year ago

Note: Please read FAQ before file an issue, see 2716

Note: Before asking questions, please refer to the FAQ, specifically 2716.

Description (描述)

Please describe your issue here (描述你遇到了什么问题) Make sure to maintain the markdown structure.

  1. SRS Version (版本): SRS/5.0.89 Make sure to maintain the markdown structure.

  2. SRS Log (日志): Make sure to maintain the markdown structure.

[2022-11-21 07:50:05.253][INFO][2910][0xv99110] XCORE-SRS/5.0.89(Bee)
[2022-11-21 07:50:05.260][INFO][2910][0xv99110] config parse complete
[2022-11-21 07:50:05.260][INFO][2910][0xv99110] write log to console
[2022-11-21 07:50:05.260][INFO][2910][0xv99110] SRS/5.0.89(Bee), MIT
[2022-11-21 07:50:05.260][INFO][2910][0xv99110] authors: Winlin<winlin@vip.126.com> ZhaoWenjie<zhaowenjie@tal.com> ShiWei<shiwei05@kuaishou.com> XiaoZhihong<hondaxiao@tencent.com> WuPengqiang<pengqiang.wpq@alibaba-inc.com> XiaLixin<xialixin@kanzhun.com> LiPeng<mozhan.lp@alibaba-inc.com> ChenGuanghua<jinxue.cgh@alibaba-inc.com> ChenHaibo<nmgchenhaibo@foxmail.com> Johzzy<hellojinqiang@gmail.com> Zhouxiaojun2008<279686030@qq.com> Pengfei.ma<pengfei.ma.chn@outlook.com> ZhangJunqin<zhangjunqin@jd.com> and https://github.com/ossrs/srs/blob/develop/trunk/AUTHORS.md#contributors
[2022-11-21 07:50:05.260][INFO][2910][0xv99110] cwd=/tmp/run, work_dir=./, build: 2022-11-21 03:37:29, configure: --cross-build --cross-prefix=aarch64-openwrt-linux-gnu- --arch=aarch64 --cpu=cortex-a53 --rtc=on --srt=on --gb28181=on --ffmpeg-fit=off --nasm=off --srtp-nasm=on --cxx11=off --sys-ssl=off --extra-flags=-D__aarch64__ --jobs=1, uname: Linux OpenWRT-Build-System 4.19.0-22-amd64 #1 SMP Debian 4.19.260-1 (2022-09-29) x86_64 GNU/Linux, osx: 0, env: 0, pkg: 
[2022-11-21 07:50:05.260][INFO][2910][0xv99110] configure detail: --prefix=/usr/local/srs --config=conf/srs.conf --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-converter=on --http-api=on --utest=off --cherrypy=off --srt=on --rtc=on --gb28181=on --simulator=off --cxx11=off --cxx14=off --backtrace=on --ffmpeg-fit=off --nasm=off --srtp-nasm=off --clean=on --gperf=off --gmc=off --gmd=off --gmp=off --gcp=off --gprof=off --static=off --shared-st=off --shared-srt=off --shared-ffmpeg=off --log-verbose=off --log-info=off --log-trace=on --log-level_v2=on --gcov=off --debug=off --debug-stats=off --cross-build=on --sanitizer=on --cygwin64=off --single-thread=off --arch=aarch64 --cpu=cortex-a53 --host=aarch64-openwrt-linux-gnu --cross-prefix=aarch64-openwrt-linux-gnu- --extra-flags="-D__aarch64__" --cc=aarch64-openwrt-linux-gnu-gcc --cxx=aarch64-openwrt-linux-gnu-g++ --ar=aarch64-openwrt-linux-gnu-ar --ld=aarch64-openwrt-linux-gnu-ld --randlib=aarch64-openwrt-linux-gnu-randlib
[2022-11-21 07:50:05.261][INFO][2910][0xv99110] srs checking config...
[2022-11-21 07:50:05.264][INFO][2910][0xv99110] ips, iface[0] eth0 ipv4 0x11043 172.16.250.78, iface[1] eth0 ipv6 0x11043 fe80::d498:8dff:fe6a:f5c5%eth0
[2022-11-21 07:50:05.264][INFO][2910][0xv99110] devices, intranet eth0 172.16.250.78, intranet eth0 fe80::d498:8dff:fe6a:f5c5%eth0
[2022-11-21 07:50:05.264][WARN][2910][0xv99110][2] stats network use index=0, ip=172.16.250.78, ifname=eth0
[2022-11-21 07:50:05.264][WARN][2910][0xv99110][2] stats disk not configed, disk iops disabled.
[2022-11-21 07:50:05.264][INFO][2910][0xv99110] write log to console
[2022-11-21 07:50:05.265][INFO][2910][0xv99110] features, rch:on, dash:on, hls:on, hds:off, srt:on, hc:on, ha:on, hs:on, hp:on, dvr:on, trans:on, inge:on, stat:on, sc:on
[2022-11-21 07:50:05.265][INFO][2910][0xv99110] SRS on aarch64(crossbuild), conf:/etc/config/openwrt.conf, limit:1000, writev:1024, encoding:little-endian, HZ:100
[2022-11-21 07:50:05.265][INFO][2910][0xv99110] mw sleep:350ms. mr enabled:on, default:0, sleep:350ms
[2022-11-21 07:50:05.266][INFO][2910][0xv99110] gc:on, pq:30000ms, cscc:[0,16), csa:on, tn:on(may hurts performance), ss:auto(guess by merged write)
[2022-11-21 07:50:05.266][INFO][2910][0xv99110] system default latency(ms): mw(0-350) + mr(0-350) + play-queue(0-30000)
[2022-11-21 07:50:05.266][WARN][2910][0xv99110][2] SRS/5.0.89 is not stable
[2022-11-21 07:50:05.266][INFO][2910][0xv99110] write pid=2910 to ./objs/srs.pid success!
[2022-11-21 07:50:05.266][INFO][2910][0xv99110] Thread #1(primordial): init name=srs-master-1, interval=5000ms
[2022-11-21 07:50:05.268][INFO][2910][0xv99110] Pool: Start threads primordial=1, hybrids=1 ok
[2022-11-21 07:50:05.268][INFO][2910][xj3g64qe] Thread #2: run with tid=2911, entry=0x7f95a02380, label=hybrid, name=srs-hybrid-2
[2022-11-21 07:50:05.297][INFO][2910][xj3g64qe] TencentCloud CLS is disabled
[2022-11-21 07:50:05.297][INFO][2910][xj3g64qe] TencentCloud APM is disabled
[2022-11-21 07:50:05.327][INFO][2910][xj3g64qe] fingerprint=1A:98:06:D4:F9:25:77:AE:B2:4F:37:5A:3C:61:ED:E0:65:6D:D0:42:B5:1C:44:7D:58:E8:AF:1A:3A:1B:00:F4
[2022-11-21 07:50:05.327][INFO][2910][xj3g64qe] CircuitBreaker: enabled=1, high=2x90, critical=1x95, dying=5x99
[2022-11-21 07:50:05.328][INFO][2910][xj3g64qe] http flv live stream, vhost=rtc.vhost.srs.com, mount=[vhost]/[app]/[stream].flv
[2022-11-21 07:50:05.328][INFO][2910][xj3g64qe] http flv live stream, vhost=__defaultVhost__, mount=[vhost]/[app]/[stream].flv
[2022-11-21 07:50:05.329][INFO][2910][xj3g64qe] http: root mount to ./objs/nginx/html
[2022-11-21 07:50:05.329][INFO][2910][xj3g64qe] server main cid=xj3g64qe, pid=2910, ppid=2435, asprocess=0
[2022-11-21 07:50:05.330][INFO][2910][xj3g64qe] RTMP listen at tcp://127.0.0.1:1935, fd=9
[2022-11-21 07:50:05.330][INFO][2910][xj3g64qe] HTTP-API listen at tcp://0.0.0.0:1985, fd=10
[2022-11-21 07:50:05.330][INFO][2910][xj3g64qe] HTTP-Server listen at tcp://0.0.0.0:80, fd=11
[2022-11-21 07:50:05.331][INFO][2910][xj3g64qe] WebRTC listen at tcp://0.0.0.0:8000, fd=12
[2022-11-21 07:50:05.331][INFO][2910][xj3g64qe] GB-TCP listen at tcp://0.0.0.0:9000, fd=13
[2022-11-21 07:50:05.332][INFO][2910][xj3g64qe] SIP-TCP listen at tcp://0.0.0.0:5060, fd=14
[2022-11-21 07:50:05.332][INFO][2910][xj3g64qe] signal installed, reload=1, reopen=10, fast_quit=15, grace_quit=3
[2022-11-21 07:50:05.333][INFO][2910][xj3g64qe] http: api mount /console to ./objs/nginx/html/console
[2022-11-21 07:50:05.335][INFO][2910][xj3g64qe] rtc listen at udp://0.0.0.0:8000, fd=15
[2022-11-21 07:50:05.336][INFO][2910][51br205t] Hybrid cpu=0.00%,49MB
[2022-11-21 07:50:05.336][WARN][2910][43p758go][22] use private address as ip: 172.16.250.78, ifname=eth0
[2022-11-21 07:50:05.336][INFO][2910][43p758go] Startup query id=vid-d121189, session=vid-ujm7d95, eip=172.16.250.78, wait=300s
[2022-11-21 07:50:05.336][INFO][2910][j769xxru] TCP: connection manager run, conns=0
[2022-11-21 07:50:05.338][INFO][2910][772kra54] GB: connection manager run, conns=0
[2022-11-21 07:50:05.338][INFO][2910][633782i9] SRT: connection manager run, conns=0
[2022-11-21 07:50:05.338][INFO][2910][6h1dba34] UDP #15 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)
[2022-11-21 07:50:05.339][INFO][2910][7t346u84] RTC: connection manager run, conns=0
[2022-11-21 07:50:10.277][INFO][2910][51br205t] Hybrid cpu=0.00%,49MB
[2022-11-21 07:50:10.317][INFO][2910][0xv99110] Process: cpu=2.00%,49MB, threads=2
[2022-11-21 07:50:15.277][INFO][2910][51br205t] Hybrid cpu=1.00%,49MB
[2022-11-21 07:50:15.367][INFO][2910][0xv99110] Process: cpu=0.99%,49MB, threads=2
[2022-11-21 07:50:20.278][INFO][2910][51br205t] Hybrid cpu=0.00%,49MB, cid=1,1, timer=52,0,0, clock=0,19,1,13,7,0,0,0,0
[2022-11-21 07:50:20.417][INFO][2910][0xv99110] Process: cpu=0.99%,49MB, threads=2
[2022-11-21 07:50:25.278][INFO][2910][51br205t] Hybrid cpu=0.00%,49MB, cid=1,1, timer=52,0,0, clock=0,19,1,13,7,0,0,0,0
[2022-11-21 07:50:25.467][INFO][2910][0xv99110] Process: cpu=2.00%,50MB, threads=2
[2022-11-21 07:50:27.290][INFO][2910][7h2j174n] Session: Start timeout=60000ms, reinvite=5000ms, candidate=172.16.250.78, pip=172.16.250.78, output=rtmp://127.0.0.1/gb28181/[stream]?vhost=rtc.vhost.srs.com
[2022-11-21 07:50:27.291][INFO][2910][7h2j174n] SIP: Change device=34020000002000000001, state=Init->Registered
[2022-11-21 07:50:27.588][INFO][2910][7h2j174n] Session: Change device=34020000002000000001, state=Init->Connecting
[2022-11-21 07:50:27.589][INFO][2910][7h2j174n] SIP: Change device=34020000002000000001, state=Registered->Inviting
[2022-11-21 07:50:27.589][INFO][2910][7h2j174n] SIP: INVITE device=sip:34020000002000000001@3402000000, branch=611r44, tag=ky039000, call=e63d3vea2bw5x050, ssrc=0200000373, sdp is v=0\r\no=34020000002000000001 0 0 IN IP4 172.16.250.78\r\ns=Play\r\nc=IN IP4 172.16.250.78\r\nt=0 0\r\nm=video 9000 TCP/RTP/AVP 96\r\na=recvonly\r\na=rtpmap:96 PS/90000\r\ny=0200000373\r\n
[2022-11-21 07:50:27.604][INFO][2910][7h2j174n] SIP: Change device=34020000002000000001, state=Inviting->Trying
[2022-11-21 07:50:27.623][INFO][2910][7h2j174n] SIP: Change device=34020000002000000001, state=Trying->Stable
[2022-11-21 07:50:27.721][INFO][2910][7h2j174n] PS: Media connected
[2022-11-21 07:50:27.722][INFO][2910][7h2j174n] Muxer: Convert GB to RTMP rtmp://127.0.0.1/gb28181/34020000002000000001?vhost=rtc.vhost.srs.com
[2022-11-21 07:50:27.730][INFO][2910][w93q2yk6] RTMP client ip=127.0.0.1:35852, fd=19, trace=, span=
[2022-11-21 07:50:27.790][INFO][2910][7h2j174n] complex handshake success.
[2022-11-21 07:50:27.791][INFO][2910][7h2j174n] protocol in.buffer=0, in.ack=0, out.ack=0, in.chunk=128, out.chunk=128
[2022-11-21 07:50:27.791][INFO][2910][w93q2yk6] complex handshake success
[2022-11-21 07:50:27.792][INFO][2910][w93q2yk6] connect app, tcUrl=rtmp://rtc.vhost.srs.com/gb28181, pageUrl=, swfUrl=, schema=rtmp, vhost=rtc.vhost.srs.com, port=1935, app=gb28181, args=(obj)
[2022-11-21 07:50:27.792][INFO][2910][w93q2yk6] edge-srs ip=172.16.250.78, version=5.0.89, pid=2910, id=0
[2022-11-21 07:50:27.793][INFO][2910][w93q2yk6] protocol in.buffer=0, in.ack=0, out.ack=0, in.chunk=128, out.chunk=128
[2022-11-21 07:50:27.838][INFO][2910][7h2j174n] connected, version=5.0.89.0, ip=127.0.0.1, pid=2910, id=0, dsu=1
[2022-11-21 07:50:27.845][WARN][2910][7h2j174n][11] Muxer: Ignore video err code=3043(DropBeforeSequence)(Drop frames before get sps and pps) : ts: consume video : write frame : drop for no sps/pps
thread [2910][7h2j174n]: on_ts_message() [./src/app/srs_app_gb28181.cpp:1610][errno=11]
thread [2910][7h2j174n]: on_ts_video() [./src/app/srs_app_gb28181.cpp:1694][errno=11]
thread [2910][7h2j174n]: write_h264_ipb_frame() [./src/app/srs_app_gb28181.cpp:1748][errno=11]
[2022-11-21 07:50:27.882][INFO][2910][w93q2yk6] client identified, type=flash-publish, vhost=rtc.vhost.srs.com, app=gb28181, stream=34020000002000000001, param=?vhost=rtc.vhost.srs.com, duration=0ms
[2022-11-21 07:50:27.883][INFO][2910][w93q2yk6] connected stream, tcUrl=rtmp://rtc.vhost.srs.com/gb28181, pageUrl=, swfUrl=, schema=rtmp, vhost=rtc.vhost.srs.com, port=1935, app=gb28181, stream=34020000002000000001, param=?vhost=rtc.vhost.srs.com, args=(obj)
[2022-11-21 07:50:27.883][INFO][2910][w93q2yk6] new live source, stream_url=rtc.vhost.srs.com/gb28181/34020000002000000001
[2022-11-21 07:50:27.884][INFO][2910][w93q2yk6] source url=rtc.vhost.srs.com/gb28181/34020000002000000001, ip=127.0.0.1, cache=1, is_edge=0, source_id=/
[2022-11-21 07:50:27.885][INFO][2910][w93q2yk6] new rtc source, stream_url=rtc.vhost.srs.com/gb28181/34020000002000000001
[2022-11-21 07:50:27.887][INFO][2910][w93q2yk6] ignore disabled exec for vhost=rtc.vhost.srs.com
[2022-11-21 07:50:27.888][INFO][2910][w93q2yk6] http: mount flv stream for sid=rtc.vhost.srs.com/gb28181/34020000002000000001, mount=rtc.vhost.srs.com/gb28181/34020000002000000001.flv
[2022-11-21 07:50:27.889][INFO][2910][w93q2yk6] start publish mr=0/350, p1stpt=20000, pnt=5000, tcp_nodelay=0
[2022-11-21 07:50:27.889][INFO][2910][7h2j174n] Session: Change device=34020000002000000001, state=Connecting->Established
[2022-11-21 07:50:30.288][INFO][2910][51br205t] Hybrid cpu=6.92%,55MB, cid=4,1, timer=52,0,0, clock=0,15,2,14,6,0,1,1,0, objs=(pkt:10,raw:10,fua:0,msg:7,oth:0,buf:0)
[2022-11-21 07:50:30.517][INFO][2910][0xv99110] Process: cpu=6.94%,56MB, threads=2
[2022-11-21 07:50:31.699][INFO][2910][w93q2yk6] 44B video sh,  codec(7, profile=Main, level=3.1, 1280x720, 0kbps, 0.0fps, 0.0s)
[2022-11-21 07:50:35.298][INFO][2910][51br205t] Hybrid cpu=8.00%,57MB, cid=4,1, timer=52,0,0, clock=0,15,2,14,6,0,1,1,0, objs=(pkt:10,raw:10,fua:0,msg:7,oth:0,buf:0)
[2022-11-21 07:50:35.568][INFO][2910][0xv99110] Process: cpu=8.97%,58MB, threads=2
[2022-11-21 07:50:37.338][INFO][2910][7h2j174n] Session: Alive=10s, packs=241, recover=0, reserved=0, msgs=244, drop=0, media(id=1, alive=9s, packs=241 recover=0, reserved=0, msgs=244, drop=0)
[2022-11-21 07:50:40.308][INFO][2910][51br205t] Hybrid cpu=9.99%,59MB, cid=1,0, timer=52,0,0, clock=0,12,6,14,5,0,0,0,0, objs=(pkt:31,raw:31,fua:0,msg:68,oth:0,buf:0)
[2022-11-21 07:50:40.617][INFO][2910][0xv99110] Process: cpu=9.90%,59MB, threads=2
[2022-11-21 07:50:45.308][INFO][2910][51br205t] Hybrid cpu=8.00%,60MB, cid=1,0, timer=52,0,0, clock=0,12,6,14,5,0,0,0,0, objs=(pkt:31,raw:31,fua:0,msg:68,oth:0,buf:0)
[2022-11-21 07:50:45.667][INFO][2910][0xv99110] Process: cpu=10.90%,61MB, threads=2
[2022-11-21 07:50:47.417][INFO][2910][7h2j174n] Session: Alive=20s, packs=493, recover=0, reserved=0, msgs=499, drop=0, media(id=1, alive=19s, packs=493 recover=0, reserved=0, msgs=499, drop=0)
  1. SRS Config (配置): Make sure to maintain the markdown structure.
    
    # no-daemon and write log to console config for srs.
    # @see full.conf for detail config.
    listen              127.0.0.1:1935;
    max_connections     1000;
    daemon              off;
    srs_log_tank        console;

stream_caster { enabled on; caster gb28181; output rtmp://127.0.0.1/gb28181/[stream]?vhost=rtc.vhost.srs.com; listen 9000; sip { enabled on; listen 5060; candidate 172.16.250.78; } }

http_api { enabled on; listen 1985; raw_api { enabled on; allow_reload on; } }

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

stats { network 0; }

rtc_server { enabled on; listen 8000; tcp { enabled on; listen 8000; } protocol all; candidate 172.16.250.78; use_auto_detect_network_ip on; ip_family ipv4; api_as_candidates on; resolve_api_domain on; keep_api_domain off; ecdsa on; encrypt on; reuseport 1; merge_nalus off; }

vhost rtc.vhost.srs.com { rtc { enabled on; nack on; nack_no_copy on; twcc on; stun_timeout 30; stun_strict_check on; dtls_role passive; dtls_version auto; drop_for_pt 0; rtmp_to_rtc on; keep_bframe off; rtc_to_rtmp off; pli_for_rtmp 6.0; } min_latency on; play { mw_latency 0; mw_msgs 0; } http_remux {
enabled on;
mount [vhost]/[app]/[stream].flv;
}
}

vhost defaultVhost { rtc {
enabled on;
nack on;
nack_no_copy on;
twcc on; stun_timeout 30; stun_strict_check on; dtls_role passive; dtls_version auto; drop_for_pt 0; rtmp_to_rtc on; keep_bframe off; rtc_to_rtmp off; pli_for_rtmp 6.0; }
min_latency on;
play {
mw_latency 0;
mw_msgs 0;
}

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

    }   
}

}



**Replay (重现)**
Make sure to maintain the markdown structure.

> Please describe how to replay the bug? (重现Bug的步骤)
Make sure to maintain the markdown structure.

1. `GB28181 pull stream, camera set GB28181 information, video stream information H264/Main/3.1/1280x720, no audio information`
1. `[flv video address plays normally](http://rtc.vhost.srs.com/gb28181/34020000002000000001.flv)`
1. `[WebRTC cannot play](webrtc://rtc.vhost.srs.com/gb28181/34020000002000000001)`

**Expect (Expected Behavior)**

> Please describe your expectation (Describe what you expect to happen)

WebRTC can play normally.

`TRANS_BY_GPT3`
online2311 commented 1 year ago

Chrome Console Log

srs.page.js:92 ?eip=x.x.x.x to overwrite candidate. Overwrite server candidate (public IP) configuration.
srs.page.js:93 ?api=x to overwrite WebRTC API(1985).
srs.page.js:94 ?schema=http|https to overwrite WebRTC API protocol.
rtc_player.html?vhost=rtc.vhost.srs.com&app=gb28181&stream=34020000002000000001.flv&server=rtc.vhost.srs.com&port=8080&autostart=true&schema=http:106 

       For autostart, we should mute it, see https://www.jianshu.com/p/c3c6944eed5a or https://developers.google.com/web/updates/2017/09/autoplay-policy-changes#audiovideo_elements
`(Anonymous) @ rtc_player.html?vhost=rtc.vhost.srs.com&app=gb28181&stream=34020000002000000001.flv&server=rtc.vhost.srs.com&port=8080&autostart=true&schema=http:106`

(Anonymous) @ rtc_player.html?vhost=rtc.vhost.srs.com&app=gb28181&stream=34020000002000000001.flv&server=rtc.vhost.srs.com&port=8080&autostart=true&schema=http:106
srs.sdk.js:316 Generated offer:  Object
srs.sdk.js:323 Got answer:  Object
srs.sdk.js:316 Generated offer:  Object
srs.sdk.js:323 Got answer:  Object
srs.sdk.js:316 Generated offer:  {api: 'http://rtc.vhost.srs.com:1985/rtc/v1/play/', tid: '13e15c2', streamurl: 'webrtc://rtc.vhost.srs.com/gb28181/34020000002000000001', clientip: null, sdp: 'v=0\r\no=- 8065349402620815713 2 IN IP4 127.0.0.1\r\ns… transport-cc\r\na=fmtp:49 repair-window=10000000\r\n'}api: "http://rtc.vhost.srs.com:1985/rtc/v1/play/"clientip: nullsdp: "v=0\r\no=- 8065349402620815713 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 63 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:XVBp\r\na=ice-pwd:FF6zAJBKwxsHBmFEjFNIwfHO\r\na=ice-options:trickle\r\na=fingerprint:sha-256 8E:D8:8B:C9:E7:76:6B:D5:8E:08:FB:18:16:81:D4:6B:C2:D4:40:F2:03:D9:E5:2C:E5:C5:63:47:0B:96:03:2D\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

TRANS_BY_GPT3

winlinvip commented 1 year ago

Can vhost be removed?

TRANS_BY_GPT3

online2311 commented 1 year ago

At first, it didn't work without adding a vhost, so I added the relevant information about the vhost. Flv playback is normal, and the source video is in rtsp h264/acc format. Since no obvious error was seen, it is unknown what the reason is.

TRANS_BY_GPT3

online2311 commented 1 year ago

Do you still need me to provide other relevant information?

TRANS_BY_GPT3

abigailcg commented 1 year ago

rtmp_to_rtc on; rtc_to_rtmp on;

winlinvip commented 1 year ago

Please remove vhost and follow @abigailcg's configuration so that FLV can be used.

Please upgrade to 5.0.100 and provide the logs.

TRANS_BY_GPT3

online2311 commented 1 year ago

System log

[2022-12-04 01:53:14.583][INFO][4246][486y6385] RTC play webrtc://172.16.250.88/gb28181/34020000002000000001, api=http://172.16.250.88:1985/rtc/v1/play/, tid=3cc2ced, clientip=172.16.250.105, app=gb28181, stream=34020000002000000001, offer=6107B, eip=, codec=, srtp=, dtls=
[2022-12-04 01:53:14.584][INFO][4246][486y6385] ignore attribute=, value=
[2022-12-04 01:53:14.606][INFO][4246][486y6385] RTC player nack=1, nnc=1
[2022-12-04 01:53:14.606][INFO][4246][486y6385] RTC connection player gcc=3
[2022-12-04 01:53:14.606][INFO][4246][486y6385] RTC: Init tracks {track: video-y29f8d8s, is_active: 0=>1},{track: audio-3985c192, is_active: 0=>1}, ok
[2022-12-04 01:53:14.607][INFO][4246][486y6385] Best matched ip=172.16.250.88, ifname=eth0
[2022-12-04 01:53:14.607][INFO][4246][486y6385] RTC: Use candidates 172.16.250.88, protocol=udp
[2022-12-04 01:53:14.610][INFO][4246][486y6385] RTC init session, user=j958n114:5YwY, url=/gb28181/34020000002000000001, encrypt=1/1, DTLS(role=passive, version=auto), timeout=30000ms, nack=1
[2022-12-04 01:53:14.611][INFO][4246][486y6385] RTC username=j958n114:5YwY, dtls=1, srtp=1, offer=6107B, answer=1556B
[2022-12-04 01:53:14.613][INFO][4246][486y6385] RTC remote offer: v=0\r\no=- 2419090662450753764 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 63 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:5YwY\r\na=ice-pwd:96+lcQO6f7QJVY3tT4tLWBlY\r\na=ice-options:trickle\r\na=fingerprint:sha-256 5A:45:D1:10:B2:3E:9F:F2:3D:97:3B:CB:EE:7D:E6:42:22:C6:58:35:42:01:E7:F3:21:6A:7A:BD:FF:1D:26:4C\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=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:63 red/48000/2\r\na=fmtp:63 111/111\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 35 36 37 38 102 123 127 122 125 107 108 109 124 121 39 40 41 42 43 44 45 46 47 48 120 119 114 49\r\nc=IN IP4 0.0.0.0\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=ice-ufrag:5YwY\r\na=ice-pwd:96+lcQO6f7QJVY3tT4tLWBlY\r\na=ice-options:trickle\r\na=fingerprint:sha-256 5A:45:D1:10:B2:3E:9F:F2:3D:97:3B:CB:EE:7D:E6:42:22:C6:58:35:42:01:E7:F3:21:6A:7A:BD:FF:1D:26:4C\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:5 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay\r\na=extmap:6 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:10 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id\r\na=extmap:11 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:35 VP9/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=fmtp:35 profile-id=1\r\na=rtpmap:36 rtx/90000\r\na=fmtp:36 apt=35\r\na=rtpmap:37 VP9/90000\r\na=rtcp-fb:37 goog-remb\r\na=rtcp-fb:37 transport-cc\r\na=rtcp-fb:37 ccm fir\r\na=rtcp-fb:37 nack\r\na=rtcp-fb:37 nack pli\r\na=fmtp:37 profile-id=3\r\na=rtpmap:38 rtx/90000\r\na=fmtp:38 apt=37\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:123 rtx/90000\r\na=fmtp:123 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:122 rtx/90000\r\na=fmtp:122 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: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=4d001f\r\na=rtpmap:121 rtx/90000\r\na=fmtp:121 apt=124\r\na=rtpmap:39 H264/90000\r\na=rtcp-fb:39 goog-remb\r\na=rtcp-fb:39 transport-cc\r\na=rtcp-fb:39 ccm fir\r\na=rtcp-fb:39 nack\r\na=rtcp-fb:39 nack pli\r\na=fmtp:39 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=4d001f\r\na=rtpmap:40 rtx/90000\r\na=fmtp:40 apt=39\r\na=rtpmap:41 H264/90000\r\na=rtcp-fb:41 goog-remb\r\na=rtcp-fb:41 transport-cc\r\na=rtcp-fb:41 ccm fir\r\na=rtcp-fb:41 nack\r\na=rtcp-fb:41 nack pli\r\na=fmtp:41 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=f4001f\r\na=rtpmap:42 rtx/90000\r\na=fmtp:42 apt=41\r\na=rtpmap:43 H264/90000\r\na=rtcp-fb:43 goog-remb\r\na=rtcp-fb:43 transport-cc\r\na=rtcp-fb:43 ccm fir\r\na=rtcp-fb:43 nack\r\na=rtcp-fb:43 nack pli\r\na=fmtp:43 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=f4001f\r\na=rtpmap:44 rtx/90000\r\na=fmtp:44 apt=43\r\na=rtpmap:45 AV1/90000\r\na=rtcp-fb:45 goog-remb\r\na=rtcp-fb:45 transport-cc\r\na=rtcp-fb:45 ccm fir\r\na=rtcp-fb:45 nack\r\na=rtcp-fb:45 nack pli\r\na=rtpmap:46 rtx/90000\r\na=fmtp:46 apt=45\r\na=rtpmap:47 AV1/90000\r\na=rtcp-fb:47 goog-remb\r\na=rtcp-fb:47 transport-cc\r\na=rtcp-fb:47 ccm fir\r\na=rtcp-fb:47 nack\r\na=rtcp-fb:47 nack pli\r\na=fmtp:47 profile=1\r\na=rtpmap:48 rtx/90000\r\na=fmtp:48 apt=47\r\na=rtpmap:120 red/90000\r\na=rtpmap:119 rtx/90000\r\na=fmtp:119 apt=120\r\na=rtpmap:114 ulpfec/90000\r\na=rtpmap:49 flexfec-03/90000\r\na=rtcp-fb:49 goog-remb\r\na=rtcp-fb:49 transport-cc\r\na=fmtp:49 repair-window=10000000\r\n
[2022-12-04 01:53:14.613][INFO][4246][486y6385] RTC local answer: v=0\r\no=SRS/5.0.100(Bee) 548278795392 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 gb28181/34020000002000000001\r\nm=audio 9 UDP/TLS/RTP/SAVPF 111\r\nc=IN IP4 0.0.0.0\r\na=ice-ufrag:j958n114\r\na=ice-pwd:412a98fth2sn169f0s6465403a541765\r\na=fingerprint:sha-256 EE:C3:D0:1F:65:1A:0C:D1:48:E8:D2:0C:CC:B3:00:83:12:51:CA:59:6F:3D:E1:56:CC:F3:4B:0E:F6:6D:D0:27\r\na=setup:passive\r\na=mid:0\r\na=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\na=sendonly\r\na=rtcp-mux\r\na=rtcp-rsize\r\na=rtpmap:111 opus/48000/2\r\na=rtcp-fb:111 transport-cc\r\na=ssrc:42888853 cname:43970333ey0k1062\r\na=ssrc:42888853 label:audio-3985c192\r\na=candidate:0 1 udp 2130706431 172.16.250.88 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:j958n114\r\na=ice-pwd:412a98fth2sn169f0s6465403a541765\r\na=fingerprint:sha-256 EE:C3:D0:1F:65:1A:0C:D1:48:E8:D2:0C:CC:B3:00:83:12:51:CA:59:6F:3D:E1:56:CC:F3:4B:0E:F6:6D:D0:27\r\na=setup:passive\r\na=mid:1\r\na=extmap:3 http://www.ietf.org/id/draft-holmer-rmcat-transport-wide-cc-extensions-01\r\na=sendonly\r\na=rtcp-mux\r\na=rtcp-rsize\r\na=rtpmap:125 H264/90000\r\na=rtcp-fb:125 transport-cc\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=ssrc:42888854 cname:43970333ey0k1062\r\na=ssrc:42888854 label:video-y29f8d8s\r\na=candidate:0 1 udp 2130706431 172.16.250.88 8000 typ host generation 0\r\n
[2022-12-04 01:53:14.631][INFO][4246][486y6385] TCP: before dispose resource(HttpConn)(0x7faa1be8a0), conns=2, zombies=0, ign=0, inz=0, ind=0
[2022-12-04 01:53:14.631][WARN][4246][486y6385][104] client disconnect peer. ret=1007
[2022-12-04 01:53:14.631][INFO][4246][h854g9tq] TCP: clear zombies=1 resources, conns=2, removing=0, unsubs=0
[2022-12-04 01:53:14.631][INFO][4246][486y6385] TCP: disposing #0 resource(HttpConn)(0x7faa1be8a0), conns=2, disposing=1, zombies=0
[2022-12-04 01:53:14.633][INFO][4246][486y6385] RTC: session address init 172.16.250.105:51238
[2022-12-04 01:53:14.633][INFO][4246][486y6385] RTC: session STUN done, waiting DTLS handshake.
[2022-12-04 01:53:14.636][INFO][4246][486y6385] DTLS: State Passive RECV, done=0, arq=0/0, r0=1, r1=0, len=157, cnt=22, size=144, hs=1
[2022-12-04 01:53:14.652][INFO][4246][486y6385] DTLS: State Passive SEND, done=0, arq=0/0, r0=-1, r1=2, len=679, cnt=22, size=82, hs=2
[2022-12-04 01:53:14.657][INFO][4246][486y6385] DTLS: State Passive RECV, done=0, arq=0/0, r0=1, r1=0, len=579, cnt=22, size=299, hs=11
[2022-12-04 01:53:14.674][INFO][4246][486y6385] DTLS: State Passive SEND, done=1, arq=0/0, r0=1, r1=0, len=554, cnt=22, size=466, hs=4
[2022-12-04 01:53:14.674][INFO][4246][486y6385] RTC: DTLS handshake done.
[2022-12-04 01:53:14.675][INFO][4246][486y6385] RTC: session pub=0, sub=1, to=30000ms connection established
[2022-12-04 01:53:14.675][INFO][4246][486y6385] RTC: Subscriber url=/gb28181/34020000002000000001 established
[2022-12-04 01:53:14.675][INFO][4246][486y6385] create consumer, no gop cache
[2022-12-04 01:53:14.675][INFO][4246][486y6385] RTC: start play url=/gb28181/34020000002000000001, source_id=/, realtime=1, mw_msgs=0
[2022-12-04 01:53:14.772][INFO][4246][6j995p35] <- CPB time=40041353, okbps=0,0,0, ikbps=0,0,0, mr=0/350, p1stpt=20000, pnt=5000
[2022-12-04 01:53:15.889][INFO][4246][9k28p9g7] <- RTC RECV #14, udp 11, pps 1/1, schedule 11
[2022-12-04 01:53:16.957][INFO][4246][3t8y0rda] HTTP #0 172.16.250.105:60783 GET http://172.16.250.88:1985/api/v1/streams/?callback=angular.callbacks._b, content-length=-1
[2022-12-04 01:53:16.974][INFO][4246][3t8y0rda] TCP: before dispose resource(HttpConn)(0x7faa1cd8d0), conns=2, zombies=0, ign=0, inz=0, ind=0
[2022-12-04 01:53:16.974][WARN][4246][3t8y0rda][104] client disconnect peer. ret=1007
[2022-12-04 01:53:16.974][INFO][4246][h854g9tq] TCP: clear zombies=1 resources, conns=2, removing=0, unsubs=0
[2022-12-04 01:53:16.974][INFO][4246][3t8y0rda] TCP: disposing #0 resource(HttpConn)(0x7faa1cd8d0), conns=2, disposing=1, zombies=0
[2022-12-04 01:53:18.957][INFO][4246][br068420] Hybrid cpu=11.88%,87MB, cid=13,6, timer=52,0,34, clock=0,12,7,15,4,0,1,1,0, free=1, objs=(pkt:39,raw:39,fua:0,msg:75,oth:0,buf:0)
[2022-12-04 01:53:18.958][INFO][4246][br068420] RTC: Server conns=1, rpkts=(1,rtp:0,stun:1,rtcp:1), spkts=(1,rtp:0,stun:1,rtcp:0), fid=(id:1,fid:1,ffid:0,addr:1,faddr:1)
[2022-12-04 01:53:19.616][INFO][4246][626a6i36] Session: Alive=50s, packs=1251, recover=0, reserved=0, msgs=1267, drop=0, media(id=1, alive=50s, packs=1251 recover=0, reserved=0, msgs=1267, drop=0)
[2022-12-04 01:53:19.617][INFO][4246][b5804o1i] Process: cpu=10.99%,88MB, threads=2
[2022-12-04 01:53:20.579][INFO][4246][626a6i36] PS: Got PSM for video=0xe0, audio=0
[2022-12-04 01:53:21.111][INFO][4246][z9u144m8] HTTP #0 172.16.250.105:60805 GET http://172.16.250.88:1985/api/v1/streams/?callback=angular.callbacks._c, content-length=-1
[2022-12-04 01:53:21.124][INFO][4246][z9u144m8] TCP: before dispose resource(HttpConn)(0x7faa1d9090), conns=2, zombies=0, ign=0, inz=0, ind=0
[2022-12-04 01:53:21.125][WARN][4246][z9u144m8][104] client disconnect peer. ret=1007
[2022-12-04 01:53:21.125][INFO][4246][h854g9tq] TCP: clear zombies=1 resources, conns=2, removing=0, unsubs=0
[2022-12-04 01:53:21.125][INFO][4246][z9u144m8] TCP: disposing #0 resource(HttpConn)(0x7faa1d9090), conns=2, disposing=1, zombies=0
[2022-12-04 01:53:23.967][INFO][4246][br068420] Hybrid cpu=10.89%,92MB, cid=8,4, timer=52,0,37, clock=0,12,8,14,3,1,1,1,0, free=1, objs=(pkt:41,raw:41,fua:0,msg:74,oth:0,buf:0)
[2022-12-04 01:53:23.967][INFO][4246][br068420] RTC: Server conns=1, rpkts=(1,rtp:0,stun:1,rtcp:1), spkts=(1,rtp:0,stun:1,rtcp:0), fid=(id:1,fid:1,ffid:0,addr:1,faddr:1)
[2022-12-04 01:53:24.667][INFO][4246][b5804o1i] Process: cpu=10.89%,92MB, threads=2
[2022-12-04 01:53:24.787][INFO][4246][6j995p35] <- CPB time=50046103, okbps=0,0,0, ikbps=0,394,0, mr=0/350, p1stpt=20000, pnt=5000
[2022-12-04 01:53:25.655][INFO][4246][57264jl3] HTTP #0 172.16.250.105:60832 GET http://172.16.250.88:1985/api/v1/streams/?callback=angular.callbacks._d, content-length=-1
[2022-12-04 01:53:25.671][INFO][4246][57264jl3] TCP: before dispose resource(HttpConn)(0x7faa1e7090), conns=2, zombies=0, ign=0, inz=0, ind=0
[2022-12-04 01:53:25.672][WARN][4246][57264jl3][104] client disconnect peer. ret=1007
[2022-12-04 01:53:25.672][INFO][4246][h854g9tq] TCP: clear zombies=1 resources, conns=2, removing=0, unsubs=0
[2022-12-04 01:53:25.672][INFO][4246][57264jl3] TCP: disposing #0 resource(HttpConn)(0x7faa1e7090), conns=2, disposing=1, zombies=0
[2022-12-04 01:53:27.568][INFO][4246][9k28p9g7] <- RTC RECV #14, udp 8, pps 1/0, schedule 8
[2022-12-04 01:53:28.926][INFO][4246][86b17d0k] HTTP #0 172.16.250.105:60848 GET http://172.16.250.88:1985/api/v1/streams/?callback=angular.callbacks._e, content-length=-1
[2022-12-04 01:53:28.941][INFO][4246][86b17d0k] TCP: before dispose resource(HttpConn)(0x7faa1f1f20), conns=2, zombies=0, ign=0, inz=0, ind=0
[2022-12-04 01:53:28.942][WARN][4246][86b17d0k][104] client disconnect peer. ret=1007
[2022-12-04 01:53:28.942][INFO][4246][h854g9tq] TCP: clear zombies=1 resources, conns=2, removing=0, unsubs=0
[2022-12-04 01:53:28.942][INFO][4246][86b17d0k] TCP: disposing #0 resource(HttpConn)(0x7faa1f1f20), conns=2, disposing=1, zombies=0
[2022-12-04 01:53:28.967][INFO][4246][br068420] Hybrid cpu=10.97%,94MB, cid=8,4, timer=52,0,37, clock=0,12,8,14,3,1,1,1,0, free=1, objs=(pkt:41,raw:41,fua:0,msg:74,oth:0,buf:0)
[2022-12-04 01:53:28.967][INFO][4246][br068420] RTC: Server conns=1, rpkts=(1,rtp:0,stun:1,rtcp:1), spkts=(1,rtp:0,stun:1,rtcp:0), fid=(id:1,fid:1,ffid:0,addr:1,faddr:1)
[2022-12-04 01:53:29.687][INFO][4246][626a6i36] Session: Alive=60s, packs=1503, recover=0, reserved=0, msgs=1523, drop=0, media(id=1, alive=60s, packs=1503 recover=0, reserved=0, msgs=1523, drop=0)
[2022-12-04 01:53:29.717][INFO][4246][b5804o1i] Process: cpu=13.90%,94MB, threads=2
[2022-12-04 01:53:33.296][INFO][4246][moy2vrmu] HTTP #0 172.16.250.105:60873 GET http://172.16.250.88:1985/api/v1/streams/?callback=angular.callbacks._f, content-length=-1
[2022-12-04 01:53:33.311][INFO][4246][moy2vrmu] TCP: before dispose resource(HttpConn)(0x7faa1fd2f0), conns=2, zombies=0, ign=0, inz=0, ind=0
[2022-12-04 01:53:33.311][WARN][4246][moy2vrmu][104] client disconnect peer. ret=1007
[2022-12-04 01:53:33.312][INFO][4246][h854g9tq] TCP: clear zombies=1 resources, conns=2, removing=0, unsubs=0
[2022-12-04 01:53:33.312][INFO][4246][moy2vrmu] TCP: disposing #0 resource(HttpConn)(0x7faa1fd2f0), conns=2, disposing=1, zombies=0
[2022-12-04 01:53:33.324][INFO][4246][626a6i36] PS: Got PSM for video=0xe0, audio=0
[2022-12-04 01:53:33.968][INFO][4246][br068420] Hybrid cpu=14.99%,96MB, cid=5,2, timer=52,0,39, clock=0,12,7,15,3,0,0,1,0, free=1, objs=(pkt:41,raw:41,fua:0,msg:75,oth:0,buf:0)

Configuration parameters

# no-daemon and write log to console config for srs.
# @see full.conf for detail config.

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

stream_caster {
    enabled on;
    caster gb28181;
    output rtmp://127.0.0.1/gb28181/[stream];
    listen 9000;
    sip {
        enabled on;
        listen 5060;
        candidate $CANDIDATE;
    }
}

http_api {
    enabled         on;
    listen          1985;
}

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

stats {
    network         0;
}

rtc_server {
    enabled on;
    listen 8000; # UDP port
    candidate $CANDIDATE;
}

vhost __defaultVhost__ {
    rtc {
        enabled on;
        rtmp_to_rtc on;
        rtc_to_rtmp on;
    }

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

TRANS_BY_GPT3

online2311 commented 1 year ago

Chrome console output

{
    "api": "http://172.16.250.88:1985/rtc/v1/play/",
    "tid": "785f0b0",
    "streamurl": "webrtc://172.16.250.88/gb28181/34020000002000000001",
    "clientip": null,
    "sdp": "v=0\r\no=- 2147227113132072862 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 63 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:Um4q\r\na=ice-pwd:vbx3kZ4P2Ov1dVHuubDByuyP\r\na=ice-options:trickle\r\na=fingerprint:sha-256 21:63:65:69:79:75:17:E4:4F:2D:DA:51:93:A1:EF:94:6F:A7:91:35:73:71:21:A1:1B:9E:52:AD:5E:94:C8:4A\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=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:63 red/48000/2\r\na=fmtp:63 111/111\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 35 36 37 38 102 123 127 122 125 107 108 109 124 121 39 40 41 42 43 44 45 46 47 48 120 119 114 49\r\nc=IN IP4 0.0.0.0\r\na=rtcp:9 IN IP4 0.0.0.0\r\na=ice-ufrag:Um4q\r\na=ice-pwd:vbx3kZ4P2Ov1dVHuubDByuyP\r\na=ice-options:trickle\r\na=fingerprint:sha-256 21:63:65:69:79:75:17:E4:4F:2D:DA:51:93:A1:EF:94:6F:A7:91:35:73:71:21:A1:1B:9E:52:AD:5E:94:C8:4A\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:5 http://www.webrtc.org/experiments/rtp-hdrext/playout-delay\r\na=extmap:6 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:10 urn:ietf:params:rtp-hdrext:sdes:rtp-stream-id\r\na=extmap:11 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:35 VP9/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=fmtp:35 profile-id=1\r\na=rtpmap:36 rtx/90000\r\na=fmtp:36 apt=35\r\na=rtpmap:37 VP9/90000\r\na=rtcp-fb:37 goog-remb\r\na=rtcp-fb:37 transport-cc\r\na=rtcp-fb:37 ccm fir\r\na=rtcp-fb:37 nack\r\na=rtcp-fb:37 nack pli\r\na=fmtp:37 profile-id=3\r\na=rtpmap:38 rtx/90000\r\na=fmtp:38 apt=37\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:123 rtx/90000\r\na=fmtp:123 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:122 rtx/90000\r\na=fmtp:122 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: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=4d001f\r\na=rtpmap:121 rtx/90000\r\na=fmtp:121 apt=124\r\na=rtpmap:39 H264/90000\r\na=rtcp-fb:39 goog-remb\r\na=rtcp-fb:39 transport-cc\r\na=rtcp-fb:39 ccm fir\r\na=rtcp-fb:39 nack\r\na=rtcp-fb:39 nack pli\r\na=fmtp:39 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=4d001f\r\na=rtpmap:40 rtx/90000\r\na=fmtp:40 apt=39\r\na=rtpmap:41 H264/90000\r\na=rtcp-fb:41 goog-remb\r\na=rtcp-fb:41 transport-cc\r\na=rtcp-fb:41 ccm fir\r\na=rtcp-fb:41 nack\r\na=rtcp-fb:41 nack pli\r\na=fmtp:41 level-asymmetry-allowed=1;packetization-mode=1;profile-level-id=f4001f\r\na=rtpmap:42 rtx/90000\r\na=fmtp:42 apt=41\r\na=rtpmap:43 H264/90000\r\na=rtcp-fb:43 goog-remb\r\na=rtcp-fb:43 transport-cc\r\na=rtcp-fb:43 ccm fir\r\na=rtcp-fb:43 nack\r\na=rtcp-fb:43 nack pli\r\na=fmtp:43 level-asymmetry-allowed=1;packetization-mode=0;profile-level-id=f4001f\r\na=rtpmap:44 rtx/90000\r\na=fmtp:44 apt=43\r\na=rtpmap:45 AV1/90000\r\na=rtcp-fb:45 goog-remb\r\na=rtcp-fb:45 transport-cc\r\na=rtcp-fb:45 ccm fir\r\na=rtcp-fb:45 nack\r\na=rtcp-fb:45 nack pli\r\na=rtpmap:46 rtx/90000\r\na=fmtp:46 apt=45\r\na=rtpmap:47 AV1/90000\r\na=rtcp-fb:47 goog-remb\r\na=rtcp-fb:47 transport-cc\r\na=rtcp-fb:47 ccm fir\r\na=rtcp-fb:47 nack\r\na=rtcp-fb:47 nack pli\r\na=fmtp:47 profile=1\r\na=rtpmap:48 rtx/90000\r\na=fmtp:48 apt=47\r\na=rtpmap:120 red/90000\r\na=rtpmap:119 rtx/90000\r\na=fmtp:119 apt=120\r\na=rtpmap:114 ulpfec/90000\r\na=rtpmap:49 flexfec-03/90000\r\na=rtcp-fb:49 goog-remb\r\na=rtcp-fb:49 transport-cc\r\na=fmtp:49 repair-window=10000000\r\n"
}

TRANS_BY_GPT3

online2311 commented 1 year ago

SRS operation initialization information

[2022-12-04 01:56:57.935][INFO][4251][e1541543] XCORE-SRS/5.0.100(Bee)
[2022-12-04 01:56:57.939][INFO][4251][e1541543] config parse complete
[2022-12-04 01:56:57.939][INFO][4251][e1541543] write log to console
[2022-12-04 01:56:57.940][INFO][4251][e1541543] SRS/5.0.100(Bee), MIT
[2022-12-04 01:56:57.940][INFO][4251][e1541543] authors: Winlin<winlin@vip.126.com> ZhaoWenjie<zhaowenjie@tal.com> ShiWei<shiwei05@kuaishou.com> XiaoZhihong<hondaxiao@tencent.com> WuPengqiang<pengqiang.wpq@alibaba-inc.com> XiaLixin<xialixin@kanzhun.com> LiPeng<mozhan.lp@alibaba-inc.com> ChenGuanghua<jinxue.cgh@alibaba-inc.com> ChenHaibo<nmgchenhaibo@foxmail.com> Johzzy<hellojinqiang@gmail.com> Zhouxiaojun2008<279686030@qq.com> Pengfei.ma<pengfei.ma.chn@outlook.com> ZhangJunqin<zhangjunqin@jd.com> and https://github.com/ossrs/srs/blob/develop/trunk/AUTHORS.md#contributors
[2022-12-04 01:56:57.940][INFO][4251][e1541543] cwd=/tmp/run, work_dir=./, build: 2022-12-02 06:43:38, configure: --cross-build --cross-prefix=aarch64-openwrt-linux-gnu- --arch=aarch64 --cpu=cortex-a53 --rtc=on --srt=on --gb28181=on --ffmpeg-fit=off --nasm=off --srtp-nasm=on --cxx11=off --sys-ssl=off --extra-flags=-D__aarch64__ --jobs=1, uname: Linux OpenWRT-Build-System 4.19.0-22-amd64 #1 SMP Debian 4.19.260-1 (2022-09-29) x86_64 GNU/Linux, osx: 0, env: 0, pkg: 
[2022-12-04 01:56:57.940][INFO][4251][e1541543] configure detail: --prefix=/usr/local/srs --config=conf/srs.conf --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-converter=on --http-api=on --utest=off --cherrypy=off --srt=on --rtc=on --gb28181=on --simulator=off --cxx11=off --cxx14=off --backtrace=on --ffmpeg-fit=off --nasm=off --srtp-nasm=off --clean=on --gperf=off --gmc=off --gmd=off --gmp=off --gcp=off --gprof=off --static=off --shared-st=off --shared-srt=off --shared-ffmpeg=off --log-verbose=off --log-info=off --log-trace=on --log-level_v2=on --gcov=off --debug=off --debug-stats=off --cross-build=on --sanitizer=on --cygwin64=off --single-thread=off --arch=aarch64 --cpu=cortex-a53 --host=aarch64-openwrt-linux-gnu --cross-prefix=aarch64-openwrt-linux-gnu- --extra-flags="-D__aarch64__" --cc=aarch64-openwrt-linux-gnu-gcc --cxx=aarch64-openwrt-linux-gnu-g++ --ar=aarch64-openwrt-linux-gnu-ar --ld=aarch64-openwrt-linux-gnu-ld --randlib=aarch64-openwrt-linux-gnu-randlib
[2022-12-04 01:56:57.940][INFO][4251][e1541543] srs checking config...
[2022-12-04 01:56:57.943][INFO][4251][e1541543] ips, iface[0] eth0 ipv4 0x11043 172.16.250.88, iface[1] eth0 ipv6 0x11043 fe80::d498:8dff:fe6a:f5c4%eth0
[2022-12-04 01:56:57.943][INFO][4251][e1541543] devices, intranet eth0 172.16.250.88, intranet eth0 fe80::d498:8dff:fe6a:f5c4%eth0
[2022-12-04 01:56:57.943][WARN][4251][e1541543][2] stats network use index=0, ip=172.16.250.88, ifname=eth0
[2022-12-04 01:56:57.943][WARN][4251][e1541543][2] stats disk not configed, disk iops disabled.
[2022-12-04 01:56:57.944][INFO][4251][e1541543] write log to console
[2022-12-04 01:56:57.944][INFO][4251][e1541543] features, rch:on, dash:on, hls:on, hds:off, srt:on, hc:on, ha:on, hs:on, hp:on, dvr:on, trans:on, inge:on, stat:on, sc:on
[2022-12-04 01:56:57.944][INFO][4251][e1541543] SRS on aarch64(crossbuild), conf:/etc/config/openwrt.conf, limit:1000, writev:1024, encoding:little-endian, HZ:100
[2022-12-04 01:56:57.944][INFO][4251][e1541543] mw sleep:350ms. mr enabled:on, default:0, sleep:350ms
[2022-12-04 01:56:57.945][INFO][4251][e1541543] gc:on, pq:30000ms, cscc:[0,16), csa:on, tn:on(may hurts performance), ss:auto(guess by merged write)
[2022-12-04 01:56:57.945][INFO][4251][e1541543] system default latency(ms): mw(0-350) + mr(0-350) + play-queue(0-30000)
[2022-12-04 01:56:57.945][WARN][4251][e1541543][2] SRS/5.0.100 is not stable
[2022-12-04 01:56:57.945][INFO][4251][e1541543] write pid=4251 to ./objs/srs.pid success!
[2022-12-04 01:56:57.945][INFO][4251][e1541543] Thread #1(primordial): init name=srs-master-1, interval=5000ms
[2022-12-04 01:56:57.946][INFO][4251][e1541543] Pool: Start threads primordial=1, hybrids=1 ok
[2022-12-04 01:56:57.947][INFO][4251][3y704298] Thread #2: run with tid=4252, entry=0x7f7c8028c0, label=hybrid, name=srs-hybrid-2
[2022-12-04 01:56:57.972][INFO][4251][3y704298] TencentCloud CLS is disabled
[2022-12-04 01:56:57.972][INFO][4251][3y704298] TencentCloud APM is disabled
[2022-12-04 01:56:58.002][INFO][4251][3y704298] fingerprint=FC:C6:90:AA:7A:B9:FF:A5:72:84:31:CB:C4:46:A7:5D:CE:B9:66:30:0D:8F:2F:A2:0A:84:45:1A:CB:E1:6D:27
[2022-12-04 01:56:58.003][INFO][4251][3y704298] CircuitBreaker: enabled=1, high=2x90, critical=1x95, dying=5x99
[2022-12-04 01:56:58.004][INFO][4251][3y704298] http flv live stream, vhost=__defaultVhost__, mount=[vhost]/[app]/[stream].flv
[2022-12-04 01:56:58.004][INFO][4251][3y704298] http: root mount to ./objs/nginx/html
[2022-12-04 01:56:58.004][INFO][4251][3y704298] server main cid=3y704298, pid=4251, ppid=4207, asprocess=0
[2022-12-04 01:56:58.005][INFO][4251][3y704298] RTMP listen at tcp://127.0.0.1:1935, fd=9
[2022-12-04 01:56:58.005][INFO][4251][3y704298] HTTP-API listen at tcp://0.0.0.0:1985, fd=10
[2022-12-04 01:56:58.006][INFO][4251][3y704298] HTTP-Server listen at tcp://0.0.0.0:8080, fd=11
[2022-12-04 01:56:58.007][INFO][4251][3y704298] GB-TCP listen at tcp://0.0.0.0:9000, fd=12
[2022-12-04 01:56:58.007][INFO][4251][3y704298] SIP-TCP listen at tcp://0.0.0.0:5060, fd=13
[2022-12-04 01:56:58.007][INFO][4251][3y704298] signal installed, reload=1, reopen=10, fast_quit=15, grace_quit=3
[2022-12-04 01:56:58.009][INFO][4251][3y704298] http: api mount /console to ./objs/nginx/html/console
[2022-12-04 01:56:58.010][INFO][4251][3y704298] rtc listen at udp://0.0.0.0:8000, fd=14
[2022-12-04 01:56:58.011][INFO][4251][x3ah7538] Hybrid cpu=0.00%,47MB

TRANS_BY_GPT3

online2311 commented 1 year ago

FLV playback is normal, the current issue is that WebRTC cannot play locally.

TRANS_BY_GPT3

online2311 commented 1 year ago

The test shows that SRS 4.x WebRTC can play normally. However, SRS 5.x WebRTC has been consistently unable to play properly. Currently, the setup GB28181 --> SRS 5.x ----srt----> SRS 4.x -----WebRTC allows for normal playback. The camera video source is H264/Main/3.1/1280x720 | AAC/11025/Mono/LC. Both SRS 5.x and SRS 4.0 use FFmpeg for secondary encoding and streaming. FFmpeg streaming command:

 /usr/bin/ffmpeg -re -f flv -i rtmp://127.0.0.1:1935/gb28181?vhost=__defaultVhost__/34020000002000000001 -vf scale_rga=w=1280:h=720 -vcodec h264_rkmpp -threads 1 -profile:v high -preset slower -q:v 50 -acodec libfdk_aac -f mpegts -y srt://srs.local.tech:10080?streamid=#!::h=srs.local.tech,r=FE80FC/34020000002000000001,m=publish?streamid=34020000002000000001

TRANS_BY_GPT3

winlinvip commented 1 year ago
image image image

Unable to reproduce the issue you mentioned, SRS 5.0.105, please try again with the configuration mentioned above.

./objs/srs -c conf/gb28181.conf 

Use this SRS configuration file.

TRANS_BY_GPT3

winlinvip commented 1 year ago

This doesn't seem to be a GB issue, it seems to be a problem with your WebRTC environment.

Try pushing the file to SRS using FFmpeg and then play it using WebRTC.

TRANS_BY_GPT3

winlinvip commented 1 year ago

Can't replay(无法重现).

TRANS_BY_GPT3