Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GB28181:DVR失败,只有48B;重新初始化摄像头后会好用, 但过一段时间重现 #2705 #10

Open
winlinvip opened this issue Jan 5, 2022 · 0 comments
Assignees

Comments

@winlinvip
Copy link
Member

注意:不提供以下信息的Issue会被直接删除(Please follow issue template, or we will delete it)

注意:咨询和讨论请提交到SRS星球(Please ask question at) http://bbs.ossrs.net

描述(Description)

描述你遇到了什么问题(Please description your issue here)

使用海康的摄像头, GB28181 保存录像有时会失败, 生成很多形如 1635902626975.mp4.tmp 的文件, 48 byte 大小

将摄像头重新初始化, 重新配置参数后会好用, 但过一段时间又会出现此情况

  1. SRS版本(Version): 4.0.99
  2. SRS的日志如下(Log):
[2021-11-03 09:13:13.260][Trace][2687937][ds43t33x][MAIN] SRS/4.0.99(Leo), MIT
[2021-11-03 09:13:13.260][Trace][2687937][ds43t33x] authors: Winlin,Wenjie,Runner365,John,B.P.Y,Lixin
[2021-11-03 09:13:13.260][Trace][2687937][ds43t33x] contributors: winlin<winlin@vip.126.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> yanghuiwen<cainiaodj@qq.com> Bepartofyou<309554135@qq.com> l<22312935+lam2003@github> xfalcon<x-falcon@github> cgh<jinxue.cgh@alibaba-inc.com> LiPeng<mozhan.lp@alibaba-inc.com> xiaozhihong<hondaxiao@tencent.com> yajun18<yajun18@staff.sina.com.cn> liulichuan<liulichuan@kuaishou.com> yapingcat<caoyapingneu@163.com> chenchengbin<chenchengbin@yy.com> chenhaibo<chenhaibo@RD-CHB-0476-01> 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> 
[2021-11-03 09:13:13.260][Trace][2687937][ds43t33x] cwd=/root/srs/trunk, work_dir=./, build: 2021-05-06 16:24:56, configure: --x86-x64 --with-gb28181, uname: Linux localhost.localdomain 4.19.90-2012.5.0.0054.oe1.x86_64 #1 SMP Tue Dec 22 15:58:47 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux, osx: 0
[2021-11-03 09:13:13.260][Trace][2687937][ds43t33x] 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=on --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 --cc=gcc --cxx=g++ --ar=ar --ld=ld --randlib=randlib
[2021-11-03 09:13:13.260][Trace][2687937][ds43t33x] srs checking config...
[2021-11-03 09:13:13.260][Trace][2687937][ds43t33x] ips, iface[0] enp1s0 ipv4 0x11043 192.168.250.240, iface[1] enp1s0 ipv4 0x11043 192.168.1.10, iface[2] wlp2s0 ipv4 0x11043 192.168.2.10, iface[3] enp0s20f0u3u2u3 ipv4 0x11043 192.168.1.23, iface[4] enp1s0 ipv6 0x11043 fe80::e1b:93a9:7914:a53a2.264814e-316np1s0, iface[5] wlp2s0 ipv6 0x11043 fe80::8865:242e:78e4:f3c2%wlp2s0, iface[6] enp0s20f0u3u2u3 ipv6 0x11043 fe80::c318:226f:658b:ffa96.953340e-310np0s20f0u3u2u3
[2021-11-03 09:13:13.260][Trace][2687937][ds43t33x] devices, intranet enp1s0 192.168.250.240, intranet enp1s0 192.168.1.10, intranet wlp2s0 192.168.2.10, intranet enp0s20f0u3u2u3 192.168.1.23, intranet enp1s0 fe80::e1b:93a9:7914:a53a2.264814e-316np1s0, intranet wlp2s0 fe80::8865:242e:78e4:f3c2%wlp2s0, intranet enp0s20f0u3u2u3 fe80::c318:226f:658b:ffa96.953340e-310np0s20f0u3u2u3
[2021-11-03 09:13:13.260][Warn][2687937][ds43t33x][0] stats network use index=0, ip=192.168.250.240, ifname=enp1s0
[2021-11-03 09:13:13.260][Warn][2687937][ds43t33x][0] stats disk not configed, disk iops disabled.
[2021-11-03 09:13:13.260][Trace][2687937][ds43t33x] you can check log by: tail -f ./objs/srs.log (@see https://github.com/ossrs/srs/wiki/v1_CN_SrsLog)
[2021-11-03 09:13:13.260][Trace][2687937][ds43t33x] please check SRS by: ./etc/init.d/srs status
[2021-11-03 09:13:13.260][Trace][2687937][ds43t33x] 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-11-03 09:13:13.260][Trace][2687937][ds43t33x] SRS on  amd64 x86_64, conf:/root/srs/trunk/conf/baby.conf, limit:1000, writev:1024, encoding:little-endian, HZ:100
[2021-11-03 09:13:13.260][Trace][2687937][ds43t33x] mw sleep:350ms. mr enabled:on, default:0, sleep:350ms
[2021-11-03 09:13:13.260][Trace][2687937][ds43t33x] gc:on, pq:30000ms, cscc:[0,16), csa:on, tn:on(may hurts performance), ss:auto(guess by merged write)
[2021-11-03 09:13:13.260][Trace][2687937][ds43t33x] system default latency(ms): mw(0-350) + mr(0-350) + play-queue(0-30000)
[2021-11-03 09:13:13.260][Warn][2687937][ds43t33x][0] SRS/4.0.99 is not stable
[2021-11-03 09:13:13.261][Trace][2687937][ds43t33x] st_init success, use epoll
[2021-11-03 09:13:13.263][Trace][2687937][ds43t33x] fingerprint=8E:AE:71:83:D0:7D:F6:06:C7:EE:78:EA:4D:29:5B:56:53:F0:6C:27:E3:97:B6:0D:87:E7:3A:36:C2:88:C6:AB
[2021-11-03 09:13:13.263][Trace][2687937][ds43t33x] RTC: Object cache init, rtp-cache=(enabled:1,pkt:64m-31w,payload:16m-69w-41w), msg-cache=(enabled:1,obj:16m-41w,buf:512m-34w)
[2021-11-03 09:13:13.263][Trace][2687937][ds43t33x] http: root mount to ./objs/nginx/html
[2021-11-03 09:13:13.263][Trace][2687937][ds43t33x] server main cid=ds43t33x, pid=2687937, ppid=1, asprocess=0
[2021-11-03 09:13:13.263][Trace][2687937][ds43t33x] write pid=2687937 to ./objs/srs.pid success!
[2021-11-03 09:13:13.263][Trace][2687937][ds43t33x] RTMP listen at tcp://0.0.0.0:1935, fd=8
[2021-11-03 09:13:13.263][Trace][2687937][ds43t33x] HTTP-API listen at tcp://0.0.0.0:1985, fd=9
[2021-11-03 09:13:13.264][Trace][2687937][ds43t33x] UDP #10 LISTEN at 0.0.0.0:5060, SO_SNDBUF(default=212992, expect=10485760, actual=425984, r0=0), SO_RCVBUF(default=212992, expect=10485760, actual=425984, r0=0)
[2021-11-03 09:13:13.264][Trace][2687937][ds43t33x] GB28181-SIP over UDP listen at udp://0.0.0.0:5060, fd=10
[2021-11-03 09:13:13.264][Trace][2687937][ds43t33x] UDP #11 LISTEN at 0.0.0.0:9000, SO_SNDBUF(default=212992, expect=10485760, actual=425984, r0=0), SO_RCVBUF(default=212992, expect=10485760, actual=425984, r0=0)
[2021-11-03 09:13:13.264][Trace][2687937][ds43t33x] GB28181-Stream over RTP listen at udp://0.0.0.0:9000, fd=11
[2021-11-03 09:13:13.264][Trace][2687937][ds43t33x] signal installed, reload=1, reopen=10, fast_quit=15, grace_quit=3
[2021-11-03 09:13:13.264][Trace][2687937][ds43t33x] http: api mount /console to ./objs/nginx/html/console
[2021-11-03 09:13:13.264][Trace][2687937][ds43t33x] Hybrid cpu=0.00%,0MB
[2021-11-03 09:13:13.264][Trace][2687937][43545629] GB28181: connection manager run, conns=0
[2021-11-03 09:13:13.264][Trace][2687937][u3ehro09] TCP: connection manager run, conns=0
[2021-11-03 09:13:13.264][Trace][2687937][ln33t210] RTC: connection manager run, conns=0
[2021-11-03 09:13:18.309][Trace][2687937][ds43t33x] Hybrid cpu=0.00%,15MB
[2021-11-03 09:13:23.354][Trace][2687937][ds43t33x] Hybrid cpu=0.33%,15MB, cid=1,1, timer=53,0,0, clock=0,49,0,0,0,0,0,0,0
[2021-11-03 09:13:25.118][Trace][2687937][3ej02z93] HTTP #0 192.168.1.10:40554 GET http://192.168.1.10:1985/api/v1/gb28181?action=sip_query_session, content-length=-1
[2021-11-03 09:13:25.119][Trace][2687937][3ej02z93] TCP: before dispose resource(HttpConn)(0x2cfee80), conns=1, zombies=0, ign=0, inz=0, ind=0
[2021-11-03 09:13:25.119][Warn][2687937][3ej02z93][104] client disconnect peer. ret=1007
[2021-11-03 09:13:25.119][Trace][2687937][u3ehro09] TCP: clear zombies=1 resources, conns=1, removing=0, unsubs=0
[2021-11-03 09:13:25.119][Trace][2687937][3ej02z93] TCP: disposing #0 resource(HttpConn)(0x2cfee80), conns=1, disposing=1, zombies=0
[2021-11-03 09:13:28.401][Trace][2687937][ds43t33x] Hybrid cpu=0.00%,15MB, cid=1,1, timer=53,0,0, clock=0,49,0,0,0,0,0,0,0
[2021-11-03 09:13:33.451][Trace][2687937][ds43t33x] Hybrid cpu=0.33%,15MB, cid=1,1, timer=52,0,0, clock=0,49,1,0,0,0,0,0,0, free=1
[2021-11-03 09:13:38.498][Trace][2687937][ds43t33x] Hybrid cpu=0.00%,15MB, cid=1,1, timer=52,0,0, clock=0,49,1,0,0,0,0,0,0, free=1
[2021-11-03 09:13:43.549][Trace][2687937][ds43t33x] Hybrid cpu=0.00%,15MB, cid=1,0, timer=52,0,0, clock=0,49,1,0,0,0,0,0,0
[2021-11-03 09:13:48.592][Trace][2687937][ds43t33x] Hybrid cpu=0.00%,15MB, cid=1,0, timer=52,0,0, clock=0,49,1,0,0,0,0,0,0
[2021-11-03 09:13:53.635][Trace][2687937][ds43t33x] Hybrid cpu=0.00%,15MB, cid=1,0, timer=52,0,0, clock=0,49,0,0,0,0,0,0,0
[2021-11-03 09:13:58.685][Trace][2687937][ds43t33x] Hybrid cpu=0.33%,15MB, cid=1,0, timer=52,0,0, clock=0,49,0,0,0,0,0,0,0
[2021-11-03 09:14:02.882][Trace][2687937][ds43t33x] gb28181: request client id=34020000001320000003 peer(192.168.1.33, 5060)
[2021-11-03 09:14:02.882][Trace][2687937][ds43t33x] gb28181: request method=REGISTER, uri=sip:34020000002000000001@3402000000, version=SIP/2.0 expires=3600
[2021-11-03 09:14:03.728][Trace][2687937][ds43t33x] Hybrid cpu=0.33%,15MB, cid=1,1, timer=52,0,0, clock=0,49,0,0,0,0,0,0,0
[2021-11-03 09:14:07.884][Trace][2687937][226w4728] gb28181: sip session=34020000001320000003 peer(192.168.1.33, 5060) status(RegisterOk,AliveOk) duration(4,0)
[2021-11-03 09:14:08.779][Trace][2687937][ds43t33x] Hybrid cpu=0.00%,15MB, cid=1,1, timer=52,0,0, clock=0,49,0,0,0,0,0,0,0
[2021-11-03 09:14:08.885][Trace][2687937][226w4728] gb28181: generate ssrc id=34020000001320000003@34020000001320000003, ssrc=11
[2021-11-03 09:14:08.885][Trace][2687937][226w4728] new source, stream_url=/live/34020000001320000003@34020000001320000003
[2021-11-03 09:14:08.885][Trace][2687937][226w4728] dvr stream 34020000001320000003@34020000001320000003 to file /root/dvr/live/34020000001320000003@34020000001320000003/2021/11/03/1635902048885.mp4
[2021-11-03 09:14:08.885][Trace][2687937][226w4728] ignore disabled exec for vhost=
[2021-11-03 09:14:08.885][Trace][2687937][226w4728] gb28181: create new stream channel id:34020000001320000003@34020000001320000003 rtmp url=rtmp://192.168.1.10:1935/live/34020000001320000003@34020000001320000003
[2021-11-03 09:14:08.888][Trace][2687937][ds43t33x] gb28181: request client id=34020000001320000003, peer(192.168.1.33, 5060)
[2021-11-03 09:14:08.888][Trace][2687937][ds43t33x] gb28181: respone method=INVITE, uri=34020000002000000001@3402000000, version=SIP/2.0 
[2021-11-03 09:14:08.888][Trace][2687937][ds43t33x] gb28181: INVITE response 34020000001320000003 client status=100
[2021-11-03 09:14:08.891][Trace][2687937][ds43t33x] gb28181: ssrc in y line is 11:b
[2021-11-03 09:14:08.891][Trace][2687937][ds43t33x] gb28181: request client id=34020000001320000003, peer(192.168.1.33, 5060)
[2021-11-03 09:14:08.891][Trace][2687937][ds43t33x] gb28181: respone method=INVITE, uri=34020000002000000001@3402000000, version=SIP/2.0 
[2021-11-03 09:14:08.891][Trace][2687937][ds43t33x] gb28181: INVITE response 34020000001320000003 client status=200
[2021-11-03 09:14:08.891][Trace][2687937][ds43t33x] gb28181: device unique id is 34020000001320000003@34020000001320000003
[2021-11-03 09:14:08.925][Trace][2687937][ds43t33x] <- GBS gb28181: client_id , peer(192.168.1.33, 15060) ps rtp packet 1412B, age=55662698, vt=2/96, sts=0/0/0xb, paylod=1400B
[2021-11-03 09:14:08.925][Trace][2687937][ds43t33x] RTP: jitbuffer VerifyAndAllocate:newSize:30000, prevBuffer:0, _buffer:47457856
[2021-11-03 09:14:08.928][Trace][2687937][ds43t33x] RTP: jitbuffer VerifyAndAllocate:newSize:90000, prevBuffer:47457856, _buffer:47489888
[2021-11-03 09:14:08.933][Trace][2687937][ds43t33x] RTP: jitbuffer VerifyAndAllocate:newSize:210000, prevBuffer:47489888, _buffer:2026151952
[2021-11-03 09:14:08.943][Trace][2687937][ds43t33x] RTP: jitbuffer VerifyAndAllocate:newSize:420000, prevBuffer:2026151952, _buffer:2025730064
[2021-11-03 09:14:08.943][Trace][2687937][ds43t33x] RTP: jitbuffer VerifyAndAllocate:newSize:30000, prevBuffer:0, _buffer:47489888
[2021-11-03 09:14:08.957][Trace][2687937][ds43t33x] RTP: jitbuffer VerifyAndAllocate:newSize:30000, prevBuffer:0, _buffer:47519904
[2021-11-03 09:14:08.967][Trace][2687937][ds43t33x] RTP: jitbuffer VerifyAndAllocate:newSize:30000, prevBuffer:0, _buffer:47549920
[2021-11-03 09:14:08.977][Trace][2687937][2hv4b11z] RTP: jitbuffer key=34020000001320000003@34020000001320000003 reallocate a frame buffer size(216416>0) resize(246416)
[2021-11-03 09:14:08.978][Trace][2687937][2hv4b11z] gb28181: ps map video es_type=h264(1b), es_id=e0, es_info_length=40
[2021-11-03 09:14:08.978][Trace][2687937][2hv4b11z] gb28181: ps map audio es_type=g711(90), es_id=c0, es_info_length=12
[2021-11-03 09:14:08.978][Trace][2687937][2hv4b11z] 44B video sh,  codec(7, profile=Main, level=Other, 1920x1088, 0kbps, 0.0fps, 0.0s)
[2021-11-03 09:14:08.978][Trace][2687937][2hv4b11z] RTP: jitbuffer key=34020000001320000003@34020000001320000003 reallocate a frame buffer size(336>0) resize(30336)
[2021-11-03 09:14:08.997][Trace][2687937][ds43t33x] RTP: jitbuffer VerifyAndAllocate:newSize:30000, prevBuffer:0, _buffer:47610288
[2021-11-03 09:14:09.008][Trace][2687937][ds43t33x] RTP: jitbuffer VerifyAndAllocate:newSize:30000, prevBuffer:0, _buffer:47665264
[2021-11-03 09:14:09.039][Trace][2687937][ds43t33x] RTP: jitbuffer VerifyAndAllocate:newSize:30000, prevBuffer:0, _buffer:47695280
[2021-11-03 09:14:09.079][Trace][2687937][ds43t33x] RTP: jitbuffer VerifyAndAllocate:newSize:30000, prevBuffer:0, _buffer:47748784
[2021-11-03 09:14:09.090][Trace][2687937][ds43t33x] RTP: jitbuffer VerifyAndAllocate:newSize:30000, prevBuffer:0, _buffer:48012000
[2021-11-03 09:14:09.120][Trace][2687937][ds43t33x] RTP: jitbuffer VerifyAndAllocate:newSize:30000, prevBuffer:0, _buffer:48042016
[2021-11-03 09:14:09.131][Trace][2687937][ds43t33x] RTP: jitbuffer VerifyAndAllocate:newSize:30000, prevBuffer:0, _buffer:48098816
[2021-11-03 09:14:09.213][Trace][2687937][ds43t33x] RTP: jitbuffer VerifyAndAllocate:newSize:30000, prevBuffer:0, _buffer:48128832
[2021-11-03 09:14:09.885][Trace][2687937][226w4728] gb28181: 34020000001320000003 clients device=34020000001320000003 send invite code=0
[2021-11-03 09:14:10.934][Trace][2687937][ds43t33x] RTP: jitbuffer VerifyAndAllocate:newSize:90000, prevBuffer:47610288, _buffer:48975168
[2021-11-03 09:14:10.939][Trace][2687937][ds43t33x] RTP: jitbuffer VerifyAndAllocate:newSize:210000, prevBuffer:48975168, _buffer:49065184
[2021-11-03 09:14:10.949][Trace][2687937][ds43t33x] RTP: jitbuffer VerifyAndAllocate:newSize:420000, prevBuffer:49065184, _buffer:2025058320
[2021-11-03 09:14:12.934][Trace][2687937][ds43t33x] RTP: jitbuffer VerifyAndAllocate:newSize:90000, prevBuffer:47748784, _buffer:47908000
[2021-11-03 09:14:12.939][Trace][2687937][ds43t33x] RTP: jitbuffer VerifyAndAllocate:newSize:210000, prevBuffer:47908000, _buffer:48881008
[2021-11-03 09:14:13.903][Trace][2687937][ds43t33x] Hybrid cpu=2.00%,18MB, cid=4,1, timer=52,0,0, clock=0,47,1,0,0,0,0,0,0, objs=(pkt:0,raw:0,fua:0,msg:36,oth:0,buf:0,drop:0)
[2021-11-03 09:14:18.924][Trace][2687937][ds43t33x] <- GBS gb28181: client_id , peer(192.168.1.33, 15060) ps rtp packet 348B, age=65664084, vt=2/96, sts=3775/900000/0xb, paylod=336B
[2021-11-03 09:14:19.035][Trace][2687937][ds43t33x] Hybrid cpu=1.67%,18MB, cid=4,1, timer=52,0,0, clock=0,47,1,0,0,0,0,0,0, objs=(pkt:0,raw:0,fua:0,msg:36,oth:0,buf:0,drop:0)
[2021-11-03 09:14:24.159][Trace][2687937][ds43t33x] Hybrid cpu=2.00%,18MB, cid=1,0, timer=51,0,0, clock=0,44,4,0,0,0,0,0,0, objs=(pkt:0,raw:0,fua:0,msg:74,oth:0,buf:0,drop:0)
[2021-11-03 09:14:25.129][Trace][2687937][64488913] HTTP #0 192.168.1.10:40580 GET http://192.168.1.10:1985/api/v1/gb28181?action=sip_query_session, content-length=-1
[2021-11-03 09:14:25.130][Trace][2687937][64488913] TCP: before dispose resource(HttpConn)(0x2e5e620), conns=1, zombies=0, ign=0, inz=0, ind=0
[2021-11-03 09:14:25.130][Warn][2687937][64488913][104] client disconnect peer. ret=1007
[2021-11-03 09:14:25.130][Trace][2687937][u3ehro09] TCP: clear zombies=1 resources, conns=1, removing=0, unsubs=0
[2021-11-03 09:14:25.130][Trace][2687937][64488913] TCP: disposing #0 resource(HttpConn)(0x2e5e620), conns=1, disposing=1, zombies=0
[2021-11-03 09:14:28.931][Trace][2687937][ds43t33x] <- GBS gb28181: client_id , peer(192.168.1.33, 15060) ps rtp packet 1412B, age=75669731, vt=2/96, sts=7662/1800000/0xb, paylod=1400B
[2021-11-03 09:14:29.302][Trace][2687937][ds43t33x] Hybrid cpu=2.00%,19MB, cid=1,0, timer=51,0,0, clock=0,44,4,0,0,0,0,0,0, objs=(pkt:0,raw:0,fua:0,msg:74,oth:0,buf:0,drop:0)
[2021-11-03 09:14:34.442][Trace][2687937][ds43t33x] Hybrid cpu=1.67%,18MB, cid=1,1, timer=52,0,0, clock=0,41,6,0,0,0,0,0,0, free=1, objs=(pkt:0,raw:0,fua:0,msg:74,oth:0,buf:0,drop:0)
[2021-11-03 09:14:38.941][Trace][2687937][2hv4b11z] gb28181: client id=34020000001320000003@34020000001320000003,  ssrc=0xb, peer(192.168.1.33, 15060), rtmp muxer is alive
[2021-11-03 09:14:39.572][Trace][2687937][ds43t33x] Hybrid cpu=2.00%,19MB, cid=1,1, timer=52,0,0, clock=0,41,6,0,0,0,0,0,0, free=1, objs=(pkt:0,raw:0,fua:0,msg:74,oth:0,buf:0,drop:0)
[2021-11-03 09:14:40.988][Trace][2687937][2hv4b11z] dvr stream 34020000001320000003@34020000001320000003 to file /root/dvr/live/34020000001320000003@34020000001320000003/2021/11/03/1635902080988.mp4
[2021-11-03 09:14:44.801][Trace][2687937][ds43t33x] Hybrid cpu=1.66%,19MB, cid=1,0, timer=51,0,0, clock=0,41,6,1,0,0,0,0,0, objs=(pkt:0,raw:0,fua:0,msg:75,oth:0,buf:0,drop:0)
[2021-11-03 09:14:48.955][Trace][2687937][2hv4b11z] gb28181: client id=34020000001320000003@34020000001320000003,  ssrc=0xb, peer(192.168.1.33, 15060), rtmp muxer is alive
[2021-11-03 09:14:49.933][Trace][2687937][ds43t33x] Hybrid cpu=2.66%,19MB, cid=1,0, timer=51,0,0, clock=0,41,6,1,0,0,0,0,0, objs=(pkt:0,raw:0,fua:0,msg:75,oth:0,buf:0,drop:0)
[2021-11-03 09:14:54.954][Trace][2687937][ds43t33x] RTP: jitbuffer VerifyAndAllocate:newSize:420000, prevBuffer:48881008, _buffer:49738560
[2021-11-03 09:14:55.054][Trace][2687937][ds43t33x] Hybrid cpu=1.67%,19MB, cid=1,0, timer=51,0,0, clock=0,44,4,0,0,0,0,0,0, objs=(pkt:0,raw:0,fua:0,msg:75,oth:0,buf:0,drop:0)
[2021-11-03 09:14:58.974][Trace][2687937][2hv4b11z] gb28181: client id=34020000001320000003@34020000001320000003,  ssrc=0xb, peer(192.168.1.33, 15060), rtmp muxer is alive
[2021-11-03 09:15:00.181][Trace][2687937][ds43t33x] Hybrid cpu=2.33%,19MB, cid=1,0, timer=51,0,0, clock=0,44,4,0,0,0,0,0,0, objs=(pkt:0,raw:0,fua:0,msg:75,oth:0,buf:0,drop:0)
[2021-11-03 09:15:05.307][Trace][2687937][ds43t33x] Hybrid cpu=2.00%,19MB, cid=1,0, timer=51,0,0, clock=0,44,3,0,0,0,0,0,0, objs=(pkt:0,raw:0,fua:0,msg:75,oth:0,buf:0,drop:0)
[2021-11-03 09:15:07.922][Trace][2687937][226w4728] gb28181: sip session=34020000001320000003 peer(192.168.1.33, 5060) status(RegisterOk,AliveOk) duration(65,0)
[2021-11-03 09:15:08.961][Trace][2687937][ds43t33x] <- GBS gb28181: client_id , peer(192.168.1.33, 15060) ps rtp packet 1412B, age=115699235, vt=2/96, sts=23448/5403600/0xb, paylod=1400B
[2021-11-03 09:15:10.437][Trace][2687937][ds43t33x] Hybrid cpu=2.33%,19MB, cid=1,0, timer=51,0,0, clock=0,44,3,0,0,0,0,0,0, objs=(pkt:0,raw:0,fua:0,msg:75,oth:0,buf:0,drop:0)
[2021-11-03 09:15:12.995][Warn][2687937][2hv4b11z][2] dvr: ignore video error code=1068 : update duration : segment close : rename fragment : rename /root/dvr/live/34020000001320000003@34020000001320000003/2021/11/03/1635902080988.mp4.tmp to /root/dvr/live/34020000001320000003@34020000001320000003/2021/11/03/1635902080988.mp4
thread [2687937][2hv4b11z]: on_video() [src/app/srs_app_dvr.cpp:854][errno=2]
thread [2687937][2hv4b11z]: update_duration() [src/app/srs_app_dvr.cpp:893][errno=2]
thread [2687937][2hv4b11z]: close() [src/app/srs_app_dvr.cpp:191][errno=2]
thread [2687937][2hv4b11z]: rename() [src/app/srs_app_fragment.cpp:149][errno=2]
[2021-11-03 09:15:14.983][Trace][2687937][2hv4b11z] dvr stream 34020000001320000003@34020000001320000003 to file /root/dvr/live/34020000001320000003@34020000001320000003/2021/11/03/1635902114983.mp4
[2021-11-03 09:15:15.574][Trace][2687937][ds43t33x] Hybrid cpu=2.33%,19MB, cid=1,0, timer=51,0,0, clock=0,43,5,0,0,0,0,0,0, objs=(pkt:0,raw:0,fua:0,msg:68,oth:0,buf:0,drop:0)
[2021-11-03 09:15:16.968][Warn][2687937][2hv4b11z][11] dvr: ignore video error code=3076 : update duration : segment close : close encoder : flush encoder : Missing audio and video track
thread [2687937][2hv4b11z]: on_video() [src/app/srs_app_dvr.cpp:854][errno=11]
thread [2687937][2hv4b11z]: update_duration() [src/app/srs_app_dvr.cpp:893][errno=11]
thread [2687937][2hv4b11z]: close() [src/app/srs_app_dvr.cpp:186][errno=11]
thread [2687937][2hv4b11z]: close_encoder() [src/app/srs_app_dvr.cpp:531][errno=11]
thread [2687937][2hv4b11z]: flush() [src/kernel/srs_kernel_mp4.cpp:5767][errno=11]
[2021-11-03 09:15:18.983][Trace][2687937][2hv4b11z] dvr stream 34020000001320000003@34020000001320000003 to file /root/dvr/live/34020000001320000003@34020000001320000003/2021/11/03/1635902118983.mp4
[2021-11-03 09:15:18.983][Trace][2687937][2hv4b11z] gb28181: client id=34020000001320000003@34020000001320000003,  ssrc=0xb, peer(192.168.1.33, 15060), rtmp muxer is alive
[2021-11-03 09:15:20.701][Trace][2687937][ds43t33x] Hybrid cpu=1.67%,19MB, cid=1,0, timer=51,0,0, clock=0,43,5,0,0,0,0,0,0, objs=(pkt:0,raw:0,fua:0,msg:68,oth:0,buf:0,drop:0)
[2021-11-03 09:15:20.969][Warn][2687937][2hv4b11z][11] dvr: ignore video error code=3076 : update duration : segment close : close encoder : flush encoder : Missing audio and video track
thread [2687937][2hv4b11z]: on_video() [src/app/srs_app_dvr.cpp:854][errno=11]
thread [2687937][2hv4b11z]: update_duration() [src/app/srs_app_dvr.cpp:893][errno=11]
thread [2687937][2hv4b11z]: close() [src/app/srs_app_dvr.cpp:186][errno=11]
thread [2687937][2hv4b11z]: close_encoder() [src/app/srs_app_dvr.cpp:531][errno=11]
thread [2687937][2hv4b11z]: flush() [src/kernel/srs_kernel_mp4.cpp:5767][errno=11]
[2021-11-03 09:15:22.986][Trace][2687937][2hv4b11z] dvr stream 34020000001320000003@34020000001320000003 to file /root/dvr/live/34020000001320000003@34020000001320000003/2021/11/03/1635902122986.mp4
[2021-11-03 09:15:25.002][Warn][2687937][2hv4b11z][11] dvr: ignore video error code=3076 : update duration : segment close : close encoder : flush encoder : Missing audio and video track
thread [2687937][2hv4b11z]: on_video() [src/app/srs_app_dvr.cpp:854][errno=11]
thread [2687937][2hv4b11z]: update_duration() [src/app/srs_app_dvr.cpp:893][errno=11]
thread [2687937][2hv4b11z]: close() [src/app/srs_app_dvr.cpp:186][errno=11]
thread [2687937][2hv4b11z]: close_encoder() [src/app/srs_app_dvr.cpp:531][errno=11]
thread [2687937][2hv4b11z]: flush() [src/kernel/srs_kernel_mp4.cpp:5767][errno=11]
[2021-11-03 09:15:25.133][Trace][2687937][3g4yrp80] HTTP #0 192.168.1.10:40610 GET http://192.168.1.10:1985/api/v1/gb28181?action=sip_query_session, content-length=-1
[2021-11-03 09:15:25.134][Trace][2687937][3g4yrp80] TCP: before dispose resource(HttpConn)(0x2d9c790), conns=1, zombies=0, ign=0, inz=0, ind=0
[2021-11-03 09:15:25.134][Warn][2687937][3g4yrp80][104] client disconnect peer. ret=1007
[2021-11-03 09:15:25.134][Trace][2687937][u3ehro09] TCP: clear zombies=1 resources, conns=1, removing=0, unsubs=0
[2021-11-03 09:15:25.134][Trace][2687937][3g4yrp80] TCP: disposing #0 resource(HttpConn)(0x2d9c790), conns=1, disposing=1, zombies=0
[2021-11-03 09:15:25.830][Trace][2687937][ds43t33x] Hybrid cpu=2.33%,19MB, cid=3,1, timer=51,0,0, clock=0,44,4,0,0,0,0,0,0, free=1, objs=(pkt:0,raw:0,fua:0,msg:49,oth:0,buf:0,drop:0)
[2021-11-03 09:15:26.960][Trace][2687937][2hv4b11z] dvr stream 34020000001320000003@34020000001320000003 to file /root/dvr/live/34020000001320000003@34020000001320000003/2021/11/03/1635902126959.mp4
[2021-11-03 09:15:28.978][Warn][2687937][2hv4b11z][11] dvr: ignore video error code=3076 : update duration : segment close : close encoder : flush encoder : Missing audio and video track
thread [2687937][2hv4b11z]: on_video() [src/app/srs_app_dvr.cpp:854][errno=11]
thread [2687937][2hv4b11z]: update_duration() [src/app/srs_app_dvr.cpp:893][errno=11]
thread [2687937][2hv4b11z]: close() [src/app/srs_app_dvr.cpp:186][errno=11]
thread [2687937][2hv4b11z]: close_encoder() [src/app/srs_app_dvr.cpp:531][errno=11]
thread [2687937][2hv4b11z]: flush() [src/kernel/srs_kernel_mp4.cpp:5767][errno=11]
[2021-11-03 09:15:28.978][Trace][2687937][2hv4b11z] gb28181: client id=34020000001320000003@34020000001320000003,  ssrc=0xb, peer(192.168.1.33, 15060), rtmp muxer is alive
[2021-11-03 09:15:30.955][Trace][2687937][ds43t33x] Hybrid cpu=2.00%,19MB, cid=3,1, timer=51,0,0, clock=0,44,4,0,0,0,0,0,0, free=1, objs=(pkt:0,raw:0,fua:0,msg:49,oth:0,buf:0,drop:0)
[2021-11-03 09:15:30.995][Trace][2687937][2hv4b11z] dvr stream 34020000001320000003@34020000001320000003 to file /root/dvr/live/34020000001320000003@34020000001320000003/2021/11/03/1635902130995.mp4
[2021-11-03 09:15:32.979][Warn][2687937][2hv4b11z][11] dvr: ignore video error code=3076 : update duration : segment close : close encoder : flush encoder : Missing audio and video track
thread [2687937][2hv4b11z]: on_video() [src/app/srs_app_dvr.cpp:854][errno=11]
thread [2687937][2hv4b11z]: update_duration() [src/app/srs_app_dvr.cpp:893][errno=11]
thread [2687937][2hv4b11z]: close() [src/app/srs_app_dvr.cpp:186][errno=11]
thread [2687937][2hv4b11z]: close_encoder() [src/app/srs_app_dvr.cpp:531][errno=11]
thread [2687937][2hv4b11z]: flush() [src/kernel/srs_kernel_mp4.cpp:5767][errno=11]
[2021-11-03 09:15:34.961][Trace][2687937][2hv4b11z] dvr stream 34020000001320000003@34020000001320000003 to file /root/dvr/live/34020000001320000003@34020000001320000003/2021/11/03/1635902134961.mp4
[2021-11-03 09:15:36.082][Trace][2687937][ds43t33x] Hybrid cpu=2.00%,19MB, cid=1,0, timer=51,0,0, clock=0,44,4,0,0,0,0,0,0, objs=(pkt:0,raw:0,fua:0,msg:50,oth:0,buf:0,drop:0)
[2021-11-03 09:15:36.978][Warn][2687937][2hv4b11z][11] dvr: ignore video error code=3076 : update duration : segment close : close encoder : flush encoder : Missing audio and video track
thread [2687937][2hv4b11z]: on_video() [src/app/srs_app_dvr.cpp:854][errno=11]
thread [2687937][2hv4b11z]: update_duration() [src/app/srs_app_dvr.cpp:893][errno=11]
thread [2687937][2hv4b11z]: close() [src/app/srs_app_dvr.cpp:186][errno=11]
thread [2687937][2hv4b11z]: close_encoder() [src/app/srs_app_dvr.cpp:531][errno=11]
thread [2687937][2hv4b11z]: flush() [src/kernel/srs_kernel_mp4.cpp:5767][errno=11]
  1. SRS的配置如下(Config):
# push gb28181 stream to SRS.

listen                  1935;
max_connections         1000;
daemon              off;
srs_log_tank        file;
srs_log_level       trace;

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://192.168.1.10:1935/live/[stream];
    
    # 接收设备端rtp流的多路复用端口
    listen              9000;
    # 多路复用端口类型,on为tcp,off为udp
    # 默认:off
    tcp_enable            off;

    # 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缓冲
    # 开启之后能有效解决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       192.168.1.10;

    #根据收到ps rtp包自带创建rtmp媒体通道,不需要api接口创建
    #rtmp地址参数[stream] 就是通道id  格式chid[ssrc]
    auto_create_channel   off;

    sip {
        # 是否启用srs内部sip信令
        # 为on信令走srs, off 只转发ps流
        enabled on;
        
        # sip监听udp端口
        listen              5060;
        
        # SIP server ID(SIP服务器ID).
        # 设备端配置编号需要与该值一致,否则无法注册
        serial              34020000002000000001;

        # SIP server domain(SIP服务器域)
        realm               3402000000;

        # 服务端发送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;
    }
}


vhost __defaultVhost__ {
    dvr {
        enabled      on;
        dvr_path     /root/dvr/[app]/[stream]/[2006]/[01]/[02]/[timestamp].mp4;
        dvr_plan     segment;
        dvr_duration    30;
        dvr_wait_keyframe       on;
    }
}

重现(Replay)

重现Bug的步骤(How to replay bug?)

不定期出现

期望行为(Expect)

描述你期望发生的事情(Please describe your expectation)

正常保存文件

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants