Live video data output method and device, processor and storage medium

By segmenting the live video stream of live video data and determining the starting frame data, and outputting the live video data segments, the problem of high video live video delay caused by the HLS protocol is solved, and the effect of reducing latency and improving user experience is achieved.

CN119835461APending Publication Date: 2025-04-15CHINA TELECOM ARTIFICIAL INTELLIGENCE TECHNOLOGY (BEIJING) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411978477.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-30
Publication Date
2025-04-15

AI Technical Summary

Technical Problem

In the existing live video technology, the HLS protocol leads to high delay in live video, slow player broadcasting, and poor user experience.

Method used

By segmenting the video live data stream, the start frame data in multiple video live data segments are determined, and the corresponding video live data segment is output based on the start frame data.

Benefits of technology

Reduces the delay in live video broadcasting, improves the player's playback speed, and improves the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119835461A_ABST
    Figure CN119835461A_ABST
Patent Text Reader

Abstract

The invention discloses a live video data output method and device, a processor and a storage medium. The method comprises the following steps: acquiring a video live broadcast data stream to be output; segmenting the video live broadcast data stream into a plurality of video live broadcast data fragments; starting frame data in the multiple live video data fragments are determined, and the starting frame data are used for indicating first frame data to be output from the live video data fragments; and outputting the corresponding live video data fragment based on the initial frame data. The technical problem of high video live broadcast delay is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of video live broadcast technology, and in particular to a method, device, processor and storage medium for outputting video live broadcast data. Background Art

[0002] At present, low latency in live video means that when live video is broadcast, the time delay between video signal transmission and reception is small, and the audience can see the images and sounds of the host or the event site in almost real time. This low-latency live video technology has important applications in many fields, such as live sports events, online education, and online conferences. With the popularization of mobile Internet and the rapid development of the live broadcast industry, users have higher and higher requirements for live video, hoping to interact with the host in time when watching live broadcasts. Therefore, low-latency live video technology is needed to meet user needs.

[0003] Under normal circumstances, most live video broadcasts are conducted using the Hypertext Transfer Protocol Dynamic Adaptive Streaming Media Transfer Protocol (HTTP Live Streaming, abbreviated as HLS). However, since the HLS protocol is divided into index files and slice files, the player must first request the index file and then request the slice file to start playing. According to the HLS protocol standard, the server must complete the slice before updating the index file. Compared with other streaming live broadcast protocols, there is a higher overall delay, the player starts slowly, and the user experience is poor. Therefore, there is a technical problem of high delay in live video broadcasts.

[0004] Currently, no effective solution has been proposed for the above-mentioned technical problem of high latency in live video streaming. Summary of the invention

[0005] The embodiments of the present invention provide a method, device, processor and storage medium for outputting live video data, so as to at least solve the technical problem of high delay in live video.

[0006] According to one aspect of an embodiment of the present invention, a method for outputting live video data is provided. The method may include: obtaining a live video data stream to be output; dividing the live video data stream into a plurality of live video data segments; respectively determining starting frame data in the plurality of live video data segments, wherein the starting frame data is used to indicate the first frame data to be output from the live video data segment; and outputting the corresponding live video data segment based on the starting frame data.

[0007] Optionally, the live video data stream is divided into a plurality of live video fragment data segments, including: obtaining slicing time data corresponding to the live video data stream, wherein the slicing time data is used to indicate the time interval for slicing the live video data stream; and dividing the live video data stream into a plurality of live video data segments according to the slicing time data.

[0008] Optionally, determining the starting frame data in a plurality of live video data segments includes: obtaining identification information of the starting frame data, wherein the identification information is used to identify the starting frame data; and extracting the starting frame data from the live video data segments based on the identification information.

[0009] Optionally, based on the starting frame data, outputting the video live data segment corresponding to the video live data segment includes: obtaining an output strategy, wherein the output strategy is used to indicate a rule for outputting the video live data segment; and outputting the video live data segment according to the output strategy and the starting frame data.

[0010] Optionally, the method for outputting live video data further includes: in response to the time data corresponding to the live video data stream being less than the slice time data, outputting the live video data stream to a player.

[0011] Optionally, the method for outputting live video data further includes: obtaining the output data length, wherein the output data length is used to indicate the length of the output data of the output device; in response to the data length corresponding to the live video data segment being less than the output data length, maintaining the output channel for outputting the live video data segment in a normal output state.

[0012] According to another aspect of an embodiment of the present invention, a device for outputting live video data is also provided. The device may include: an acquisition unit, used to acquire a live video data stream to be output; a segmentation unit, used to segment the live video data stream into a plurality of live video data segments; a determination unit, used to respectively determine the starting frame data in the plurality of live video data segments, wherein the starting frame data is used to indicate the first frame data to be output from the live video data segment; and an output unit, used to output the corresponding live video data segment based on the starting frame data.

[0013] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored program, wherein when the program is executed by a processor, the device where the storage medium is located is controlled to execute the method for outputting live video data in an embodiment of the present invention.

[0014] According to another aspect of an embodiment of the present invention, a processor is further provided. The processor is used to run a program, wherein when the program is run, the method for outputting live video data in an embodiment of the present invention is executed.

[0015] According to another aspect of the embodiment of the present invention, a computer program product is also provided, which includes computer instructions, and when the computer instructions are executed by a processor, the method for outputting live video data in the embodiment of the present invention is implemented.

[0016] In an embodiment of the present invention, a video live data stream to be output is obtained; the video live data stream is divided into a plurality of video live data segments; the starting frame data in the plurality of video live data segments are respectively determined, wherein the starting frame data is used to indicate the first frame data to be output from the video live data segment; and the corresponding video live data segment is output based on the starting frame data. That is to say, the embodiment of the present invention determines a plurality of video live data segments by dividing the video live data stream, thereby determining the starting frame data in each video live data segment, and then outputting the corresponding video live data segment according to the starting frame data. Since the embodiment of the present invention solves the technical problem of high video live delay by dividing the video live data stream and outputting the video live data according to the starting frame data, the technical effect of reducing the video live delay is achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of this application. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0018] Figure 1 is a flow chart of a method for outputting live video data according to an embodiment of the present invention;

[0019] Figure 2 is a schematic diagram of a solution for instantly starting live video broadcast based on the HLS protocol according to an embodiment of the present invention;

[0020] Figure 3 is a schematic diagram of a packaging method according to an embodiment of the present invention;

[0021] Figure 4 It is a schematic diagram of a device for outputting live video data according to an embodiment of the present invention. DETAILED DESCRIPTION

[0022] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0023] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, functional component or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, functional components or devices.

[0024] According to an embodiment of the present invention, an embodiment of a method for outputting live video data is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0025] Figure 1 is a flow chart of a method for outputting live video data according to an embodiment of the present invention. Figure 1 As shown, the method may include the following steps:

[0026] Step S101, obtaining the live video data stream to be output.

[0027] In the technical solution provided in the above step S101 of the present invention, the live video data stream may also be referred to as a live video stream.

[0028] In this embodiment, the live video data stream to be output is obtained. For example, the live video data stream to be output is obtained according to the corresponding interface. This is only an example and does not limit the specific method of obtaining the live video data to be output.

[0029] Step S102, dividing the live video data stream into a plurality of live video data segments.

[0030] In the technical solution provided in the above step S102 of the present invention, the live video data segment may also be referred to as a video segment or a slice.

[0031] In this embodiment, after the live video data stream to be output is obtained in step S101, the live video data stream is divided into a plurality of live video data segments. For example, the live video data stream is divided into a plurality of live video data segments at fixed time intervals. This is only an example and does not limit the specific method of dividing the live video data stream.

[0032] For example, the slices are divided according to fixed time intervals instead of being divided according to a group of pictures (GOP).

[0033] Optionally, when the slices are divided at fixed time intervals, it can be ensured that the size of each slice is relatively small. When the slices are downloaded by the client, the slices are small and the download speed is fast, thereby improving the start-up speed.

[0034] Step S103, respectively determine the starting frame data in a plurality of live video data segments.

[0035] In the technical solution provided in the above step S103 of the present invention, the start frame data is used to indicate the first frame data to be output from the live video data segment. The start frame data may also be referred to as an I frame.

[0036] In this embodiment, after the live video data stream is divided into a plurality of live video data segments in step S102, the start frame data in the plurality of live video data segments are respectively determined. For example, the start frame data in the live video data segments are distinguished in the programming logic, so as to determine the start frame data in the plurality of live video data segments. This is only an illustrative example, and does not limit the specific method for determining the start frame data in the plurality of live video data segments.

[0037] Optionally, since it is necessary to solve the problem that the first frame of the slice obtained by the player may not be an I frame, which may cause the player to fail to decode and play a distorted screen or a black screen, it is necessary to determine the starting frame data in multiple video live data segments.

[0038] For example, each slice is logically distinguished as an I frame or a non-I frame, and within the HLS index file, the slice whose first frame is kept as an I frame is always the first item in the tag index file of the Hypertext Transfer Protocol Live Streaming (HLS) standard.

[0039] Step S104: output the corresponding live video data segment based on the starting frame data.

[0040] In the technical solution provided by the above step S104 of the present invention, after determining the starting frame data in the plurality of live video data segments in step S103, the corresponding live video data segments are output according to the starting frame data.

[0041] In this embodiment, the corresponding live video data segment is output according to the start frame data. For example, the corresponding live video data segment is output through a player, which is only an exemplary example and does not limit the specific method of outputting the corresponding live video data segment.

[0042] For example, the HLS standard tag #EXT-X-START:TIME-OFFSET=0 instructs the player to always play from the first segment, thereby avoiding decoding failure problems.

[0043] Optionally, generating live video data segments based on the start frame data can reduce the amount of data transmission, save bandwidth resources, and improve data transmission efficiency.

[0044] It should be noted that the above embodiments can be executed by an output device for live video data.

[0045] In the above steps S101 to S104 of the present invention, a video live data stream to be output is obtained; the video live data stream is divided into a plurality of video live data segments; the starting frame data in the plurality of video live data segments are respectively determined, wherein the starting frame data is used to indicate the first frame data to be output from the video live data segment; and the corresponding video live data segment is output based on the starting frame data. That is to say, the embodiment of the present invention determines a plurality of video live data segments by dividing the video live data stream, thereby determining the starting frame data in each video live data segment, and then outputting the corresponding video live data segment according to the starting frame data. Since the embodiment of the present invention solves the technical problem of high video live delay by dividing the video live data stream and outputting the video live data according to the starting frame data, the technical effect of reducing the video live delay is achieved.

[0046] The above method of this embodiment is further introduced below.

[0047] As an optional implementation method, the live video data stream is divided into multiple live video fragment data segments, including: obtaining slicing time data corresponding to the live video data stream, wherein the slicing time data is used to indicate the time interval for slicing the live video data stream; according to the slicing time data, the live video data stream is divided into multiple live video data segments.

[0048] In this embodiment, the slice time data corresponding to the live video data stream is obtained, wherein the slice time data may be pre-set time data, so that the live video data stream is divided into a plurality of live video data segments according to the slice time data.

[0049] Optionally, the present invention uses slice time data to segment the live video data stream, that is, the present invention segments the slices according to fixed time intervals, rather than segmenting the slices according to a GOP. When the fixed time intervals are used to segment the slices, it can be ensured that the size of each slice is relatively small. When the client downloads the slices, the slices are small and the download speed is fast, thereby improving the start speed.

[0050] As an optional implementation method, determining the starting frame data in multiple live video data segments includes: obtaining identification information of the starting frame data, wherein the identification information is used to identify the starting frame data; and extracting the starting frame data from the live video data segment based on the identification information.

[0051] In this embodiment, the identification information of the start frame data is obtained. For example, by checking the data packets in the live video data stream, the characteristics of the start frame data are found. These characteristics can be a specific byte sequence, a specific data format, or other unique identification information. This is only an illustrative example, and the specific content of the identification information of the start frame data is not limited.

[0052] Optionally, after obtaining the identification information of the starting frame data, the starting frame data is extracted from the live video data segment according to the identification information.

[0053] Optionally, the frame type is determined by checking the frame header information or mark of the frame, so that the video slices are divided into key slices containing I frames and non-key slices containing non-I frames. The quality and decoding efficiency of the video can be better controlled, and the transmission and playback performance of the video can be improved.

[0054] As an optional implementation method, outputting a video live data segment based on starting frame data includes: obtaining an output strategy corresponding to the video live data segment, wherein the output strategy is used to indicate a rule for outputting the video live data segment; and outputting the video live data segment according to the output strategy and starting frame data.

[0055] In this embodiment, the output strategy is obtained, so that the live video data segment is output according to the output strategy and the starting frame data. For example, the output strategy is determined by obtaining the tag of the HLS standard. This is only an illustrative example and does not limit the specific method of obtaining the output strategy.

[0056] For example, the output strategy is determined by the HLS standard tag #EXT-X-START:TIME-OFFSET=0, that is, the output strategy is that the player always plays from the first slice. Thus, the live video data segment is output according to the output strategy.

[0057] Optionally, outputting data segments according to an output strategy can avoid unnecessary data redundancy and reduce consumption of bandwidth and storage space.

[0058] As an optional implementation manner, the method for outputting live video data further includes: in response to the time data corresponding to the live video data stream being less than the slice time data, outputting the live video data stream to a player.

[0059] In this embodiment, when the time data corresponding to the live video data stream is less than the sliced ​​time data, it means that the time of the live video data stream is short and does not need to be segmented. Based on this, the live video data stream is directly output to the player.

[0060] For example, at the beginning of slice generation, the slice information is updated to the HLS index file, and the player can initiate a request for the slice file in advance and establish a Hypertext Transfer Protocol (http) link in advance, that is, output the live video data stream in advance.

[0061] Optionally, since the time data corresponding to the live video data stream is smaller than the sliced ​​time data, the player can receive and play the video data faster, reducing delays and freezes.

[0062] As an optional implementation manner, the method for outputting live video data also includes: obtaining the output data length, wherein the output data length is used to indicate the length of the output data of the output device; in response to the data length corresponding to the live video data segment being less than the output data length, maintaining the output channel for outputting the live video data segment in a normal output state.

[0063] In this embodiment, the output data length is obtained, and the data length corresponding to the live video data segment is compared with the output data length. When the data length corresponding to the live video data segment is less than the output data length, it means that the server side requests live video data, but there is no live video data in the request queue at this time. Based on this, the output channel is kept in a normal output state. When live video data is input into the request queue, the input live video data can be directly output.

[0064] Optionally, the player may request a slice file that has not been generated in advance. At this time, because the file has not been generated, the server will usually report a 404 error, resulting in a high delay in the output of the live video data. Based on this, when the slice server is generating slices, the present invention needs to maintain the request after the request comes in, and according to the processing of the second point, whenever a set of link data (such as moof+mdat) is generated, this set of data is sent to the player. At this time, generation, transmission and playback are achieved, which can significantly reduce player delay.

[0065] It should be noted that the above embodiments can be executed by an output device for live video data.

[0066] In this embodiment, a video live data stream to be output is obtained; the video live data stream is divided into a plurality of video live data segments; the starting frame data in the plurality of video live data segments are respectively determined, wherein the starting frame data is used to indicate the first frame data to be output from the video live data segment; and the corresponding video live data segment is output based on the starting frame data. That is to say, the embodiment of the present invention determines a plurality of video live data segments by dividing the video live data stream, thereby determining the starting frame data in each video live data segment, and then outputting the corresponding video live data segment according to the starting frame data. Since the embodiment of the present invention solves the technical problem of high video live delay by dividing the video live data stream and outputting the video live data according to the starting frame data, the technical effect of reducing the video live delay is achieved.

[0067] The technical solution of the embodiment of the present invention is illustrated below in conjunction with preferred implementation modes.

[0068] At present, low latency in live video means that during live video, the time from signal transmission to the time the audience receives the signal is as short as possible. Low latency is very important in live video. Low latency can improve user experience. When watching live video, the audience hopes to see the latest content in time, but high latency will cause a certain gap between the content seen by the audience and the actual time, which reduces the user experience.

[0069] At the same time, low latency can improve interactivity. Many live video platforms provide interactive functions, and viewers can interact with the anchor through comments, likes, etc. If the latency is too high, it will make it difficult for viewers and anchors to interact, affecting user engagement.

[0070] In addition, low latency can also improve the real-time performance of live broadcasts. In some important live broadcast scenarios, such as sports events and news reports, real-time performance is very important. Low latency can ensure that viewers can see the latest situation and improve the timeliness and authenticity of live broadcasts. Therefore, this low-latency live video technology has important applications in many fields, such as live sports events, online education, and online conferences. With the popularization of mobile Internet and the rapid development of the live broadcast industry, users have higher and higher requirements for live video broadcasts. They hope to be able to interact with the anchor in time when watching live broadcasts. Therefore, low-latency live video technology is needed to meet user needs.

[0071] Under normal circumstances, most live video broadcasts are conducted using the Hypertext Transfer Protocol (HTP) dynamically adaptive streaming media transmission protocol. However, since the HLS protocol is divided into index files and slice files, the player must first request the index file and then request the slice file before it can start playing. According to the HLS protocol standard, the server must complete the slicing before updating the index file. Compared with other streaming live broadcast protocols, there is a higher overall delay, the player starts slowly, and the user experience is poor. Therefore, there is a technical problem of high delay in live video broadcasts. At present, no effective solution has been proposed for the above-mentioned technical problem of high delay in live video broadcasts.

[0072] However, the embodiment of the present invention proposes a solution to start live video streaming in seconds based on the HLS protocol, which introduces a GOP cache design in the HLS index file of the slice server, supports the client's advance request, reduces the size of the slice file, and encapsulates the slices independently according to a certain number of frames. Through these methods, the technical problem of high latency in live video streaming is solved, and the technical effect of reducing the latency of live video streaming is achieved.

[0073] The embodiments of the present invention are further described below.

[0074] Figure 2 is a schematic diagram of a solution for solving the problem of live video broadcasting in seconds based on the HLS protocol according to an embodiment of the present invention. Figure 2 As shown, when producing HLS slices, unlike the common practice, the present application adopts the method of dividing the slices according to fixed time intervals instead of dividing the slices according to a GOP.

[0075] In this embodiment, the player first requests a playlist from the slice server, and the slice server returns the playlist, so that the player requests the first slice file from the slice server. The slice player downloads the slice file according to the request content. When the slice file is downloaded, the player requests the latest slice file from the slice server, which is then generated and sent to the slice server. After the current slice file is sent, the player requests the next slice from the slice server.

[0076] Optionally, when the present invention uses a fixed time interval to divide the slices, it can ensure that the size of each slice is relatively small. When the client downloads the slices, the slices are small and the download speed is fast, thereby improving the start speed.

[0077] Optionally, producing HLS slices refers to converting the live video stream into a series of short video clips in real time and storing them on a server so that users can access and watch these video clips through the HLS protocol.

[0078] Optionally, the present invention uses slicing to improve the stability and compatibility of live video, allowing users to smoothly watch live content in different network environments. The production of HLS slices requires the use of special software or tools, which usually divides the live stream into segments of a few seconds and generates corresponding index files to facilitate the client player to load and play these segments in sequence.

[0079] Optionally, producing HLS slices means converting the live video stream into a series of short video clips in real time and storing them on the server so that users can access and watch these video clips through the HLS protocol. The benefit of doing so is that it can improve the stability and compatibility of live video, allowing users to smoothly watch live content in different network environments.

[0080] Optionally, HLS slicing needs to be done using specialized software or tools, which usually divides the live stream into segments of a few seconds and generates corresponding index files to facilitate client players to load and play these segments in sequence.

[0081] Optionally, after using the above slicing method, it is necessary to solve the problem that the first frame of the slice obtained by the player may not be an I frame, which may cause the player to fail to decode and play a distorted or black screen. This application uses the method of logically distinguishing each slice as an I frame or non-I frame. In the HLS index file, the slice whose first frame is an I frame is always the first item in the HLS index file.

[0082] Optionally, the HLS standard tag #EXT-X-START:TIME-OFFSET=0 is used to instruct the player to always play from the first segment, thereby avoiding the decoding failure problem.

[0083] Optionally, in video coding, an I frame (key frame) is an independent frame in a video sequence that does not depend on other frames for decoding and can be displayed independently, while a non-I frame (predicted frame or reference frame) depends on other frames for decoding and cannot be displayed independently.

[0084] Alternatively, in video coding, a video sequence is usually composed of a series of consecutive I frames, P frames (predicted frames) and B frames (bidirectionally predicted frames), wherein the I frame is usually used for the start or key position of the video sequence, and the P frame and B frame are used to describe the motion and changes in the video sequence.

[0085] Optionally, to logically distinguish video slices into I frames or non-I frames, the division may be performed based on frame type information.

[0086] Optionally, the type of the frame can usually be determined by checking the frame header information or mark of the frame, so as to divide the video slices into key slices containing I frames and non-key slices containing non-I frames. This can better control the quality and decoding efficiency of the video and improve the transmission and playback performance of the video.

[0087] Optionally, the traditional HLS index file is updated only after the slice is completely generated, which results in the player having to find the latest file in the index file before initiating a request for the slice file. The present application proposes to update the slice information to the HLS index file at the beginning of slice generation, so that the player can initiate a request for the slice file in advance and establish an http link in advance.

[0088] Optionally, Figure 3 is a schematic diagram of a packaging method according to an embodiment of the present invention, such as Figure 3 As shown, for good compatibility, the method proposed in the present invention is encapsulated with fmp4. The encapsulation standard is that the playback time of an fmp4 slice is usually 1s. In order to allow the player to download and play the slice at the same time, the content of the fmp4 slice needs to be further segmented. The internal structure is adjusted from the traditional one slice one moof+mdat to one moof+mdat every 5 frames, which is equivalent to having multiple groups of moof+mdat structures in one slice.

[0089] Optionally, encapsulation through fmp4 can reduce latency on the player side, and only requires waiting for 5 frames of data at most before parsing and playing.

[0090] Optionally, according to the aforementioned segmentation method, the player may request a slice file that has not been generated in advance. At this time, because the file has not been generated, the server usually reports a 404 error, so this situation needs to be handled.

[0091] Optionally, when the slice server is generating slices, after a request comes in, it needs to maintain the request and, according to the processing of the second point, send this set of data to the player every time a set of moof+mdat is generated. In this way, generation, transmission and playback are achieved simultaneously, which can significantly reduce player delay.

[0092] Optionally, the Hypertext Transfer Protocol Dynamic Adaptive Streaming Media Transport Protocol is a streaming media network transmission protocol based on HTTP. It cuts the entire streaming media into a series of small media files (usually in TS format) and provides a matching media list file (m3u8 format). The client sequentially pulls these media files and plays them, thereby achieving the effect of seemingly playing a continuous streaming media.

[0093] Optionally, the main advantages of HLS technology include: Support for multiple devices and platforms: HLS can be played on a variety of devices and platforms, including PCs, mobile devices, and smart TVs.

[0094] Optionally, adaptive bitrate: HLS can automatically adjust the bitrate of the video based on the user device and network conditions to ensure a smooth playback experience.

[0095] Optionally, real-time: HLS can achieve almost real-time video transmission, allowing users to quickly obtain the latest content.

[0096] Optionally, reliability: HLS uses the HTTP protocol for transmission, which has high stability and reliability, and can effectively avoid problems such as video freeze and buffering.

[0097] Optionally, Group of Pictures (GOP) is a concept in video coding. Specifically, GOP refers to the distance between two I frames (i.e. key frames or intra-coded frames) in a video coding sequence. A GOP is a group of continuous pictures, which is used to assist random access.

[0098] Optionally, the first image of a GOP must be an I frame, so that the GOP can be decoded independently without reference to other images. When compressing a video, the video sequence is first divided into several groups of images GOPs, and then compressed in units of GOPs.

[0099] Optionally, in a GOP cache design, the goal of the cache is to maximize system performance and efficiency, rather than simply storing data. Key features of a GOP cache design include: Optimization of cached data: A GOP cache design optimizes cached data to increase data access speed and efficiency. This may include operations such as compressing, indexing, and sharding the data.

[0100] Optionally, efficient cache management: The GOP cache design will adopt an efficient cache management strategy to ensure the consistency and validity of cached data. This may include adopting cache replacement strategies such as LRU (least recently used) or LFU (least frequently used).

[0101] Optionally, intelligent cache prefetching: The GOP cache design intelligently performs cache prefetching operations based on data access patterns and predicted demand to reduce data access latency.

[0102] Optionally, cache update strategy: The GOP cache design will adopt an appropriate cache update strategy to ensure the consistency of cache data with backend data while minimizing access to backend data.

[0103] Optionally, through the above features, the GOP cache design can effectively improve the performance and efficiency of the system, reduce the response time and resource consumption of the system, and improve the user experience and system reliability.

[0104] Optionally, MP4: The full name is MPEG-4 Part 14, which is a digital multimedia container format based on the ISO / IEC 14496-14 standard. The MP4 format uses a packaging method called a box structure (Box). Each Box contains a type identifier, size, and data. This structure makes the MP4 file have good scalability and flexibility, and new media types and metadata can be easily added.

[0105] Optionally, the MP4 format supports high-quality video compression, making the file size relatively small while maintaining high video quality. Due to its wide compatibility and efficient compression algorithm, the MP4 format has been widely used in Internet video, mobile device video, digital television and other fields.

[0106] Optionally, fMP4: (Fragmented MPEG-4) is a streaming media format based on MPEG-4 Part 12, which is a media streaming format that allows the transmission of adaptive bit rate content over the Internet. It divides the entire video file into multiple small fragments, each of which contains video, audio (mdat) and related metadata (moof).

[0107] Optionally, I frame: (I frame) is a frame type in video encoding and decoding, representing a key frame, also known as an intra picture, and is an important frame type in video encoding. An I frame is a fully compressed coded frame that contains a complete image data. During decoding, the complete image can be reconstructed using only the data of the I frame without referring to other frames. In other words, the I frame is the first frame in a video sequence, it does not rely on the information of other frames, is a complete image frame, and does not refer to the content of other frames during encoding, so a higher bit rate is required to ensure image quality.

[0108] Alternatively, in video transmission and editing, an I frame is often used to locate the starting point and key pictures of a video, and is a reference point for other frame types (such as a P frame and a B frame).

[0109] Optionally, in video coding, P frame (Predicted frame) and B frame (Bi-directional predicted frame) are two types of frames other than I frame (Intra frame).

[0110] Optionally, a P frame is a frame predicted and encoded based on a previous frame (usually an I frame or a P frame), and it only stores pixel information that is different from the previous frame, thereby reducing the redundancy of video data and reducing the size of the video file.

[0111] Optionally, the B frame is a frame predicted and encoded based on the previous frame and the next frame. It stores pixel information that is different from the previous and next frames, further improving the efficiency and quality of video encoding.

[0112] Optionally, the use of P frames and B frames can effectively reduce the size of video files and improve the quality of videos, but it will also increase the complexity of video encoding and decoding. In video encoding, appropriate frame types and encoding parameters are usually selected according to specific application scenarios and requirements.

[0113] Optionally, the present invention proposes to optimize the player start-up in multiple ways based on the standard HLS, from the slice server, the player, which can effectively reduce the start-up time and the first frame time. And it is still compatible with the HLS standard, and the start-up time and playback delay can be reduced on players that support the HLS standard.

[0114] In this embodiment, by introducing GOP cache design in the HLS index file of the slice server, the client's advance request is supported, the slice file size is reduced, and the slice is packaged independently according to a certain number of frames. Through these methods, the technical problem of high delay in video live broadcast is solved, and the technical effect of reducing the delay in video live broadcast is achieved.

[0115] According to an embodiment of the present invention, a device for outputting live video data is also provided. It should be noted that the device for outputting live video data can be used to execute the method for outputting live video data in the method embodiment.

[0116] Figure 4 Schematic diagram of a device for outputting live video data according to an embodiment of the present invention. Figure 4 As shown, the output device 400 of the live video data may include: an acquisition unit 401, a segmentation unit 402, a determination unit 403 and an output unit 404.

[0117] The acquisition unit 401 is used to acquire the live video data stream to be output.

[0118] The segmentation unit 402 is used to segment the live video data stream into multiple live video data segments.

[0119] The determination unit 403 is used to respectively determine the starting frame data in the multiple live video data segments, wherein the starting frame data is used to indicate the first frame data to be output from the live video data segment.

[0120] The output unit 404 is used to output the corresponding live video data segment based on the starting frame data.

[0121] Optionally, the segmentation unit 402 may include: a first acquisition module, used to obtain slicing time data corresponding to the live video data stream, wherein the slicing time data is used to indicate the time interval for slicing the live video data stream; and a segmentation module, used to segment the live video data stream into multiple live video data segments according to the slicing time data.

[0122] Optionally, the determination unit 403 may include: a second acquisition module, used to acquire identification information of the starting frame data, wherein the identification information is used to identify the starting frame data; and an extraction module, used to extract the starting frame data from the live video data segment based on the identification information.

[0123] Optionally, the output unit 404 may include: a third acquisition module, used to obtain the output strategy corresponding to the live video data segment, wherein the output strategy is used to indicate the rules for outputting the live video data segment; an output module, used to output the live video data segment according to the output strategy and the starting frame data.

[0124] Optionally, the output device 400 for live video data may further include: a first output unit, configured to output the live video data stream to a player in response to the time data corresponding to the live video data stream being less than the slice time data.

[0125] Optionally, the output device 400 for live video data may further include: a first acquisition unit, used to acquire the output data length, wherein the output data length is used to indicate the length of the output data of the output device; and a maintaining unit, used to maintain the output channel of the output live video data segment in a normal output state in response to the data length corresponding to the live video data segment being less than the output data length.

[0126] In this embodiment, a video live data stream to be output is obtained; the video live data stream is divided into a plurality of video live data segments; the starting frame data in the plurality of video live data segments are respectively determined, wherein the starting frame data is used to indicate the first frame data to be output from the video live data segment; and the corresponding video live data segment is output based on the starting frame data. That is to say, the embodiment of the present invention determines a plurality of video live data segments by dividing the video live data stream, thereby determining the starting frame data in each video live data segment, and then outputting the corresponding video live data segment according to the starting frame data. Since the embodiment of the present invention solves the technical problem of high video live delay by dividing the video live data stream and outputting the video live data according to the starting frame data, the technical effect of reducing the video live delay is achieved.

[0127] According to an embodiment of the present invention, a computer-readable storage medium is also provided, which storage medium includes a stored program, wherein the program executes the method for outputting live video data in an embodiment of the method.

[0128] According to an embodiment of the present invention, a processor is also provided, which is used to run a program, wherein the program executes the method for outputting live video data in the method embodiment when the program is running.

[0129] According to an embodiment of the present invention, a computer program product is also provided. The computer program product includes computer instructions. When the computer instructions are executed by a processor, the method for outputting live video data in the method embodiment is implemented.

[0130] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0131] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0132] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0133] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed over multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0134] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0135] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent functional component, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software functional component, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, disk or optical disk, etc., which can store program codes.

[0136] The above are only preferred embodiments of the present invention. It should be pointed out that, for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A method for outputting live video data, characterized in that: include: Get the live video data stream to be output; Dividing the live video data stream into a plurality of live video data segments; Respectively determine the starting frame data in the plurality of the live video data segments, wherein the starting frame data is used to indicate the first frame data to be output from the live video data segment; Based on the starting frame data, the corresponding live video data segment is output.

2. The method according to claim 1, characterized in that The live video data stream is divided into a plurality of live video segment data segments, including: Acquire slice time data corresponding to the live video data stream, wherein the slice time data is used to indicate a time interval for slicing the live video data stream; According to the slicing time data, the live video data stream is divided into a plurality of live video data segments.

3. The method according to claim 1, characterized in that Determining the starting frame data in the plurality of live video data segments comprises: Acquire identification information of the start frame data, wherein the identification information is used to identify the start frame data; Based on the identification information, the starting frame data is extracted from the live video data segment.

4. The method according to claim 1, characterized in that: Based on the starting frame data, outputting the corresponding video live data segment includes: Obtaining an output policy corresponding to the live video data segment, wherein the output policy is used to indicate a rule for outputting the live video data segment; According to the output strategy and the starting frame data, the live video data segment is output.

5. The method according to claim 1, characterized in that The method further comprises: In response to the time data corresponding to the live video data stream being less than the slice time data, the live video data stream is output to the player.

6. The method according to any one of claims 1 to 5, characterized in that: The method further comprises: Obtaining an output data length, wherein the output data length is used to indicate the length of output data of an output device; In response to the data length corresponding to the live video data segment being less than the output data length, the output channel for outputting the live video data segment is kept in a normal output state.

7. A device for outputting live video data, characterized in that: include: An acquisition unit, used for acquiring a live video data stream to be output; A segmentation unit, used for segmenting the live video data stream into a plurality of live video data segments; A determination unit, used to respectively determine the starting frame data in the plurality of live video data segments, wherein the starting frame data is used to indicate the first frame data to be output from the live video data segment; An output unit is used to output the corresponding video live data segment based on the starting frame data.

8. A computer-readable storage medium, characterized in that: The computer-readable storage medium includes a stored program, wherein when the program is executed by a processor, the device where the storage medium is located is controlled to execute the method according to any one of claims 1 to 6.

9. A processor, characterized in that: The processor is used to run a program, wherein the program executes the method according to any one of claims 1 to 6 when running.

10. A computer program product, characterized in that The computer program product comprises computer instructions, which implement the method according to any one of claims 1 to 6 when executed by a processor.

Citation Information

Patent Citations

  • Method for realizing low-delay HLS live streaming

    CN111372099A

  • Live Streaming Media

    US20240283986A1