Real-time streaming transmission method across network boundary

文档序号:1101648 发布日期:2020-09-25 浏览:7次 中文

阅读说明:本技术 一种跨网络边界的实时流传输方法 (Real-time streaming transmission method across network boundary ) 是由 陈天辉 佘永涛 裘昊 孙伟涛 于 2020-06-09 设计创作,主要内容包括:本发明公开了一种跨网络边界的实时流传输方法。它具体包括如下步骤:作为流传输的起始点,服务器接收到流传输的信令,将原始流RTP、RTSP、RTMP、UDP进行媒体信息校验;通过transcoder将RTSP、UDP、RTP格式的流统一透传成RTMP格式;FFMPEG组件将RTMP转成HTTP-FLV并推到边界;边界和FFMPEG组件一一对应,FFMPEG的推流方式主动穿越边界将实时流通过HTTP传输到内网;SRS接收到HTTP-FLV流,同时组播成RTMP格式;内网客户端播放器播放RTMP视频流。本发明的有益效果是:降低整个播放链路,方便追踪;降低服务器存储压力;能够普遍适用于基于http的跨网络实时流传输场景;实现跨边界组件的可插拔;零侵入,降低开发工作量;集成中间件少,易部署;低延迟,提升用户体验。(The invention discloses a real-time streaming transmission method across network boundaries. The method specifically comprises the following steps: as the starting point of stream transmission, the server receives the signaling of stream transmission and checks the media information of the original streams RTP, RTSP, RTMP and UDP; streams in RTSP, UDP and RTP formats are transmitted into an RTMP format in a unified way through a transcoder; the FFMPEG component converts RTMP into HTTP-FLV and pushes to the boundary; the boundary corresponds to the FFMPEG components one by one, and the FFMPEG stream pushing mode actively crosses the boundary to transmit the real-time stream to the intranet through HTTP; the SRS receives the HTTP-FLV stream and multicasts the HTTP-FLV stream into an RTMP format; and the intranet client player plays the RTMP video stream. The invention has the beneficial effects that: the whole playing link is reduced, and tracking is convenient; reducing the storage pressure of the server; the method can be generally suitable for a cross-network real-time streaming transmission scene based on http; the pluggable of a boundary crossing component is realized; zero intrusion, and reduced development workload; the integrated middleware is few and is easy to deploy; low delay, and improved user experience.)

1. A real-time streaming transmission method across network boundaries is characterized by comprising the following steps:

(1) receiving a play request: as the starting point of stream transmission, the server receives the signaling of stream transmission and checks the media information of the original streams RTP, RTSP, RTMP and UDP;

(2) transparent transmission into RTMP: streams in RTSP, UDP and RTP formats are transmitted into an RTMP format in a unified way through a transcoder;

(3) the FFMPEG component converts RTMP into HTTP-FLV and pushes to the boundary;

(4) boundary agent: the boundary corresponds to the FFMPEG components one by one, and the FFMPEG stream pushing mode actively crosses the boundary to transmit the real-time stream to the intranet through HTTP;

(5) the SRS receives the HTTP-FLV stream and multicasts the HTTP-FLV stream into an RTMP format;

(6) and the intranet client player plays the RTMP video stream.

2. The method of claim 1, wherein the raw input stream is real-time streaming of RTSP, UDP, RTP; the transcoder refers to a coding and decoding component; the RTMP refers to RTMP live broadcast stream which is uniformly output by a transcoder, and is a webpage broadcast stream protocol which is widely used in the industry; the FFMPEG refers to an open source stream protocol conversion tool; the boundary refers to a tool platform which accords with the network construction standard of the ministry of public security, can realize the cross-network data transmission work of a private video network and a public security intranet, and exists.

3. The method according to claim 1 or 2, wherein in the step (3) and the step (4), the method specifically comprises:

(a) FFMPEG components are deployed on a boundary machine, and are uniformly distributed and scheduled by Java cluster application;

(b) after receiving the instruction set, FFMPEG checks the stream encapsulation format, the RTMP encapsulation format is FLV, and the RMTP protocol header is analyzed through FFMPEG to extract the FLV data packet;

(c) adding an HTTP protocol header to the extracted FLV data packet by using FFMPEG to form an HTTP-FLV real-time stream;

(d) calling the boundary to penetrate the IP and the port, and pushing the flow to the intranet.

4. A method of real-time streaming across network boundaries as claimed in claim 1 or 2, wherein in step (5) wherein: the stream-cassette component of the SRS is capable of listening to and receiving streams of other protocols while multicasting streams of these protocols to RTMP providing client calls, the stream-cassette component is off by default and needs to be enabled when the SRS is installed.

Technical Field

The invention relates to the technical field of data interaction, in particular to a cross-network-boundary real-time streaming transmission method.

Background

Public security networks relate to public security information networks, internal networks, video private networks and the like, are strictly physically isolated from the Internet, and are prohibited to be used by one machine for two purposes. The data interaction between the private video network and the public security intranet is realized through a gatekeeper or a security boundary. The safety margin has a great advantage in real time compared with the ferrying mode of the network gate.

In the data interaction of a general video private network and a public security intranet, video watching is realized in a network gate mode, a stream needs to be transcoded into a slicing file, and then FTP (file transfer protocol) ferrying to the public security intranet, and the mode has the following problems: the link is long, and the abnormal problem is difficult to track; the development workload is large; the watching video has large delay and cannot meet the requirement of real-time watching and examining on-site conditions; when the public security intranet receives the slice file and assembles the slice file into the playlist, errors are easy to occur; in the FTP ferrying mode, the file transmission state is difficult to monitor accurately.

Disclosure of Invention

The present invention provides a short-link and low-latency real-time streaming method across network boundaries to overcome the above-mentioned deficiencies in the prior art.

In order to achieve the purpose, the invention adopts the following technical scheme:

a real-time streaming transmission method across network boundaries specifically comprises the following steps:

(1) receiving a play request: as the starting point of stream transmission, the server receives the signaling of stream transmission and checks the media information of the original streams RTP, RTSP, RTMP and UDP;

(2) transparent transmission into RTMP: streams in RTSP, UDP and RTP formats are transmitted into an RTMP format in a unified way through a transcoder;

(3) the FFMPEG component converts RTMP into HTTP-FLV and pushes to the boundary;

(4) boundary agent: the boundary corresponds to the FFMPEG components one by one, and the FFMPEG stream pushing mode actively crosses the boundary to transmit the real-time stream to the intranet through HTTP;

(5) the SRS receives the HTTP-FLV stream and multicasts the HTTP-FLV stream into an RTMP format;

(6) and the intranet client player plays the RTMP video stream.

The invention relates to a method for watching a real-time video stream of a private video network across a security boundary in a public security intranet. Compared with the traditional mode of gate ferry, the invention can produce the following effects: the whole playing link is reduced, and the problem of tracking is facilitated; extra video files cannot be generated, and the storage pressure of a server is reduced; the method can be generally suitable for a cross-network real-time streaming transmission scene based on http; the original system which does not relate to cross-network is compatible, and the pluggable of a cross-boundary component is realized; the low invasion of the original system is kept, and the zero invasion can be realized almost, so that the development workload is greatly reduced; the integrated middleware is few and is easy to deploy; the low delay of the second level can be almost achieved, and the user experience is greatly improved; additional video files cannot be generated, and the storage pressure of the server is reduced.

Preferably, the original input stream refers to real-time streams of RTSP, UDP and RTP; the transcoder refers to a coding and decoding component; the RTMP refers to RTMP live broadcast stream which is uniformly output by a transcoder, and is a webpage broadcast stream protocol which is widely used in the industry; the FFMPEG refers to an open source stream protocol conversion tool; the boundary refers to a tool platform which accords with the network construction standard of the ministry of public security, can realize the cross-network data transmission work of a private video network and a public security intranet, and exists.

Preferably, in the step (3) and the step (4), the following are specifically mentioned:

(a) FFMPEG components are deployed on a boundary machine, and are uniformly distributed and scheduled by Java cluster application;

(b) after receiving the instruction set, FFMPEG checks the stream encapsulation format, the RTMP encapsulation format is FLV, and the RMTP protocol header is analyzed through FFMPEG to extract the FLV data packet;

(c) adding an HTTP protocol header to the extracted FLV data packet by using FFMPEG to form an HTTP-FLV real-time stream;

(d) calling the boundary to penetrate the IP and the port, and pushing the flow to the intranet.

Preferably, in step (5), wherein: the stream-cassette component of the SRS is capable of listening to and receiving streams of other protocols while multicasting streams of these protocols to RTMP providing client calls, the stream-cassette component is off by default and needs to be enabled when the SRS is installed.

The invention has the beneficial effects that: the whole playing link is reduced, and the problem of tracking is facilitated; extra video files cannot be generated, and the storage pressure of a server is reduced; the method can be generally suitable for a cross-network real-time streaming transmission scene based on http; the original system which does not relate to cross-network is compatible, and the pluggable of a cross-boundary component is realized; the low invasion of the original system is kept, and the zero invasion can be realized almost, so that the development workload is greatly reduced; the integrated middleware is few and is easy to deploy; the low delay of the second level can be almost achieved, and the user experience is greatly improved.

Drawings

FIG. 1 is a network architecture diagram of the present invention;

fig. 2 is a flow chart of the method of the present invention.

Detailed Description

The invention is further described with reference to the following figures and detailed description.

In the embodiment shown in fig. 1 and fig. 2, a method for real-time streaming across a network boundary specifically includes the following steps:

(1) receiving a play request: as the starting point of stream transmission, the server receives the signaling of stream transmission and checks the media information of the original streams RTP, RTSP, RTMP and UDP;

(2) transparent transmission into RTMP: streams in RTSP, UDP and RTP formats are transmitted into RTMP format through a transcoder in a unified way, and preparation is made for converting the streams into HTTP-FLV streams in the next step;

(3) the FFMPEG component converts RTMP into HTTP-FLV and pushes to the boundary; the method specifically comprises the following steps: the method is realized by calling an FFMPEG component through Java, the component meets the deployment mode of cluster type task scheduling, reduces the pressure of a CPU, bandwidth and the like of a single machine, and can ensure high availability.

(4) Boundary agent: the boundary corresponds to the FFMPEG components one by one, and the FFMPEG stream pushing mode actively crosses the boundary to transmit the real-time stream to the intranet through HTTP;

the method specifically comprises the following steps:

(a) FFMPEG components are deployed on a boundary machine, and are uniformly distributed and scheduled by Java cluster application;

(b) after receiving the instruction set, FFMPEG checks the stream encapsulation format, the RTMP encapsulation format is FLV, and the RMTP protocol header is analyzed through FFMPEG to extract the FLV data packet;

(c) adding an HTTP protocol header to the extracted FLV data packet by using FFMPEG to form an HTTP-FLV real-time stream;

(d) calling a boundary penetration IP and a port, and pushing the stream to an intranet;

(5) the SRS receives the HTTP-FLV stream and multicasts the HTTP-FLV stream into an RTMP format; wherein: the stream-filter component of the SRS is capable of intercepting and receiving streams of other protocols (RTSP, HTTP-FLV, HLS, etc.), and multicasting the streams of these protocols into an RTMP providing client call, it should be noted that the stream-filter component is turned off by default, and the component needs to be enabled when the SRS is installed.

(6) The intranet client player plays RTMP video stream; and client players such as APP, webpage, VLC and the like of the public security intranet play RTMP video streams issued by the SRS.

The original input stream refers to real-time streams of RTSP, UDP and RTP; a transcoder refers to a codec component; the RTMP refers to RTMP live broadcast stream which is uniformly output by a transcoder, and is a webpage broadcast stream protocol which is widely used in the industry; FFMPEG refers to an open source streaming protocol conversion tool; the boundary refers to a tool platform which accords with the network construction standard of the ministry of public security, can realize the cross-network data transmission work of a private video network and a public security intranet, and exists.

The project is a project created by a certain public security bureau for a first-line civil police, and the first-line civil police has high working pressure, and the project needs to run back and forth on different sites to a great extent. The low-delay real-time borrowing of the field camera can greatly help police, and even the field police work can be processed in a remote mode. The following is a description of the overall workflow:

1. the policeman initiates a site video borrowing request in an internal police service.

2. And the video private network platform receives the borrowing request and starts to call the front-end camera video.

3. The video private network platform converts the camera into RTMP in real time through the Transcoder.

4. The video private network platform calls FFMPEG to convert RTMP to HTTP-FLV and push to the security boundary.

5. And the security boundary forwards the HTTP-FLV stream to the SRS server of the public security intranet.

6. The SRS server receives the HTTP-FLV stream and multicasts it into RTMP.

7. The policeman sees the on-site camera video of the private network on the police service.

The invention relates to a method for watching a real-time video stream of a private video network across a security boundary in a public security intranet. Compared with the traditional mode of gate ferry, the invention can produce the following effects: the whole playing link is reduced, and the problem of tracking is facilitated; extra video files cannot be generated, and the storage pressure of a server is reduced; the method can be generally suitable for a cross-network real-time streaming transmission scene based on http; the original system which does not relate to cross-network is compatible, and the pluggable of a cross-boundary component is realized; the low invasion of the original system is kept, and the zero invasion can be realized almost, so that the development workload is greatly reduced; the integrated middleware is few and is easy to deploy; the low delay of the second level can be almost achieved, and the user experience is greatly improved.

6页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种续航时间长的散热型随身WIFI设备

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!

技术分类