Open winlinvip opened 2 years ago
描述(Description)
描述你遇到了什么问题(Please description your issue here)
SRS/4.0.63 -develop分支
[2021-02-17 17:33:35.606][Trace][30802][lzna07j5] gb28181: request client id=31010400991327100000 peer(192.168.120.61, 5061) [2021-02-17 17:33:35.606][Trace][30802][lzna07j5] gb28181: request method=REGISTER, uri=sip:31010400992097123456@3101040099, version=SIP/2.0 expires=3600 [2021-02-17 17:33:43.878][Trace][30802][lzna07j5] gb28181: 31010400991327230000 client not registered [2021-02-17 17:33:43.879][Trace][30802][lzna07j5] gb28181: request client id=31010400991327100000 peer(192.168.120.61, 5061) [2021-02-17 17:33:43.879][Trace][30802][lzna07j5] gb28181: request method=REGISTER, uri=sip:31010400992097123456@3101040099, version=SIP/2.0 expires=0 [2021-02-17 17:33:43.880][Trace][30802][lzna07j5] gb28181: request client id=31010400991327230000 peer(192.168.120.61, 5061) [2021-02-17 17:33:43.880][Trace][30802][lzna07j5] gb28181: request method=REGISTER, uri=sip:31010400992097123456@3101040099, version=SIP/2.0 expires=3600 [2021-02-17 17:33:44.880][Trace][30802][b01i4t78] gb28181: sip session=31010400991327230000 peer(192.168.120.61, 5061) status(RegisterOk,AliveOk) duration(0,0) [2021-02-17 17:33:45.616][Trace][30802][60k476mb] gb28181: sip session=31010400991327100000 register expire [2021-02-17 17:33:45.616][Trace][30802][60k476mb] gb28181: client id=31010400991327100000 sip session is remove [2021-02-17 17:33:45.616][Trace][30802][60k476mb] gb28181: sip client finished. [2021-02-17 17:33:45.880][Trace][30802][b01i4t78] gb28181: generate ssrc id=31010400991327230000@34020000001320000003, ssrc=7060225 [2021-02-17 17:33:45.902][Trace][30802][b01i4t78] new source, stream_url=/live/31010400991327230000@34020000001320000003 [2021-02-17 17:33:45.922][Trace][30802][b01i4t78] hls: win=60000ms, frag=5000ms, prefix=, path=./objs/nginx/html, m3u8=[app]/[stream].m3u8, ts=[app]/[stream]-[seq].ts, aof=2.00, floor=0, clean=1, waitk=1, dispose=0ms, dts_directly=1 [2021-02-17 17:33:45.922][Trace][30802][b01i4t78] ignore disabled exec for vhost= [2021-02-17 17:33:45.922][Trace][30802][b01i4t78] gb28181: create new stream channel id:31010400991327230000@34020000001320000003 rtmp url=rtmp://127.0.0.1:11935/live/31010400991327230000@34020000001320000003 [2021-02-17 17:33:45.927][Trace][30802][lzna07j5] gb28181: request client id=34020000001320000003, peer(192.168.120.61, 5061) [2021-02-17 17:33:45.927][Trace][30802][lzna07j5] gb28181: respone method=INVITE, uri=31010400992097123456@3402000000, version=SIP/2.0 [2021-02-17 17:33:45.927][Trace][30802][lzna07j5] gb28181: INVITE response 34020000001320000003 client status=100 [2021-02-17 17:33:45.931][Trace][30802][lzna07j5] gb28181: ssrc in y line is 7060225:6bbb01 [2021-02-17 17:33:45.931][Trace][30802][lzna07j5] gb28181: request client id=34020000001320000003, peer(192.168.120.61, 5061) [2021-02-17 17:33:45.931][Trace][30802][lzna07j5] gb28181: respone method=INVITE, uri=31010400992097123456@3402000000, version=SIP/2.0 [2021-02-17 17:33:45.931][Trace][30802][lzna07j5] gb28181: INVITE response 34020000001320000003 client status=200 [2021-02-17 17:33:45.931][Trace][30802][lzna07j5] gb28181: device unique id is 31010400991327230000@34020000001320000003 [2021-02-17 17:33:46.032][Trace][30802][ug670s85] gb28181: SrsPsJitterBuffer key=31010400991327230000@34020000001320000003 reallocate ps buffer size(80064>0) resize(90304) [2021-02-17 17:33:46.033][Trace][30802][ug670s85] gb28181: ps map video es_type=h264(1b), es_id=e0, es_info_length=28 [2021-02-17 17:33:46.033][Trace][30802][ug670s85] gb28181: ps map audio es_type=g711(90), es_id=c0, es_info_length=12 [2021-02-17 17:33:46.034][Trace][30802][ug670s85] 46B video sh, codec(7, profile=Main, level=Other, 1920x1088, 0kbps, 0.0fps, 0.0s) [2021-02-17 17:33:46.063][Trace][30802][ug670s85] gb28181: SrsPsJitterBuffer key=31010400991327230000@34020000001320000003 reallocate ps buffer size(336>0) resize(10576) [2021-02-17 17:33:46.881][Trace][30802][b01i4t78] gb28181: 31010400991327230000 clients device=34020000001320000003 send invite code=0 [2021-02-17 17:33:47.892][Trace][30802][lzna07j5] <- GBS gb28181: client_id , peer(192.168.120.61, 15060) ps rtp packet 348B, age=14017135, vt=2/96, sts=264/172800/0x6bbb01, paylod=336B [2021-02-17 17:33:55.901][Trace][30802][ug670s85] -> HLS time=10039367ms, sno=2, ts=31010400991327230000@34020000001320000003-1.ts, dur=0.00, dva=3839p [2021-02-17 17:33:57.893][Trace][30802][ug670s85] gb28181: client id=31010400991327230000@34020000001320000003, ssrc=0x6bbb01, peer(192.168.120.61, 15060), rtmp muxer is alive [2021-02-17 17:34:05.919][Trace][30802][ug670s85] -> HLS time=20057518ms, sno=4, ts=31010400991327230000@34020000001320000003-3.ts, dur=0.00, dva=1880p [2021-02-17 17:34:07.908][Trace][30802][lzna07j5] <- GBS gb28181: client_id , peer(192.168.120.61, 15060) ps rtp packet 1412B, age=34051978, vt=2/96, sts=2990/1972800/0x6bbb01, paylod=1400B [2021-02-17 17:34:15.934][Trace][30802][ug670s85] -> HLS time=30072400ms, sno=5, ts=31010400991327230000@34020000001320000003-4.ts, dur=0.00, dva=5879p [2021-02-17 17:34:17.480][Trace][30802][lzna07j5] gb28181: request client id=31010400991327220000 peer(192.168.120.55, 5060) [2021-02-17 17:34:17.480][Trace][30802][lzna07j5] gb28181: request method=REGISTER, uri=sip:31010400992097123456@3101040099, version=SIP/2.0 expires=3600 [2021-02-17 17:34:20.492][Trace][30802][ug670s85] gb28181: client id=31010400991327230000@34020000001320000003, ssrc=0x6bbb01, peer(192.168.120.61, 15060), rtmp muxer is alive [2021-02-17 17:34:22.482][Trace][30802][763883to] gb28181: sip session=31010400991327220000 peer(192.168.120.55, 5060) status(RegisterOk,AliveOk) duration(4,0) [2021-02-17 17:34:23.482][Trace][30802][763883to] gb28181: generate ssrc id=31010400991327220000@34020000001320000002, ssrc=35166983 [2021-02-17 17:34:23.482][Trace][30802][763883to] new source, stream_url=/live/31010400991327220000@34020000001320000002 [2021-02-17 17:34:23.482][Trace][30802][763883to] hls: win=60000ms, frag=5000ms, prefix=, path=./objs/nginx/html, m3u8=[app]/[stream].m3u8, ts=[app]/[stream]-[seq].ts, aof=2.00, floor=0, clean=1, waitk=1, dispose=0ms, dts_directly=1 [2021-02-17 17:34:23.482][Trace][30802][763883to] ignore disabled exec for vhost= [2021-02-17 17:34:23.482][Trace][30802][763883to] gb28181: create new stream channel id:31010400991327220000@34020000001320000002 rtmp url=rtmp://127.0.0.1:11935/live/31010400991327220000@34020000001320000002 [2021-02-17 17:34:23.485][Trace][30802][lzna07j5] gb28181: request client id=34020000001320000002, peer(192.168.120.55, 5060) [2021-02-17 17:34:23.485][Trace][30802][lzna07j5] gb28181: respone method=INVITE, uri=31010400992097123456@3402000000, version=SIP/2.0 [2021-02-17 17:34:23.485][Trace][30802][lzna07j5] gb28181: INVITE response 34020000001320000002 client status=100 [2021-02-17 17:34:23.487][Trace][30802][lzna07j5] gb28181: ssrc in y line is 35166983:2189b07 [2021-02-17 17:34:23.487][Trace][30802][lzna07j5] gb28181: request client id=34020000001320000002, peer(192.168.120.55, 5060) [2021-02-17 17:34:23.487][Trace][30802][lzna07j5] gb28181: respone method=INVITE, uri=31010400992097123456@3402000000, version=SIP/2.0 [2021-02-17 17:34:23.487][Trace][30802][lzna07j5] gb28181: INVITE response 34020000001320000002 client status=200 [2021-02-17 17:34:23.487][Trace][30802][lzna07j5] gb28181: device unique id is 31010400991327220000@34020000001320000002 [2021-02-17 17:34:23.572][Trace][30802][8g04b9be] gb28181: SrsPsJitterBuffer key=31010400991327220000@34020000001320000002 reallocate ps buffer size(61324>0) resize(71564) [2021-02-17 17:34:23.572][Trace][30802][8g04b9be] gb28181: ps map video es_type=h264(1b), es_id=e0, es_info_length=28 [2021-02-17 17:34:23.572][Trace][30802][8g04b9be] gb28181: ps map audio es_type=g711(90), es_id=c0, es_info_length=12 [2021-02-17 17:34:23.603][Trace][30802][8g04b9be] gb28181: SrsPsJitterBuffer key=31010400991327220000@34020000001320000002 reallocate ps buffer size(336>0) resize(10576) [2021-02-17 17:34:24.482][Trace][30802][763883to] gb28181: 31010400991327220000 clients device=34020000001320000002 send invite code=0 [2021-02-17 17:34:31.158][Trace][30802][8g04b9be] gb28181: client id=31010400991327220000@34020000001320000002, ssrc=0x2189b07, peer(192.168.120.55, 15060), rtmp muxer is alive [2021-02-17 17:34:35.961][Trace][30802][ug670s85] -> HLS time=50099174ms, sno=9, ts=31010400991327230000@34020000001320000003-8.ts, dur=0.00, dva=1920p [2021-02-17 17:34:41.145][Trace][30802][ug670s85] gb28181: client id=31010400991327230000@34020000001320000003, ssrc=0x6bbb01, peer(192.168.120.61, 15060), rtmp muxer is alive [2021-02-17 17:34:44.893][Trace][30802][b01i4t78] gb28181: sip session=31010400991327230000 peer(192.168.120.61, 5061) status(RegisterOk,AliveOk) duration(61,56) [2021-02-17 17:34:51.157][Trace][30802][ug670s85] gb28181: client id=31010400991327230000@34020000001320000003, ssrc=0x6bbb01, peer(192.168.120.61, 15060), rtmp muxer is alive [2021-02-17 17:34:56.013][Trace][30802][ug670s85] -> HLS time=70151632ms, sno=12, ts=31010400991327230000@34020000001320000003-11.ts, dur=0.00, dva=3959p [2021-02-17 17:35:01.171][Trace][30802][ug670s85] gb28181: client id=31010400991327230000@34020000001320000003, ssrc=0x6bbb01, peer(192.168.120.61, 15060), rtmp muxer is alive [2021-02-17 17:35:08.213][Trace][30802][b020n867] HTTP #0 192.168.120.51:58236 GET http://192.168.51.104:1985/api/v1/gb28181?action=sip_query_session, content-length=-1 [2021-02-17 17:35:11.183][Trace][30802][lzna07j5] <- GBS gb28181: client_id , peer(192.168.120.61, 15060) ps rtp packet 1412B, age=97316049, vt=2/96, sts=11632/7668000/0x6bbb01, paylod=1400B [2021-02-17 17:35:12.732][Trace][30802][b020n867] HTTP #1 192.168.120.51:58236 GET http://192.168.51.104:1985/api/v1/gb28181?action=query_channel, content-length=-1 [2021-02-17 17:35:16.045][Trace][30802][ug670s85] -> HLS time=90179703ms, sno=16, ts=31010400991327230000@34020000001320000003-15.ts, dur=0.00, dva=0p [2021-02-17 17:35:21.169][Trace][30802][ug670s85] gb28181: client id=31010400991327230000@34020000001320000003, ssrc=0x6bbb01, peer(192.168.120.61, 15060), rtmp muxer is alive [2021-02-17 17:35:22.494][Trace][30802][763883to] gb28181: sip session=31010400991327220000 peer(192.168.120.55, 5060) status(RegisterOk,AliveOk) duration(65,60) [2021-02-17 17:35:23.213][Trace][30802][7y2371j7] TCP: before dispose resource(HttpConn)(0x2c72f10), conns=2, zombies=0, ign=0, inz=0, ind=0 [2021-02-17 17:35:23.213][Trace][30802][7y2371j7] client finished. [2021-02-17 17:35:23.213][Trace][30802][291us7m8] TCP: clear zombies=1 resources, conns=2, removing=0, unsubs=0 [2021-02-17 17:35:23.213][Trace][30802][7y2371j7] TCP: disposing #0 resource(HttpConn)(0x2c72f10), conns=2, disposing=1, zombies=0 [2021-02-17 17:35:27.732][Trace][30802][b020n867] TCP: before dispose resource(HttpConn)(0x2c7a5a0), conns=1, zombies=0, ign=0, inz=0, ind=0 [2021-02-17 17:35:27.732][Trace][30802][b020n867] client finished. [2021-02-17 17:35:27.732][Trace][30802][291us7m8] TCP: clear zombies=1 resources, conns=1, removing=0, unsubs=0 [2021-02-17 17:35:27.732][Trace][30802][b020n867] TCP: disposing #0 resource(HttpConn)(0x2c7a5a0), conns=1, disposing=1, zombies=0 [2021-02-17 17:35:28.790][Trace][30802][8f8k3e0v] RTMP client ip=192.168.120.51:58244, fd=14 [2021-02-17 17:35:28.812][Trace][30802][8f8k3e0v] complex handshake success [2021-02-17 17:35:28.814][Trace][30802][8f8k3e0v] connect app, tcUrl=rtmp://192.168.51.104:11935/live, pageUrl=, swfUrl=, schema=rtmp, vhost=192.168.51.104, port=11935, app=live, args=null [2021-02-17 17:35:28.814][Trace][30802][8f8k3e0v] protocol in.buffer=0, in.ack=0, out.ack=0, in.chunk=128, out.chunk=128 [2021-02-17 17:35:28.910][Trace][30802][8f8k3e0v] ignore AMF0/AMF3 command message. [2021-02-17 17:35:28.958][Trace][30802][8f8k3e0v] ignore AMF0/AMF3 command message. [2021-02-17 17:35:28.958][Trace][30802][8f8k3e0v] client identified, type=Play, vhost=192.168.51.104, app=live, stream=31010400991327230000@34020000001320000003, param=, duration=-1ms [2021-02-17 17:35:28.958][Trace][30802][8f8k3e0v] connected stream, tcUrl=rtmp://192.168.51.104:11935/live, pageUrl=, swfUrl=, schema=rtmp, vhost=__defaultVhost__, port=11935, app=live, stream=31010400991327230000@34020000001320000003, param=, args=null [2021-02-17 17:35:28.959][Trace][30802][8f8k3e0v] source url=/live/31010400991327230000@34020000001320000003, ip=192.168.120.51, cache=1, is_edge=0, source_id=b01i4t78/b01i4t78 [2021-02-17 17:35:28.959][Trace][30802][8f8k3e0v] dispatch cached gop success. count=24, duration=930 [2021-02-17 17:35:28.959][Trace][30802][8f8k3e0v] create consumer, active=1, queue_size=0.00, jitter=30000000 [2021-02-17 17:35:28.959][Trace][30802][8f8k3e0v] set fd=14, SO_SNDBUF=46080=>175000, buffer=350ms [2021-02-17 17:35:28.959][Trace][30802][8f8k3e0v] start play smi=0ms, mw_sleep=350, mw_msgs=8, realtime=0, tcp_nodelay=0 [2021-02-17 17:35:31.183][Trace][30802][lzna07j5] <- GBS gb28181: client_id , peer(192.168.120.61, 15060) ps rtp packet 1412B, age=117316014, vt=2/96, sts=14352/9468000/0x6bbb01, paylod=1400B [2021-02-17 17:35:36.068][Trace][30802][ug670s85] -> HLS time=110206176ms, sno=19, ts=31010400991327230000@34020000001320000003-18.ts, dur=0.00, dva=2040p [2021-02-17 17:35:39.386][Trace][30802][8f8k3e0v] -> PLA time=10071546, msgs=9, okbps=1295,0,0, ikbps=2,0,0, mw=350/8 [2021-02-17 17:35:41.171][Trace][30802][lzna07j5] <- GBS gb28181: client_id , peer(192.168.120.55, 15060) ps rtp packet 1412B, age=127310651, vt=2/96, sts=28351/13975200/0x2189b07, paylod=1400B [2021-02-17 17:35:44.903][Trace][30802][b01i4t78] gb28181: sip session=31010400991327230000 peer(192.168.120.61, 5061) status(RegisterOk,AliveOk) duration(121,55) [2021-02-17 17:35:48.669][Trace][30802][r6462n59] RTMP client ip=192.168.120.51:58259, fd=15 [2021-02-17 17:35:48.685][Trace][30802][r6462n59] complex handshake success [2021-02-17 17:35:48.690][Trace][30802][r6462n59] connect app, tcUrl=rtmp://192.168.51.104:11935/live, pageUrl=, swfUrl=, schema=rtmp, vhost=192.168.51.104, port=11935, app=live, args=null [2021-02-17 17:35:48.690][Trace][30802][r6462n59] protocol in.buffer=0, in.ack=0, out.ack=0, in.chunk=128, out.chunk=128 [2021-02-17 17:35:48.786][Trace][30802][r6462n59] ignore AMF0/AMF3 command message. [2021-02-17 17:35:48.834][Trace][30802][r6462n59] ignore AMF0/AMF3 command message. [2021-02-17 17:35:48.834][Trace][30802][r6462n59] client identified, type=Play, vhost=192.168.51.104, app=live, stream=31010400991327220000@34020000001320000002, param=, duration=-1ms [2021-02-17 17:35:48.834][Trace][30802][r6462n59] connected stream, tcUrl=rtmp://192.168.51.104:11935/live, pageUrl=, swfUrl=, schema=rtmp, vhost=__defaultVhost__, port=11935, app=live, stream=31010400991327220000@34020000001320000002, param=, args=null [2021-02-17 17:35:48.834][Trace][30802][r6462n59] source url=/live/31010400991327220000@34020000001320000002, ip=192.168.120.51, cache=1, is_edge=0, source_id=763883to/763883to [2021-02-17 17:35:48.835][Trace][30802][r6462n59] dispatch cached gop success. count=0, duration=-1 [2021-02-17 17:35:48.835][Trace][30802][r6462n59] create consumer, active=1, queue_size=0.00, jitter=30000000 [2021-02-17 17:35:48.835][Trace][30802][r6462n59] set fd=15, SO_SNDBUF=46080=>175000, buffer=350ms [2021-02-17 17:35:48.835][Trace][30802][r6462n59] start play smi=0ms, mw_sleep=350, mw_msgs=8, realtime=0, tcp_nodelay=0 [2021-02-17 17:35:51.192][Trace][30802][ug670s85] gb28181: client id=31010400991327230000@34020000001320000003, ssrc=0x6bbb01, peer(192.168.120.61, 15060), rtmp muxer is alive [2021-02-17 17:35:56.084][Trace][30802][ug670s85] -> HLS time=130221880ms, sno=22, ts=31010400991327230000@34020000001320000003-21.ts, dur=0.00, dva=4039p [2021-02-17 17:35:59.495][Trace][30802][8f8k3e0v] -> PLA time=30210779, msgs=9, okbps=1276,1291,0, ikbps=0,0,0, mw=350/8 [2021-02-17 17:36:01.185][Trace][30802][ug670s85] gb28181: client id=31010400991327230000@34020000001320000003, ssrc=0x6bbb01, peer(192.168.120.61, 15060), rtmp muxer is alive [2021-02-17 17:36:11.174][Trace][30802][lzna07j5] <- GBS gb28181: client_id , peer(192.168.120.61, 15060) ps rtp packet 1412B, age=157317500, vt=2/96, sts=20398/13068000/0x6bbb01, paylod=1400B [2021-02-17 17:36:16.121][Trace][30802][ug670s85] -> HLS time=150258680ms, sno=26, ts=31010400991327230000@34020000001320000003-25.ts, dur=0.00, dva=80p [2021-02-17 17:36:19.802][Trace][30802][8f8k3e0v] -> PLA time=50487312, msgs=9, okbps=1269,1291,0, ikbps=0,0,0, mw=350/8 [2021-02-17 17:36:21.190][Trace][30802][ug670s85] gb28181: client id=31010400991327230000@34020000001320000003, ssrc=0x6bbb01, peer(192.168.120.61, 15060), rtmp muxer is alive [2021-02-17 17:36:22.505][Trace][30802][763883to] gb28181: sip session=31010400991327220000 peer(192.168.120.55, 5060) status(RegisterOk,AliveOk) duration(125,59) [2021-02-17 17:36:31.178][Trace][30802][8g04b9be] gb28181: client id=31010400991327220000@34020000001320000002, ssrc=0x2189b07, peer(192.168.120.55, 15060), rtmp muxer is alive [2021-02-17 17:36:36.124][Trace][30802][ug670s85] -> HLS time=170261744ms, sno=29, ts=31010400991327230000@34020000001320000003-28.ts, dur=0.00, dva=2080p [2021-02-17 17:36:39.833][Trace][30802][8f8k3e0v] -> PLA time=70518864, msgs=9, okbps=1268,1269,0, ikbps=0,0,0, mw=350/8 [2021-02-17 17:36:41.190][Trace][30802][ug670s85] gb28181: client id=31010400991327230000@34020000001320000003, ssrc=0x6bbb01, peer(192.168.120.61, 15060), rtmp muxer is alive
1. SRS的配置如下(Config):
listen 11935; max_connections 1000; srs_log_tank file; srs_log_file ./objs/srs.log;
http_api { enabled on; listen 1985; }
stats { network 0; }
stream_caster { enabled on; caster gb28181;
# 转发流到rtmp服务器地址与端口 # TODO: https://github.com/ossrs/srs/pull/1679/files#r400875104 # [stream] is VideoChannelCodecID(视频通道编码ID) for sip # 自动创建的道通[stream] 是‘chid[ssrc]’ [ssrc]是rtp的ssrc # [ssrc] rtp中的ssrc output rtmp://127.0.0.1:11935/live/[stream]; # 接收设备端rtp流的多路复用端口 listen 9000; # rtp接收监听端口范围,最小值 rtp_port_min 58200; # rtp接收监听端口范围,最大值 rtp_port_max 58300; # 是否等待关键帧之后,再转发, # off:不需等待,直接转发 # on:等第一个关键帧后,再转发 wait_keyframe on; # rtp包空闲等待时间,如果指定时间没有收到任何包 # rtp监听连接自动停止,发送BYE命令 rtp_idle_timeout 30; # 是否转发音频流 # 目前只支持aac格式,所以需要设备支持aac格式 # on:转发音频 # off:不转发音频,只有视频 # *注意*!!!:flv 只支持11025 22050 44100 三种 # 如果设备端没有三种中任何一个,转发时为自动选择一种格式 # 同时也会将adts的头封装在flv aac raw数据中 # 这样的话播放器为自动通过adts头自动选择采样频率 # 像ffplay, vlc都可以,但是flash是没有声音, # 因为flash,只支持11025 22050 44100 audio_enable off; # 开启之后能有效解决rtp乱序等问题 jitterbuffer_enable on; # 服务器主机号,可以域名或ip地址 # 也就是设备端将媒体发送的地址,如果是服务器是内外网 # 需要写外网地址, # 调用api创建stream session时返回ip地址也是host # $CANDIDATE 是系统环境变量,从环境变量获取地址,如果没有配置,用* # *代表指定stats network 的网卡号地址,如果没有配置network,默认则是第0号网卡地址 # TODO: https://github.com/ossrs/srs/pull/1679/files#r400917594 #host $CANDIDATE; host 192.168.51.104 #根据收到ps rtp包自带创建rtmp媒体通道,不需要api接口创建 #rtmp地址参数[stream] 就是通道id 格式chid[ssrc] auto_create_channel on; sip { # 是否启用srs内部sip信令 # 为on信令走srs, off 只转发ps流 enabled on; # sip监听udp端口 listen 5060; # SIP server ID(SIP服务器ID). # 设备端配置编号需要与该值一致,否则无法注册 #serial 34020000002000000001; serial 31010400992097123456 # SIP server domain(SIP服务器域) realm 3101040099; # 服务端发送ack后,接收回应的超时时间,单位为秒 # 如果指定时间没有回应,认为失败 ack_timeout 30; # 设备心跳维持时间,如果指定时间内(秒)没有接收一个心跳 # 认为设备离线 keepalive_timeout 120; # 注册之后是否自动给设备端发送invite # on: 是 off 不是,需要通过api控制 auto_play on; # 设备将流发送的端口,是否固定 # on 发送流到多路复用端口 如9000 # off 自动从rtp_mix_port - rtp_max_port 之间的值中 # 选一个可以用的端口 invite_port_fixed on; # 向设备或下级域查询设备列表的间隔,单位(秒) # 默认60秒 query_catalog_interval 60; }
} http_server { enabled on; listen 8080; dir ./objs/nginx/html; } vhost defaultVhost { hls { enabled on; hls_path ./objs/nginx/html; hls_fragment 5; hls_window 60; } http_remux { enabled on; mount [vhost]/[app]/[stream].flv; hstrs on; } }
**重现(Replay)** > 重现Bug的步骤(How to replay bug?) 两台相机的配置基本相同:视频编码H264 1. `查询session` { "code": 0, "data": { "sessions": [ { "id": "31010400991327220000", "device_sumnum": 1, "devices": [ { "device_id": "34020000001320000002", "device_name": "Camera 01", "device_status": "ON", "invite_status": "InviteOk", "invite_time": 1613554463 } ] }, { "id": "31010400991327230000", "device_sumnum": 1, "devices": [ { "device_id": "34020000001320000003", "device_name": "IPdome", "device_status": "ON", "invite_status": "InviteOk", "invite_time": 1613554425 } ] } ] } } 2. `查询channel` { "code": 0, "data": { "channels": [ { "id": "31010400991327220000@34020000001320000002", "ip": "192.168.51.104", "rtmp_port": 11935, "app": "live", "stream": "31010400991327220000@34020000001320000002", "rtmp_url": "rtmp://192.168.51.104:11935/live/31010400991327220000@34020000001320000002", "ssrc": 35166983, "rtp_port": 9000, "port_mode": "fixed", "rtp_peer_port": 15060, "rtp_peer_ip": "192.168.120.55", "recv_time": 1613554463, "recv_time_str": "2021-02-17T09:34:23.531" }, { "id": "31010400991327230000@34020000001320000003", "ip": "192.168.51.104", "rtmp_port": 11935, "app": "live", "stream": "31010400991327230000@34020000001320000003", "rtmp_url": "rtmp://192.168.51.104:11935/live/31010400991327230000@34020000001320000003", "ssrc": 7060225, "rtp_port": 9000, "port_mode": "fixed", "rtp_peer_port": 15060, "rtp_peer_ip": "192.168.120.61", "recv_time": 1613554425, "recv_time_str": "2021-02-17T09:33:46.017" } ] } } 3. `vlc拉取rtmp流` rtmp://192.168.51.104:11935/live/31010400991327220000@34020000001320000002 失败 rtmp://192.168.51.104:11935/live/31010400991327230000@34020000001320000003 成功 **期望行为(Expect)** > 描述你期望发生的事情(Please describe your expectation) 可以正常拉取 rtmp://192.168.51.104:11935/live/31010400991327220000@34020000001320000002 的流
描述(Description)
SRS/4.0.63 -develop分支
listen 11935; max_connections 1000; srs_log_tank file; srs_log_file ./objs/srs.log;
srs_log_level info;
http_api { enabled on; listen 1985; }
stats { network 0; }
stream_caster { enabled on; caster gb28181;
} http_server { enabled on; listen 8080; dir ./objs/nginx/html; } vhost defaultVhost { hls { enabled on; hls_path ./objs/nginx/html; hls_fragment 5; hls_window 60; } http_remux { enabled on; mount [vhost]/[app]/[stream].flv; hstrs on; } }