CN115174545A - Plug flow web playing method and system based on national standard GB28181 - Google Patents

Plug flow web playing method and system based on national standard GB28181 Download PDF

Info

Publication number
CN115174545A
CN115174545A CN202210754971.XA CN202210754971A CN115174545A CN 115174545 A CN115174545 A CN 115174545A CN 202210754971 A CN202210754971 A CN 202210754971A CN 115174545 A CN115174545 A CN 115174545A
Authority
CN
China
Prior art keywords
server
stream
video stream
web
pingos
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202210754971.XA
Other languages
Chinese (zh)
Other versions
CN115174545B (en
Inventor
劳康乘
黄章良
陈小军
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangzhou Lubangtong IoT Co Ltd
Original Assignee
Guangzhou Lubangtong IoT Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangzhou Lubangtong IoT Co Ltd filed Critical Guangzhou Lubangtong IoT Co Ltd
Priority to CN202210754971.XA priority Critical patent/CN115174545B/en
Priority claimed from CN202210754971.XA external-priority patent/CN115174545B/en
Publication of CN115174545A publication Critical patent/CN115174545A/en
Application granted granted Critical
Publication of CN115174545B publication Critical patent/CN115174545B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/02Protocols based on web technology, e.g. hypertext transfer protocol [HTTP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L43/00Arrangements for monitoring or testing data switching networks
    • H04L43/10Active monitoring, e.g. heartbeat, ping or trace-route
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L63/00Network architectures or network communication protocols for network security
    • H04L63/08Network architectures or network communication protocols for network security for authentication of entities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/20Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
    • H04N21/21Server components or server architectures
    • H04N21/218Source of audio or video content, e.g. local disk arrays
    • H04N21/2187Live feed

Landscapes

  • Engineering & Computer Science (AREA)
  • Signal Processing (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Computer Hardware Design (AREA)
  • General Health & Medical Sciences (AREA)
  • Cardiology (AREA)
  • Health & Medical Sciences (AREA)
  • Computer Security & Cryptography (AREA)
  • Computing Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Multimedia (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention belongs to the technical field of computers, and discloses a plug flow web playing method based on national standard GB28181, which specifically comprises the following steps: step 1: loading WXINLINePlayer at the front end of the web; and 2, step: the web front end sends a playing request to a stream pushing server; the stream pushing server is used for requesting the Sip server to acquire a video stream corresponding to the equipment ID, decapsulating the video stream into a naked stream, repackaging the naked stream into a video stream in an rtmp format according to an H264 or H265 coding protocol and sending the video stream to the pingos server; and step 3: WXINLINEPLayer decodes the flv formatted video stream and plays it on the web front end. The method is based on a pingos + front-end WXINLINePlayer decoding method, and the playing of H264/H265 codes can be realized by realizing a webpage url request through the streaming media forwarding and plug-flow service; the method is not only suitable for the Web front-end playing of the national standard GB28181 code stream, but also suitable for the Web front-end playing of an rtsp code stream. In addition, the invention also provides a system for realizing the method.

Description

Plug flow web playing method and system based on national standard GB28181
Technical Field
The invention belongs to the technical field of computers, and particularly relates to a plug flow web playing method and system based on national standard GB 28181.
Background
With the rise of security equipment and live videos, the technology for web playing the national standard GB28181 code stream is as follows:
first mode
rtsp pulling and pushing flow technology: directly calling the ffmpeg function avformat _ open _ input (), pulling the code stream, but the national standard GB28181 code stream cannot be directly opened (the GB28181 code stream needs interaction);
in the process, the user and the password are required to be known in the pull rtsp stream, the pull rtsp stream is generally suitable for own equipment, and the equipment of a third party generally does not provide the user and the password to the outside;
second mode
IE-Activex plug-in play mode: it can be decoded in Activex and then drawn on the window through the handle, but this approach relies on the IE browser and does not support the development of H5 well and the IE authorities are not ready to support.
Third mode
nginx-rtmp + front-end WASM decoding mode: the method can not install additional binary programs and can well support H5 front-end development, the method is suitable for H5 rendering, but the current streaming media service is accessed based on RTMP service, and native RTMP only supports H264 and does not support H265 transmission.
CN201910710296.9 discloses a web-based video monitoring method, apparatus, storage medium, server and system, the method includes: s1: receiving a playing request for playing a monitoring video sent by a web client page, wherein the playing request comprises a camera ID; s2: inquiring basic information of a camera corresponding to the camera ID from a database; s3: acquiring an original rtsp video stream from the camera by using the basic information; s4: converting the rtsp video stream into an rtmp video stream, and converting the rtmp video stream into a flv video stream of a websocket; s5: and sending the flv video stream to the web client so that the web client converts the flv video stream into a video fragment with a playable format and then directly plays the video fragment in a viedo tag.
The scheme is similar to the first mode, and the international GB28181 code stream, namely the international stream, cannot be directly opened.
Meanwhile, the pull rtsp stream needs to know the user and the password, and is generally suitable for own equipment, and the equipment of a third party generally does not provide the user and the password to the outside. And the lib265 is not introduced into the previous code stream, and the native rtmp does not support H265 coding.
In view of the prior art, the following problems need to be overcome in realizing the opening of the national standard GB28181 code stream and rtsp code stream at the front end:
1. at present, the stream pushing service is generally accessed by rtsp and GB28181, and the rtsp needs to know the user id and the password of the equipment, which is generally unrealistic;
2. most security equipment responds to national requirements and must support GB28181; most of the code stream of GB28181 is based on international stream, and the common web page cannot be decoded;
3. an active based on IE is not maintained and cannot well support the development of h 5;
4. the new wxinlinelayer can resolve the H265 coding, but does not support GB28181 access;
5. native rtmp does not support H265 and lib265 forwarding and decapsulation must be introduced.
The technical problem that the present scheme will solve lies in: how to realize the playing of the GB28181 code stream at the front end of the webpage.
Disclosure of Invention
The invention mainly aims to provide a plug-flow web playing method based on national standard GB28181, which is based on a pingos + front-end WXINLINePlayer decoding method, and realizes the playing of H264/H265 codes by realizing a webpage url request through the streaming media forwarding plug-flow service of the invention;
the method is not only suitable for the Web front-end playing of the national standard GB28181 code stream, but also suitable for the Web front-end playing of the rtsp code stream.
In addition, the invention also provides a system for realizing the method.
According to a first aspect of the present invention, a plug flow web playing method based on national standard GB28181 is provided, which specifically includes the following steps:
step 1: loading WXINLINePlayer at the front end of the web;
step 2: the web front end sends a playing request to a stream pushing server; the playing request contains a device ID;
the stream pushing server is used for requesting the Sip server to acquire a video stream corresponding to the equipment ID, decapsulating the video stream into a naked stream, repackaging the naked stream into a video stream in an rtmp format according to an H264 or H265 coding protocol and sending the video stream to the pingos server;
the pingos server is used for transcoding the rtmp-format video stream into an flv-format video stream and pushing the flv-format video stream to WXINLINePlayer;
and step 3: WXINLINePlayer decodes the flv format video stream and plays it at the web front end.
In the present invention, the advantages of using pingos server are:
pingos supported HTTP (S) -FLV on native nginx-rtmp-module, which could just as well be combined with wxinlinelayer (input source requires HTTP (S) -FLV);
pingos are built on NGINX and inherit the NGINX-rtmp-module modules of arut and AlexWo. Besides repairing some problems existing in the arut and AlexWoo versions, pingos are subjected to multiple functional extensions in coding, live broadcast protocols and other aspects;
3. the http(s) service of pingos can be used to load the front-end code (decoding library);
4. support H264, H265;
5. triggered by the high aggregation low coupling principle, if the streaming media service is realized in the push streaming server module, too much business logic is coupled with the streaming media logic, separation is not realized, the load of the push streaming service is increased, the coupling is increased, and the universality is not facilitated. The invention adds the pingos server to reduce the coupling, and the pingos server is universally used for various video streams.
In general, the introduction of pingos can realize the development of streaming media more quickly and reduce the development threshold of the streaming media.
In the above stream pushing web playing method based on the national standard GB28181, the video stream in the device is an international stream or rtsp stream.
In the above plug-flow web playing method based on national standard GB28181, in step 3, the web front end sends the url address to wxinlinelayer; the WXINLINePlayer requests the video stream from the pingos service by loading the url address; the url address is generated by a pingos server and sent to the web front end through a stream pushing server, and the pingos server pushes a video stream in an flv format to a WXINLINEPlayer according to a request of the WXINLINEPlayer.
In the above plug-flow web playing method based on the national standard GB28181, the web front end and the plug-flow server maintain a heartbeat connection, and the plug-flow server continuously pushes a video stream in rtmp format to the pingos server when the heartbeat connection exists; and the stream pushing server stops pushing the rtmp format video stream to the pingos server when the heartbeat connection is disconnected.
In the above plug-flow web playing method based on the national standard GB28181, the plug-flow server transcodes the international stream or rtsp stream into rtmp format through pjSip, librtp, and ffmpeg codec library.
Meanwhile, the invention also discloses a plug flow web playing system based on the national standard GB28181, which comprises the following components:
a Web front end, the Web front end loaded with WXINLINePlayer;
a plug flow server;
a Sip server;
a pingos server;
the Web front end is used for sending a playing request to the stream pushing server; the playing request contains a device ID;
the stream pushing server is used for requesting the Sip server to acquire a video stream corresponding to the equipment ID according to the playing request, decapsulating the video stream into a naked stream, repackaging the naked stream into a video stream in an rtmp format according to an H264 or H265 coding protocol and sending the video stream to the pingos server;
the pingos server is used for transcoding the rtmp-format video stream into an flv-format video stream and pushing the flv-format video stream to WXINLINePlayer;
the WXINLINEPLayer is used for decoding and rendering the flv format video stream and displaying the flv format video stream on a Web front end.
In the above plug-flow Web playing system based on the national standard GB28181, the Web front end includes the following units:
the player loading unit: for loading WXINLINEPlayer;
a play request generation unit: the system comprises a push streaming server, a display server and a display server, wherein the push streaming server is used for generating a play request according to the operation of a user and sending the play request to the push streaming server;
url address sending module: the server is used for responding to the information of the plug flow server and forwarding the URL address of the video playing to WXINLINEPLayer; the WXINLINEPLayer requests the video stream from the pingos service by loading the url address; the url address is generated by a pingos server and sent to the web front end through a stream pushing server, and the pingos server pushes the video stream in the flv format to WXINLINEPLayer according to the request of the WXINLINEPLayer.
In the above plug-flow Web playing system based on national standard GB28181, the Web front end further includes:
heartbeat connection maintenance unit: the server is used for establishing and maintaining heartbeat connection with the plug flow server; the stream pushing server continuously pushes the video stream in rtmp format to the pingos server when the heartbeat connection exists; and the stream pushing server stops pushing the video stream in rtmp format to the pingos server when the heartbeat connection is disconnected.
In the above plug-flow web playing system based on the national standard GB28181, the video stream corresponding to the device ID is an international stream or an rtsp stream; the plug flow server transcodes the international stream or rtsp stream into rtmp format through pjSip, librtp and ffmpeg codec libraries.
One of the above technical solutions of the present invention has at least one of the following advantages or beneficial effects:
according to the method, the open source ffmpeg and pjSip codes, the librtp, libx265-dev, libx264-dev and libnuma-dev open source library are utilized, http analysis is realized through analysis, national standard GB28181 and rtsp streams are extracted through pjSip and ffmpeg pull, the streams are analyzed into naked streams (H264/H265), then ffmpeg unpacking is called to support rtmp format of H265 and pushed to a nginx-rtmp module, the nginx-rtmp module is analyzed into http-flv format and pushed to wave decoding, webgl is drawn on a browser after codes are received, and the browser can play video streams of H265 without plug-ins.
In particular: the invention fully considers that GB28181 code stream needs interaction and does not support webpage decoding, a newly-generated WXINLINePlayer can solve H265 coding, but does not support the display condition of GB28181 access, and realizes that the video stream of H264/H265 coding is played at the front end of Web without plug-in through the plug-in service among the plug-in server, the Sip server and the pingos server.
The browser end of the invention does not need to install plug-ins and can realize web playing of H265 video, and because of the H5 technology, the browser end supports the playing of a pc browser and a mobile end; h265 coded web playing is supported; supporting GB28181 access source plug flow;
compared with server decoding, the invention can decode by browser wasm, reduce the burden of the server, and realize the simultaneous playing of multiple devices; the invention not only can forward the streaming media, but also can monitor the states of the web front end, the equipment end and the nginx-rtmp end;
the code stream interaction of the invention is that the pingos is sent to the web without passing through the push stream service, so that a heartbeat packet of the web to the push stream service is added, and whether the code stream is successfully closed or abnormally closed can be detected.
Meanwhile, the pingos server has the following advantages:
pingos supported HTTP (S) -FLV on native nginx-rtmp-module, which just could incorporate wxinlineplayer (the input source requires HTTP (S) -FLV);
pingos are built dependent on NGINX and inherit the NGINX-rtmp-module modules of arut and AlexWoo. Besides repairing some problems existing in the arut and AlexWoo versions, pingos are subjected to multiple functional extensions in coding, live broadcast protocols and other aspects;
3. the front-end code (decoding library) can be loaded using pingos http(s) service;
4. support H264, H265;
5. from the triggering of the high aggregation low coupling principle, if the streaming media service is implemented in the streaming server module, too many service logics are coupled with the streaming media logic, separation is not implemented, the load of the streaming service is increased, the coupling is increased, and the universality is not facilitated. The invention adds the pingos server to reduce the coupling, and the pingos server is universally used for various video streams.
Drawings
The invention is further described below with reference to the accompanying drawings and examples;
FIG. 1 is a flow chart of example 1 of the present invention;
fig. 2 is a block diagram of the structure of embodiment 2 of the present invention.
Detailed Description
Reference will now be made in detail to embodiments of the present invention, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to the same or similar elements or elements having the same or similar function throughout. The embodiments described below with reference to the accompanying drawings are illustrative only for the purpose of explaining the present invention and are not to be construed as limiting the present invention.
Example 1
A plug flow web playing method based on national standard GB28181 comprises the following steps:
step 1: loading WXINLINEPlayer on the front end of the web;
and 2, step: the web front end sends a playing request to a stream pushing server; the playing request contains a device ID;
the stream pushing server is used for requesting the Sip server to acquire a video stream corresponding to the equipment ID, decapsulating the video stream into a naked stream, repackaging the naked stream into a video stream in rtmp format according to an H264 or H265 coding protocol and sending the video stream to the pingos server; the streaming media service of the Sip server sends national standard stream or pushes the stream service to directly pull rtsp stream to the camera through an rtp protocol;
the pingos server is used for transcoding the rtmp-format video stream into an flv-format video stream and pushing the flv-format video stream to WXINLINEPLayer;
and step 3: WXINLINePlayer decodes the flv format video stream and plays it at the web front end.
More specifically, the following details show the data interaction process among the web front end, wxinlinelayer, push stream server, sip server, and pingos server, and a complete video playing process is divided into 30 subdivision steps, which are as follows:
initializing a decoding plug-in at a web front end;
WXINLINEPLayer preparation, and if the loading fails, the loading is repeated until the loading is successful;
returning the successful loadSuccess loaded by the WXINLINePlayer to the front end;
4. the plug flow server loads a configuration and initialization object;
5. the stream pushing server sends a Register request to the Sip server;
the sip server sends a response 401 to the plug flow server, and gives an authentication system and parameters suitable for the plug flow server in a message header WWW _ authentication field of the response;
7. the flow pushing server sends a Register request to the Sip server again, and a trust book is given in an Authorization field of the request and contains authentication information;
the sip server verifies the request, if the proxy identity of the streaming server is checked to be legal, a successful response 200OK is sent to the streaming server, and if the identity is not legal, a service refusal response is sent;
the web front end sends a request (play) request with a device id, where the device is typically a camera;
10. the push stream server receives and resolves a request (play) request and sends an Invite request to the Sip server; the equipment id is contained in the Invite request;
the sip server sends an Invite request to the internal module streaming media/device (refer to GBT 28181-2016 public safety video monitoring networking system information transmission, exchange, control technical requirement pdf 9.2;
according to the relevant standard, the server does not need to input a user name and a password when acquiring the video stream, and the problem that an account password is needed for pulling an rtsp stream in the traditional technology is solved.
12, if the sip server successfully requests, replying 200OK of the plug flow server;
13. the stream pushing server receives the 200OK and returns ACK to the Sip server;
the streaming media service of the sip server sends national standard stream or pushes the stream service to directly pull rtsp stream to the camera through an rtp protocol; the video stream corresponding to GBT 28181 is an international stream;
15. the plug flow server receives the international flow or the rtsp flow, decapsulates the international flow or the rtsp flow into a bare flow, and introduces lib264 and lib265 to repackage the bare flow into rtmp format;
16. the stream pushing server pushes the code stream in the rtmp format to the nginx module of the pingos server;
responding the information of the push flow success of the push flow server by the pingos and returning a push flow address, namely a url address;
18. the plug flow server responds to the request (play) request of the step 9 to the web front end, sends the url address to the web front end, and generates a guid (globally unique identifier for representing the unique action) to return to the web;
the web front end receives the response and needs to send a timing heartbeat packet for the guid;
20. the push flow server indicates the action to keep active through the heartbeat packet, otherwise, the flow is disconnected and the resource is released;
loading url address to WXINLINePlayer from Web front end;
WXINLINEPLayer requests the pull stream from the pingos server according to the url address;
the pingos server pushes the code stream to WXINLINEPLayer after receiving the request;
rendering the decoded WXINLINEPlayer to a web play;
25, the Web front end initiates a request (stop) to stop playing to the push streaming server;
26. the stream pushing server sends a bye request to the Sip server (the Sip server closes according to the technical requirements of information transmission, exchange and control of a GBT 28181-2016 public safety video monitoring networking system);
the sip server replies 200OK;
28. the method comprises the steps that a push flow server sends a response request (stop) request to a web front end;
29, the Web front end closes the keepalive heartbeat packet and releases resources;
30. the push flow server also stops the push flow to release the resource.
The invention utilizes the open source ffmpeg and pjSip codes and the librtp, libx265-dev, libx264-dev and libnuma-dev open source libraries to realize http analysis through analysis, and extracts national standard GB28181 and rtsp streams through pjSip and ffmpeg pull to analyze into naked streams (H264/H265), then calls the ffmpeg decapsulation to support the rtmp format of H265 to push to the nginx-rtmp module, the nginx-rtmp module analyzes into the http-flv format to push to the wap decoding, the webgl is drawn on the browser after the codes are received, and the browser can play the video stream of H265 without plug-ins.
In particular: the invention fully considers that GB28181 code stream needs interaction and does not support webpage decoding, a newly-generated WXINLINePlayer can solve H265 coding, but does not support the display condition of GB28181 access, and realizes that the video stream of H264/H265 coding is played at the front end of Web without plug-in through the plug-in service among the plug-in server, the Sip server and the pingos server.
The browser end of the invention does not need to install plug-ins and can realize web playing of H265 video, and because of the H5 technology, the browser end supports the playing of a pc browser and a mobile end; h265 coded web playing is supported; supporting GB28181 access source plug flow;
compared with server decoding, the invention can decode by browser wasm, reduce the burden of the server, and realize the simultaneous playing of multiple devices; the invention not only can forward the streaming media, but also can monitor the states of the web front end, the equipment end and the nginx-rtmp end;
the code stream interaction of the invention is that the pingos is sent to the web without passing through the push stream service, so that a heartbeat packet of the web to the push stream service is added, and whether the code stream is successfully closed or abnormally closed can be detected.
Example 2
Referring to fig. 2, a plug flow web playing system based on national standard GB28181 includes the following components:
a Web front end 1, said Web front end loaded with wxinlinelayer 5;
a plug flow server 2;
a Sip server 3;
a pingos server 4;
the Web front end is used for sending a playing request to a stream pushing server; the playing request contains a device ID;
the stream pushing server is used for requesting the Sip server to acquire the video stream in the equipment according to the playing request, decapsulating the video stream into a naked stream, repackaging the naked stream into a video stream in an rtmp format according to an H264 or H265 coding protocol and sending the video stream to the pingos server; the streaming media service of the Sip server sends national standard stream or pushes the stream service to directly pull rtsp stream to the camera through an rtp protocol;
the pingos server is used for transcoding the rtmp-format video stream into an flv-format video stream and pushing the flv-format video stream to WXINLINEPLayer;
the WXINLINEPLayer is used for decoding and rendering the flv format video stream and displaying the flv format video stream on a Web front end.
In this embodiment, the Web front end includes the following units:
the player loading unit 12: for loading WXINLINEPlayer;
play request generation unit 11: the system comprises a push streaming server, a display server and a display server, wherein the push streaming server is used for generating a play request according to the operation of a user and sending the play request to the push streaming server;
url address sending module 13: the server is used for responding to the information of the plug flow server and forwarding the URL address of the video playing to WXINLINEPLayer; the WXINLINePlayer requests the video stream from the pingos service by loading the url address; the url address is generated by a pingos server and sent to the web front end through a stream pushing server, and the pingos server pushes the video stream in the flv format to WXINLINEPLayer according to the request of the WXINLINEPLayer.
Heartbeat connection maintaining unit 14: the system is used for establishing and maintaining heartbeat connection with the plug flow server; the stream pushing server continuously pushes the rtmp-format video stream to the pingos server when the heartbeat connection exists; and the stream pushing server stops pushing the video stream in rtmp format to the pingos server when the heartbeat connection is disconnected.
The video stream corresponding to the equipment ID is an international stream or an rtsp stream; the stream pushing server realizes that the international stream or rtsp stream is transcoded into an rtmp format through a pjSip or ffmpeg codec library;
the working process of the invention is as follows:
the player loading unit loads WXINLINePlayer; a user operates a play request generating unit to generate a play request and sends the play request to a stream pushing server; the stream pushing server acquires a video stream in the format of international stream or rtsp stream from the Sip server according to the playing request; the stream pushing server decapsulates the video stream into a bare stream, and encapsulates the bare stream into a video stream in an rtmp format again according to an H264 or H265 coding protocol and sends the video stream to the pingos server; the pinggos server returns a url address, the plug flow server sends the url address to the web front end, and the web front end sends the url address to the WXINLINEPLayer through a url address sending module for recording and acquiring the flv format video stream; the url address is used for WXINLINEPLayer to acquire the transcoded flv format video stream from the pingos server; in the process, the plug flow server continuously decodes and encapsulates the video stream and sends the video stream to the pingos server, and the pingos server continuously sends the flv format video stream to the WXINLINEPlayer; because the code stream interaction is that the video stream is sent to the web by the pinggos without passing through the streaming service, the heartbeat connection with the streaming server is maintained by the heartbeat connection maintaining unit, and the maintenance of the heartbeat connection is the premise that the streaming server continuously decodes and packages the video stream and sends the video stream to the pinggos server, so that whether the code stream is successfully or abnormally closed can be detected.
While embodiments of the present invention have been shown and described, it will be understood by those of ordinary skill in the art that: various changes, modifications, substitutions and alterations can be made to the embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the claims and their equivalents.

Claims (9)

1. A plug flow web playing method based on national standard GB28181 is characterized by comprising the following steps:
step 1: loading WXINLINEPlayer on the front end of the web;
and 2, step: the web front end sends a playing request to a stream pushing server; the playing request contains a device ID;
the stream pushing server is used for requesting the Sip server to acquire a video stream corresponding to the equipment ID, decapsulating the video stream into a naked stream, repackaging the naked stream into a video stream in an rtmp format according to an H264 or H265 coding protocol and sending the video stream to the pingos server;
the pingos server is used for transcoding the rtmp-format video stream into an flv-format video stream and pushing the flv-format video stream to WXINLINEPLayer;
and 3, step 3: WXINLINEPLayer decodes the flv formatted video stream and plays it on the web front end.
2. The stream pushing web playing method based on the national standard GB28181 according to claim 1, wherein said video stream is an international stream or an rtsp stream.
3. The method for playing the plug-flow web based on the national standard GB28181 of claim 1, wherein in the step 3, the web front end sends the url address to wxinlinelayer; the WXINLINEPLayer requests the video stream from the pingos service by loading the url address; the url address is generated by a pingos server and sent to the web front end through a stream pushing server, and the pingos server pushes the video stream in the flv format to WXINLINEPLayer according to the request of the WXINLINEPLayer.
4. The method for playing the plug-flow web based on the national standard GB28181 according to claim 1, wherein the web front end and the plug-flow server keep heartbeat connection, and the plug-flow server continuously pushes the video stream in rtmp format to the pingos server when the heartbeat connection exists; and the stream pushing server stops pushing the rtmp format video stream to the pingos server when the heartbeat connection is disconnected.
5. The plug flow web playing method based on the national standard GB28181 of claim 2, wherein said plug flow server transcodes international streams or rtsp streams into rtmp format through pjSip, librtp and ffmpeg codec.
6. A plug flow web playing system based on national standard GB28181 is characterized by comprising the following components:
a Web front end, the Web front end loaded with WXINLINePlayer;
a plug flow server;
a Sip server;
a pingos server;
the Web front end is used for sending a playing request to the stream pushing server; the playing request contains a device ID;
the stream pushing server is used for requesting the Sip server to acquire a video stream corresponding to the equipment ID according to the playing request, decapsulating the video stream into a naked stream, repackaging the naked stream into a video stream in rtmp format according to an H264 or H265 coding protocol and sending the video stream to the pingos server;
the pingos server is used for transcoding the rtmp-format video stream into an flv-format video stream and pushing the flv-format video stream to WXINLINePlayer;
the WXINLINEPLayer is used for decoding and rendering the flv format video stream and displaying the flv format video stream on a Web front end.
7. The national standard GB 28181-based push streaming Web playing system according to claim 6, wherein said Web front end comprises the following units:
the player loading unit: for loading WXINLINEPlayer;
a play request generation unit: the system comprises a push streaming server, a display server and a display server, wherein the push streaming server is used for generating a play request according to the operation of a user and sending the play request to the push streaming server;
url address sending module: for responding to the plug flow server information and forwarding the url address to wxinlinelayer; the WXINLINEPLayer requests the video stream from the pingos service by loading the url address; the url address is generated by a pingos server and sent to the web front end through a stream pushing server, and the pingos server pushes the video stream in the flv format to WXINLINEPLayer according to the request of the WXINLINEPLayer.
8. The national standard GB 28181-based push streaming Web playing system according to claim 7, wherein said Web front end further comprises:
a heartbeat connection maintaining unit: the server is used for establishing and maintaining heartbeat connection with the plug flow server; the stream pushing server continuously pushes the rtmp-format video stream to the pingos server when the heartbeat connection exists; and the stream pushing server stops pushing the video stream in rtmp format to the pingos server when the heartbeat connection is disconnected.
9. The system according to claim 6, wherein the video stream corresponding to the device ID is an international stream or rtsp stream; the stream pushing server transcodes the international stream or rtsp stream into rtmp format through pjSip, librtp and ffmpeg codec library.
CN202210754971.XA 2022-06-29 Plug-flow web playing method and system based on national standard GB28181 Active CN115174545B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210754971.XA CN115174545B (en) 2022-06-29 Plug-flow web playing method and system based on national standard GB28181

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210754971.XA CN115174545B (en) 2022-06-29 Plug-flow web playing method and system based on national standard GB28181

Publications (2)

Publication Number Publication Date
CN115174545A true CN115174545A (en) 2022-10-11
CN115174545B CN115174545B (en) 2024-07-12

Family

ID=

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115643426A (en) * 2022-10-17 2023-01-24 中国科学院空间应用工程与技术中心 Universal video playing method and system for space application field
CN115942001A (en) * 2022-12-01 2023-04-07 青岛民航凯亚系统集成有限公司 Cross-platform video transcoding and stream pushing method for airport supervision

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140317183A1 (en) * 2013-04-23 2014-10-23 Cisco Technology, Inc. Reducing real time media traffic in a network environment
US20170289214A1 (en) * 2016-04-04 2017-10-05 Hanwha Techwin Co., Ltd. Method and apparatus for playing media stream on web browser
WO2017219532A1 (en) * 2016-06-24 2017-12-28 乐视控股(北京)有限公司 Video application program control method and video application program control system
US20180183849A1 (en) * 2016-12-22 2018-06-28 Hanwha Techwin Co., Ltd. Method and device for media streaming between server and client using rtp/rtsp standard protocol
CN110446010A (en) * 2019-08-02 2019-11-12 江西航天鄱湖云科技有限公司 Video monitoring method, device, storage medium, server and system based on web
CN112866199A (en) * 2020-12-31 2021-05-28 北京优锘科技有限公司 Method for viewing device supporting GB/T28181 protocol in main stream browser
WO2021174718A1 (en) * 2020-03-05 2021-09-10 深圳中兴网信科技有限公司 Remote monitoring control system and terminal
CN114567458A (en) * 2021-12-02 2022-05-31 杭州盈高科技有限公司 System and method for quickly identifying monitoring equipment

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140317183A1 (en) * 2013-04-23 2014-10-23 Cisco Technology, Inc. Reducing real time media traffic in a network environment
US20170289214A1 (en) * 2016-04-04 2017-10-05 Hanwha Techwin Co., Ltd. Method and apparatus for playing media stream on web browser
WO2017219532A1 (en) * 2016-06-24 2017-12-28 乐视控股(北京)有限公司 Video application program control method and video application program control system
US20180183849A1 (en) * 2016-12-22 2018-06-28 Hanwha Techwin Co., Ltd. Method and device for media streaming between server and client using rtp/rtsp standard protocol
CN110446010A (en) * 2019-08-02 2019-11-12 江西航天鄱湖云科技有限公司 Video monitoring method, device, storage medium, server and system based on web
WO2021174718A1 (en) * 2020-03-05 2021-09-10 深圳中兴网信科技有限公司 Remote monitoring control system and terminal
CN112866199A (en) * 2020-12-31 2021-05-28 北京优锘科技有限公司 Method for viewing device supporting GB/T28181 protocol in main stream browser
CN114567458A (en) * 2021-12-02 2022-05-31 杭州盈高科技有限公司 System and method for quickly identifying monitoring equipment

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115643426A (en) * 2022-10-17 2023-01-24 中国科学院空间应用工程与技术中心 Universal video playing method and system for space application field
CN115643426B (en) * 2022-10-17 2023-11-21 中国科学院空间应用工程与技术中心 Universal video playing method and system for space application field
CN115942001A (en) * 2022-12-01 2023-04-07 青岛民航凯亚系统集成有限公司 Cross-platform video transcoding and stream pushing method for airport supervision

Similar Documents

Publication Publication Date Title
US10412130B2 (en) Method and apparatus for playing media stream on web browser
CN104618690B (en) A kind of method and system of HD video real-time VOD and history playback
CN108769616A (en) A kind of real-time video based on RTSP agreements is without plug-in unit method for previewing and system
US20160119399A1 (en) Extending browser support of real time media to any available codec
CN110661752A (en) Plug-in-free real-time video playing system and method
CN110870282B (en) Processing media data using file tracks of web content
WO2016182844A1 (en) Transferring media data using a websocket subprotocol
EP2822274A1 (en) Method for converting online media data or playing video and apparatus thereof
CN104396263A (en) Methods and systems for real-time transmuxing of streaming media content
US20180176278A1 (en) Detecting and signaling new initialization segments during manifest-file-free media streaming
CN101600092A (en) The generation of network video and player method and system
CN113938470A (en) Method and device for playing RTSP data source by browser and streaming media server
CN114025191B (en) Webrtc low-delay live broadcast method and system based on Nginx-rtmp
CN113727184A (en) Video playing method, device, system, storage medium and electronic equipment
CA2554987C (en) Storage of advanced video coding (avc) parameter sets in avc file format
CN108810475B (en) Android video monitoring device based on Onvif standard and Sip protocol
Bailey Live Video Streaming from Android-Enabled Devices to Web Browsers
CN115174545B (en) Plug-flow web playing method and system based on national standard GB28181
CN115174545A (en) Plug flow web playing method and system based on national standard GB28181
CN114339146B (en) Audio and video monitoring method and device, electronic equipment and computer readable storage medium
US10547878B2 (en) Hybrid transmission protocol
KR100820350B1 (en) Multi contaniner format integration streaming server and streaming method
US11412309B2 (en) Method for managing the connections of an electronic device
Nasir Raspberry Pi and IP Camera
RU2366103C2 (en) Storage of advanced video coding (avc) set of parametres in avc file format

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant