A low-latency live push streaming method and system

CN116800990BActive Publication Date: 2026-08-18HUIZHIAN INFORMATION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211573081.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-08
Publication Date
2026-08-18
Estimated Expiration
2042-12-08

AI Technical Summary

Technical Problem

[0003]本发明提供了一种低延迟直播式推流方法和系统,用以解决Ffmpeg流媒体推送引擎进行直播视频推流过程中的延时较大的问题:

Benefits of technology

本发明提出的一种低延迟直播式推流方法和系统利用ffmpeg的编码库、网络接口库等自推流编码图片,任何流媒体服务器都可以低延迟接受并发布。利用c++实现同异步结合管道运输内存上的格式图片编码并推送出去。本发明提出的一种基于ffmpeg开发库的低延迟直播式推流方法和系统基于开源并封装api,集成动态库调用实现各平台低延迟直播式推流。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116800990B_ABST
    Figure CN116800990B_ABST
Patent Text Reader

Abstract

The application provides a low-delay live push streaming method and system. The low-delay live push streaming method comprises the following steps: preparing a push code picture for each streaming server and embedding the push code picture in each network interface in a network interface library and an ffmpeg streaming push engine; each streaming server corresponds to one push code picture; when the streaming server needs to push a video stream, the streaming server sends the push code picture to the ffmpeg streaming push engine through the network interface; and the ffmpeg streaming push engine determines whether to push a video stream through the push code picture. The system comprises modules corresponding to the method steps.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention proposes a low-latency live streaming method and system, belonging to the field of streaming technology. Background Technology

[0002] With the continuous development of self-media, video streaming has become the technological foundation of the current internet video industry. However, the FFmpeg streaming media push engine is frequently used in current internet video streaming processes. Because the FFmpeg streaming media push engine provides command-based push, it suffers from significant latency and high system resource consumption when applied to real-time live streaming. Summary of the Invention

[0003] This invention provides a low-latency live streaming method and system to solve the problem of high latency in the live video streaming process of the Ffmpeg streaming media push engine: A low-latency live streaming method, the low-latency live streaming method comprising: A push code image is created for each streaming media server, and the push code image is embedded in each network interface in the network interface library and the ffmpeg streaming media push engine; wherein, each streaming media server corresponds to one push code image; When the streaming media server needs to push video, it sends a push code image to the ffmpeg streaming media push engine through the network interface. The ffmpeg streaming media push engine determines whether to push video based on the push code image.

[0004] Furthermore, a push code image is defined for each streaming media server, and the push code image is embedded into each network interface in the network interface library and the ffmpeg streaming media push engine, including: For each streaming media server, a push code image is created specifically for the ffmpeg development library, and each streaming media server uniquely corresponds to one push code image; Extract the network interface for data transmission between the streaming media server and the ffmpeg streaming media push engine; The streaming service sends the push code image to the network interface and the ffmpeg streaming push engine. The network interface and the ffmpeg streaming media push engine store the push code image, and store the correspondence between the push code image and the streaming media service and the network interface in the ffmpeg streaming media push engine.

[0005] Furthermore, when the streaming media server needs to push video, it sends a push code image to the ffmpeg streaming media push engine through the network interface, including: When the streaming media server needs to push video, it extracts the push code image and sends it to the network interface. The network interface obtains the video streaming permission authentication of the streaming media server by identifying the streaming code image. When the streaming code image is compared with the streaming code image stored in the network interface, and it is determined that the streaming media server has video streaming permission when it is determined that the streaming code image sent by the streaming media server is consistent with the streaming code image stored in the network interface. When the network interface determines that the streaming media server has video streaming permissions, it sends the streaming code image to the ffmpeg streaming media push engine.

[0006] Furthermore, the ffmpeg streaming media push engine determines whether to push video based on the push code image, including: The network interface sends the push code image to the ffmpeg streaming media push engine. The ffmpeg streaming media push engine obtains the streaming media server's video push permission authentication by recognizing the push code image. When the push code image is compared with the push code image stored in the ffmpeg streaming media push engine, and it is determined that the streaming media server has video push permission when it is determined that the push code image sent by the streaming media server is consistent with the push code image stored in the ffmpeg streaming media push engine. When the ffmpeg streaming media push engine determines that the streaming media server has video push permissions, it pushes the video to the streaming media server corresponding to the push code image through the network interface.

[0007] A low-latency live streaming system, the low-latency live streaming system comprising: An embedding module is used to define a push code image for each streaming media server and embed the push code image into each network interface in the network interface library and the ffmpeg streaming media push engine; wherein, each streaming media server corresponds to one push code image; The push module is used to send a push code image to the ffmpeg streaming media push engine through the network interface when the streaming media server needs to push video. The determination module is used by the ffmpeg streaming media push engine to determine whether to push video stream based on the push code image.

[0008] Furthermore, the embedding module includes: A specification module is used to specify a push code image for each streaming media server and the ffmpeg development library, and each streaming media server uniquely corresponds to a push code image. The interface extraction module is used to extract the network interface for data transmission between the streaming media server and the ffmpeg streaming media push engine. The first image sending module is used for the streaming media service to send the push code image to the network interface and the ffmpeg streaming media push engine; The storage module is used to save the push code image in the network interface and the ffmpeg streaming media push engine, and to store the correspondence between the push code image and the streaming media service and the network interface in the ffmpeg streaming media push engine.

[0009] Furthermore, the push module includes: The extraction and sending module is used to extract the push code image and send it to the network interface when the streaming media server needs to push video. The consistency comparison module is used for the network interface to obtain the video streaming permission authentication of the streaming media server through the push code image recognition. When the push code image is compared with the push code image stored in the network interface, and it is determined that the streaming media server has video streaming permission when it is determined that the push code image sent by the streaming media server is consistent with the push code image stored in the network interface. The second image sending module is used to send the push code image to the ffmpeg streaming media push engine when the network interface determines that the streaming media server has video push permissions.

[0010] Furthermore, the determination module includes: The third image sending module is used to send the push code image to the ffmpeg streaming media push engine via the network interface. The authentication module is used by the ffmpeg streaming media push engine to obtain the streaming media server's video push permission authentication through push code image recognition. When the push code image is compared with the push code image stored in the ffmpeg streaming media push engine, and it is determined that the streaming media server has video push permission when it is determined that the push code image sent by the streaming media server is consistent with the push code image stored in the ffmpeg streaming media push engine. The streaming module is used to push video to the streaming server corresponding to the streaming code image through the network interface when the ffmpeg streaming media push engine determines that the streaming media server has video streaming permissions.

[0011] Beneficial effects of this invention: This invention proposes a low-latency live streaming method and system that utilizes ffmpeg's encoding library and network interface library to encode images for self-pushing, allowing any streaming media server to receive and publish them with low latency. It employs C++ to implement synchronous and asynchronous pipelined transport of encoded images in memory and push them out. This invention's low-latency live streaming method and system, based on the ffmpeg development library, is based on open source and encapsulates APIs, integrating dynamic library calls to achieve low-latency live streaming on various platforms. Attached Figure Description

[0012] Figure 1 This is a flowchart of the method described in this invention; Figure 2 This is a system block diagram of the system described in this invention. Detailed Implementation

[0013] The preferred embodiments of the present invention will be described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.

[0014] This invention proposes a low-latency live streaming method, such as... Figure 1 As shown, the low-latency live streaming method includes: S1. Develop a push code image for each streaming media server and embed the push code image into each network interface in the network interface library and the ffmpeg streaming media push engine; wherein, each streaming media server corresponds to one push code image; S2. When the streaming media server needs to push video, it sends a push code image to the ffmpeg streaming media push engine through the network interface. S3. The ffmpeg streaming media push engine determines whether to push video based on the push code image.

[0015] The working principle of the above technical solution is as follows: First, a push code image is created for each streaming media server, and the push code image is embedded in each network interface in the network interface library and the ffmpeg streaming media push engine; wherein, each streaming media server corresponds to one push code image; then, when the streaming media server needs to push video, it sends the push code image to the ffmpeg streaming media push engine through the network interface; finally, the ffmpeg streaming media push engine determines whether to push video based on the push code image.

[0016] The advantages of the above technical solution are as follows: This embodiment proposes a low-latency live streaming method based on the ffmpeg development library. It utilizes ffmpeg's encoding library and network interface library to encode images for self-pushing, allowing any streaming media server to receive and publish with low latency. C++ is used to implement synchronous and asynchronous pipelined transport of formatted images in memory for encoding and pushing. This invention proposes a low-latency live streaming method based on the ffmpeg development library, which is based on open source and encapsulates APIs, integrating dynamic library calls to achieve low-latency live streaming on various platforms.

[0017] One embodiment of the present invention involves defining a push code image for each streaming media server and embedding the push code image into each network interface in the network interface library and the ffmpeg streaming media push engine, including: S101. For each streaming media server, a push code image for the ffmpeg development library is specified, and each streaming media server uniquely corresponds to one push code image. S102. Extract the network interface for data transmission between the streaming media server and the ffmpeg streaming media push engine; S103, The streaming media service sends the push code image to the network interface and the ffmpeg streaming media push engine; S104. The network interface and the ffmpeg streaming media push engine save the push code image, and store the correspondence between the push code image and the streaming media service and the network interface in the ffmpeg streaming media push engine.

[0018] The working principle of the above technical solution is as follows: First, a push code image is formulated for each streaming media server specifically for the ffmpeg development library, and each streaming media server uniquely corresponds to one push code image; then, the network interface for data transmission between the streaming media server and the ffmpeg streaming media push engine is extracted; subsequently, the streaming media service sends the push code image to the network interface and the ffmpeg streaming media push engine; finally, the network interface and the ffmpeg streaming media push engine save the push code image, and the correspondence between the push code image and the streaming media service and the network interface is stored in the ffmpeg streaming media push engine.

[0019] The above technical solution has the following effect: by directly recognizing the push code image instead of pushing the command, when the push code image is already embedded in the network interface and engine, there is no need to wait for the push command. The push code image is directly recognized and the push is connected according to the push requirements, which can effectively improve the efficiency of video push and reduce the latency of video push.

[0020] In one embodiment of the present invention, when the streaming media server needs to push video, it sends a push code image to the ffmpeg streaming media push engine through the network interface, including: S201. When the streaming media server needs to push video, it extracts the push code image and sends it to the network interface. S202. The network interface obtains the video streaming permission authentication of the streaming media server by identifying the streaming code image. When the streaming code image is compared with the streaming code image stored in the network interface, and it is determined that the streaming media server has video streaming permission when it is determined that the streaming code image sent by the streaming media server is consistent with the streaming code image stored in the network interface. S203. When the network interface determines that the streaming media server has video streaming permissions, the streaming code image is sent to the ffmpeg streaming media push engine.

[0021] The working principle of the above technical solution is as follows: First, when the streaming media server needs to push video, it extracts the push code image and sends it to the network interface; then, the network interface identifies the streaming media server through the push code image to authenticate its video push permission. When the push code image is compared with the push code image stored in the network interface, and it is determined that the streaming media server has video push permission when the push code image sent by the streaming media server is consistent with the push code image stored in the network interface, the streaming media server is determined to have video push permission; finally, when the network interface determines that the streaming media server has video push permission, it sends the push code image to the ffmpeg streaming media push engine.

[0022] The above technical solution has the following effect: by directly recognizing the push code image instead of pushing the command, when the push code image is already embedded in the network interface and engine, there is no need to wait for the push command. The push code image is directly recognized and the push is connected according to the push requirements, which can effectively improve the efficiency of video push and reduce the latency of video push.

[0023] In one embodiment of the present invention, the ffmpeg streaming media push engine determines whether to push video based on the push code image, including: S301, The network interface sends the push code image to the ffmpeg streaming media push engine; S302. The ffmpeg streaming media push engine obtains the streaming media server's video push permission authentication by identifying the push code image. When the push code image is compared with the push code image stored in the ffmpeg streaming media push engine, and it is determined that the streaming media server has video push permission when it is determined that the push code image sent by the streaming media server is consistent with the push code image stored in the ffmpeg streaming media push engine. S303. When the ffmpeg streaming media push engine determines that the streaming media server has video push permission, it pushes the video to the streaming media server corresponding to the push code image through the network interface.

[0024] The working principle of the above technical solution is as follows: First, the network interface sends the push code image to the ffmpeg streaming media push engine; then, the ffmpeg streaming media push engine obtains the streaming media server's video push permission authentication through push code image recognition. When the push code image is compared with the push code image stored in the ffmpeg streaming media push engine, and it is determined that the streaming media server has video push permission when it is determined that the push code image sent by the streaming media server is consistent with the push code image stored in the ffmpeg streaming media push engine; finally, when the ffmpeg streaming media push engine determines that the streaming media server has video push permission, it pushes the video to the streaming media server corresponding to the push code image through the network interface.

[0025] The above technical solution has the following effect: by directly recognizing the push code image instead of pushing the command, when the push code image is already embedded in the network interface and engine, there is no need to wait for the push command. The push code image is directly recognized and the push is connected according to the push requirements, which can effectively improve the efficiency of video push and reduce the latency of video push.

[0026] This invention proposes a low-latency live streaming system, such as... Figure 2 As shown, the low-latency live streaming system includes: An embedding module is used to define a push code image for each streaming media server and embed the push code image into each network interface in the network interface library and the ffmpeg streaming media push engine; wherein, each streaming media server corresponds to one push code image; The push module is used to send a push code image to the ffmpeg streaming media push engine through the network interface when the streaming media server needs to push video. The determination module is used by the ffmpeg streaming media push engine to determine whether to push video stream based on the push code image.

[0027] The working principle of the above technical solution is as follows: First, a push code image is specified for each streaming media server through the embedding module, and the push code image is embedded in each network interface in the network interface library and the ffmpeg streaming media push engine; wherein, each streaming media server corresponds to one push code image; then, when the streaming media server needs to push video, the push module sends the push code image to the ffmpeg streaming media push engine through the network interface; finally, the ffmpeg streaming media push engine uses the push code image to determine whether to push video.

[0028] The advantages of the above technical solution are as follows: This embodiment proposes a low-latency live streaming system based on the ffmpeg development library. It utilizes ffmpeg's encoding library and network interface library to encode images for self-pushing, allowing any streaming media server to receive and publish them with low latency. C++ is used to implement synchronous and asynchronous pipelined transport of formatted images in memory for encoding and pushing. This invention proposes a low-latency live streaming system based on the ffmpeg development library, which is based on open source and encapsulates APIs, integrating dynamic library calls to achieve low-latency live streaming on various platforms.

[0029] In one embodiment of the present invention, the embedded module includes: A specification module is used to specify a push code image for each streaming media server and the ffmpeg development library, and each streaming media server uniquely corresponds to a push code image. The interface extraction module is used to extract the network interface for data transmission between the streaming media server and the ffmpeg streaming media push engine. The first image sending module is used for the streaming media service to send the push code image to the network interface and the ffmpeg streaming media push engine; The storage module is used to save the push code image in the network interface and the ffmpeg streaming media push engine, and to store the correspondence between the push code image and the streaming media service and the network interface in the ffmpeg streaming media push engine.

[0030] The working principle of the above technical solution is as follows: First, a push code image for the ffmpeg development library is defined for each streaming media server by a defining module, and each streaming media server uniquely corresponds to one push code image; then, the network interface for data transmission between the streaming media server and the ffmpeg streaming media push engine is extracted using an interface extraction module; subsequently, the streaming media service is controlled by a first image sending module to send the push code image to the network interface and the ffmpeg streaming media push engine; finally, the network interface and the ffmpeg streaming media push engine are controlled by a storage module to save the push code image, and the correspondence between the push code image and the streaming media service and the network interface is stored in the ffmpeg streaming media push engine.

[0031] The above technical solution has the following effect: by directly recognizing the push code image instead of pushing the command, when the push code image is already embedded in the network interface and engine, there is no need to wait for the push command. The push code image is directly recognized and the push is connected according to the push requirements, which can effectively improve the efficiency of video push and reduce the latency of video push.

[0032] In one embodiment of the present invention, the push module includes: The extraction and sending module is used to extract the push code image and send it to the network interface when the streaming media server needs to push video. The consistency comparison module is used for the network interface to obtain the video streaming permission authentication of the streaming media server through the push code image recognition. When the push code image is compared with the push code image stored in the network interface, and it is determined that the streaming media server has video streaming permission when it is determined that the push code image sent by the streaming media server is consistent with the push code image stored in the network interface. The second image sending module is used to send the push code image to the ffmpeg streaming media push engine when the network interface determines that the streaming media server has video push permissions.

[0033] The working principle of the above technical solution is as follows: First, when the streaming media server needs to push video, the extraction and sending module extracts the push code image and sends it to the network interface. Then, the consistency comparison module controls the network interface to identify the streaming media server through the push code image for video push permission authentication. When the push code image is compared with the push code image stored in the network interface, and it is determined that the streaming media server has video push permission when the push code image sent by the streaming media server is consistent with the push code image stored in the network interface, the streaming media server is determined to have video push permission. Afterwards, when the network interface determines that the streaming media server has video push permission, the second image sending module sends the push code image to the ffmpeg streaming media push engine.

[0034] The above technical solution has the following effect: by directly recognizing the push code image instead of pushing the command, when the push code image is already embedded in the network interface and engine, there is no need to wait for the push command. The push code image is directly recognized and the push is connected according to the push requirements, which can effectively improve the efficiency of video push and reduce the latency of video push.

[0035] In one embodiment of the present invention, the determination module includes: The third image sending module is used to send the push code image to the ffmpeg streaming media push engine via the network interface. The authentication module is used by the ffmpeg streaming media push engine to obtain the streaming media server's video push permission authentication through push code image recognition. When the push code image is compared with the push code image stored in the ffmpeg streaming media push engine, and it is determined that the streaming media server has video push permission when it is determined that the push code image sent by the streaming media server is consistent with the push code image stored in the ffmpeg streaming media push engine. The streaming module is used to push video to the streaming server corresponding to the streaming code image through the network interface when the ffmpeg streaming media push engine determines that the streaming media server has video streaming permissions.

[0036] The working principle of the above technical solution is as follows: First, the third image sending module controls the network interface to send the push code image to the ffmpeg streaming media push engine; then, the authentication module controls the ffmpeg streaming media push engine to obtain the streaming media server's video push permission authentication through push code image recognition. When the push code image is compared with the push code image stored in the ffmpeg streaming media push engine, and it is determined that the streaming media server has video push permission when it is determined that the push code image sent by the streaming media server is consistent with the push code image stored in the ffmpeg streaming media push engine; finally, when the ffmpeg streaming media push engine determines that the streaming media server has video push permission, the push module uses the network interface to push video to the streaming media server corresponding to the push code image.

[0037] The above technical solution has the following effect: by directly recognizing the push code image instead of pushing the command, when the push code image is already embedded in the network interface and engine, there is no need to wait for the push command. The push code image is directly recognized and the push is connected according to the push requirements, which can effectively improve the efficiency of video push and reduce the latency of video push.

[0038] Obviously, those skilled in the art can make various modifications and variations to this invention without departing from its spirit and scope. Therefore, if these modifications and variations fall within the scope of the claims of this invention and their equivalents, this invention also intends to include these modifications and variations.

Claims

1. A low-latency live push streaming method, characterized by, The low-latency live streaming method includes: A push code image is created for each streaming media server, and the push code image is embedded in each network interface in the network interface library and the ffmpeg streaming media push engine; wherein, each streaming media server corresponds to one push code image; When the streaming media server needs to push video, it sends a push code image to the ffmpeg streaming media push engine through the network interface. The ffmpeg streaming media push engine determines whether to push video based on the push code image, including: The network interface sends the push code image to the ffmpeg streaming media push engine; The ffmpeg streaming media push engine obtains the streaming media server's video push permission authentication by recognizing the push code image. When the push code image is compared with the push code image stored in the ffmpeg streaming media push engine, and it is determined that the streaming media server has video push permission when it is determined that the push code image sent by the streaming media server is consistent with the push code image stored in the ffmpeg streaming media push engine. When the ffmpeg streaming media push engine determines that the streaming media server has video push permissions, it pushes the video to the streaming media server corresponding to the push code image through the network interface.

2. The low-latency live streaming method according to claim 1, characterized in that, A push code image is defined for each streaming media server, and the push code image is embedded into each network interface in the network interface library and the ffmpeg streaming media push engine, including: For each streaming media server, a unique push code image is created for the ffmpeg development library, and each streaming media server has a unique push code image. Extract the network interface for data transmission between the streaming media server and the ffmpeg streaming media push engine; The streaming media server sends the push code image to the network interface and the ffmpeg streaming media push engine. The network interface and the ffmpeg streaming media push engine store the push code image, and store the correspondence between the push code image and the streaming media server and the network interface in the ffmpeg streaming media push engine.

3. The low-latency live streaming method according to claim 1, characterized in that, When the streaming media server needs to push video, it sends a push code image to the ffmpeg streaming media push engine through the network interface, including: When the streaming media server needs to push video, it extracts the push code image and sends it to the network interface. The network interface obtains the video streaming permission authentication of the streaming media server by identifying the streaming code image. When the streaming code image is compared with the streaming code image stored in the network interface, and it is determined that the streaming media server has video streaming permission when it is determined that the streaming code image sent by the streaming media server is consistent with the streaming code image stored in the network interface. When the network interface determines that the streaming media server has video streaming permissions, it sends the streaming code image to the ffmpeg streaming media push engine.

4. A low-latency live streaming system, characterized in that, The low-latency live streaming system includes: An embedding module is used to define a push code image for each streaming media server and embed the push code image into each network interface in the network interface library and the ffmpeg streaming media push engine; wherein, each streaming media server corresponds to one push code image; The push module is used to send a push code image to the ffmpeg streaming media push engine through the network interface when the streaming media server needs to push video. The determination module is used by the ffmpeg streaming media push engine to determine whether to push video stream based on the push code image; The determination module includes: The third image sending module is used to send the push code image to the ffmpeg streaming media push engine via the network interface; The authentication module is used by the ffmpeg streaming media push engine to obtain the streaming media server's video push permission authentication through push code image recognition. When the push code image is compared with the push code image stored in the ffmpeg streaming media push engine, and it is determined that the streaming media server has video push permission when it is determined that the push code image sent by the streaming media server is consistent with the push code image stored in the ffmpeg streaming media push engine. The streaming module is used to push video to the streaming server corresponding to the streaming code image through the network interface when the ffmpeg streaming media push engine determines that the streaming media server has video streaming permissions.

5. The low-latency live streaming system according to claim 4, characterized in that, The embedded module includes: A module is defined to specify the push code image for each streaming media server using the ffmpeg development library, and each streaming media server has a unique push code image. The interface extraction module is used to extract the network interface for data transmission between the streaming media server and the ffmpeg streaming media push engine. The first image sending module is used by the streaming media server to send the push code image to the network interface and the ffmpeg streaming media push engine. The storage module is used to save the push code image in the network interface and the ffmpeg streaming media push engine, and to store the correspondence between the push code image and the streaming media server and the network interface in the ffmpeg streaming media push engine.

6. The low-latency live streaming system according to claim 4, characterized in that, The push module includes: The extraction and sending module is used to extract the push code image and send it to the network interface when the streaming media server needs to push video. The consistency comparison module is used for the network interface to obtain the video streaming permission authentication of the streaming media server through the push code image recognition. When the push code image is compared with the push code image stored in the network interface, and it is determined that the streaming media server has video streaming permission when it is determined that the push code image sent by the streaming media server is consistent with the push code image stored in the network interface. The second image sending module is used to send the push code image to the ffmpeg streaming media push engine when the network interface determines that the streaming media server has video push permissions.

Citation Information

Patent Citations

  • Two-dimension code authentication system and method based on CBS signature mechanism

    CN104320253A

  • Method for sending key information, method for receiving key information, server and computer device

    CN108235074A