Video playback method, device, electronic device and storage medium

By dynamically adjusting the video code rate in the video playback device, the problems of lag and low quality caused by traditional fixed code rate are solved, and the stability and quality of video playback are improved.

CN117793476BActive Publication Date: 2025-02-25SHUXING TECH (BEIJING) CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202410122049.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-29
Publication Date
2025-02-25
Estimated Expiration
2044-01-29

AI Technical Summary

Technical Problem

In a mobile network environment, due to fluctuations in network bandwidth, traditional fixed video code rate may cause video playback lag or video quality to be too low, affecting the video playback effect.

Method used

By sending a video request to the server, receiving the response information includes multiple groups of candidate code rates and their corresponding video file addresses, determining the target code rate based on the current network environment information, and obtaining and playing the target video file.

Benefits of technology

It realizes dynamic adjustment of video playback bit rate and adapts to the current network environment quality, thus solving the problem of stuttering video playback or low video quality and improving the video playback effect.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117793476B_ABST
    Figure CN117793476B_ABST
Patent Text Reader

Abstract

The embodiment of the present application provides a video playback method, device, electronic device and storage medium, the method comprising: sending a video request to a server, the video request is used to request to obtain information of a first video; receiving response information returned by the server in response to the video request, the response information comprising multiple groups of information associated with the first video, each group of information comprising: candidate bit rates and their corresponding video file addresses; determining a first target bit rate from multiple candidate bit rates, the first target bit rate matching the current network environment information of the video playback device; obtaining a first target video file according to the video file address corresponding to the first target bit rate, and playing the first target video file. The embodiment of the present application can improve the video playback effect.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of video technology, and in particular to a video playback method, device, electronic device and storage medium. Background Art

[0002] With the development of mobile Internet, short video applications have become an important part of users' daily lives. However, due to the complexity and instability of the mobile network environment, such as fluctuations in network bandwidth and changes in network latency, the playback quality of short videos on mobile devices may be affected.

[0003] Traditional video transmission protocols, such as HTTP Live Streaming (HLS), usually use a fixed video bit rate for transmission. However, in a mobile network environment, due to fluctuations in network bandwidth, a fixed video bit rate may cause video playback to be jittery or the video quality to be too low, thus affecting the video playback effect. Summary of the invention

[0004] The present application provides a video playback method, device, electronic device and storage medium, which can improve the video playback effect.

[0005] In a first aspect, an embodiment of the present application provides a video playback method, the method comprising:

[0006] Sending a video request to a server, where the video request is used to request obtaining information of a first video;

[0007] Receiving response information returned by the server in response to the video request, the response information including multiple groups of information associated with the first video, each group of information including: a candidate bit rate and a corresponding video file address;

[0008] Determine a first target bit rate from a plurality of candidate bit rates, where the first target bit rate matches current network environment information of the video playback device;

[0009] A first target video file is obtained according to a video file address corresponding to the first target bit rate, and the first target video file is played.

[0010] Through the above embodiment, the video playback device sends a video request to the server to request the information of the first video. The response information returned by the server to the video playback device includes multiple groups of information associated with the first video, each group of information includes a candidate bit rate and its corresponding video file address, so that the video playback device can obtain multiple candidate bit rates, and determine the first target bit rate that matches it from the multiple candidate bit rates according to the current network environment information of the video playback device, and then obtain the first target video file according to the video file address corresponding to the first target bit rate and play it. In this way, the bit rate used by the video playback device when playing the video can adapt to the current network environment quality, so as to solve the problems of video playback freeze or low video quality caused by the mismatch between the bit rate and the current network environment quality, which is conducive to improving the video playback effect.

[0011] In a possible implementation of the first aspect, the video file address corresponding to the candidate bit rate includes a first video file address and a second video file address, and the video files indicated by the first video file address and the second video file address are the same.

[0012] Through the above implementation, the video file of the first video at the same candidate bit rate can be copied into multiple copies and stored in multiple different video file addresses respectively, so that even if an abnormality occurs in one of the video file addresses, the video playback device can still obtain the video file from other video file addresses. This can prevent the inability to normally obtain the video file due to the abnormality of the video file address, thereby reducing the impact on video playback.

[0013] In a possible implementation of the first aspect, acquiring the first target video file according to the video file address corresponding to the first target bit rate includes:

[0014] Acquire the video content of the first target video file from the first video file address corresponding to the first target bit rate;

[0015] When an abnormality occurs in the first video file address, switch to the second video file address corresponding to the first target bit rate to obtain subsequent video content, where the subsequent video content is the video content in the first target video file except the video content obtained from the first video file address corresponding to the first target bit rate.

[0016] Through the above implementation, the video playback device can obtain the video content of the first target video file from the first video file address corresponding to the first target bit rate, and play the obtained video content. When an abnormality occurs in the first video file address, it can seamlessly switch to the second video file address corresponding to the first target bit rate to obtain the subsequent video content of the first target video file, and continue to play the subsequent video content obtained, which is conducive to ensuring the continuous playback of the first target video file.

[0017] In a possible implementation manner of the first aspect, after playing the first target video file, the method further includes:

[0018] Receiving a play event from a player, wherein the play event is used to indicate a change in current network environment information of the video playback device;

[0019] Determine a second target bit rate from a plurality of candidate bit rates, wherein the second target bit rate matches the changed network environment information;

[0020] The second target video file is obtained according to the video file address corresponding to the second target bit rate, and the video is played by switching to the first position of the second target video file, where the first position corresponds to the position of the video content that has been played in the first target video file.

[0021] Through the above implementation, in the process of the video playback device playing the first target video file according to the first target bit rate, when the network environment information of the video playback device changes, the video playback device can re-determine the second target bit rate that matches it from the multiple candidate bit rates that have been obtained according to the changed network environment information, and then obtain the second target video file according to the video file address corresponding to the second target bit rate and play the subsequent video content. In this way, the video playback device can realize dynamic adjustment of the bit rate, so that it switches from the first target bit rate to the second target bit rate to adapt to the changes in the network environment quality, which is conducive to improving the video playback effect. In addition, when switching the bit rate, the video playback device does not need to resend the video request to the server, but directly obtains the second target bit rate from the multiple candidate bit rates that have been obtained, which can save the number of requests and reduce the interaction between the video playback device and the player, thereby helping to ensure the smoothness of video playback.

[0022] In a possible implementation manner of the first aspect, when the playback event indicates that current network environment information of the video playback device is worse than network environment information matched by the first target bit rate, the second target bit rate is less than the first target bit rate;

[0023] When the playback event indicates that current network environment information of the video playback device is better than network environment information matched by the first target bit rate, the second target bit rate is greater than the first target bit rate.

[0024] Through the above implementation, the bit rate can be reduced when the current network environment information of the video playback device deteriorates, thereby avoiding the use of a higher bit rate for video playback and causing the video playback to be jerky. When the current network environment information of the video playback device improves, the bit rate can be increased, thereby avoiding the use of a lower bit rate for video playback and causing the video playback quality to be too low.

[0025] In a possible implementation manner of the first aspect, the network environment information includes: one or more of: network bandwidth, network delay, and network type.

[0026] Through the above implementation, the network environment quality of the video playback device can be evaluated more accurately by using network bandwidth, network delay or network type to measure the network environment quality.

[0027] In a possible implementation manner of the first aspect, each set of information further includes quality indicator information, and the quality indicator information includes: one or more of resolution, encoding format, super resolution, video quality multi-method evaluation fusion, and high dynamic range index;

[0028] The playing of the first target video file comprises:

[0029] The first target video file is played according to the quality indicator information corresponding to the first target bit rate.

[0030] Through the above implementation, when playing videos, the video playback device can adjust the video quality according to quality indicator information such as resolution, encoding format, super resolution, high dynamic range or video quality multi-method evaluation fusion index, which is beneficial to improving the video quality.

[0031] In a second aspect, an embodiment of the present application provides a video playback device, the device comprising:

[0032] A sending unit, configured to send a video request to a server, wherein the video request is used to request to obtain information of a first video;

[0033] A receiving unit, configured to receive response information returned by the server in response to the video request, wherein the response information includes multiple groups of information associated with the first video, each group of information including: a candidate bit rate and a corresponding video file address;

[0034] A determination unit, configured to determine a first target bit rate from a plurality of candidate bit rates, wherein the first target bit rate matches current network environment information of the video playback device;

[0035] The playing unit is used to obtain a first target video file according to the video file address corresponding to the first target bit rate, and play the first target video file.

[0036] In a possible implementation of the second aspect, the video file address corresponding to the candidate bit rate includes a first video file address and a second video file address, and the video files indicated by the first video file address and the second video file address are the same.

[0037] In a possible implementation of the second aspect, when the playback unit obtains the first target video file according to the video file address corresponding to the first target bit rate, it is specifically configured to:

[0038] Acquire the video content of the first target video file from the first video file address corresponding to the first target bit rate;

[0039] When an abnormality occurs in the first video file address, switch to the second video file address corresponding to the first target bit rate to obtain subsequent video content, where the subsequent video content is the video content in the first target video file except the video content obtained from the first video file address corresponding to the first target bit rate.

[0040] In a possible implementation manner of the second aspect, the receiving unit is further used to: receive a play event from a player, where the play event is used to indicate a change in current network environment information of the video playback device;

[0041] The determining unit is further configured to: determine a second target bit rate from a plurality of candidate bit rates, wherein the second target bit rate matches the changed network environment information;

[0042] The playback unit is also used to: obtain a second target video file according to a video file address corresponding to the second target bit rate, switch to a first position of the second target video file for video playback, and the first position corresponds to a position of video content that has been played in the first target video file.

[0043] In a possible implementation of the second aspect, when the playback event indicates that current network environment information of the video playback device is worse than network environment information matched by the first target bit rate, the second target bit rate is less than the first target bit rate;

[0044] When the playback event indicates that current network environment information of the video playback device is better than network environment information matched by the first target bit rate, the second target bit rate is greater than the first target bit rate.

[0045] In a possible implementation manner of the second aspect, the network environment information includes: one or more of: network bandwidth, network delay, and network type.

[0046] In a possible implementation manner of the second aspect, each set of information further includes quality indicator information, and the quality indicator information includes: one or more of resolution, encoding format, super resolution, video quality multi-method evaluation fusion, and high dynamic range index;

[0047] When playing the first target video file, the playing unit is specifically used to:

[0048] The first target video file is played according to the quality indicator information corresponding to the first target bit rate.

[0049] In a third aspect, an embodiment of the present application provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the method in the above-mentioned first aspect and any possible implementation manner thereof when executing the computer program.

[0050] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the method in the above-mentioned first aspect and any possible implementation manner thereof is implemented.

[0051] In a fifth aspect, an embodiment of the present application provides a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements the method in the above-mentioned first aspect and any possible implementation manner thereof.

[0052] The beneficial effects brought about by the second to fifth aspects mentioned above can be referred to the description of the beneficial effects in the first aspect, and will not be repeated here.

[0053] It should be understood that the above general description and the following detailed description are merely exemplary and explanatory, and are not intended to limit the technical solutions of the present application. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the background technology, the drawings required for use in the embodiments of the present application or the background technology will be described below.

[0055] The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present application and are used together with the specification to illustrate the technical solution of the present application.

[0056] Figure 1 It is a schematic diagram of an application environment of a video playback method provided in an embodiment of the present application;

[0057] Figure 2 It is a flowchart of a video playback method provided in an embodiment of the present application;

[0058] Figure 3 It is a schematic diagram of a code rate switching process of the related technology;

[0059] Figure 4 is a schematic diagram of a code rate switching process provided in an embodiment of the present application;

[0060] Figure 5 is a structural schematic diagram of a video playback device provided in an embodiment of the present application;

[0061] Figure 6 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

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

[0063] The terms "first", "second", etc. in the embodiments of the present application are used to distinguish different objects, rather than to describe a specific order. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not limited to the listed steps or units, but optionally includes steps or units that are not listed, or optionally includes other steps or units inherent to these processes, methods, products or devices.

[0064] It should be understood that in the present application, "at least one (item)" means one or more, "more than one" means two or more, and "at least two (items)" means two or three and more than three. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " can indicate that the previous and next associated objects are in an "or" relationship, which refers to any combination of these items, including any combination of single items (items) or plural items (items). For example, at least one item (item) of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.

[0065] Reference to "embodiments" in this application means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0066] With the development of mobile Internet, short video applications have become an important part of users' daily lives. However, due to the complexity and instability of the mobile network environment, such as fluctuations in network bandwidth and changes in network latency, the playback quality of short videos on mobile devices may be affected.

[0067] Traditional video transmission protocols, such as HTTP Live Streaming (HLS), usually use a fixed video bit rate for transmission. However, in a mobile network environment, due to fluctuations in network bandwidth, a fixed video bit rate may cause video playback to be jittery or the video quality to be too low, thus affecting the video playback effect.

[0068] Based on this, an embodiment of the present application provides a video playback method that can improve the video playback effect.

[0069] The execution subject of the video playback method may be a video playback device, for example, the video playback method may be executed by a terminal device or other processing device, wherein the terminal device may be, but is not limited to, various personal computers, laptops, tablet computers, smart phones, and portable wearable devices. In some possible implementations, the data query method may be implemented by a processor calling a computer-readable instruction stored in a memory.

[0070] See also Figure 1 , Figure 11 is a schematic diagram of an application environment of a video playback method provided in an embodiment of the present application. The application environment involves a video playback device 101 and a server 102 , wherein the video playback device 101 can be connected to the server 102 for communication.

[0071] For example, a user can access an application (referred to as a video application) that can provide video services (or short video services) through the video playback device 101, and the server 102 can be a server corresponding to the video application. The video playback device 101 can obtain relevant information of the video from the server 102 and play the video at a suitable bit rate.

[0072] See also Figure 2 , Figure 2 is a flow chart of a video playback method provided in an embodiment of the present application, and the video playback method can be applied to Figure 1 The video playback device 101 in FIG. Figure 2 As shown, the video playing method includes the following steps S201 to S204.

[0073] S201, sending a video request to a server, where the video request is used to request information of a first video.

[0074] The first video refers to a video to be played, and the information of the first video can be understood as information required to play the first video.

[0075] The video playback device sends a video request to the server, and correspondingly, the server receives the video request sent by the video playback device. Specifically, the video playback device can send a video request to the server in response to the creation of the player, for requesting to obtain information of the video to be played (i.e., the first video). Exemplarily, the video playback device can create a player when receiving a play instruction for the first video, and then send a video request to the server.

[0076] In one possible scenario, a user accesses a video application through a video playback device, and the video playback device can display a video recommendation page. The user can select a video cover on the video recommendation page and initiate a play command (for example, by clicking on a video cover to initiate a play command). At this time, the video to be played is the video corresponding to the video cover. When the video playback device receives the play command initiated by the user, it creates a player and sends a video request to the server to request information about the video corresponding to the video cover.

[0077] In another possible scenario, the video playback device displays a video playback page when playing a video, and the user can initiate a play instruction by sliding up on the video playback page. At this time, the video to be played is the next video of the currently playing video. When the video playback device receives the play instruction initiated by the user, it creates a player and sends a video request to the server to request information about the next video of the currently playing video.

[0078] S202, receiving response information returned by the server in response to the video request, where the response information includes multiple groups of information associated with the first video, each group of information including: a candidate bit rate and its corresponding video file address.

[0079] After receiving the video request sent by the video playback device, the server can generate response information in response to the video request and return the response information to the video playback device. Correspondingly, the video playback device receives the response information returned by the server.

[0080] The response information includes multiple sets of information associated with the first video, where multiple sets of information refer to at least two sets of information. Each set of information may include a candidate bit rate, so that the multiple sets of information include multiple candidate bit rates, that is, the response information includes multiple candidate bit rates, and the response information may also be called a multi-bit rate protocol. Among them, the candidate bit rate can be understood as a bit rate that can be selected when playing the first video.

[0081] Each set of information may also include a video file address, and the video file address in each set of information corresponds to a candidate bit rate, and different candidate bit rates correspond to different video file addresses. The video file address can be understood as the address of the video file of the first video at the candidate bit rate corresponding to the video file address (in order to simplify the description, it is recorded as the corresponding candidate bit rate), and the video file of the first video at the corresponding candidate bit rate can be obtained through the video file address.

[0082] For example, the first video is associated with 4 groups of information, thereby associating 4 candidate bit rates. Assuming that the video files of the first video at these 4 candidate bit rates are 1080P, 720P, 540P and 480P video files respectively, the video file addresses corresponding to these 4 candidate bit rates are recorded as address 1, address 2, address 3 and address 4 respectively. Then, the 1080P video file can be obtained through address 1, the 720P video file can be obtained through address 2, the 540P video file can be obtained through address 3, and the 480P video file can be obtained through address 4.

[0083] Optionally, the number of video file addresses included in each set of information may be one or more. When each set of information includes multiple video file addresses, the multiple video file addresses correspond to the same candidate bit rate, that is, the video files indicated by the multiple video file addresses are the same.

[0084] Exemplarily, the video file address is a Uniform Resource Locator (URL).

[0085] S203: Determine a first target bit rate from a plurality of candidate bit rates, where the first target bit rate matches current network environment information of the video playback device.

[0086] After receiving the response information returned by the server, the video playback device can parse the response information to obtain the information contained therein, such as multiple candidate bit rates and the video file address corresponding to each candidate bit rate. After obtaining multiple candidate bit rates, the video playback device can select a suitable bit rate from the multiple candidate bit rates according to the current network environment information of the video playback device as the first target bit rate.

[0087] The first target bit rate matches the current network environment information of the video playback device, wherein the network environment information refers to information used to measure the quality of the network environment. Accordingly, the first target bit rate matches the current network environment quality of the video playback device. Thus, when the video playback device plays the video according to the first target bit rate that matches the current network environment information, it can adapt to the current network environment quality, thereby reducing the impact on the video playback effect caused by the mismatch between the bit rate and the current network environment quality.

[0088] For example, if the current network environment quality of the video playback device is good, the first target bit rate adapted thereto may be higher to prevent the current use of a lower bit rate for video playback from causing the video playback quality to be too low. If the current network environment quality of the video playback device is poor, the first target bit rate adapted thereto may be lower to prevent the current use of a higher bit rate for video playback from causing the video playback to be choppy.

[0089] In a possible implementation, the video playback device may obtain current network environment information through a network interface or an application programming interface (API) of an operating system. Optionally, the network environment information may include but is not limited to information such as network bandwidth, network delay, and network type.

[0090] In one possible implementation, the terminal device can estimate the current download speed based on network environment information such as the current network bandwidth, network delay and network type, compare the download speed with multiple candidate bit rates, and select a candidate bit rate that is less than or equal to the download speed from the multiple candidate bit rates as the first target bit rate.

[0091] Optionally, if there are at least two candidate bitrates less than or equal to the download speed among the multiple candidate bitrates, the largest candidate bitrate may be selected from the at least two candidate bitrates less than or equal to the download speed as the first target bitrate.

[0092] S204: Obtain a first target video file according to a video file address corresponding to the first target bit rate, and play the first target video file.

[0093] After the video playback device determines the first target bit rate, the video file address corresponding to the first target bit rate is also determined. The video playback device can obtain the first target video file according to the video file address corresponding to the first target bit rate and play it. The first target video file refers to the video file of the first video at the first target bit rate.

[0094] Specifically, the video playback device can pass the video file address corresponding to the first target bit rate to the player, and the player obtains the first target video file by accessing the video file address corresponding to the first target bit rate, and then plays the first target video file according to the first target bit rate.

[0095] Through the above embodiment, the video playback device sends a video request to the server to request the information of the first video. The response information returned by the server to the video playback device includes multiple groups of information associated with the first video, each group of information includes a candidate bit rate and its corresponding video file address, so that the video playback device can obtain multiple candidate bit rates, and determine the first target bit rate that matches it from the multiple candidate bit rates according to the current network environment information of the video playback device, and then obtain the first target video file according to the video file address corresponding to the first target bit rate and play it. In this way, the bit rate used by the video playback device when playing the video can adapt to the current network environment quality, so as to solve the problems of video playback freeze or low video quality caused by the mismatch between the bit rate and the current network environment quality, which is conducive to improving the video playback effect.

[0096] In a possible implementation, the video file address corresponding to the candidate bit rate includes a first video file address and a second video file address, and the video files indicated by the first video file address and the second video file address are the same.

[0097] The first video file address may be regarded as a primary address, and the second video file address may be regarded as a backup address. The number of the backup addresses may be one or more.

[0098] The first video file address and the second video file address indicate the same video file, that is, the video file of the first video at the same candidate bit rate can be copied into multiple copies and stored in different video file addresses respectively, so that when an abnormality occurs in a certain video file address (for example, the server corresponding to the video file address does not respond), the video file can be obtained from other video file addresses, thereby preventing the video file from being unable to be normally obtained due to the abnormality of the video file address.

[0099] For example, when a candidate bit rate is used for video playback, the video playback device may preferentially obtain the video file from the first video file address (i.e., the primary address) corresponding to the candidate bit rate. When an abnormality occurs in the first video file address corresponding to the candidate bit rate, the video file may be switched to the second video file address (i.e., the backup address) corresponding to the candidate bit rate to obtain the video file.

[0100] Through the above implementation, the video file of the first video at the same candidate bit rate can be copied into multiple copies and stored in multiple different video file addresses respectively, so that even if an abnormality occurs in one of the video file addresses, the video playback device can still obtain the video file from other video file addresses. This can prevent the inability to normally obtain the video file due to the abnormality of the video file address, thereby reducing the impact on video playback.

[0101] In a possible implementation, obtaining the first target video file according to the video file address corresponding to the first target bit rate may specifically include: obtaining the video content of the first target video file from the first video file address corresponding to the first target bit rate; when an abnormality occurs in the first video file address, switching to the second video file address corresponding to the first target bit rate to obtain subsequent video content, the subsequent video content being the video content in the first target video file except for the video content obtained from the first video file address corresponding to the first target bit rate.

[0102] After the video playback device determines the first target bit rate, the first video file address and the second video address corresponding to the first target bit rate are also determined. The video playback device can first obtain the video content of the first target video file from the first video file address corresponding to the first target bit rate, and play the obtained video content. When an abnormality occurs in the first video file address, it may cause the video playback device to be unable to obtain the subsequent video content of the first target video file from the first video file address in a timely manner. Therefore, the video playback device can seamlessly switch to the second video file address corresponding to the first target bit rate to obtain the subsequent video content of the first target video file, and continue to play the obtained subsequent video content.

[0103] It can be understood that the video content obtained from the first video file address and the subsequent video content obtained from the second video file address together constitute a complete first target video file. For example, the duration of the first target video file is 60 seconds. Assuming that when the first video file address is abnormal, the video playback device has obtained the first 30 seconds of the video content of the first target video file from the first video file address, then after the video playback device switches to the second video file address, the second 30 seconds of the video content of the first target video file can be obtained from the second video file address.

[0104] Through the above implementation, the video playback device can obtain the video content of the first target video file from the first video file address corresponding to the first target bit rate, and play the obtained video content. When an abnormality occurs in the first video file address, it can seamlessly switch to the second video file address corresponding to the first target bit rate to obtain the subsequent video content of the first target video file, and continue to play the subsequent video content obtained, which is conducive to ensuring the continuous playback of the first target video file.

[0105] In a possible implementation, after playing the first target video file, the video playback device may further include: receiving a playback event from a player, the playback event being used to indicate a change in current network environment information of the video playback device; determining a second target bit rate from a plurality of candidate bit rates, the second target bit rate matching the changed network environment information; obtaining a second target video file according to a video file address corresponding to the second target bit rate, switching to a first position of the second target video file for video playback, the first position corresponding to a position of video content that has been played in the first target video file.

[0106] When the video playback device is playing the first target video file, its current network environment information may change dynamically. For example, it may become better or worse than the network environment information matched by the first target bit rate. Changes in the current network environment information of the video playback device may affect video playback. When video playback is affected, the player will report a playback event to indicate changes in the current network environment information of the video playback device. After receiving a playback event from the player, the video playback device can reselect a suitable bit rate from the multiple candidate bit rates obtained as the second target bit rate based on the changed network environment information, thereby achieving dynamic adjustment (or switching) of the bit rate.

[0107] The second target bit rate matches the changed network environment information, and accordingly, the second target bit rate matches the changed network environment quality. Thus, when the video playback device plays the video according to the second target bit rate matching the changed network environment information, it can adapt to the changed network environment quality.

[0108] After the video playback device determines the second target bit rate, the video file address corresponding to the second target bit rate is also determined. The video playback device can obtain the second target video file according to the video file address corresponding to the second target bit rate and play it. The second target video file refers to the video file of the first video at the second target bit rate.

[0109] Specifically, the video playback device can pass the video file address corresponding to the second target bit rate to the player, and the player obtains the second target video file by accessing the video file address corresponding to the second target bit rate, and then plays the second target video file according to the second target bit rate.

[0110] Since the video playback device has played part of the video content of the first video when playing the first target video file, the video playback device does not need to play the second target video file from the beginning, but can play the subsequent video content from the first position of the second target video file. The first position corresponds to the position of the video content that has been played in the first target video file, so that the subsequent video content played by the video playback device from the first position is the video content of the first video that has not been played yet.

[0111] It can be understood that the video content played by the video playback device according to the first target video file and the video content played according to the second target video file together constitute the complete content of the first video. For example, the duration of the first video is 60 seconds. Assuming that when the video playback device receives the play event from the player, it has played the first 30 seconds of the first video according to the first target video file, then after switching to the second target video file, the video playback device can continue to play the last 30 seconds of the first video.

[0112] Through the above implementation, in the process of the video playback device playing the first target video file according to the first target bit rate, when the network environment information of the video playback device changes, the video playback device can re-determine the second target bit rate that matches it from the multiple candidate bit rates that have been obtained according to the changed network environment information, and then obtain the second target video file according to the video file address corresponding to the second target bit rate and play the subsequent video content. In this way, the video playback device can realize dynamic adjustment of the bit rate, so that it switches from the first target bit rate to the second target bit rate to adapt to the changes in the network environment quality, which is conducive to improving the video playback effect. In addition, when switching the bit rate, the video playback device does not need to resend the video request to the server, but directly obtains the second target bit rate from the multiple candidate bit rates that have been obtained, which can save the number of requests and reduce the interaction between the video playback device and the player, thereby helping to ensure the smoothness of video playback.

[0113] The following is a comparison of the bit rate switching process during video playback in the embodiment of the present application and the related art with reference to the accompanying drawings.

[0114] See also Figure 3 , Figure 3 Schematic diagram of a code rate switching process of the related technology. The process includes the following steps A1 to A7.

[0115] Step A1: the video playback device sends a first video request to the server, the first video request being used to request information of a first video file, the first video file being a video file of a first video at a first bit rate. Accordingly, the server receives the first video request from the video playback device.

[0116] Step A2: the server returns the URL (referred to as the first URL) where the first video file is located to the video playback device. Accordingly, the video playback device receives the first URL from the server.

[0117] Step A3: the video playback device sends the first URL to the player. Accordingly, the player receives the first URL from the video playback device, obtains the first video file from the first URL, and plays the first video file.

[0118] Step A4: the player reports the play event to the video play device. Correspondingly, the video play device receives the play event from the player.

[0119] Step A5: the video playback device sends a second video request to the server, the second video request being used to request information of a second video file, the second video file being a video file of the first video at a second bit rate. Accordingly, the server receives the second video request from the video playback device.

[0120] Step A6: The server returns the URL (referred to as the second URL) where the second video file is located to the video playback device. Accordingly, the video playback device receives the second URL from the server.

[0121] Step A7: the video playback device sends the second URL to the player. Accordingly, the player receives the second URL from the video playback device, obtains the second video file from the second URL, and plays the second video file.

[0122] From the above process, it can be seen that the related technology needs to resend the video request (i.e. the above-mentioned second video request) to the server when switching the bit rate (from the first bit rate to the second bit rate), which increases the interaction between the video playback device and the player, and will affect the smoothness of the video playback.

[0123] See also Figure 4 , Figure 4 Schematic diagram of a code rate switching process provided by an embodiment of the present application. The process includes the following steps B1 to B5.

[0124] Step B1: The video playback device sends a third video request to the server, where the third video request is used to request to obtain information about the first video. Correspondingly, the server receives the third video request from the video playback device.

[0125] Step B2: The server returns a multi-bitrate protocol to the video playback device, the multi-bitrate protocol including multiple sets of information associated with the first video, each set of information including a candidate bitrate and its corresponding URL, that is, the multi-bitrate protocol includes multiple candidate bitrates and URLs corresponding to each candidate bitrate. Accordingly, the video playback device receives the multi-bitrate protocol from the server.

[0126] Step B3, the video playback device determines a first target bit rate from multiple candidate bit rates, and sends a URL (referred to as a third URL) corresponding to the first target bit rate to the player. Accordingly, the player receives the third URL from the video playback device, obtains a third video file from the third URL, and plays it. The first target bit rate matches the current network environment information of the video playback device, and the third video file is a video file of the first video at the first target bit rate.

[0127] Step B4: the player reports the play event to the video play device. Correspondingly, the video play device receives the play event from the player.

[0128] Step B5: The video playback device determines a second target bit rate from multiple candidate bit rates, and sends a URL (referred to as a fourth URL) corresponding to the second target bit rate to the player. Accordingly, the player receives the fourth URL from the video playback device, obtains a fourth video file from the fourth URL, and plays the fourth video file. The second target bit rate matches the changed network environment information of the video playback device, and the fourth video file is a video file of the first video at the second target bit rate.

[0129] From the above process, it can be seen that the embodiment of the present application only needs to make one video request to obtain multiple candidate bit rates. When the bit rate is switched later (from the first target bit rate to the second target bit rate), there is no need to resend the video request to the server, but directly obtain the second target bit rate from the multiple candidate bit rates that have been obtained. This can save the number of requests and reduce the interaction between the video playback device and the player, which is conducive to smooth playback of the video.

[0130] In a possible implementation, when the playback event indicates that the current network environment information of the video playback device is worse than the network environment information matched by the first target bit rate, the second target bit rate is less than the first target bit rate; when the playback event indicates that the current network environment information of the video playback device is better than the network environment information matched by the first target bit rate, the second target bit rate is greater than the first target bit rate.

[0131] The current network environment information of the video playback device is worse than the network environment information matched by the first target bit rate, indicating that the current network environment information of the video playback device has deteriorated. At this time, the bit rate can be reduced, so the second target bit rate is lower than the first target bit rate.

[0132] The current network environment information of the video playback device is better than the network environment information matched by the first target bit rate, indicating that the current network environment information of the video playback device has improved. At this time, the bit rate can be increased, so the second target bit rate is greater than the first target bit rate.

[0133] Through the above implementation, the bit rate can be reduced when the current network environment information of the video playback device deteriorates, thereby avoiding the use of a higher bit rate for video playback and causing the video playback to be jerky. When the current network environment information of the video playback device improves, the bit rate can be increased, thereby avoiding the use of a lower bit rate for video playback and causing the video playback quality to be too low.

[0134] In a possible implementation manner, the network environment information includes: one or more of network bandwidth, network delay, and network type.

[0135] Among them, network bandwidth, network latency and network type can be used to measure the quality of the network environment. The network type may include but is not limited to the fifth-generation mobile communication network (5th-Generation, 5G), the fourth-generation mobile communication network (4th-Generation, 4G), or wireless network (Wireless Fidelity, Wi-Fi).

[0136] For example, the larger the network bandwidth, the better the network environment quality, and the smaller the network bandwidth, the worse the network environment quality. For another example, the smaller the network delay, the better the network environment quality, and the larger the network delay, the worse the network environment quality. For another example, the network environment quality when the network type is 5G can be considered better than the network environment quality when the network type is 4G.

[0137] Through the above implementation, the network environment quality of the video playback device can be evaluated more accurately by using network bandwidth, network delay or network type to measure the network environment quality.

[0138] In a possible implementation, each set of information also includes quality indicator information, and the quality indicator information includes: one or more of resolution, encoding format, super resolution, video quality multi-method evaluation fusion (Visual Multimethod Assessment Fusion, VMAF), and high dynamic range (High Dynamic Range, HDR) indicators. The video playback device plays the first target video file, which may specifically include: playing the first target video file according to the quality indicator information corresponding to the first target bit rate.

[0139] The response information returned by the server to the video playback device includes not only multiple candidate bitrates and the video file addresses corresponding to each candidate bitrate, but also quality indicator information corresponding to each candidate bitrate, which can be used to indicate or adjust the video quality.

[0140] Resolution refers to the number of pixels in the width and height of a video. For example, the higher the resolution, the clearer the corresponding video picture, and the better (or higher) the video quality; the lower the resolution, the blurrier the corresponding video picture, and the worse (or lower) the video quality. The encoding format may include but is not limited to Advanced Video Coding (AVC, also known as H264) or High Efficiency Video Coding (HEVC, also known as H265) format. The video quality of H265 format is better than that of H264 format. Super-resolution refers to improving the original resolution of a video. The Visual Multimethod Assessment Fusion (VMAF) indicator is a video quality indicator. For example, the higher the VMAF score, the better the corresponding video quality; the lower the VMAF score, the worse the corresponding video quality. High Dynamic Range (HDR) video can provide a wider color range, higher contrast, and brighter brightness.

[0141] In one possible implementation, the resolution, encoding format and VMAF indicator are used to assist in selecting the video file corresponding to the first video. The terminal device can select a suitable video file for playback based on the current network environment information and the bit rate, resolution, encoding format and VMAF indicator in the multi-bitrate protocol.

[0142] Specifically, each set of information in the multi-bitrate protocol corresponds to a video file, that is, the multi-bitrate protocol corresponds to multiple video files. The terminal device can evaluate the video quality of each video file according to the resolution, encoding format and VMAF index of the video file, and sort the multiple video files in order of video quality from high to low. At this time, the video file with higher video quality ranks higher. The terminal device can also estimate the current download speed based on network environment information such as the current network bandwidth, network delay and network type, compare the download speed with the bit rate of the sorted video files, and select the top-ranked video file from the video files with a bit rate less than or equal to the download speed for playback. In this way, the terminal device can adapt to the current network environment quality and ensure video quality when playing videos.

[0143] In one possible implementation, super-resolution and HDR are used to adjust video quality during video playback. When playing the first target video file, the terminal device can adjust the video quality according to the super-resolution and HDR information of the first target video file.

[0144] Specifically, after the terminal device obtains the super-resolution information of the first target video file, it can determine whether the video resolution needs to be increased according to the resolution of the first target video file and the screen resolution of the terminal device. For example, if the screen resolution of the terminal device is smaller than the resolution of the first target video file, that is, the screen of the terminal device cannot support the display of a higher resolution, it can be considered that there is no need to increase the video resolution. For another example, if the screen resolution of the terminal device is larger than the resolution of the first target video file, that is, the screen of the terminal device can support the display of a higher resolution, it can be considered that the video resolution needs to be increased.

[0145] The terminal device may also determine whether to support the increase of the video resolution based on the computing performance of the terminal device, wherein the computing performance of the terminal device may be determined based on information such as the current central processing unit (CPU), graphics processing unit (GPU), and temperature of the terminal device. For example, if the computing performance of the terminal device is high, it may be considered that the video resolution can be increased. For another example, if the computing performance of the terminal device is low, it may be considered that the video resolution cannot be increased.

[0146] The terminal device may determine whether to enable the super-resolution function according to whether the video resolution needs to be improved and whether the improvement of the video resolution is supported. For example, if it is determined that the video resolution needs to be improved and the improvement of the video resolution can be supported, the terminal device may enable the super-resolution function when playing the first target video file to further improve the video clarity. For another example, if it is determined that the video resolution does not need to be improved or the improvement of the video resolution is not supported, the terminal device may not enable the super-resolution function when playing the first target video file.

[0147] After the terminal device obtains the HDR information of the first target video file, it can determine whether to turn on the HDR function according to whether the terminal device supports the display of HDR video. For example, if the terminal device supports the display of HDR video, the terminal device can turn on the HDR function when playing the first target video file to further improve the video quality. For another example, if the terminal device does not support the display of HDR video, the terminal device may not turn on the HDR function when playing the first target video file.

[0148] Through the above implementation, when playing a video, the video playback device can adjust the video quality according to quality indicator information such as resolution, encoding format, super resolution, HDR or VMAF, which is beneficial to improving the video quality.

[0149] The following uses the scenario of playing a video on a video recommendation page as an example to illustrate the video playing method of an embodiment of the present application.

[0150] The user accesses the video application through a video playback device, and the video playback device can display a video recommendation page. The user initiates a play command by clicking on a video cover in the video recommendation page. When the video playback device receives the play command, it creates a player and sends a video request to the server to request information about the video corresponding to the video cover (i.e., the first video).

[0151] In response to the video request, the server returns a multi-bitrate protocol to the video playback device, where the multi-bitrate protocol includes multiple groups of information associated with the first video, each group of information includes a candidate bitrate and its corresponding first video file address, second video file address, and quality indicator information, that is, the multi-bitrate protocol includes multiple candidate bitrates and the first video file address, second video file address, and quality indicator information corresponding to each candidate bitrate.

[0152] The video playback device selects a suitable bit rate from multiple candidate bit rates as the first target bit rate according to the current network environment information, and the first target bit rate matches the current network environment information of the video playback device. After the video playback device determines the first target bit rate, the video file address corresponding to the first target bit rate is also determined.

[0153] The video playback device passes the first video file address corresponding to the first target bit rate to the player. The player obtains the first target video file by accessing the first video file address corresponding to the first target bit rate, and then plays the first target video file according to the first target bit rate, and can adjust the video quality according to the quality indicator information corresponding to the first target bit rate.

[0154] In one possible case, when an abnormality occurs in the first video file address corresponding to the first target bit rate, the player can seamlessly switch to the second video file address corresponding to the first target bit rate to obtain subsequent video content of the first target video file, and continue to play the obtained subsequent video content.

[0155] In another possible case, the player reports a playback event to the video playback device to indicate a change in the current network environment information of the video playback device. In response to the playback event, the video playback device reselects a suitable bit rate from the obtained multiple candidate bit rates according to the changed network environment information as the second target bit rate, and the second target bit rate matches the changed network environment information. After the video playback device determines the second target bit rate, the video file address corresponding to the second target bit rate is also determined.

[0156] The video playback device passes the second video file address corresponding to the second target bit rate to the player. The player obtains the second target video file by accessing the first video file address corresponding to the second target bit rate, and then plays it from the position in the second target video file corresponding to the position of the video content that has been played in the first target video file according to the second target bit rate, and can adjust the video quality according to the quality indicator information corresponding to the second target bit rate.

[0157] It should be understood that the contents not specifically described in the above embodiments can be referred to the relevant description in the previous embodiments, and will not be repeated here.

[0158] Through the above embodiments, the bit rate used by the video playback device when playing the video can adapt to the current network environment quality, so that the problems such as video playback freeze or low video quality caused by the mismatch between the bit rate and the current network environment quality can be solved, which is conducive to improving the video playback effect. When the current network environment information of the video playback device changes, the video playback device can dynamically adjust the bit rate accordingly to adapt to the change of the network environment quality, and the video playback device does not need to resend the video request to the server when switching the bit rate, so that the number of requests can be saved, and the interaction between the video playback device and the player can be reduced, which is conducive to ensuring the smoothness of video playback. In addition, a backup video file address is set, so that when a certain video file address is abnormal, the video playback device can obtain the video file from the backup video file address to ensure the continuous playback of the video. In addition, when the video playback device plays the video, the video quality can also be adjusted according to the quality indicator information, which is conducive to improving the video quality.

[0159] Those skilled in the art will appreciate that, in the above method of specific implementation, the order in which the steps are written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of the steps should be determined by their functions and possible internal logic.

[0160] The above description of various embodiments tends to emphasize the differences between the various embodiments. The same or similar aspects can be referenced to each other, and for the sake of brevity, they will not be repeated herein.

[0161] See also Figure 5 , Figure 5 is a structural diagram of a video playback device provided in an embodiment of the present application. The video playback device 500 includes: a sending unit 501, a receiving unit 502, a determining unit 503 and a playback unit 504, wherein:

[0162] A sending unit 501 is used to send a video request to a server, where the video request is used to request to obtain information of a first video;

[0163] The receiving unit 502 is used to receive the response information returned by the server in response to the video request, where the response information includes multiple groups of information associated with the first video, each group of information includes: a candidate bit rate and its corresponding video file address;

[0164] A determination unit 503, configured to determine a first target bit rate from a plurality of candidate bit rates, wherein the first target bit rate matches current network environment information of the video playback device;

[0165] The playing unit 504 is configured to obtain a first target video file according to a video file address corresponding to the first target bit rate, and play the first target video file.

[0166] Through the above embodiment, the video playback device sends a video request to the server to request the information of the first video. The response information returned by the server to the video playback device includes multiple groups of information associated with the first video, and each group of information includes a candidate bit rate and its corresponding video file address, so that the video playback device can obtain multiple candidate bit rates, and determine the first target bit rate that matches it from the multiple candidate bit rates according to the current network environment information of the video playback device, and then obtain the first target video file according to the video file address corresponding to the first target bit rate and play it. In this way, the bit rate used by the video playback device when playing the video can adapt to the current network environment quality, so as to solve the problems of video playback freeze or low video quality caused by the mismatch between the bit rate and the current network environment quality, which is conducive to improving the video playback effect.

[0167] In a possible implementation manner, the video file address corresponding to the candidate bit rate includes a first video file address and a second video file address, and the video files indicated by the first video file address and the second video file address are the same.

[0168] Through the above implementation, the video file of the first video at the same candidate bit rate can be copied into multiple copies and stored in multiple different video file addresses respectively, so that even if an abnormality occurs in one of the video file addresses, the video playback device can still obtain the video file from other video file addresses. This can prevent the inability to normally obtain the video file due to the abnormality of the video file address, thereby reducing the impact on video playback.

[0169] In a possible implementation, when the playback unit 504 obtains the first target video file according to the video file address corresponding to the first target bit rate, it is specifically used to: obtain the video content of the first target video file from the first video file address corresponding to the first target bit rate; when an abnormality occurs in the first video file address, switch to the second video file address corresponding to the first target bit rate to obtain subsequent video content, and the subsequent video content is the video content in the first target video file except for the video content obtained from the first video file address corresponding to the first target bit rate.

[0170] Through the above implementation, the video playback device can obtain the video content of the first target video file from the first video file address corresponding to the first target bit rate, and play the obtained video content. When an abnormality occurs in the first video file address, it can seamlessly switch to the second video file address corresponding to the first target bit rate to obtain the subsequent video content of the first target video file, and continue to play the subsequent video content obtained, which is conducive to ensuring the continuous playback of the first target video file.

[0171] In a possible implementation, the receiving unit 502 is further used to: receive a playback event from a player, the playback event is used to indicate a change in the current network environment information of the video playback device; the determination unit 503 is further used to: determine a second target bit rate from multiple candidate bit rates, the second target bit rate matches the changed network environment information; the playback unit 504 is further used to: obtain a second target video file according to a video file address corresponding to the second target bit rate, switch to a first position of the second target video file for video playback, the first position corresponding to a position of the video content that has been played in the first target video file.

[0172] Through the above implementation, in the process of the video playback device playing the first target video file according to the first target bit rate, when the network environment information of the video playback device changes, the video playback device can re-determine the second target bit rate that matches it from the multiple candidate bit rates that have been obtained according to the changed network environment information, and then obtain the second target video file according to the video file address corresponding to the second target bit rate and play the subsequent video content. In this way, the video playback device can realize dynamic adjustment of the bit rate, so that it switches from the first target bit rate to the second target bit rate to adapt to the changes in the network environment quality, which is conducive to improving the video playback effect. In addition, when switching the bit rate, the video playback device does not need to resend the video request to the server, but directly obtains the second target bit rate from the multiple candidate bit rates that have been obtained, which can save the number of requests and reduce the interaction between the video playback device and the player, thereby helping to ensure the smoothness of video playback.

[0173] In a possible implementation, when the playback event indicates that the current network environment information of the video playback device is worse than the network environment information matched by the first target bit rate, the second target bit rate is less than the first target bit rate; when the playback event indicates that the current network environment information of the video playback device is better than the network environment information matched by the first target bit rate, the second target bit rate is greater than the first target bit rate.

[0174] Through the above implementation, when the current network environment information of the video playback device deteriorates, the bit rate can be reduced, thereby avoiding still using a higher bit rate for video playback and causing the video playback to be unsmooth. When the current network environment information of the video playback device improves, the bit rate can be increased, thereby avoiding still using a lower bit rate for video playback and causing the video playback quality to be too low.

[0175] In a possible implementation manner, the network environment information includes: one or more of network bandwidth, network delay, and network type.

[0176] Through the above implementation, the network environment quality of the video playback device can be more accurately evaluated by using network bandwidth, network delay or network type to measure the network environment quality.

[0177] In a possible implementation, each group of information also includes quality indicator information, and the quality indicator information includes: one or more of: resolution, encoding format, super-resolution, fusion of multi-method video quality evaluation, and high dynamic range indicators; when playing the first target video file, the playback unit 504 is specifically used to: play the first target video file according to the quality indicator information corresponding to the first target bit rate.

[0178] Through the above implementation, when playing a video, the video playback device can adjust the video quality according to quality indicator information such as resolution, encoding format, super resolution, high dynamic range or video quality multi-method evaluation fusion index, which is beneficial to improving the video quality.

[0179] For the specific definition of the video playback device, please refer to the definition of the video playback method above, which will not be repeated here. Each unit in the above video playback device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above units can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above units.

[0180] See also Figure 6 , Figure 66 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application. The electronic device 600 includes a memory 601 and a processor 602. Optionally, the electronic device 600 also includes a communication interface 603 and a bus 604. The memory 601, the processor 602 and the communication interface 603 are connected to each other through the bus 604. The memory 601 stores a computer program, and the processor 602 is used to execute the computer program stored in the memory 601 to implement the methods in the above-mentioned method embodiments.

[0181] An embodiment of the present application further provides a computer-readable storage medium, in which a computer program is stored. When the computer program is executed by a processor, the methods in the above-mentioned method embodiments are implemented.

[0182] An embodiment of the present application further provides a computer program product, which includes a computer program. When the computer program is executed by a processor, the method in the above-mentioned method embodiments is implemented.

[0183] It should be understood that the memory / readable storage medium in the embodiments of the present application may be a volatile memory or a non-volatile memory, or may include both a volatile memory and a non-volatile memory. Among them, the non-volatile memory may be a hard disk drive (HDD), a solid-state drive (SSD), a read-only memory (ROM) or a flash memory, etc. The volatile memory may be a random access memory (RAM) or an external cache memory. As an illustration and not limitation, RAM may be in various forms, such as a static random access memory (SRAM) or a dynamic random access memory (DRAM), etc.

[0184] The processor in the embodiments of the present application may be a combination of one or more processing modules such as a central processing unit (CPU), a graphics processing unit (GPU) or a microprocessor (MPU), and may also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0185] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0186] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application.

Claims

1. A video playback method, characterized in that: The method comprises: Sending a video request to a server, where the video request is used to request obtaining information of a first video; Receiving response information returned by the server in response to the video request, the response information including multiple groups of information associated with the first video, each group of information including: candidate bit rates and their corresponding video file addresses and quality indicator information; The quality of the video file indicated by each video file address is evaluated according to the quality indicator information to obtain the video quality of each video file, the current download speed is estimated according to the current network environment information of the video playback device, at least one bit rate that is less than or equal to the download speed is determined from multiple candidate bit rates, and the bit rate corresponding to the video file with the highest video quality among at least one video file corresponding to the at least one bit rate that is less than or equal to the download speed is determined as the first target bit rate; Acquire a first target video file according to the video file address corresponding to the first target bit rate, and play the first target video file; If the screen resolution of the video playback device is greater than the resolution of the first target video file, and the computing performance of the video playback device supports improving the video resolution, then enabling the super-resolution function when playing the first target video file; If the video playback device supports displaying high dynamic range videos, a high dynamic range function is enabled when playing the first target video file.

2. The method according to claim 1, characterized in that The video file address corresponding to the candidate bit rate includes a first video file address and a second video file address, and the video files indicated by the first video file address and the second video file address are the same.

3. The method according to claim 2, characterized in that The obtaining the first target video file according to the video file address corresponding to the first target bit rate includes: Acquire the video content of the first target video file from the first video file address corresponding to the first target bit rate; When an abnormality occurs in the first video file address, switch to the second video file address corresponding to the first target bit rate to obtain subsequent video content, where the subsequent video content is the video content in the first target video file except the video content obtained from the first video file address corresponding to the first target bit rate.

4. The method according to claim 1, characterized in that After playing the first target video file, the method further includes: Receiving a play event from a player, wherein the play event is used to indicate a change in current network environment information of the video playback device; Determine a second target bit rate from a plurality of candidate bit rates, wherein the second target bit rate matches the changed network environment information; The second target video file is obtained according to the video file address corresponding to the second target bit rate, and the video is played by switching to the first position of the second target video file, where the first position corresponds to the position of the video content that has been played in the first target video file.

5. The method according to claim 4, characterized in that When the playback event indicates that current network environment information of the video playback device is worse than network environment information matched by the first target bit rate, the second target bit rate is less than the first target bit rate; When the playback event indicates that current network environment information of the video playback device is better than network environment information matched by the first target bit rate, the second target bit rate is greater than the first target bit rate.

6. The method according to any one of claims 1 to 5, characterized in that The network environment information includes: one or more of network bandwidth, network delay and network type.

7. The method according to any one of claims 1 to 5, characterized in that The quality indicator information includes: one or more of resolution, encoding format, super resolution, video quality multi-method evaluation fusion, and high dynamic range indicator.

8. A video playback device, characterized in that: The device comprises: A sending unit, configured to send a video request to a server, wherein the video request is used to request to obtain information of a first video; A receiving unit, configured to receive response information returned by the server in response to the video request, wherein the response information includes multiple groups of information associated with the first video, each group of information including: candidate bit rates and their corresponding video file addresses and quality indicator information; a determination unit, configured to evaluate the quality of the video file indicated by each video file address according to the quality indicator information, obtain the video quality of each video file, estimate the current download speed according to the current network environment information of the video playback device, determine at least one bit rate that is less than or equal to the download speed from a plurality of candidate bit rates, and determine the bit rate corresponding to the video file with the highest video quality among at least one video file corresponding to the at least one bit rate that is less than or equal to the download speed as the first target bit rate; A playback unit, used to obtain a first target video file according to a video file address corresponding to the first target bit rate, and play the first target video file; if the screen resolution of the video playback device is greater than the resolution of the first target video file, and the computing performance of the video playback device supports improving the video resolution, then enabling a super-resolution function when playing the first target video file; if the video playback device supports displaying high dynamic range video, then enabling a high dynamic range function when playing the first target video file.

9. An electronic device, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the method according to any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

11. A computer program product, characterized in that The computer program product comprises a computer program, and when the computer program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Video playing method, device and terminal equipment based on video aggregation service

    CN103517098A

  • Audio and video playing method and device, electronic equipment and storage medium

    CN110677727A

  • Resource transmission method and device, terminal and storage medium

    CN113141524A