A method for previewing SDI video signal in a web page
Through the method of frame processing and WebSocket forwarding, it solves the delay and bandwidth problems in remote web page video signal browsing, and achieves low-latency and high-stability SDI video signal preview, which is suitable for applications under low network conditions.
Patent Information
- Application Number
- CN202111437084.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-29
- Publication Date
- 2024-09-06
- Estimated Expiration
- 2041-11-29
AI Technical Summary
The existing technology suffers from response delays and large network bandwidth requirements when browsing remote web page video signals, making it impossible to directly display SDI video signals on web pages, especially under low latency and poor network conditions.
By collecting SDI video signals, frame processing and converting them into PNG format image data, using WebSocket to forward and assemble into Blob objects, low-latency web page playback is achieved, and the frame acquisition interval is adjusted to adapt to network conditions.
It effectively reduces latency, reduces network bandwidth usage, and improves the stability and adaptability of SDI video data processing.
Smart Images

Figure CN114143490B
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field related to information processing and transmission, and in particular to a method for previewing an SDI video signal in a web page. Background Art
[0002] With the rapid development of information technology and network technology and the gradual increase in data transmission rates, the information that can be transmitted and obtained through the network has gradually become more extensive and comprehensive. Compared with the past, information could only be transmitted over short distances with high latency in simple and shorter data segments. Now, information can be generated simultaneously in multiple dimensions such as real-time video and voice and transmitted over ultra-long distances. It can also be browsed anytime and anywhere on smart devices of various forms, breaking the limitations of traditional information processing and transmission to a certain extent.
[0003] In the prior art, when browsing video signals on a remote web page (mostly used in security or remote control and other related technical fields), the SDI video signal of the camera is usually converted through streaming protocols such as rtmp and hls, and then played by embedding a video playback plug-in in the web page.
[0004] The streaming media protocol conversion method adopted by the prior art itself has different degrees of response delay, and there is also a delay problem in the conversion process. Therefore, when used, it is not suitable for certain scenarios that require low latency. The processing method of the streaming media protocol in the prior art requires a large network bandwidth. In some cases where the conditions of the temporarily built network are poor, the use effect is poor. However, the web browser in the prior art cannot directly display and insert SDI video signals, so it is inevitable to use related protocols or processing methods. Summary of the invention
[0005] The object of the present invention is to provide a method for previewing an SDI video signal in a web page to solve the problems raised in the above background technology.
[0006] To achieve the above object, the present invention provides the following technical solutions:
[0007] A method for previewing an SDI video signal in a web page comprises the following steps:
[0008] Collecting SDI video signals, where the SDI video signals are generated by a video acquisition device and are high frame rate lossless image signals;
[0009] Acquire the SDI video signal, read the frame picture in the SDI video signal according to the preset frame acquisition interval, and convert the frame picture into image data through a preset SDI conversion model, wherein the image data is in PNG format;
[0010] Acquire and respond to a data request signal, update the frame acquisition interval according to the data request signal, and forward the image data through WebSocket, wherein the data request signal includes a frame request data segment and a frame modification data segment;
[0011] The image data forwarded through the WebSocket is received, the image data is assembled into a Blob object using a preset data processing unit, and the Blob object is output using a Blob protocol.
[0012] As a further solution of the present invention: the frame acquisition interval is an adjustable control parameter, and the frame acquisition interval is used to express the time interval between two adjacent acquisitions of the SDI video signal;
[0013] The frame modification data segment is used to assign a value to the frame acquisition interval.
[0014] As a further solution of the present invention: before the step of forwarding the image data via WebSocket is performed, the following steps are also included:
[0015] Read the frame modification data segment, and determine the frame modification data segment. If the frame modification data segment is an empty data segment,
[0016] Use network testing tools to test network bandwidth and network speed and generate network test results;
[0017] The frame acquisition interval is set according to the network test result.
[0018] As a further solution of the present invention: before the step of reading the frame images in the SDI video signal according to the preset frame acquisition interval is performed, the step of:
[0019] The SDI video signal is uploaded to a cloud server, and the cloud server is used to store and back up the SDI video signal.
[0020] As a further solution of the present invention: the steps of acquiring and responding to the data request signal, updating the frame acquisition interval according to the data request signal, and forwarding the image data through WebSocket specifically include:
[0021] Receiving a data request signal from a mobile smart terminal;
[0022] reading a frame modification data segment in the data request signal, performing content determination on the frame modification data segment and generating a modification determination result;
[0023] updating the frame acquisition interval according to the modification determination result;
[0024] reading a frame request data segment in the data request signal, and performing content determination on the frame request data segment to generate a request determination result;
[0025] The image data is forwarded according to the request determination result.
[0026] Compared with the prior art, the beneficial effects of the present invention are as follows: by performing frame processing on SDI video signals, converting frame images into image data at a certain frame interval, forwarding the image data through WebSocket, assembling the image data using the Blob protocol, and using a web page for playback output, the present invention effectively reduces the delay compared to the traditional streaming media SDI video signal conversion and playback method using WebGL, and reduces the occupancy of network bandwidth and transmission rate to a certain extent. At the same time, the adjustable frame acquisition interval further increases the occupancy pressure of network bandwidth and rate under this SDI video data processing method, and further improves the stability. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] Figure 1 A schematic diagram of an execution method for browsing SDI video signals on a web page.
[0028] Figure 2 The present invention is a flowchart of a method for browsing SDI video signals on a web page. DETAILED DESCRIPTION
[0029] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0030] The specific implementation of the present invention is described in detail below in conjunction with specific embodiments.
[0031] like Figure 1 The method for browsing an SDI video signal in a web page provided by an embodiment of the present invention comprises the following steps:
[0032] In this embodiment, step S100 corresponds to Figure 1 The video capture card and the capture device in step S200 and step S300 correspond to Figure 1 The frame processing module in step S400 corresponds to Figure 1 Display module in.
[0033] S100, collecting SDI video signals, where the SDI video signals are generated by a video collection device and are high frame rate lossless image signals.
[0034] In this embodiment, the SDI video signal is generated by a device such as a camera (such as a surveillance camera), and then captured by a video capture card. Here we use the DeckLink video capture card of BlackMagic Design to connect the SDI video signal of the camera to the capture card, so that the SDI video signal can be further processed by the capture card.
[0035] S200, acquiring the SDI video signal, reading a frame image in the SDI video signal according to a preset frame acquisition interval, and converting the frame image into image data through a preset SDI conversion model, wherein the image data is in PNG format.
[0036] In this embodiment, the execution of this step can be uniformly summarized as the frame processing steps performed by the frame processing module. The program development interface provided by the acquisition card is used to read each frame of the SDI video signal. The pixel format is generally YUV 4:2:2 format, and each frame is converted into a PNG format image. Of course, the image data here can also be in multiple formats such as JPG and BMP. This is mainly determined by multiple requirements such as the quality of the generated image data and the conversion efficiency. The reason why we choose to use the PNG format in step S200 is that the PNG format is the most balanced format among multiple formats in experimental use to meet the above-mentioned multiple requirements.
[0037] S300, obtaining and responding to a data request signal, updating the frame acquisition interval according to the data request signal, and forwarding the image data through WebSocket, wherein the data request signal includes a frame request data segment and a frame modification data segment.
[0038] In this embodiment, this step represents the process of responding to the terminal request, that is, the user accesses the image data through the web page of the remote smart device to obtain the end response process. During execution, after receiving the data request signal from the smart mobile terminal, the corresponding response steps are executed according to the content of the data request signal, thereby realizing the sending of the required image data content to the browser web page of the mobile smart device. The WebSocket used here is a relatively new high-efficiency service data transmission communication protocol, which can push the data of the PNG image to the browser in the form of a binary data stream.
[0039] S400, receiving the image data forwarded through the WebSocket, assembling the image data into a Blob object using a preset data processing unit, and outputting the Blob object using a Blob protocol.
[0040] In this embodiment, after receiving the data stream, the JavaScript program on the browser side assembles the data into a Blob format and plays it using the Blob protocol. After testing, the delay is about two frames. Compared with the traditional web video playback using webGL technology, there is no need to convert the SDI data into streaming media, which reduces the delay. By directly compressing the SDI data signal and previewing and playing it through the Blob protocol, the delay can be greatly reduced. At the same time, the data transmission volume can be effectively controlled to meet the usage requirements under different network bandwidths.
[0041] As another preferred embodiment of the present invention, the frame acquisition interval is an adjustable control parameter, and the frame acquisition interval is used to express the time interval between two adjacent acquisitions of the SDI video signal;
[0042] The frame modification data segment is used to assign a value to the frame acquisition interval.
[0043] In this embodiment, the frame acquisition interval is briefly explained. As a preset frame acquisition interval, it works for a long time at a preset value during normal use. When the user requires certain specific usage parameters to use it in a usage scenario that suits his own needs, the frame acquisition interval can be reset through the frame modification data segment in the data request signal during the process of requesting to obtain the image data. The advantage of such a setting that can be modified at any time is that it can more effectively adapt to usage scenarios under different needs and network bandwidths.
[0044] As another preferred embodiment of the present invention, before the step of forwarding the image data via WebSocket is performed, the step further includes:
[0045] Read the frame modification data segment, and determine the frame modification data segment. If the frame modification data segment is an empty data segment,
[0046] Use network testing tools to test network bandwidth and network speed and generate network test results.
[0047] The frame acquisition interval is set according to the network test result.
[0048] In this embodiment, the frame acquisition interval is further explained here. When the user does not set the frame acquisition interval according to his or her own needs, in order to ensure that the data transmission can be carried out more efficiently and stably, a step of detecting the bandwidth and rate of the network connected to the user is set, and then the frame acquisition interval is reasonably adjusted and controlled according to the detection result of the network connection with the user's smart device, so as to achieve the effect of stable image data transmission and improve the stability of accessing SDI video data segments through web pages in different scenarios.
[0049] As another preferred embodiment of the present invention, before the step of reading the frame images in the SDI video signal according to the preset frame acquisition interval is performed, the step further includes:
[0050] The SDI video signal is uploaded to a cloud server, and the cloud server is used to store and back up the SDI video signal.
[0051] In this embodiment, additional explanation is given after step S100 and before step S200, and also includes the step of uploading the SDI video information to the cloud for storage. The reason why the uploading and saving step is performed before step S200 is that the original SDI video information can be saved, which can facilitate subsequent data review and further analysis (in some scenarios).
[0052] As another preferred embodiment of the present invention, the steps of acquiring and responding to a data request signal, updating the frame acquisition interval according to the data request signal, and forwarding the image data through WebSocket specifically include:
[0053] Receive a data request signal from a mobile smart terminal.
[0054] The frame modification data segment in the data request signal is read, content determination is performed on the frame modification data segment, and a modification determination result is generated.
[0055] The frame acquisition interval is updated according to the modification determination result.
[0056] The frame request data segment in the data request signal is read, and content determination is performed on the frame request data segment to generate a request determination result.
[0057] The image data is forwarded according to the request determination result.
[0058] In this embodiment, the execution process of step S300 is further decomposed and explained, mainly including the operation judgment and execution content of two parts: frame acquisition interval and forwarding picture data.
[0059] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0060] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the disclosure in the specification and examples. This application is intended to cover any variations, uses or adaptations of the present disclosure, which follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the claims.
[0061] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.
Claims
1. A method for previewing SDI video signals in a web page. It is characterized in that The following steps are involved: Collecting SDI video signals, where the SDI video signals are generated by a video acquisition device and are high frame rate lossless image signals; Acquire the SDI video signal, read the frame picture in the SDI video signal according to the preset frame acquisition interval, and convert the frame picture into image data through a preset SDI conversion model, wherein the image data is in PNG format; Acquire and respond to a data request signal, update the frame acquisition interval according to the data request signal, and forward the image data through WebSocket, wherein the data request signal includes a frame request data segment and a frame modification data segment; Receiving the image data forwarded through the WebSocket, assembling the image data into a Blob object using a preset data processing unit, and outputting the Blob object using a Blob protocol; The frame acquisition interval is an adjustable control parameter, and the frame acquisition interval is used to express the time interval between two adjacent acquisitions of the SDI video signal; The frame modification data segment is used to assign a value to the frame acquisition interval; Before the step of forwarding the image data via WebSocket is performed, the step further includes: Read the frame modification data segment, and determine the frame modification data segment. If the frame modification data segment is an empty data segment, Use network testing tools to test network bandwidth and network speed and generate network test results; The frame acquisition interval is set according to the network test result.
2. A method for previewing an SDI video signal in a web page according to claim 1, It is characterized in that Before the step of reading the frame images in the SDI video signal according to the preset frame acquisition interval is performed, the step further includes: The SDI video signal is uploaded to a cloud server, and the cloud server is used to store and back up the SDI video signal.
3. A method for previewing an SDI video signal in a web page according to claim 1, It is characterized in that The steps of acquiring and responding to a data request signal, updating the frame acquisition interval according to the data request signal, and forwarding the image data through WebSocket specifically include: Receiving a data request signal from a mobile smart terminal; reading a frame modification data segment in the data request signal, performing content determination on the frame modification data segment and generating a modification determination result; updating the frame acquisition interval according to the modification determination result; reading a frame request data segment in the data request signal, and performing content determination on the frame request data segment to generate a request determination result; The image data is forwarded according to the request determination result.
