Video streaming system and method

By introducing SDK and callback functions into the video streaming system, efficient video streaming under the GB28181 protocol is realized, solving the complexity of video encoding format conversion and frame adjustment, and improving the efficiency and simplicity of the system.

CN115633214BActive Publication Date: 2025-01-10HUIZHIAN INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211004484.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-22
Publication Date
2025-01-10
Estimated Expiration
2042-08-22

AI Technical Summary

Technical Problem

Existing video streaming systems require video encoding format conversion and video frame adjustment to adapt to the GB28181 protocol, resulting in complexity and inefficiency.

Method used

A video streaming system was designed, including encoding conversion module, packaging module and transmission module. The playback rules are sent through the SDK, and video encoding conversion, slice packaging and protocol conversion are performed. Callback functions and pointer jumps are used to achieve efficient streaming transcoding and pushing. .

Benefits of technology

It realizes efficient video streaming, can handle multiple private streaming protocols, simplifies the architecture, reduces the computational complexity and buffer size, and improves the space-time complexity.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115633214B_ABST
    Figure CN115633214B_ABST
Patent Text Reader

Abstract

The present invention provides a video streaming system and method, comprising: a coding conversion module, used for sending a playback rule of a player SDK to a preset video streaming system, performing coding conversion on a camera in the video streaming system according to the playback rule, and determining the conversion code; a packaging module, used for slicing and packaging the video stream corresponding to the camera in batches according to the playback rule and the conversion code, and determining the packaging data; a transmission module, used for converting the video coding format and adjusting the video frame of the packaged data based on a preset national standard 28181 protocol, determining the adjusted video, and transmitting the adjusted video to a preset server.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of video streaming, and in particular to a video streaming system and method. Background Art

[0002] GB28181 protocol refers to the national standard GB / T 28181-2016 "Technical Requirements for Information Transmission, Exchange and Control of Public Security Video Surveillance Networking Systems". This standard specifies the interconnection structure of public security video surveillance networking systems, basic requirements and security requirements for transmission, exchange and control, as well as technical requirements such as control and transmission processes and protocol interfaces. It is a national standard in the field of video surveillance.

[0003] There are many camera manufacturers on the market, with a variety of camera models and video stream types. The national standard 28181 document stipulates that the push of video streams uses a universal encoding format and limited communication protocols, so it is usually necessary to convert the video encoding format and adjust the video frame for specific communication protocols. Summary of the invention

[0004] The present invention provides a video streaming system and method to solve the problems mentioned above.

[0005] The technical solution provides a video streaming system, including:

[0006] The encoding conversion module is used to send the playback rules of the player SDK to the preset video streaming system, and according to the playback rules, perform encoding conversion on the camera in the video streaming system to determine the conversion code;

[0007] A packaging module, used to slice and package the video stream corresponding to the camera in batches according to the playback rules and the conversion code, and determine the packaged data;

[0008] The transmission module is used to convert the video encoding format of the packaged data and adjust the video frame based on the preset national standard 28181 protocol, determine the adjusted video, and transmit the adjusted video to a preset server.

[0009] As an embodiment of the present technical solution, the encoding conversion module includes:

[0010] A callback function unit is used to send the playback rules of the player SDK to the preset video streaming system, and collect the callback function between the playback rules of the player SDK and the video streaming system after the connection is successful;

[0011] A judging unit, used to judge whether the event is a camera encoding conversion through the callback function;

[0012] The encoding conversion unit is used to convert the camera in the video streaming system into encoding when the event is camera encoding conversion;

[0013] The pointer jump unit is used to jump the pointer of the callback function to the packaging module when the event is not camera encoding conversion.

[0014] As an embodiment of the present technical solution, the packaging module includes:

[0015] An acquisition unit, used for acquiring the playing rule and the conversion code;

[0016] A video stream determination unit, used to collect a callback function according to the playback rule, and determine whether the event is a video stream processing event according to the callback function;

[0017] A packing unit, used for slicing and packing the video stream corresponding to the camera in batches to determine the packing data when the event is a video stream processing event;

[0018] The pointer jump stopping unit is used to stop the pointer jump of the callback function when the event is not a processing event of the video stream.

[0019] As an embodiment of the present technical solution, the transmission module includes:

[0020] The video coding format conversion unit is used to convert the packaged data into a video coding format based on the preset national standard 28181 protocol and determine the converted video data;

[0021] A video frame adjustment unit, used for performing video frame adjustment on the converted video data, determining adjustment data and adjusting video;

[0022] A rule analysis unit, used for performing rule analysis on the adjustment data and transmitting the analysis result to the player SDK;

[0023] The video transmission unit is used to transmit the adjusted video to a preset server.

[0024] This technical solution provides a national standard 28181 video streaming method based on SDK, including:

[0025] Send the playback rules of the player SDK to the preset video streaming system, and according to the playback rules, perform encoding conversion on the camera in the video streaming system to determine the conversion encoding;

[0026] The video stream corresponding to the camera is sliced ​​and packaged in batches according to the playback rule and the conversion code to determine the packaged data;

[0027] Based on the preset national standard 28181 protocol, the packaged data is converted into a video encoding format and the video frame is adjusted, the adjusted video is determined, and the adjusted video is transmitted to a preset server.

[0028] As an embodiment of the present technical solution, the playing rules of the player SDK are sent to the preset video streaming system, and the camera in the video streaming system is converted by the playing rules to determine the conversion code, including:

[0029] Send the playback rules of the player SDK to the preset video streaming system, and collect the callback function between the playback rules of the player SDK and the video streaming system after the connection is successful;

[0030] Through the callback function, determine whether the event is camera encoding conversion;

[0031] When the event is camera encoding conversion, the camera in the video streaming system is encoded and converted;

[0032] When the event is not camera encoding conversion, the pointer of the callback function jumps to the packaging module.

[0033] As an embodiment of the present technical solution, the video stream corresponding to the camera is sliced ​​and packaged in batches according to the playback rule and the conversion coding, and the packaged data is determined, including:

[0034] Obtaining the playback rule and the conversion code;

[0035] According to the playback rules, a callback function is collected, and through the callback function, whether the event is a processing event of the video stream is determined;

[0036] When the event is a video stream processing event, the video stream corresponding to the camera is sliced ​​and packaged in batches to determine the packaged data;

[0037] When the event is not a processing event of the video stream, the pointer jump of the callback function is stopped.

[0038] As an embodiment of the present technical solution, based on the preset national standard 28181 protocol, converting the packaged data into a video encoding format and adjusting the video frame, determining the adjusted video, and transmitting the adjusted video to a preset server, includes:

[0039] Based on the preset national standard 28181 protocol, the packaged data is converted into a video encoding format to determine the converted video data;

[0040] Performing video frame adjustment on the converted video data to determine adjustment data and adjustment video;

[0041] Perform rule analysis on the adjustment data and transmit the analysis result to the player SDK;

[0042] The adjusted video is transmitted to a preset server.

[0043] Other features and advantages of the present invention will be described in the following description, and partly become apparent from the description, or understood by practicing the present invention. The purpose and other advantages of the present invention can be realized and obtained by the structures particularly pointed out in the written description and the accompanying drawings.

[0044] The technical solution of the present invention is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] The accompanying drawings are used to provide a further understanding of the present invention and constitute a part of the specification. Together with the embodiments of the present invention, they are used to explain the present invention and do not constitute a limitation of the present invention. In the accompanying drawings:

[0046] Figure 1 This is a flow chart of a video streaming system in an embodiment of the present invention;

[0047] Figure 2 The following is a flow chart of a video streaming system module in an embodiment of the present invention. DETAILED DESCRIPTION

[0048] The preferred embodiments of the present invention are described below in conjunction with the accompanying drawings. It should be understood that the preferred embodiments described herein are only used to illustrate and explain the present invention, and are not used to limit the present invention.

[0049] It should be noted that when a component is referred to as being "fixed to" or "disposed on" another component, it can be directly on the other component or indirectly on the other component. When a component is referred to as being "connected to" another component, it can be directly or indirectly connected to the other component.

[0050] It should be understood that the orientation or position relationship indicated by terms such as "length", "width", "up", "down", "front", "back", "left", "right", "vertical", "horizontal", "top", "bottom", "inside" and "outside" are based on the orientation or position relationship shown in the drawings, and are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operate in a specific orientation, and therefore cannot be understood as a limitation on the present invention.

[0051] In addition, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations, and "plurality" means two or more, unless otherwise clearly and specifically limited. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device.

[0052] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.

[0053] Embodiment 1:

[0054] According to the attached Figure 1 As shown, an embodiment of the present invention provides a video streaming system, including:

[0055] The encoding conversion module is used to send the playback rules of the player SDK to the preset video streaming system, and according to the playback rules, perform encoding conversion on the camera in the video streaming system to determine the conversion code;

[0056] A packaging module, used to slice and package the video stream corresponding to the camera in batches according to the playback rules and the conversion code, and determine the packaged data;

[0057] The transmission module is used to convert the video encoding format of the packaged data and adjust the video frame based on the preset national standard 28181 protocol, determine the adjusted video, and transmit the adjusted video to a preset server.

[0058] The working principle and beneficial effects of the above technical solution are:

[0059] The embodiment of the present invention provides a national standard 28181 video streaming system based on SDK, including: a coding conversion module, which is used to send the playback rules of the player SDK to the preset video streaming system, and the camera in the video streaming system is coded and converted according to the playback rules to determine the conversion code; a packaging module, which is used to slice and package the video stream corresponding to the camera in batches according to the playback rules and the conversion code to determine the packaged data; a transmission module, which is used to convert the video coding format and adjust the video frame of the packaged data based on the preset national standard 28181 protocol, determine the adjusted video, and transmit the adjusted video to a preset server. A video streaming solution for implementing national standard 28181 is proposed. SDK is introduced, and the SDK is registered and connected to the platform. The camera private stream coding conversion and RTP-based packetization and segmentation are performed by callback function, and the callback parameters are bound by typeless pointer parameter passing, so as to realize a set of efficient streaming solutions that can handle multiple private stream protocols and have a clear architecture.

[0060] Embodiment 2:

[0061] According to the attached Figure 2 As shown, in one embodiment, the encoding conversion module includes:

[0062] A callback function unit is used to send the playback rules of the player SDK to the preset video streaming system, and collect the callback function between the playback rules of the player SDK and the video streaming system after the connection is successful;

[0063] A judging unit, used to judge whether the event is a camera encoding conversion through the callback function;

[0064] The encoding conversion unit is used to convert the camera in the video streaming system into encoding when the event is camera encoding conversion;

[0065] The pointer jump unit is used to jump the pointer of the callback function to the packaging module when the event is not camera encoding conversion.

[0066] The working principle and beneficial effects of the above technical solution are:

[0067] In this technical solution, the callback function unit is used to send the playback rules of the player SDK to the preset video streaming system, and collect the callback function between the playback rules of the player SDK and the video streaming system after the connection is successful; the judgment unit is used to judge whether the event is camera encoding conversion through the callback function; the encoding conversion unit is used to perform encoding conversion on the camera in the video streaming system when the event is camera encoding conversion; the pointer jumping unit is used to jump the pointer of the callback function to the packaging module when the event is not camera encoding conversion. Efficient and specialized streaming transcoding and push are achieved.

[0068] Embodiment 3:

[0069] In one embodiment, the packaging module includes:

[0070] An acquisition unit, used for acquiring the playing rule and the conversion code;

[0071] A video stream determination unit, used to collect a callback function according to the playback rule, and determine whether the event is a video stream processing event according to the callback function;

[0072] A packing unit, used for slicing and packing the video stream corresponding to the camera in batches to determine the packing data when the event is a video stream processing event;

[0073] The pointer jump stopping unit is used to stop the pointer jump of the callback function when the event is not a processing event of the video stream.

[0074] The working principle and beneficial effects of the above technical solution are:

[0075] In this technical solution, the acquisition unit is used to acquire the playback rules and the conversion code; the video stream judgment unit is used to collect the callback function through the playback rules, and judge whether the event is a video stream processing event through the callback function; the packaging unit is used to slice the video stream corresponding to the camera and package it in batches to determine the packaged data when the event is a video stream processing event; the pointer jump stop unit is used to stop the pointer jump of the callback function when the event is not a video stream processing event. This method reduces the computational complexity and can greatly reduce the buffer size, thereby making a breakthrough in time and space complexity.

[0076] Embodiment 4:

[0077] In one embodiment, the transmission module includes:

[0078] The video coding format conversion unit is used to convert the packaged data into a video coding format based on the preset national standard 28181 protocol and determine the converted video data;

[0079] A video frame adjustment unit, used for performing video frame adjustment on the converted video data, determining adjustment data and adjusting video;

[0080] A rule analysis unit, used for performing rule analysis on the adjustment data and transmitting the analysis result to the player SDK;

[0081] The video transmission unit is used to transmit the adjusted video to a preset server.

[0082] The working principle and beneficial effects of the above technical solution are:

[0083] In this technical solution, the video encoding format conversion unit is used to convert the packaged data into a video encoding format based on the preset national standard 28181 protocol, and determine the converted video data; the video frame adjustment unit is used to adjust the converted video data into video frames, and determine the adjusted data and the adjusted video; the rule analysis unit is used to perform rule analysis on the adjusted data and transmit the analysis results to the player SDK; the video transmission unit is used to transmit the adjusted video to a preset server. A set of efficient streaming solutions that can handle multiple private streaming protocols and have a clear architecture is realized.

[0084] Embodiment 5:

[0085] This technical solution provides a national standard 28181 video streaming method based on SDK, including:

[0086] Send the playback rules of the player SDK to the preset video streaming system, and according to the playback rules, perform encoding conversion on the camera in the video streaming system to determine the conversion encoding;

[0087] The video stream corresponding to the camera is sliced ​​and packaged in batches according to the playback rule and the conversion code to determine the packaged data;

[0088] Based on the preset national standard 28181 protocol, the packaged data is converted into a video encoding format and the video frame is adjusted, the adjusted video is determined, and the adjusted video is transmitted to a preset server.

[0089] The working principle and beneficial effects of the above technical solution are:

[0090] In this technical solution, the playback rules of the player SDK are sent to the preset video streaming system. According to the playback rules, the camera in the video streaming system is encoded and converted to determine the conversion code; according to the playback rules and the conversion code, the video stream corresponding to the camera is sliced ​​and packaged in batches to determine the packaged data; based on the preset national standard 28181 protocol, the packaged data is converted into a video encoding format and the video frame is adjusted to determine the adjusted video, and the adjusted video is transmitted to the preset server. The SDK is introduced and connected to the platform through SDK registration. The camera private stream encoding conversion and RTP-based packetization and segmentation are performed by means of callback functions, and the callback parameters are bound by untyped pointer passing parameters, thereby realizing an efficient streaming solution that can handle multiple private stream protocols and has a clear architecture.

[0091] Embodiment 6:

[0092] In one embodiment, the sending of the playback rules of the player SDK to the preset video streaming system, encoding and converting the camera in the video streaming system according to the playback rules, and determining the conversion encoding includes:

[0093] Send the playback rules of the player SDK to the preset video streaming system, and collect the callback function between the playback rules of the player SDK and the video streaming system after the connection is successful;

[0094] Through the callback function, determine whether the event is camera encoding conversion;

[0095] When the event is camera encoding conversion, the camera in the video streaming system is encoded and converted;

[0096] When the event is not camera encoding conversion, the pointer of the callback function jumps to the packaging module.

[0097] The working principle and beneficial effects of the above technical solution are:

[0098] This technical solution sends the playback rules of the player SDK to the preset video streaming system, and according to the playback rules, the camera in the video streaming system is converted by encoding, and the conversion code is determined, including: sending the playback rules of the player SDK to the preset video streaming system, collecting the callback function between the playback rules of the player SDK and the video streaming system after the connection is successful; judging whether the event is camera encoding conversion by the callback function; when the event is camera encoding conversion, the camera in the video streaming system is converted by encoding; when the event is not camera encoding conversion, the pointer of the callback function is jumped to the packaging module. Efficient and specialized streaming transcoding and push are realized.

[0099] Embodiment 7:

[0100] As an embodiment of the present technical solution, the video stream corresponding to the camera is sliced ​​and packaged in batches according to the playback rule and the conversion coding, and the packaged data is determined, including:

[0101] Obtaining the playback rule and the conversion code;

[0102] According to the playback rules, a callback function is collected, and through the callback function, whether the event is a processing event of the video stream is determined;

[0103] When the event is a video stream processing event, the video stream corresponding to the camera is sliced ​​and packaged in batches to determine the packaged data;

[0104] When the event is not a processing event of the video stream, the pointer jump of the callback function is stopped.

[0105] The working principle and beneficial effects of the above technical solution are:

[0106] In this technical solution, the video stream corresponding to the camera is sliced ​​and packaged in batches through the playback rules and the conversion code, the packaged data is determined, and the playback rules and the conversion code are obtained; the callback function is collected through the playback rules, and the callback function is used to determine whether the event is a processing event of the video stream; when the event is a processing event of the video stream, the video stream corresponding to the camera is sliced ​​and packaged in batches, and the packaged data is determined; when the event is not a processing event of the video stream, the pointer jump of the callback function is stopped. This method reduces the computational complexity and can greatly reduce the buffer size, thereby making a breakthrough in time and space complexity.

[0107] Embodiment 8:

[0108] In one embodiment, based on the preset national standard 28181 protocol, converting the packaged data into a video coding format and adjusting the video frame, determining the adjusted video, and transmitting the adjusted video to a preset server includes:

[0109] Based on the preset national standard 28181 protocol, the packaged data is converted into a video encoding format to determine the converted video data;

[0110] Performing video frame adjustment on the converted video data to determine adjustment data and adjustment video;

[0111] Perform rule analysis on the adjustment data and transmit the analysis result to the player SDK;

[0112] The adjusted video is transmitted to a preset server.

[0113] The working principle and beneficial effects of the above technical solution are:

[0114] In this technical solution, based on the preset national standard 28181 protocol, the packaged data is converted into a video encoding format and the video frame is adjusted, the adjusted video is determined, and the adjusted video is transmitted to a preset server, including: based on the preset national standard 28181 protocol, the packaged data is converted into a video encoding format to determine the converted video data; the converted video data is adjusted into a video frame to determine the adjusted data and the adjusted video; the adjusted data is analyzed according to rules, and the analysis results are transmitted to the player SDK; the adjusted video is transmitted to a preset server. A set of efficient streaming solutions that can handle multiple private streaming protocols and have a clear architecture is realized.

Claims

1. A video streaming system, comprising: The encoding conversion module is used to send the playback rules of the player SDK to the preset video streaming system, and according to the playback rules, perform encoding conversion on the camera in the video streaming system to determine the conversion code; A packaging module, used to slice and package the video stream corresponding to the camera in batches according to the playback rules and the conversion code, and determine the packaged data; A transmission module, used for converting the video coding format of the packaged data and adjusting the video frame based on the preset national standard 28181 protocol, determining the adjusted video, and transmitting the adjusted video to a preset server; Wherein, the encoding conversion module includes: A callback function unit is used to send the playback rules of the player SDK to the preset video streaming system, and collect the callback function between the playback rules of the player SDK and the video streaming system after the connection is successful; A judging unit, used to judge whether the event is a camera encoding conversion through the callback function; The encoding conversion unit is used to perform encoding conversion on the camera in the video streaming system when the event is camera encoding conversion; The pointer jump unit is used to jump the pointer of the callback function to the packaging module when the event is not camera encoding conversion.

2. The system according to claim 1, characterized in that The packaging module includes: An acquisition unit, used for acquiring the playing rule and the conversion code; A video stream determination unit, used to collect a callback function according to the playback rule, and determine whether the event is a video stream processing event according to the callback function; A packing unit, used for slicing and packing the video stream corresponding to the camera in batches to determine the packing data when the event is a video stream processing event; The pointer jump stopping unit is used to stop the pointer jump of the callback function when the event is not a processing event of the video stream.

3. The system according to claim 1, characterized in that The transmission module comprises: The video coding format conversion unit is used to convert the packaged data into a video coding format based on the preset national standard 28181 protocol and determine the converted video data; A video frame adjustment unit, used for performing video frame adjustment on the converted video data, determining adjustment data and adjusting video; A rule analysis unit, used for performing rule analysis on the adjustment data and transmitting the analysis result to the player SDK; The video transmission unit is used to transmit the adjusted video to a preset server.

4. A video streaming method, characterized in that: include: Send the playback rules of the player SDK to the preset video streaming system, and according to the playback rules, perform encoding conversion on the camera in the video streaming system to determine the conversion encoding; The video stream corresponding to the camera is sliced ​​and packaged in batches according to the playback rule and the conversion code to determine the packaged data; Based on the preset national standard 28181 protocol, the packaged data is converted into a video encoding format and the video frame is adjusted, the adjusted video is determined, and the adjusted video is transmitted to a preset server; The step of sending the playback rules of the player SDK to the preset video streaming system, performing encoding conversion on the camera in the video streaming system according to the playback rules, and determining the conversion encoding includes: Send the playback rules of the player SDK to the preset video streaming system, and collect the callback function between the playback rules of the player SDK and the video streaming system after the connection is successful; Through the callback function, determine whether the event is camera encoding conversion; When the event is camera encoding conversion, the camera in the video streaming system is encoded and converted; When the event is not camera encoding conversion, the pointer of the callback function jumps to the packaging module.

5. The method according to claim 4, characterized in that The step of slicing and packaging the video stream corresponding to the camera in batches according to the playback rule and the conversion coding, and determining the packaged data includes: Obtaining the playback rule and the conversion code; According to the playback rules, a callback function is collected, and through the callback function, whether the event is a processing event of the video stream is determined; When the event is a video stream processing event, the video stream corresponding to the camera is sliced ​​and packaged in batches to determine the packaged data; When the event is not a processing event of the video stream, the pointer jump of the callback function is stopped.

6. The method according to claim 4, characterized in that The method includes converting the packaged data into a video encoding format and adjusting the video frame based on the preset national standard 28181 protocol, determining the adjusted video, and transmitting the adjusted video to a preset server, including: Based on the preset national standard 28181 protocol, the packaged data is converted into a video encoding format to determine the converted video data; Performing video frame adjustment on the converted video data to determine adjustment data and adjustment video; Perform rule analysis on the adjustment data and transmit the analysis result to the player SDK; The adjusted video is transmitted to a preset server.

Citation Information

Patent Citations

  • Video playing method and equipment

    CN104702976A

  • Video data IP conversion method and system

    CN113691832A