Giter Site home page Giter Site logo

gb28181's Introduction

GB28181解决的问题

  • 不同平台互通(厂商都自定义取流协议)
    比如以前的摄像头都是零散的,每个公安局只能看到自己小范围的监控录像,发生了重大案件,还需要把硬盘监控资料交到上级部门,上级部门再组织大量人员人工回放查看,这样太影响效率了!

组成

SIP信令

RFC 3261

  • REGISTER
  • INVITE

RFC 3428

  • MESSAGE
  • MANSCDP+xml

RFC 2976

  • INFO
  • MANSRTSP

RFC 3265

  • SUBSCRIBE
  • NOTIFY

RFC 4566

  • SDP

流媒体

  • RTP + PS/H264

基本功能

  • 远程观看设备实时流
  • 远程录像回放
  • 设备控制(比如云台)
  • 设备主动上报信息

注册流程

image

建立媒体流流程

基本流程

image

信令交互

image

封包

image

REGISTER

  • Request-Line: REGISTER sip:si服务器国标id@sip服务器ip:sip服务器端口 SIP/2.0
  • Via: SIP/2.0/(TCP or UDP) sip设备ip:sip设备端口;rport;branch=xxx
  • From: sip:sip设备国标id@sip服务器域id;tag=xxx
  • To: sip:sip设备国标id@sip服务器域id
  • Call-Id: xxx
  • CSeq: xxx REGISTER
  • Contact: sip:sip设备国标id@sip设备ip:sip设备端口
  • Max-Forwards: xxx
  • User-Agent: xxx
  • Expiers: xxx
  • Content-Length: 0

基本概念

  • uac
  • uas
    逻辑概念,代表sip信令的发起方和服务方,可能是两个独立的实体,也可能在一个主机上
  • Redirect Server
    重定向服务器,用于查找sip代理服务器
  • Registrar
    位置服务器,记录设备的ip和设备id的对应关系

我们要做的

image

  • 和实际gb28181的区别:c/s p2p
  • sip信令服务器
    • register
    • invite
    • message
      • catalog
      • keepalive
      • alarm
      • 云台控制
    • subscribe
      • 订阅camera经纬度
  • 流媒体服务
    • RTP+PS解析,转换http-flv、rtmp、hls
  • NVR or 国标级联

开源软件

  • eXosip & osip
  • pjsip
  • freeswitch
  • srs
  • opal

抓包

文档

gb28181's People

Contributors

felix-001 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.