Video generation method, device, medium and equipment supporting multi-protocol video live broadcast

By generating index files and live files, the same domain name and the same server support three video live protocols: HLS, FLV and RTMP, which solves the problem of video screen jump in the live video system, improves user experience and simplifies operational configuration.

CN115052167BActive Publication Date: 2025-02-28BEIJING XINLIU WANLIAN NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210254824.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-15
Publication Date
2025-02-28
Estimated Expiration
2042-03-15

AI Technical Summary

Technical Problem

The existing live video broadcasting system is difficult to support three playback protocols: HTTP-HLS, HTTP-FLV and RTMP at the same time, resulting in the possibility of jumping and incoherence of video screens when the client watches live broadcast, affecting the user experience.

Method used

By generating index files and live files, searching live files based on the index files or accessing the source site to obtain live videos, the same domain name and the same server support the broadcast of three protocols: HLS, FLV and RTMP.

Benefits of technology

The broadcast content of the three broadcast protocols has been realized, which avoids the problem of broadcast jumps, saves the return-to-source bandwidth, and simplifies operational configuration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 00000000_0000_ABST
    Figure 00000000_0000_ABST
Patent Text Reader

Abstract

The present application discloses a video generation method, device, computer-readable storage medium and electronic device that support multi-protocol video live broadcast. According to the video information of the source station, an index file and a live broadcast file are first generated; then the live broadcast file is searched based on the index file, or the source station is accessed to obtain the live broadcast video, so that the same domain name and the same server support the broadcast of three protocols: HLS, FLV and RTMP, so as to ensure that the customer has only one copy of the live broadcast content pushed to its own source station, that is, the broadcast content of the three broadcast protocols is unified, which can avoid the problem of broadcast jump, save the return bandwidth and simplify the operation configuration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of video live broadcast technology, and specifically to a video generation method, device, computer-readable storage medium and electronic device that support multi-protocol video live broadcast. Background Art

[0002] There are currently three popular video playback protocols for live streaming: HTTP-HLS, HTTP-FLV, and RTMP. The first two use the basic HTTP protocol to transmit content, but the video encapsulation formats of the corresponding content are different. RTMP is a new video playback format based on UDP protocol transmission proposed to reduce live streaming latency.

[0003] In order to attract customers, mainstream video production manufacturers generally support the above three live broadcast protocols, which requires video live broadcast acceleration manufacturers to also support services simultaneously. The mainstream way for acceleration manufacturers to support the three protocols is generally: HLS is a playback domain name, and FLV / RTMP is another different playback domain name (different server groups). The reason for configuring two different domain names is mainly to solve the problem of video screen jumping and discontinuity that may occur when watching live broadcasts using the HLS protocol on the client. This phenomenon occurs during the live broadcast process. Due to the switching of the live broadcast server, the video screen viewed is inconsistent, affecting the user experience. Summary of the invention

[0004] In order to solve the above technical problems, the present application is proposed. The embodiments of the present application provide a video generation method, device, computer-readable storage medium and electronic device supporting multi-protocol video live broadcast, which solve the above problems.

[0005] According to one aspect of the present application, a video generation method supporting multi-protocol video live broadcast is provided, including: generating an index file and a live broadcast file based on video information of a source station; wherein the live broadcast file stores time segments of the video information, and the index file stores an access list for accessing the live broadcast file; and searching for the live broadcast file based on the index file, or accessing the source station to obtain the live video.

[0006] In one embodiment, generating the index file and the live broadcast file according to the live broadcast video of the source station includes: generating the live broadcast files of multiple definition and the corresponding index files according to the live broadcast video of the source station.

[0007] In one embodiment, searching for the live broadcast file based on the index file, or accessing the source station to obtain the live broadcast video includes: searching for the live broadcast file based on the index file, or accessing the source station to obtain the live broadcast video according to a playback protocol.

[0008] In one embodiment, before searching the live broadcast file based on the index file according to the playback protocol, or accessing the source station to obtain the live broadcast video, the video generation method also includes: obtaining the playback protocol; wherein the playback protocol includes: adaptive bitrate streaming media transmission protocol, fast streaming media transmission protocol, and real-time message transmission protocol.

[0009] In one embodiment, searching for the live broadcast file based on the index file or accessing the source station to obtain the live video according to the playback protocol includes: when the playback protocol is the adaptive bit rate streaming media transmission protocol, obtaining the index file and the live broadcast file through the first software.

[0010] In one embodiment, searching for the live broadcast file based on the index file or accessing the source station to obtain the live broadcast video according to the playback protocol includes: when the playback protocol is the fast streaming media transmission protocol, requesting the second software through the internal port conversion of the first software, and the second software accessing the source station to obtain the live broadcast video.

[0011] In one embodiment, searching the live broadcast file based on the index file or accessing the source station to obtain the live broadcast video according to the playback protocol includes: when the playback protocol is the real-time messaging protocol, accessing the source station through a second software to obtain the live broadcast video.

[0012] According to another aspect of the present application, a video generation device supporting multi-protocol video live broadcast is provided, including: a file generation module, used to generate an index file and a live broadcast file according to video information of a source station; wherein the live broadcast file stores a time segment of the video information, and the index file stores an access list for accessing the live broadcast file; and a video acquisition module, used to search for the live broadcast file based on the index file, or access the source station to obtain the live video.

[0013] According to another aspect of the present application, a computer-readable storage medium is provided, wherein the storage medium stores a computer program, and the computer program is used to execute any of the above-mentioned video generation methods supporting multi-protocol video live broadcast.

[0014] According to another aspect of the present application, an electronic device is provided, comprising: a processor; a memory for storing instructions executable by the processor; and the processor is used to execute any of the above-described video generation methods supporting multi-protocol video live broadcast.

[0015] The present application provides a video generation method, device, computer-readable storage medium and electronic device that support multi-protocol video live broadcast. According to the video information of the source station, an index file and a live broadcast file are first generated; then the live broadcast file is searched based on the index file, or the source station is accessed to obtain the live video, so that the same domain name and the same server support the broadcast of three protocols: HLS, FLV and RTMP, to ensure that the customer has only one copy of the live broadcast content pushed to its own source station, that is, the broadcast content of the three broadcast protocols is unified, which can not only avoid the problem of broadcast jump, but also save the return bandwidth and simplify the operation configuration. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] By describing the embodiments of the present application in more detail in conjunction with the accompanying drawings, the above and other purposes, features and advantages of the present application will become more apparent. The accompanying drawings are used to provide a further understanding of the embodiments of the present application and constitute a part of the specification. Together with the embodiments of the present application, they are used to explain the present application and do not constitute a limitation of the present application. In the accompanying drawings, the same reference numerals generally represent the same components or steps.

[0017] Figure 1 It is a flowchart of a video generation method supporting multi-protocol video live broadcast provided by an exemplary embodiment of the present application.

[0018] Figure 2 It is a flowchart of a video generation method supporting multi-protocol video live broadcast provided by another exemplary embodiment of the present application.

[0019] Figure 3 It is a schematic diagram of the principle structure of a video generation method supporting multi-protocol video live broadcast provided by an exemplary embodiment of the present application.

[0020] Figure 4 It is a structural diagram of a video generation device supporting multi-protocol video live broadcast provided by an exemplary embodiment of the present application.

[0021] Figure 5 It is a structural diagram of a video generation device supporting multi-protocol video live broadcast provided by another exemplary embodiment of the present application.

[0022] Figure 6 It is a structural diagram of an electronic device provided by an exemplary embodiment of the present application. DETAILED DESCRIPTION

[0023] Below, the exemplary embodiments according to the present application will be described in detail with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments of the present application, and it should be understood that the present application is not limited to the exemplary embodiments described here.

[0024] Figure 1FIG. 1 is a flow chart of a video generation method supporting multi-protocol video live broadcast provided by an exemplary embodiment of the present application. Figure 1 As shown, the video generation method includes the following steps:

[0025] Step 110: Generate an index file and a live broadcast file according to the video information of the source station.

[0026] The live broadcast file stores the time segment of the video information, and the index file stores the access list for accessing the live broadcast file.

[0027] There are three playback protocols for live broadcasting technology: HLS, RTMP, and FLV. The most commonly used protocol on current live broadcasting platforms is the HLS protocol. HLS, or Http Live Streaming, is an HTTP-based streaming media transmission protocol proposed by Apple. This means that users who watch live broadcasts can directly open and play them in a browser through a link without installing any independent software. The HLS protocol consists of two parts: an index file and a live broadcast file. The index file (m3u8) stores the access list of the live broadcast file (ts file). The live broadcast file (ts file) is a group of files that store video time slices. Live broadcast files usually have 3 to 5 time slices, and each one is played for about 5 seconds.

[0028] Generally, live streaming generates corresponding ts playback time slices in real time according to the client's push stream. When the number of files is reached (for example, 3 slices), the corresponding m3u8 index file is generated in real time to publish the corresponding live content. Different servers have different playback progress, which may lead to inconsistency between the cut ts and its m3u8 file content, resulting in the phenomenon of jumping of the playback screen.

[0029] RTMP, or Real Time Messaging Protocol, is a protocol proposed by Adobe specifically for Flash players. FLV, or Flash Video, is another video format proposed by Adobe, and is also based on HTTP transmission. RTMP and FLV store the latest live content in the server's memory rather than in files, so they can maintain consistency with the source site.

[0030] Therefore, this application generates index files and live broadcast files in real time from the video information of the source station and stores them in its own source station, so that the live broadcast files stored in its own source station are consistent with the live video content of the source station, thereby ensuring the consistency of the progress of the live broadcast content and avoiding the jumping phenomenon of the broadcast screen.

[0031] In one embodiment, the specific implementation of step 110 may be: generating a plurality of live files of different resolutions and corresponding index files according to the live video of the source station. In order to meet the broadcasting requirements of users with different resolutions, the present application may generate a plurality of live files of different resolutions and corresponding index files when storing live files and index files in its own source station to meet the different requirements of different users.

[0032] Step 120: Search for the live broadcast file based on the index file, or access the source station to obtain the live broadcast video.

[0033] Specifically, according to the playback protocol, the live broadcast file is searched based on the index file, or the source station is accessed to obtain the live video. After obtaining the index file and the live broadcast file, according to the live broadcast requirements and the broadcast protocol followed by the live broadcast, the live broadcast file stored in the own source station is selected or the video source station is directly accessed to obtain the live video, thereby ensuring the coherence and consistency of the live broadcast video.

[0034] The present application provides a video generation method that supports multi-protocol video live broadcast. According to the video information of the source station, an index file and a live broadcast file are first generated; then, according to the playback protocol, the live broadcast file is searched based on the index file, or the source station is accessed to obtain the live video, thereby achieving the same domain name and the same server supporting the broadcast of three protocols: HLS, FLV and RTMP, to ensure that the customer has only one copy of the live broadcast content pushed to its own source station, that is, unifying the broadcast content of the three broadcast protocols, which can not only avoid the problem of broadcast jumps, but also save the return bandwidth and simplify the operation configuration.

[0035] Figure 2 FIG. 1 is a flow chart of a video generation method supporting multi-protocol video live broadcast provided by another exemplary embodiment of the present application. Figure 2 As shown, before step 120, the video generation method may further include:

[0036] Step 130: Obtain the playback protocol.

[0037] Among them, the playback protocols include: adaptive bitrate streaming media transmission protocol, fast streaming media transmission protocol, and real-time message transmission protocol. After the live broadcast file and index file are generated, live broadcast can be realized. At this time, the broadcast protocol adopted by the user can be obtained in real time, and the corresponding live broadcast method can be adopted according to the specific broadcast protocol to improve the efficiency and effect of live broadcast.

[0038] Specifically, Figure 3As shown, when the playback protocol is an adaptive bitrate streaming media transmission protocol, the index file and the live broadcast file are obtained through the first software (B layer-M layer-T layer-own source station-shared resources); among them, the ts file can store 1 hour of video to aggregate the access to the same ts piece at the edge, thereby alleviating the storage pressure, and the m3u8 file is not cached, but is transmitted through to the access file of the shared resource to avoid inconsistent access to the video file.

[0039] In one embodiment, if Figure 3 As shown, when the playback protocol is a fast streaming media transmission protocol, the internal port conversion of the first software requests the second software, and the second software accesses the source station to obtain the live video.

[0040] In one embodiment, if Figure 3 As shown, when the playback protocol is a real-time message transmission protocol, the source station is accessed through the second software to obtain the live video.

[0041] Figure 4 FIG. 1 is a schematic diagram of a video generation device supporting multi-protocol video live broadcast provided by an exemplary embodiment of the present application. Figure 4 As shown, the video generating device 40 includes: a file generating module 41, which is used to generate an index file and a live broadcast file according to the video information of the source station; wherein the live broadcast file stores the time segment of the video information, and the index file stores the access list for accessing the live broadcast file; and a video acquisition module 42, which is used to search for the live broadcast file based on the index file, or access the source station to obtain the live video.

[0042] The present application provides a video generation device that supports multi-protocol video live broadcast. The file generation module 41 first generates an index file and a live broadcast file based on the video information of the source station. Then the video acquisition module 42 searches for the live broadcast file based on the index file, or accesses the source station to obtain the live video, thereby achieving the same domain name and the same server supporting the broadcast of three protocols: HLS, FLV and RTMP, to ensure that the customer has only one copy of the live broadcast content pushed to its own source station, that is, unifying the broadcast content of the three broadcast protocols, which can not only avoid the problem of broadcast jumps, but also save back-to-source bandwidth and simplify operational configuration.

[0043] In one embodiment, the file generation module 41 may be further configured to generate live broadcast files of multiple definition levels and corresponding index files according to the live broadcast video of the source station.

[0044] In one embodiment, the video acquisition module 42 may be further configured to: search for a live broadcast file based on an index file according to a playback protocol, or access a source station to acquire a live broadcast video.

[0045] Figure 5FIG. 1 is a schematic diagram of the structure of a video generation device supporting multi-protocol video live broadcast provided by another exemplary embodiment of the present application. Figure 5 As shown, the video generating device 40 may further include: a protocol acquisition module 43, for acquiring a playback protocol; wherein the playback protocol includes: an adaptive bit rate streaming media transmission protocol, a fast streaming media transmission protocol, and a real-time message transmission protocol.

[0046] In one embodiment, the video acquisition module 42 may be further configured to: when the playback protocol is an adaptive bit rate streaming media transmission protocol, acquire the index file and the live broadcast file through the first software.

[0047] In one embodiment, the video acquisition module 42 may be further configured to: when the playback protocol is a fast streaming media transmission protocol, request the second software through the internal port conversion of the first software, and the second software accesses the source station to obtain the live video.

[0048] In one embodiment, the video acquisition module 42 may be further configured to: when the playback protocol is a real-time message transmission protocol, access the source station through the second software to acquire the live video.

[0049] Below, reference Figure 6 The electronic device according to the embodiment of the present application is described. The electronic device may be any one or both of the first device and the second device, or a stand-alone device independent of them, and the stand-alone device may communicate with the first device and the second device to receive the collected input signal from them.

[0050] Figure 6 A block diagram of an electronic device according to an embodiment of the present application is illustrated.

[0051] like Figure 6 As shown, the electronic device 10 includes one or more processors 11 and a memory 12 .

[0052] The processor 11 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in the electronic device 10 to perform desired functions.

[0053] The memory 12 may include one or more computer program products, and the computer program product may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. The non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on the computer-readable storage medium, and the processor 11 may run the program instructions to implement the video generation method supporting multi-protocol video live broadcast of the various embodiments of the present application described above and / or other desired functions. Various contents such as input signals, signal components, noise components, etc. may also be stored in the computer-readable storage medium.

[0054] In one example, the electronic device 10 may further include: an input device 13 and an output device 14, and these components are interconnected via a bus system and / or other forms of connection mechanisms (not shown).

[0055] When the electronic device is a stand-alone device, the input device 13 may be a communication network connector, which is used to receive the collected input signals from the first device and the second device.

[0056] In addition, the input device 13 may also include, for example, a keyboard, a mouse, and the like.

[0057] The output device 14 can output various information to the outside, including determined distance information, direction information, etc. The output device 14 can include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto, and the like.

[0058] Of course, to simplify, Figure 6 Only some of the components related to the present application in the electronic device 10 are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, according to specific application situations, the electronic device 10 may also include any other appropriate components.

[0059] In addition to the above-mentioned methods and devices, an embodiment of the present application may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the video generation method supporting multi-protocol video live broadcast according to various embodiments of the present application described in the above-mentioned "Exemplary Method" section of this specification.

[0060] The computer program product may be written in any combination of one or more programming languages ​​to write program codes for performing the operations of the embodiments of the present application, including object-oriented programming languages, such as Java, C++, etc., and conventional procedural programming languages, such as "C" language or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as an independent software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0061] In addition, an embodiment of the present application may also be a computer-readable storage medium having computer program instructions stored thereon, which, when executed by a processor, enables the processor to execute the steps of a video generation method supporting multi-protocol video live broadcast according to various embodiments of the present application described in the above “Exemplary Method” section of this specification.

[0062] The computer readable storage medium can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0063] The basic principles of the present application are described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, effects, etc. mentioned in the present application are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. are required by each embodiment of the present application. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, not for limitation, and the above details do not limit the present application to being implemented by adopting the above specific details.

[0064] The block diagrams of the devices, apparatuses, equipment, and systems involved in this application are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagram. As will be appreciated by those skilled in the art, these devices, apparatuses, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including", "comprising", "having", etc. are open words, referring to "including but not limited to", and can be used interchangeably with them. The words "or" and "and" used here refer to the words "and / or" and can be used interchangeably with them, unless the context clearly indicates otherwise. The words "such as" used here refer to the phrase "such as but not limited to", and can be used interchangeably with them.

[0065] It should also be noted that in the apparatus, device and method of the present application, each component or each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the present application.

[0066] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present application. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the present application. Therefore, the present application is not intended to be limited to the aspects shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

[0067] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present application to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.

Claims

1. A video generation method supporting multi-protocol video live broadcast, characterized in that: include: Generate live broadcast files of three protocols: HLS, FLV and RTMP based on the video information of the source station; Among them, HLS live broadcast files are uniformly stored in shared resources; When playing the HLS live broadcast file, obtaining a time segment of video information within a time range and a corresponding index file through the first software; wherein the live broadcast file stores the time segment of the video information, and the index file stores an access list for accessing the live broadcast file; and searching for the live broadcast file based on the index file; When playing the FLV live broadcast file, the second software accesses the client source station or the own source station to obtain the live video, and requests the second software through the internal port conversion of the first software at the playback layer; When playing the RTMP live broadcast file, access the client source station or the own source station through the second software to obtain the live video; The first software and the second software are deployed on the same server.

2. The video generation method according to claim 1, characterized in that: The generating of the index file and the live broadcast file according to the live broadcast video of the source station includes: Based on the live video of the source station, the live files of multiple definition and the corresponding index files are generated.

3. The video generation method according to claim 1, characterized in that: The searching the live broadcast file based on the index file, or accessing the source station to obtain the live broadcast video includes: According to the playback protocol, the live broadcast file is searched based on the index file, or the source station is accessed to obtain the live broadcast video.

4. A computer-readable storage medium storing a computer program, wherein the computer program is used to execute the video generation method supporting multi-protocol video live broadcast described in any one of claims 1-3.

5. An electronic device, comprising: processor; a memory for storing instructions executable by the processor; The processor is used to execute the video generation method supporting multi-protocol video live broadcast described in any one of claims 1-3 above.

Citation Information

Patent Citations

  • Live stream slicing method, device and system

    CN109787983A

  • Media playing method and system supporting multiple streaming media transmission protocols

    CN113727189A