Intelligent set top box and live broadcast delay reduction method

By analyzing the HLS data index file in the smart set-top box, determining and playing the data files that meet the conditions as the first broadcast position after the cut, and cache subsequent files, the delay problem during the cut-off of the smart set-top box is solved, achieving low latency and fluency of live broadcast.

CN120568084APending Publication Date: 2025-08-29HISENSE BROADBAND MULTIMEDIA TECH
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410216759.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-02-27
Publication Date
2025-08-29

AI Technical Summary

Technical Problem

When cutting the smart set-top box, due to network latency and bandwidth speed, the live video has delays, affecting the user's viewing experience.

Method used

The intelligent set-top box analyzes the index file of HLS data, determines the first data file that meets specific playback conditions as the first broadcast location after cutting, and downloads and plays the file according to the download address of the file, and caches subsequent files to ensure the continuity and fluency of live broadcast.

Benefits of technology

Reduces live broadcast latency and improves the smoothness and real-timeness of user viewing experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120568084A_ABST
    Figure CN120568084A_ABST
Patent Text Reader

Abstract

According to the intelligent set top box and the live broadcast delay reduction method provided by the invention, the HLS data of the live broadcast source after channel switching is obtained in response to the channel switching instruction; the HLS data comprises an index file, and the index file records downloading addresses and playing durations corresponding to a plurality of data files. And analyzing to obtain the playing duration and the downloading duration corresponding to each data file in the first index file. And then determining a first data file meeting the playing condition from back to front according to the to-be-played sequence of the plurality of data files, and taking the first data file meeting the playing condition as a target data file. And then playing is started from the target data file, and each data file after the target data file is cached, so that the live broadcast fluency is ensured. According to the method and the device, the target data file is found from back to front according to the to-be-played sequential storage of the plurality of data files, so that the first broadcast position is closer to the live broadcast time after channel switching, and the live broadcast delay is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the technical field of smart set-top boxes, and in particular to a smart set-top box and a method for reducing live broadcast delay. Background Art

[0002] The live broadcast service of the smart set-top box is realized by interacting with the streaming server based on the adaptive bitrate streaming media transmission protocol (Http LiveStreaming, HLS). The smart set-top box requests the streaming media server to send the streaming media file. In response to the request, the streaming media server divides the streaming media file into multiple transport stream (Transport Stream, TS) fragment files based on the HLS protocol, and uses an index file for transmission for download and playback by the smart set-top box. In the related art, in response to the channel switching instruction, the smart set-top box directly plays the first TS fragment file in sequence. At this time, due to the influence of network delay, bandwidth speed, etc., the live video used for viewing will have a certain delay compared to radio and television TV programs, affecting the user's viewing experience. Summary of the Invention

[0003] The present disclosure provides a smart set-top box and a method for reducing live broadcast delay, so as to reduce the live broadcast delay when switching channels, so that users can watch live programs more real-time.

[0004] The present disclosure provides a smart set-top box, comprising:

[0005] The interface is configured to send an adaptive bit rate streaming media transmission protocol HLS data request to the streaming media server and transmit the HLS data fed back by the streaming media server;

[0006] A processor, connected to the interface, is configured to:

[0007] In response to the channel switching instruction, obtain HLS data corresponding to the channel switching, wherein the HLS data includes an index file, and the index file records the download addresses and playback durations corresponding to multiple data files;

[0008] Obtain the playback duration and download duration corresponding to the multiple data files in the first index file;

[0009] Determining a first data file that meets a playback condition from the back to the front according to the order in which the multiple data files are to be played, and determining the first data file that meets the playback condition as a target data file; wherein the playback condition includes that the playback duration of the target data file is not less than the total download duration of the data files following the target data file, and the playback duration of the target data file is not greater than the total playback duration of the data files following the target data file;

[0010] The target data file is downloaded according to the download address corresponding to the target data file, so as to start playing from the target data file.

[0011] The present disclosure provides a smart set-top box and a method for reducing live broadcast latency. In response to a channel switching instruction, the smart set-top box sends an adaptive bitrate streaming protocol (HLS) data request to a streaming media server to obtain the corresponding HLS data after the channel switching. The HLS data includes an index file that records the download addresses and playback durations of multiple data files. The server parses and obtains the playback durations and download durations of the multiple data files recorded in the first index file after the channel switching. The server then determines the first data file that meets the playback conditions, starting from the last data file in the order in which the multiple data files are to be played. This first data file that meets the playback conditions is then determined as the target data file. After obtaining the target data file, the server uses the target data file as the first broadcast position after the channel switching. The server downloads the target data file according to its corresponding download address, starting playback from the target data file, and caches subsequent data files to ensure the continuity and smoothness of the live broadcast. The playback conditions include the target data file's playback duration being no less than the total download duration of the data files following the target data file, and the target data file's playback duration being no greater than the total playback duration of the data files following the target data file. In this disclosure, the target data file is determined based on the playback conditions, starting from the end and ending in the order in which multiple data files are to be played. This allows the first broadcast position after switching to be closer to the live broadcast time, thereby reducing live broadcast latency. The playback conditions in this disclosure ensure that sufficient data is cached for playback, ensuring the smoothness of the live broadcast. Therefore, this disclosure can reduce live broadcast latency while also ensuring the smoothness of the live broadcast, thereby improving the user's live viewing experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0012] To more clearly illustrate the technical solutions of the present disclosure, the following briefly describes the drawings used in some embodiments of the present disclosure. Obviously, the drawings described below are merely illustrations of some embodiments of the present disclosure, and those skilled in the art can also derive other drawings based on these drawings. Furthermore, the drawings described below are schematic diagrams and are not intended to limit the actual dimensions of the products, actual processes of the methods, actual timing of signals, and the like involved in the embodiments of the present disclosure.

[0013] Figure 1 A schematic diagram of a usage scenario of a smart set-top box provided according to some embodiments of the present disclosure;

[0014] Figure 2 A schematic diagram of the structure of HLS data provided according to some embodiments of the present disclosure;

[0015] Figure 3A flowchart of HLS data live broadcast provided according to some embodiments of the present disclosure;

[0016] Figure 4 An interactive schematic diagram provided according to some embodiments of the present disclosure;

[0017] Figure 5 A flow chart of a method for reducing live broadcast delay according to some embodiments of the present disclosure Figure 1 ;

[0018] Figure 6 A flow chart of a method for reducing live broadcast delay according to some embodiments of the present disclosure Figure 2 ;

[0019] Figure 7 A flow chart of a method for reducing live broadcast delay according to some embodiments of the present disclosure Figure 3 ;

[0020] Figure 8 A schematic diagram of a method for reducing live broadcast delay according to some embodiments of the present disclosure Figure 1 ;

[0021] Figure 9 A schematic diagram of a method for reducing live broadcast delay according to some embodiments of the present disclosure Figure 2 ;

[0022] Figure 10 A schematic diagram of a method for reducing live broadcast delay according to some embodiments of the present disclosure Figure 3 . DETAILED DESCRIPTION

[0023] To facilitate the explanation of the technical solution of the application, some concepts involved in this application are first explained below.

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

[0025] It should be noted that the brief descriptions of terms in this application are only for the purpose of facilitating the understanding of the embodiments described below, and are not intended to limit the embodiments of this application. Unless otherwise specified, these terms should be understood according to their ordinary and usual meanings.

[0026] In the specification and claims of this application and the accompanying drawings, the terms "first," "second," "third," etc. are used to distinguish similar or similar objects or entities, and are not necessarily intended to limit a particular order or sequence, unless otherwise noted. It should be understood that the terms used in this manner are interchangeable under appropriate circumstances.

[0027] The terms "comprise," "include," and "have," and any variations thereof, are intended to cover but not exclude inclusion; for example, a product or device comprising a list of components is not necessarily limited to all the components expressly listed but may include other components not expressly listed or inherent to such product or device.

[0028] The term "module" refers to any known or later developed hardware, software, firmware, artificial intelligence, fuzzy logic, or combination of hardware and / or software code that is capable of performing the functionality associated with that element.

[0029] Figure 1 Schematic diagram of a usage scenario of a smart set-top box provided according to some embodiments of the present disclosure. Figure 1 As shown, the smart set-top box 100 is a device that connects the display device 200 and the server 400. It can convert compressed digital signals into TV content and display it on the display device.

[0030] The display device 200 performs data communication with the server 400 , and the user can operate the display device 200 through the smart device 300 or the control apparatus 500 .

[0031] In some embodiments, the control device 500 may be a remote controller, and the communication between the remote controller and the display device includes infrared protocol communication, Bluetooth protocol communication, or at least one of other short-range communication methods, to control the display device 200 wirelessly or wired. The user may control the display device 200 by inputting user commands through at least one of buttons on the remote controller, voice input, and control panel input.

[0032] In some embodiments, the smart device 300 may include any one of a mobile terminal, a tablet computer, a computer, a laptop computer, an AR / VR device, etc.

[0033] In some embodiments, the smart device 300 may also be used to control the display device 200. For example, the display device 200 may be controlled using a Java layer of an application running on the smart device.

[0034] In some embodiments, data communication may also be performed between the smart device 300 and the display device.

[0035] In some embodiments, the display device 200 can also be controlled in a manner other than the control device 500 and the smart device 300. For example, the user's voice command control can be directly received through a module for obtaining voice commands configured inside the display device 200, or the user's voice command control can be received through a voice control device set outside the display device 200.

[0036] In some embodiments, the smart set-top box 100 also communicates data with the server 400. The smart set-top box 100 may be allowed to communicate via a local area network (LAN), a wireless local area network (WLAN), and other networks. The server 400 may provide various content and interactions to the smart set-top box 100. The server 400 may be a cluster or multiple clusters, and may include one or more types of servers.

[0037] In some embodiments, a software step executed by a step execution entity can be transferred to another step execution entity in data communication with the step execution entity as needed. For example, a software step executed by a server can be transferred to a display device in data communication with the server as needed, and vice versa.

[0038] The control device 500 can also be connected to the smart set-top box 100 for communication. Usually, the control device and the set-top box communicate via an infrared protocol. The set-top box receives the communication signal from the control device to complete the user's remote control operation.

[0039] The smart set-top box 100 can be externally arranged on the outside of the display device housing, or can be built into the display device.

[0040] In some embodiments, when the display device uses the configured player for live broadcast, the live broadcast data is mainly transmitted using the adaptive bit rate streaming media transmission protocol (Http Live Streaming, HLS) based on the Hyper Text Transfer Protocol (HTTP). The working principle of the HLS protocol is to divide the entire media stream into small HTTP-based files for download, downloading only one piece at a time, so that the client can download and play at the same time without having to download the entire media stream before playing. Compared with the real-time transport protocol (RTP), HLS data can pass through any firewall or proxy server that allows HTTP data to pass, thus having greater stability. Among them, HTTP is a simple request-response protocol, which usually runs on the Transmission Control Protocol (TCP) and is used to define the process of exchanging data between the client and the server. After the client is connected to the server, if it wants to obtain a resource in the server, it must comply with a certain communication format. The HTTP protocol is used to define the format of communication between the client and the server.

[0041] Figure 2 A schematic diagram of the structure of HLS data provided according to some embodiments of the present disclosure. In some embodiments, Figure 2 As shown in , HLS data includes an index file and transport stream (TS) fragment files. The index file is also known as an M3U8 file. An M3U8 file is actually a playlist, similar to a media playlist. Its internal information records a series of media segment resources. Playing these segments sequentially can fully display the multimedia resources. The network address of the corresponding audio and video file can be found based on the M3U8 file index for online playback.

[0042] In some embodiments, the address of at least one secondary index file can be recorded in the M3U8 index file, for example: the addresses of three secondary index files are recorded in the M3U8 file, namely Alternate-A index file, Alternate-B index file and Alternate-C index file. What is recorded in the address of each secondary index file is the download address of each TS fragment file of the multimedia resource, and the client can download the corresponding TS fragment file through the download address of each TS fragment file. The secondary index file is equivalent to a standby source, and the client can choose to download the same resource at different speeds from many different standby sources, thereby allowing the streaming media session between the client and the server to adapt to different data rates. In other embodiments, each secondary index file also can continue to be nested, for example: the address of at least one tertiary index file is recorded in each secondary index file.

[0043] In some other embodiments, the download address of each TS segment file of the multimedia resource can be directly recorded in the M3U8 file without the existence of a nested index file.

[0044] For example, the specific format of the M3U8 file can be:

[0045] {#EXTM3U,#EXT-X-MEDIA-SEQUENCE,#EXT-X-TARGETDURATION:10,#EXTINF:10.0,htt p: / / media.example.com / first.ts,#EXTINF:9.99,http: / / media.example.com / second.ts,#EXT-X-ENDLIST}

[0046] Among them, the #EXTM3U tag represents the M3U8 file header and is placed in the first line.

[0047] The #EXT-X-MEDIA-SEQUENCE tag indicates the sequence number of the first TS fragment file, which is usually 0. However, in a live broadcast scenario, this sequence number identifies the starting position of the live broadcast segment.

[0048] The #EXT-X-TARGETDURATION:10 tag indicates that the maximum duration of each TS segment file is 10 seconds.

[0049] The #EXTINF tag indicates the playback duration of each TS segment file.

[0050] The #EXT-X-ENDLIST tag indicates the end of an M3U8 file. If an M3U8 file does not have the #EXT-X-ENDLIST tag, it is considered a live broadcast, and new TS segments will be added to the end of the playlist. When playing live broadcasts, the client display device needs to continuously update the M3U8 file to obtain the latest TS segments for playback.

[0051] Figure 3 A flowchart of an HLS data live broadcast according to some embodiments of the present disclosure is provided. In some embodiments, Figure 7 As shown in , the audio / video input data (Audio / video inputs) provided by the media producer is transmitted to the streaming server (Server) end, and is converted into HLS data on the streaming server end.

[0052] The media encoder module of the streaming media server is responsible for transcoding the audio / video input data into data in a target encoding format. The encoding format of the data provided by the media producer can be any audio / video encoding format. In some embodiments, the target encoding format can be MPEG2-TS format.

[0053] After transcoding data into the target encoding format, the stream segmenter module on the streaming server is responsible for slicing the data in the target encoding format. The slicing result is HLS data, which includes an index file. The index file then records multiple data files, such as the download addresses corresponding to multiple TS fragment files.

[0054] HLS data is transmitted to a distribution, which is a common HTTP file server. The smart set-top box uses HTTP to retrieve and play each data file, such as each TS segment file, in sequence, and can thus play the entire audio / video stream provided by the media producer.

[0055] Figure 4 FIG. 1 is an interactive diagram provided according to some embodiments of the present disclosure. Figure 4 As shown in the figure, when the user issues a channel switching command, the smart set-top box needs to re-acquire the HLS data of the new live source. Based on the characteristics of the HLS protocol, the smart set-top box needs to parse the HLS data to obtain the M3U8 file, and obtain the download address of each data file such as the TS segment file from the M3U8 file, and then download and play the corresponding TS segment file.

[0056] In some embodiments, the smart set-top box may include an interface. The smart set-top box sends a request to the streaming server via the interface for HLS data of the new live source after the channel switching. The streaming server feeds back the HLS data of the new live source after the channel switching to the smart set-top box. The smart set-top box receives the HLS data of the new live source after the channel switching sent by the streaming server via the interface.

[0057] In the related art, in response to a channel switching instruction, the smart set-top box directly plays the first data file, such as the first TS fragment file, in sequence. At this time, due to network delays, bandwidth speeds, etc., the live video viewed will have a certain delay compared to radio and television television programs, affecting the user's viewing experience.

[0058] In the present disclosure, the playback duration and download duration corresponding to the multiple data files recorded in the first index file after switching are parsed and obtained. Then, the first data file that meets the playback conditions is determined from the back to the front according to the order in which the multiple data files are to be played, and the first data file that meets the playback conditions is determined as the target data file. In the present disclosure, the target TS segment file is determined from the back to the front according to the order in which the multiple TS segment files are to be played based on the playback conditions, so that the first broadcast position after switching is closer to the live broadcast time, thereby reducing live broadcast delay.

[0059] Figure 5 A flow chart of a method for reducing live broadcast delay according to some embodiments of the present disclosure Figure 1 .like Figure 5 As shown, the live broadcast delay reduction method provided by the present disclosure includes:

[0060] S110: In response to the channel switching instruction, obtain HLS data corresponding to the channel switching, where the HLS data includes an index file, and the index file records the download addresses and playback durations corresponding to multiple data files.

[0061] In response to the channel switching instruction, the smart set-top box requests the HLS data corresponding to the new live source from the streaming server. The streaming server generates the HLS data corresponding to the new live source through transcoding and slicing, and sends it to the smart set-top box.

[0062] Among them, HLS data includes index files, wherein one index file records the download address and playback duration corresponding to multiple data files. Exemplarily, the index file is an M3U8 index file.

[0063] Based on the characteristics of the HLS protocol, the smart set-top box needs to parse the HLS data to obtain the M3U8 file, obtain the download address of each data file from the M3U8 file, and then download and play the corresponding data file.

[0064] M3U8 files vary in size. Some can index six or seven data files, while others can index three or four. Furthermore, data files are often cut into smaller and longer pieces. When there are many data files, if you directly request the first parsed file to play, the remaining data files recorded in the M3U8 file will actually have been encoded. This can result in a greater delay in the video viewed by the user.

[0065] S120: Obtain the playback duration and download duration corresponding to the multiple data files in the first index file.

[0066] In the present disclosure, in order to reduce the live broadcast delay and avoid jumps to ensure the continuity of the broadcast, the first index file after switching channels is obtained.

[0067] For the first index file after switching channels, it is not necessary to download and play from the first parsed data file, but to download and play from the countdown fragment parsed from the received M3U8 file. In this way, the live broadcast time point is closer to the actual program source time, thereby reducing the live broadcast delay.

[0068] For subsequent index files, such as the next index file and subsequent index files, the continuity of content playback can be achieved by playing the next corresponding data file in sequence according to the order in which the data files are to be played.

[0069] In the present disclosure, after receiving the first index file, multiple data files recorded therein are parsed, and the video stream paths of the data files are analyzed to obtain the corresponding playback time and download time of each data file.

[0070] It is understandable that, in the present disclosure, when the number of data files in the index file is 1, the data file can be directly downloaded and played.

[0071] S130: determining the first data file that meets the playback condition from the end to the beginning according to the order of the plurality of data files to be played, and determining the first data file that meets the playback condition as the target data file.

[0072] The playback conditions include that the playback duration of the target data file is not less than the total download duration of the data files following the target data file, and the playback duration of the target data file is not greater than the total playback duration of the data files following the target data file.

[0073] In the present disclosure, in order to reduce live broadcast delay, the first data file that meets the playback conditions is determined from the back to the front according to the order of multiple data files to be played, and the first data file that meets the playback conditions is determined as the target data file. The target data file is then used as the first broadcast file after switching.

[0074] In some embodiments, the streaming media server uses segmentation technology based on the video of the HLS protocol to segment the HLS data into multiple M3U8 files.

[0075] The set-top box will request an M3U8 index file from the streaming server every few seconds. Each M3U8 file will increment the corresponding data files in a stack. For example, if the current M3U8 file contains data files 39, 40, 41, 42, 43, and 44, the next M3U8 file will contain data files 40, 41, 42, 43, 44, and 45.

[0076] The data files 39, 40, 41, 42, 43, and 44 recorded in the current M3U8 file are played in the order 39, 40, 41, 42, 43, and 44, that is, they are played from the front to the back. The data files 40, 41, 42, 43, 44, and 45 recorded in the next M3U8 file are played in the order 40, 41, 42, 43, 44, and 45, respectively.

[0077] In the present disclosure, in order to reduce the live broadcast delay, the first data file that meets the playback conditions is determined from the back to the front according to the order of multiple data files to be played, and the first data file that meets the playback conditions is determined as the target data file.

[0078] For example, when the current M3U8 file records the data files 39, 40, 41, 42, 43, and 44, the "43" data file is the first data file that meets the playback conditions determined from the back to the front in the order to be played, and the "43" data file is the target data file. When switching channels, the first index file is played starting from the "43" data file as the first broadcast position, and then the "44" data file is cached and played.

[0079] For example, if the data file "43" does not meet the playback conditions, the judgment will continue. If the data file "42" is the first data file that meets the playback conditions determined from the back to the front according to the order to be played, then the data file "42" is the target data file. When switching channels, the first index file will be played starting from the data file "42" as the first broadcast position, and then the data files "43" and "44" will be cached for playback.

[0080] For example, if both "43" and "42" do not meet the playback conditions, the judgment will continue. The "41" data file is the first data file that meets the playback conditions determined from the back to the front according to the order to be played, and the "41" data file is the target data file. When switching channels, the first index file is played starting from the "41" data file as the first broadcast position, and then the "42", "43", and "44" data files are cached for playback.

[0081] In the present disclosure, the playback conditions are determined based on the playback duration and download duration of multiple data files, and the playback conditions can ensure the smoothness of the live broadcast. In the present disclosure, the target data file is determined from the back to the front according to the playback conditions according to the order of the multiple data files to be played, so that the first broadcast position after switching is closer to the live broadcast time, thereby reducing the live broadcast delay. The playback conditions in the present disclosure can ensure that enough data is cached for playback, thereby ensuring the smoothness of the live broadcast. Therefore, the present disclosure can reduce the live broadcast delay and ensure the smoothness of the live broadcast, thereby improving the user's live broadcast viewing experience.

[0082] For example, based on the playback and download times of each data file, the playback condition can be to determine the first data file to be played from the end to the beginning in the order to be played. When playing the first data file, the next data file can be cached to prepare the data file for playback. Then, when playing the next data file, the next data file can be cached, and so on. This playback condition may cause some playback lag.

[0083] Exemplarily, based on the playback time and download time corresponding to each data file, the playback conditions may include: determining the first broadcast data file from back to front in the order to be played, the first broadcast data file is the target data file, the playback time of the target data file is not less than the total download time corresponding to all data files after the target data file, and the playback time of the target data file is not greater than the total playback time corresponding to all data files after the target data file.

[0084] If the playback duration of the target data file is not less than the total download duration of all data files following the target data file, it can be ensured that during the playback of the target data file, all data files following the target data file in the index file can be cached, thereby ensuring that the playback content is ready for playback after the target data file is played, thereby ensuring the continuity and smoothness of the playback.

[0085] The playback time of the target data file is not greater than the total playback time of all data files after the target data file. This ensures that after the target data file is played, the total playback time of the remaining data files in the index file can still ensure the playback loop, avoiding playback freeze or black screen.

[0086] For example, if the playback duration of a target data file is 10 seconds and the total download duration of all data files after the target data file is 6 seconds, all data files after the target data file can be cached during playback to ensure playback continuity and fluency.

[0087] For example, if the target data file has a playback duration of 10 seconds and the total playback duration of all subsequent data files is 12 seconds, a 10-second playback loop can be maintained after the target data file is played, thus avoiding lag or a black screen. If the total playback duration of all subsequent data files is 8 seconds, within the 10-second playback loop, there will be a 2-second lag or black screen after playing the 8-second content.

[0088] In some embodiments, the playback duration of the target data file can be set to the length of the time window. During the time window, at least the content of the time window length must be played to avoid lag or black screen. If the playback duration corresponding to the cached content is less than the time window length, there is no file prepared for playback within the time window, and lag or black screen will occur.

[0089] In some embodiments, the first M3U8 index file after switching channels contains a first preset number n of data files. Based on the playback conditions: the playback duration of the target data file is not less than the total download duration of all data files following the target data file, and the playback duration of the target data file is not greater than the total playback duration of all data files following the target data file, if the target data file is parsed to contain a second preset number i of data files, then the target data file is the penultimate (i+1) data file in the index file, and the penultimate (i+1) data file is used as the first broadcast position after switching channels, i.e., playback starts from the penultimate (i+1) data file. That is, during the playback of the penultimate (i+1) data file, the subsequent i data files can be cached; and the total playback duration of the subsequent i data files is greater than or equal to the playback duration of the penultimate (i+1) data file.

[0090] While playing the i+1th to last data file, the next i data files can be cached; and the total playback time of the next i data files is greater than or equal to the playback time of the i+1th to last data file. This can reduce live broadcast latency while ensuring smooth live broadcast.

[0091] For example, the n data files recorded in the first M3U8 index file after switching are: TS1, TS2, TS3, TS4..., TS n-3 TS n-2 TS n-1 TS n If TS n-1 For the first data file that meets the playback conditions from the back to the front in the order to be played, TS n-1 is the target data file. n-1 During the period, TS n Can be cached, and TS nThe playback time is greater than or equal to TS n-1 If TS n-2 For the first data file that meets the playback conditions from the back to the front in the order to be played, TS n-2 is the target data file. n-2 During the period, TS n-1 TS n can be cached, and TS n-1 TS n The total playback time is greater than or equal to TS n-2 The playback time of the video is 100%. And so on.

[0092] When playing the i+1th to last data file and there are i data files to be cached, it can be closest to the live broadcast time to reduce the live broadcast delay, and it can also ensure that when playing the target fragment file, enough data is cached for subsequent playback, thereby ensuring the smoothness of the live broadcast.

[0093] S140: Download the target data file according to the download address corresponding to the target data file, so as to start playing from the target data file.

[0094] To reduce live streaming latency, the system determines the first data file that meets the playback requirements from the end to the beginning of the list of data files to be played. This first data file that meets the playback requirements is then designated as the target data file. While playing the target data file, sufficient data can be cached for subsequent playback, ensuring smooth live streaming.

[0095] In the present disclosure, obtaining the playback durations corresponding to the multiple data files recorded in the index file includes:

[0096] The index file includes an EXTINF tag corresponding to each of the multiple data files;

[0097] The playback duration corresponding to each of the data files is read according to the EXTINF tag.

[0098] In this disclosure, obtaining the download duration corresponding to multiple data files in the first index file includes:

[0099] Get the file size corresponding to each data file in the first index file;

[0100] The download time corresponding to each data file is obtained based on the download speed and the file size of each data file.

[0101] Likewise, different data files may take different or the same amount of time to download.

[0102] In some embodiments, obtaining the file size corresponding to each data file in the first index file may include:

[0103] Get the file size of a frame of image corresponding to the data file;

[0104] The downloading time corresponding to the data file is obtained by multiplying the playback time by the file size of one frame of image.

[0105] The process of obtaining the file size of a frame of image corresponding to the data file includes:

[0106] Get the number of pixels in a frame of image according to the video resolution;

[0107] The number of bytes of a frame of image = (number of pixels * number of image quantization bits) / 8.

[0108] For example, video resolution refers to the size or dimensions of an image produced by a video imaging product. Common video resolutions include 352×288, 176×144, 640×480, 1024×768, and 1920×1080. The two numbers in the image are: the length of the image and the width of the image. The product of these two numbers gives the number of pixels in a frame.

[0109] Exemplarily, the image quantization bit number is 24 bits.

[0110] For example, when the video resolution is 1920×1080, the number of pixels in a frame of image is: 1920×1080=2073600.

[0111] The image quantization bit number is 24 bits, so the number of bytes of a frame of image = (2073600*24) / 8 = 6220800 bytes.

[0112] Converted to MB, 1MB = 1024 × 1024 bytes, so the size of one frame of image is: 6220800 ÷ (1024 × 1024) ≈ 5.93MB.

[0113] Assuming that the playback duration of the data file is 10 seconds, the download duration of the data file is 59.3 MB.

[0114] Exemplarily, the playback duration and download duration corresponding to each data file are stored in the form of a list or an array.

[0115] In order to make the objectives, technical solutions and advantages of the embodiments of the present invention more clear, the embodiments of the present invention are described in detail below with reference to the accompanying drawings and specific embodiments.

[0116] In some embodiments, the streaming media server uses segmentation technology based on the video of the HLS protocol to segment the HLS data into multiple M3U8 files.

[0117] The smart box will request an M3U8 index file from the streaming server every few seconds. Each M3U8 file will increment the corresponding data file in a stack. For example, if the current M3U8 file contains data files 39, 40, 41, 42, 43, and 44, the next M3U8 file will contain data files 40, 41, 42, 43, 44, and 45.

[0118] After receiving the first M3U8 index file, the smart set-top box parses the data files and analyzes the video stream path of the data files to determine the video playback duration. The index file contains the corresponding playback duration of each data file. The playback duration of different data files may be different or the same.

[0119] Suppose that content is the video content of 1 minute that server completes coding in M3U8, if play from first ts of parsing, the content of watching video of user will at least be delayed 1 minute so.Because set-top box has buffer mechanism, as long as after the play time of guaranteeing current data file has been played, there are other continuous fragmentation data for playing in the buffer memory, and just relevant with the download time to download and bandwidth and network speed.Illustratively, under the bandwidth of 100Mb, download speed is 1.25MB / s, and each data file video fragment size is 5MB left and right sizes, then downloads a data file and wants 4s clock.Such as the playing duration of target fragmentation file is 10 seconds, so as long as the data in guaranteeing buffer memory can download and complete in 10 seconds, and the data in buffer memory are enough to play at least 10 seconds again, can always so smoothly and fluently play down, guarantee the fluency of live broadcast.

[0120] Next, the M3U8 file is requested again. After determining that it is not the first M3U8 file after switching, the next corresponding data file is played in the order in which each data file is to be played to achieve the continuity of content playback.

[0121] Figure 6 A flow chart of a method for reducing live broadcast delay according to some embodiments of the present disclosure Figure 2 .like Figure 6 As shown, in some embodiments, obtaining the playback durations corresponding to the plurality of data files recorded in the index file includes:

[0122] S111: The index file includes an EXTINF tag corresponding to each of the multiple data files;

[0123] S112: Read the corresponding playback duration of each data file according to the EXTINF tag.

[0124] Figure 7 A flow chart of a method for reducing live broadcast delay according to some embodiments of the present disclosure Figure 3 .like Figure 7 As shown, in the present disclosure, in order to reduce the live broadcast delay and avoid jumps to ensure playback continuity, different processing methods are adopted depending on whether the index file is the first index file after switching channels.

[0125] When the current index file is the first index file after switching channels, it is not necessary to download and play from the first parsed data file, but to download and play from the countdown fragment data file parsed from the received M3U8 file. In this way, the live broadcast time point is closer to the actual program source time, thereby reducing the live broadcast delay.

[0126] If the current index file is not the first index file after switching, but the second index file and subsequent index files, the next corresponding data file can be played in sequence according to the order in which the data files are to be played to achieve content playback continuity.

[0127] Figure 8 A schematic diagram of a method for reducing live broadcast delay according to some embodiments of the present disclosure Figure 1 ; Figure 9 A schematic diagram of a method for reducing live broadcast delay according to some embodiments of the present disclosure Figure 2 ; Figure 10 A schematic diagram of a method for reducing live broadcast delay according to some embodiments of the present disclosure Figure 3 .like Figure 8-10 As shown in the figure, the n data files recorded in the first M3U8 index file after switching are: TS1, TS2, TS3, TS4..., TS n-3 TS n-2 TS n-1 TS n .

[0128] If TS n-1 For the first data file that meets the playback conditions from the back to the front in the order to be played, TS n-1 For the target data file. At this time, there is a TS in the cache. n For fragmented data files, start from the second to last TS n-1 Start playback.

[0129] When TS n-1 If the playback conditions are not met, continue to rewind to TS n-2 If TS n-2 For the first data file that meets the playback conditions from the back to the front in the order to be played, TS n-2 For the target data file. At this time, there are two TS files in the cache. n-1 TS n For fragmented data files, start from the third to last one, i.e. TSn-2 Start playback.

[0130] When TS n-2 If the playback conditions are not met, continue to rewind to TS n-3 If TS n-3 For the first data file that meets the playback conditions from the back to the front in the order to be played, TS n-3 For the target data file. At this time, there are three TS files in the cache. n-2 TS n-1 TS n For fragmented data files, start from the fourth to last file, i.e. TS n-3 Start playback.

[0131] In the present disclosure, the first data file that meets the playback conditions is determined from back to front according to the order in which multiple data files are to be played, and the first data file that meets the playback conditions is determined as the target data file. After obtaining the target data file, the target data file is used as the first broadcast position after switching the channel, and the playback starts from the target data file, and the data files after the target data file are cached to ensure the continuity and smoothness of the live broadcast. In the present disclosure, the playback conditions are determined based on the playback time and download time of multiple data files, and the playback conditions can ensure the smoothness of the live broadcast. In the present disclosure, the target data file is determined from back to front according to the order in which multiple data files are to be played based on the playback conditions, so that the first broadcast position after switching the channel is closer to the live broadcast time, thereby reducing the live broadcast delay. The playback conditions in the present disclosure can ensure that enough data is cached for playback, thereby ensuring the smoothness of the live broadcast. Therefore, the present disclosure can reduce the live broadcast delay and ensure the smoothness of the live broadcast, thereby improving the user's live broadcast viewing experience.

[0132] Similar parts between the embodiments provided in this application can be referenced to each other. The specific implementation methods provided above are only a few examples under the overall concept of this application and do not constitute a limitation on the scope of protection of this application. For those skilled in the art, any other implementation methods expanded based on the scheme of this application without expending creative work shall fall within the scope of protection of this application.

Claims

1. A smart set-top box, characterized in that: include: The interface is configured to send an adaptive bit rate streaming media transmission protocol HLS data request to the streaming media server and transmit the HLS data fed back by the streaming media server; A processor, connected to the interface, is configured to: In response to the channel switching instruction, obtain HLS data corresponding to the channel switching, wherein the HLS data includes an index file, and the index file records the download addresses and playback durations corresponding to multiple data files; Obtain the playback duration and download duration corresponding to the multiple data files in the first index file; Determining a first data file that meets a playback condition from the back to the front according to the order in which the multiple data files are to be played, and determining the first data file that meets the playback condition as a target data file; wherein the playback condition includes that the playback duration of the target data file is not less than the total download duration of the data files following the target data file, and the playback duration of the target data file is not greater than the total playback duration of the data files following the target data file; The target data file is downloaded according to the download address corresponding to the target data file, so as to start playing from the target data file.

2. The smart set-top box according to claim 1, characterized in that Obtaining the playback duration corresponding to the multiple data files in the first index file includes: The index file contains an EXTINF tag corresponding to each data file in the multiple data files; The playback duration corresponding to each of the data files is read according to the EXTINF tag.

3. The smart set-top box according to claim 1, characterized in that Get the download duration of multiple data files in the first index file, including: Get the file size corresponding to each data file in the first index file; The download time corresponding to each data file is obtained based on the download speed and the file size of each data file.

4. The smart set-top box according to claim 1, wherein: The index file records a first preset number n of data files, and the target data file contains a second preset number i of data files, so the target data file is the (i+1)th data file from the last in the index file.

5. The smart set-top box according to claim 1, wherein: When the current index file is not the first index file after switching channels, the plurality of data files are played in the order in which they are stored to be played.

6. A method for reducing live broadcast delay, characterized in that: Applied to the smart set-top box according to any one of claims 1 to 5, the method comprises: In response to the channel switching instruction, obtain HLS data corresponding to the channel switching, wherein the HLS data includes an index file, and the index file records the download addresses and playback durations corresponding to multiple data files; Obtain the playback duration and download duration corresponding to the multiple data files in the first index file; Determining a first data file that meets a playback condition from the back to the front according to the order in which the multiple data files are to be played, and determining the first data file that meets the playback condition as a target data file; wherein the playback condition includes that the playback duration of the target data file is not less than the total download duration of the data files following the target data file, and the playback duration of the target data file is not greater than the total playback duration of the data files following the target data file; The target data file is downloaded according to the download address corresponding to the target data file, so as to start playing from the target data file.

7. The method for reducing live broadcast delay according to claim 6, wherein: Obtaining the playback duration corresponding to the multiple data files in the first index file includes: The index file contains an EXTINF tag corresponding to each data file in the multiple data files; The playback duration corresponding to each of the data files can be read according to the EXTINF tag.

8. The method for reducing live broadcast delay according to claim 6, wherein: Get the download duration of multiple data files in the first index file, including: Get the file size corresponding to each data file in the first index file; The download time corresponding to each data file is obtained based on the download speed and the file size of each data file.

9. The method for reducing live broadcast delay according to claim 6, wherein: The index file records a first preset number n of data files, and the target data file contains a second preset number i of data files, so the target data file is the (i+1)th data file from the last in the index file.

10. The method for reducing live broadcast delay according to claim 6, wherein: When the current index file is not the first index file after switching channels, the plurality of data files are played in the order in which they are stored to be played.

Citation Information

Cited By

  • Media data playing method and device, computer equipment and storage medium

    CN116266867A