CN112422997A - Plug-in-free low-delay live broadcast method for hydraulic engineering video - Google Patents
Plug-in-free low-delay live broadcast method for hydraulic engineering video Download PDFInfo
- Publication number
- CN112422997A CN112422997A CN202011045518.9A CN202011045518A CN112422997A CN 112422997 A CN112422997 A CN 112422997A CN 202011045518 A CN202011045518 A CN 202011045518A CN 112422997 A CN112422997 A CN 112422997A
- Authority
- CN
- China
- Prior art keywords
- video
- real
- plug
- code stream
- time
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 22
- 238000012544 monitoring process Methods 0.000 claims abstract description 23
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 claims abstract description 15
- 230000009471 action Effects 0.000 abstract description 2
- 238000005516 engineering process Methods 0.000 description 4
- VYZAMTAEIAYCRO-UHFFFAOYSA-N Chromium Chemical compound [Cr] VYZAMTAEIAYCRO-UHFFFAOYSA-N 0.000 description 3
- 230000008901 benefit Effects 0.000 description 3
- 230000006872 improvement Effects 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 2
- 230000007547 defect Effects 0.000 description 2
- 238000009434 installation Methods 0.000 description 2
- 238000012360 testing method Methods 0.000 description 2
- 230000006835 compression Effects 0.000 description 1
- 238000007906 compression Methods 0.000 description 1
- 238000004590 computer program Methods 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000002452 interceptive effect Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000002265 prevention Effects 0.000 description 1
- 230000009467 reduction Effects 0.000 description 1
- 238000009877 rendering Methods 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/20—Servers specifically adapted for the distribution of content, e.g. VOD servers; Operations thereof
- H04N21/21—Server components or server architectures
- H04N21/218—Source of audio or video content, e.g. local disk arrays
- H04N21/2187—Live feed
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/60—Network structure or processes for video distribution between server and client or between remote clients; Control signalling between clients, server and network components; Transmission of management data between server and client, e.g. sending from server to client commands for recording incoming content stream; Communication details between server and client
- H04N21/63—Control signaling related to video distribution between client, server and network components; Network processes for video distribution between server and clients or between remote clients, e.g. transmitting basic layer and enhancement layers over different transmission paths, setting up a peer-to-peer communication via Internet between remote STB's; Communication protocols; Addressing
- H04N21/643—Communication protocols
- H04N21/6437—Real-time Transport Protocol [RTP]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N21/00—Selective content distribution, e.g. interactive television or video on demand [VOD]
- H04N21/80—Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
- H04N21/85—Assembly of content; Generation of multimedia applications
- H04N21/854—Content authoring
- H04N21/8543—Content authoring using a description language, e.g. Multimedia and Hypermedia information coding Expert Group [MHEG], eXtensible Markup Language [XML]
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Databases & Information Systems (AREA)
- Computer Security & Cryptography (AREA)
- Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)
Abstract
The invention relates to a method for live broadcast of hydraulic engineering videos without plug-ins and with low delay, belonging to the field of live broadcast; making a request action for acquiring a real-time video code stream to a remote water conservancy video monitoring station through a client browser; the real-time H.264 code stream of a front-end network camera of the video monitoring station is packaged through an RTSP (real time streaming protocol) and transmitted to a remote streaming media server; the streaming media server converts the received RTSP stream into mpeg streams through an FFmpeg program, and encodes the real-time code stream in the H.264 format into an mpeg1video format; the streaming media server forwards the code stream in mpeg1video format to a client browser through a websocket protocol, and the client browser continuously analyzes the code stream and draws images and audio by adopting JScheg plug-in and canvas components; the user can watch the real-time picture of the remote video station at the browser end. According to the invention, the low-delay live broadcast watching of the remote water conservancy video monitoring station can be realized without installing plug-ins on browser clients and reducing the safety of the browser.
Description
Technical Field
The invention relates to a plug-in-free low-delay live broadcast method for hydraulic engineering videos, and belongs to the technical field of real-time monitoring video remote live broadcast of hydraulic engineering.
Background
Under the background that the country greatly promotes 'water conservancy informatization drives water conservancy modernization' and accelerates promotion of network speed increasing and cost reducing, a large number of video monitoring stations are continuously built in nationwide and local projects, compared with an automatic water level station and an automatic rainfall station, the video monitoring stations have the advantages of visual observation, rich content and the like, and the basic water conservancy disaster prevention and reduction capability and the accuracy of remote command and scheduling are greatly improved.
At present, a B/S architecture (browser/server architecture) is mainly adopted for browsing video pictures of a water conservancy video station as a video monitoring client, namely, the video monitoring pictures are viewed at a browser. Through project construction and factory research, after the equipment installation of a video station manufacturer is finished, plug-ins are required to be installed in a browser to be watched, the plug-ins supported by different browsing are different, and the safety is required to be correspondingly reduced.
In the prior art, the plug-in-free live broadcast method adopting the HLS protocol (HTTP-based streaming media network transport protocol) has a high network delay of more than 10 seconds; the plug-in-free live broadcast scheme adopting the RTMP protocol has the defects that the network delay is slightly lower, about 5 seconds, and the other plug-in-free solutions have high delay.
Therefore, the problems of complex plug-in installation, safety risk, high delay and the like exist in the existing hydraulic engineering video live broadcast technical solution.
Disclosure of Invention
Aiming at the defects in the prior art, the invention provides a method for live broadcast of hydraulic engineering videos without plug-ins and with low delay, which has the following specific technical scheme:
a method for live broadcast of hydraulic engineering videos without plug-ins and with low delay comprises the following steps:
step 101: a user sends a request for acquiring a real-time video code stream to a video monitoring station at a client browser;
step 102: the real-time H.264 code stream of a front-end network camera of the video monitoring station is packaged through an RTSP (real time streaming protocol) and transmitted to a remote streaming media server;
step 103: the streaming media server converts the received RTSP stream into mpeg streams through an FFmpeg program, and encodes the real-time code stream in the H.264 format into an mpeg1video format;
step 104: the streaming media server forwards the code stream in mpeg1video format to a client browser through a websocket protocol, and the client browser continuously analyzes the code stream and draws images and audio by adopting JScheg plug-in and canvas components;
step 105: the user can watch the real-time picture of the remote video station at the browser end.
As an improvement of the technical scheme, the video monitoring station is a remote water conservancy video monitoring station.
As an improvement of the technical scheme, the network-side camera at the front end of the remote water conservancy video monitoring station supports the RTSP protocol.
The invention has the beneficial effects that:
1. the invention relates to a live broadcast scheme, and a low-delay technology is mainly embodied as follows: 1) FFmpeg adopts a multi-thread concurrent decoding technology to improve the decoding speed, and the network load is correspondingly reduced by manually setting the frame rate, so that the delay is greatly reduced; 2) when the front-end browser uses JSMpeg decoding to render the video picture, the cache can be manually reduced according to the requirement, the playing delay is reduced, and the real-time performance of video playing is improved. Through tests, the 1920-1080 resolution remote water conservancy video monitoring station real-time image is tested on the premise that the network bandwidth and the server performance are guaranteed, the time delay is about 0.5 second approximately, and compared with the 10-second time delay of a plug-in-free live broadcast method adopting an HLS protocol and the 5-second time delay of a plug-in-free live broadcast method adopting an RTMP protocol in the prior art, the method greatly reduces the time delay time and improves the user experience.
2. The canvas component originally supported by HTML5 is adopted at the browser end, so that the image can be drawn on the webpage by directly using JavaScript, and therefore, the browser does not need to install additional plug-ins and reduce the safety of the browser, and the method is suitable for the mainstream browsers commonly used at present, such as 360, Chrome, Firefox and the like, so that the user operation is more convenient and safer.
Drawings
Fig. 1 is a flow chart of the hydraulic engineering video plug-in-free low-delay live broadcast method of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
As shown in fig. 1, the method for live broadcasting of hydraulic engineering videos without plug-ins and with low delay includes the following steps:
step 101: and the user makes a request action for acquiring the real-time video code stream to the remote water conservancy video monitoring station at the client browser.
Step 102: and the real-time H.264 code stream of the front-end network camera of the video monitoring station is packaged by an RTSP protocol and is transmitted to the remote streaming media server.
Step 103: the streaming media server converts the received RTSP stream into mpeg streams through an FFmpeg program, and encodes the real-time code stream in the H.264 format into mpeg1video format.
Step 104: the streaming media server forwards the code stream in mpeg1video format to the client browser through the websocket protocol, and the client browser continuously analyzes the code stream and draws images and audio by adopting JScheg plug-in and canvas components.
Step 105: the user can watch the real-time picture of the remote video station at the browser end.
In order to further understand the embodiment, it should be noted that the network camera at the front end of the water conservancy video monitoring station in the embodiment should support the RTSP protocol.
FFmpeg is a set of open source computer programs that can be used to record, convert digital audio, video, and convert them into streams. It includes the leading audio and video coding library, and can easily implement the interconversion between several video formats. The FFmpeg adopts a multi-thread concurrent decoding technology, has the advantage of improving the decoding speed, and can correspondingly reduce the delay of video playing. In addition, in practical application, the frame rate can be manually set, the network load is correspondingly reduced, and the delay is reduced as far as possible under the condition of ensuring the video fluency.
JSMpeg is a video player written in JavaScript. JSMpeg can load static video through Ajax (asynchronous JavaScript and XML, a web page development technique that creates interactive, fast dynamic web page applications, a technique that can update parts of a web page without reloading the entire web page), and allows low latency streams as low as 50 milliseconds to be provided through websockets. JSMpeg can be used in any modern browser (Chrome, Firefox, Safari, Edge, etc.) and the compression speed is only 20 kb. When the front-end browser uses JSMpeg decoding to render video pictures, the playing delay can be reduced by manually setting the size of the cache, namely the smaller the set cache is, the lower the delay is.
The embodiment shows that the invention achieves the following beneficial effects:
1. the direct broadcast scheme of the invention mainly reflects the reasons of low delay: 1) FFmpeg adopts a multi-thread concurrent decoding technology to improve the decoding speed, and manually sets the frame rate to correspondingly reduce the network load, thereby greatly reducing the delay, and 2) when the JSMpeg is used for decoding and rendering a video picture at a browser end, the cache can be manually reduced as required, thereby reducing the playing delay and improving the real-time performance of video playing. Through tests, under the condition that network bandwidth and server performance are guaranteed, the real-time picture delay of a 1920-1080 resolution remote water conservancy video monitoring station is tested to be about 0.5 second approximately, and compared with the 10-second delay of a plug-in-free live broadcast method adopting an HLS protocol and the 5-second delay of a plug-in-free live broadcast method adopting an RTMP protocol in the prior art, the method greatly reduces delay time and improves user experience.
2. The canvas component originally supported by HTML5 is adopted at the browser end, so that the image can be drawn on the webpage by directly using JavaScript, and therefore, the browser does not need to install additional plug-ins and reduce the safety of the browser, and the method is suitable for the mainstream browsers commonly used at present, such as 360, Chrome, Firefox and the like, so that the user operation is more convenient and safer.
The above description is only for the purpose of illustrating the preferred embodiments of the present invention and is not to be construed as limiting the invention, and any modifications, equivalents and improvements made within the spirit and principle of the present invention are intended to be included within the scope of the present invention.
Claims (3)
1. A method for live broadcast of hydraulic engineering videos without plug-ins and with low delay is characterized by comprising the following steps:
step 101: a user sends a request for acquiring a real-time video code stream to a video monitoring station at a client browser;
step 102: the real-time H.264 code stream of a front-end network camera of the video monitoring station is packaged through an RTSP (real time streaming protocol) and transmitted to a remote streaming media server;
step 103: the streaming media server converts the received RTSP stream into mpeg streams through an FFmpeg program, and encodes the real-time code stream in the H.264 format into an mpeg1video format;
step 104: the streaming media server forwards the code stream in mpeg1video format to a client browser through a websocket protocol, and the client browser continuously analyzes the code stream and draws images and audio by adopting JScheg plug-in and canvas components;
step 105: the user can watch the real-time picture of the remote video station at the browser end.
2. The hydraulic engineering video plug-in-free low-delay live broadcasting method according to claim 1, characterized in that: the video monitoring station is a remote water conservancy video monitoring station.
3. The hydraulic engineering video plug-in-free low-delay live broadcasting method according to claim 2, characterized in that: and the network end camera at the front end of the remote water conservancy video monitoring station supports an RTSP protocol.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011045518.9A CN112422997A (en) | 2020-09-29 | 2020-09-29 | Plug-in-free low-delay live broadcast method for hydraulic engineering video |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011045518.9A CN112422997A (en) | 2020-09-29 | 2020-09-29 | Plug-in-free low-delay live broadcast method for hydraulic engineering video |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112422997A true CN112422997A (en) | 2021-02-26 |
Family
ID=74855227
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011045518.9A Pending CN112422997A (en) | 2020-09-29 | 2020-09-29 | Plug-in-free low-delay live broadcast method for hydraulic engineering video |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112422997A (en) |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113556612A (en) * | 2021-07-15 | 2021-10-26 | 中国电子科技集团公司第五十二研究所 | Method and system for playing H.265 video stream on browser |
CN113824925A (en) * | 2021-08-11 | 2021-12-21 | 南京国电南自电网自动化有限公司 | WEB plug-in-free video monitoring system and method |
CN113938656A (en) * | 2021-10-27 | 2022-01-14 | 南京工业大学 | Method for playing network monitoring camera video without plug-in and low delay by browser |
CN114025140A (en) * | 2021-11-19 | 2022-02-08 | 四方智能(武汉)控制技术有限公司 | Integrated client for B/S architecture monitoring system |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107277004A (en) * | 2017-06-13 | 2017-10-20 | 重庆扬讯软件技术股份有限公司 | A kind of browser is without plug-in unit net cast method |
CN108337528A (en) * | 2018-01-17 | 2018-07-27 | 浙江大华技术股份有限公司 | A kind of method and apparatus of preview video |
CN108769616A (en) * | 2018-06-21 | 2018-11-06 | 泰华智慧产业集团股份有限公司 | A kind of real-time video based on RTSP agreements is without plug-in unit method for previewing and system |
CN111064972A (en) * | 2019-11-28 | 2020-04-24 | 湖北工业大学 | Live video control method based on IPV9 |
-
2020
- 2020-09-29 CN CN202011045518.9A patent/CN112422997A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107277004A (en) * | 2017-06-13 | 2017-10-20 | 重庆扬讯软件技术股份有限公司 | A kind of browser is without plug-in unit net cast method |
CN108337528A (en) * | 2018-01-17 | 2018-07-27 | 浙江大华技术股份有限公司 | A kind of method and apparatus of preview video |
CN108769616A (en) * | 2018-06-21 | 2018-11-06 | 泰华智慧产业集团股份有限公司 | A kind of real-time video based on RTSP agreements is without plug-in unit method for previewing and system |
CN111064972A (en) * | 2019-11-28 | 2020-04-24 | 湖北工业大学 | Live video control method based on IPV9 |
Non-Patent Citations (1)
Title |
---|
周佳波: "去雾算法的研究及其在视频监控中的应用", 《中国优秀博硕士学位论文全文数据库(硕士)信息科技辑》 * |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113556612A (en) * | 2021-07-15 | 2021-10-26 | 中国电子科技集团公司第五十二研究所 | Method and system for playing H.265 video stream on browser |
CN113824925A (en) * | 2021-08-11 | 2021-12-21 | 南京国电南自电网自动化有限公司 | WEB plug-in-free video monitoring system and method |
CN113938656A (en) * | 2021-10-27 | 2022-01-14 | 南京工业大学 | Method for playing network monitoring camera video without plug-in and low delay by browser |
CN114025140A (en) * | 2021-11-19 | 2022-02-08 | 四方智能(武汉)控制技术有限公司 | Integrated client for B/S architecture monitoring system |
CN114025140B (en) * | 2021-11-19 | 2024-03-08 | 四方智能(武汉)控制技术有限公司 | Integrated client for B/S architecture monitoring system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN112422997A (en) | Plug-in-free low-delay live broadcast method for hydraulic engineering video | |
US9686593B2 (en) | Decoding of closed captions at a media server | |
CN110557670B (en) | Method, device, terminal and storage medium for playing video in webpage | |
US20170311006A1 (en) | Method, system and server for live streaming audio-video file | |
CN113556579B (en) | Method for playing security real-time video without web plug-in based on HTML5 | |
US8782721B1 (en) | Closed captions for live streams | |
CN112073809B (en) | Method for supporting browser to play video with any coding format | |
CN111355976B (en) | Video live broadcast method and system based on HEVC standard | |
CN112930687B (en) | Media stream processing method and device, storage medium and program product | |
CN110708564B (en) | Live transcoding method and system for dynamically switching video streams | |
CN111147947B (en) | Websocket-based flv video transmission and webpage playing method | |
KR102522741B1 (en) | Broadcast content redistribution and ad insertion | |
CN108718416A (en) | Embedded video camera audio-visual system and its method is broadcast live in HTML5 | |
CN113938470B (en) | Method and device for playing RTSP data source by browser and streaming media server | |
CN108494792A (en) | A kind of flash player plays the converting system and its working method of hls video flowings | |
CN108471548B (en) | Live video quick playing method and device | |
CN110602522A (en) | Multi-path real-time live webRTC stream synthesis method | |
CN115623264A (en) | Live stream subtitle processing method and device and live stream playing method and device | |
CN113382278B (en) | Video pushing method and device, electronic equipment and readable storage medium | |
US20140036990A1 (en) | System and method for optimizing a video stream | |
CN114885198B (en) | Mixed network-oriented accompanying sound and video collaborative presentation system | |
CN116233490A (en) | Video synthesis method, system, device, electronic equipment and storage medium | |
CN112291483B (en) | Video pushing method and system, electronic equipment and readable storage medium | |
CN114339284A (en) | Method, device, storage medium and program product for monitoring live broadcast delay | |
CN113556612A (en) | Method and system for playing H.265 video stream on browser |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20210226 |
|
RJ01 | Rejection of invention patent application after publication |