Video playback method and apparatus, and electronic device and computer-readable storage medium
By generating a set of images of the target video and displaying the target images, the problem of terminal devices being unable to play multiple videos simultaneously is solved, achieving a dual-video playback effect and improving the user experience.
Patent Information
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- SHENZHEN TCL NEW-TECH CO LTD
- Filing Date
- 2025-10-28
- Publication Date
- 2026-06-11
AI Technical Summary
Existing terminal devices cannot play multiple videos simultaneously, resulting in a poor user experience.
The limitation of video playback is solved by generating a set of target images corresponding to the target video and displaying the set of target images instead of playing the video.
It enables dual video playback on terminal devices that do not support dual video playback, thus improving the user experience.
Smart Images

Figure CN2025130639_11062026_PF_FP_ABST
Abstract
Description
Video playback methods, devices, electronic devices, and computer-readable storage media
[0001] This application claims priority to Chinese Patent Application No. 202411777532.6, filed on December 4, 2024, entitled "Video Playback Method, Apparatus, Electronic Device and Computer-Readable Storage Medium", the entire contents of which are incorporated herein by reference. Technical Field
[0002] This application relates to the field of video playback technology, specifically to a video playback method, apparatus, electronic device, and computer-readable storage medium. Background Technology
[0003] Video playback is a common way of outputting information; watching videos allows people to quickly understand the content. With the development of video playback technology, the smoothness and clarity of video playback have been greatly improved. Technical issues
[0004] On some terminal devices or systems, the playback is limited to a single video, meaning that two or more videos cannot be played simultaneously, which means the user experience needs improvement. Technical solutions
[0005] This application provides a video playback method, apparatus, electronic device, and computer-readable storage medium, which can achieve the effect of video playback through image display and solve the limitation problem of video playback.
[0006] In a first aspect, embodiments of this application provide a video playback method applied to a terminal device, the method comprising:
[0007] In response to a video playback request, playback configuration information is obtained, which includes video configuration information and display configuration information;
[0008] Obtain the target video based on the video configuration information;
[0009] A target image set for the target video is generated according to the display configuration information, and the target image set includes at least one target image.
[0010] The terminal device is controlled to display the target image from the target image set according to the display configuration information.
[0011] Secondly, this application also provides a video playback device applied to a terminal device. The device includes: a response module, used to obtain playback configuration information in response to a video playback request, wherein the playback configuration information includes video configuration information and display configuration information;
[0012] The acquisition module is used to acquire the target video based on the video configuration information;
[0013] The generation module is configured to generate a set of target images for the target video according to the display configuration information, wherein the set of target images includes at least one target image;
[0014] The display module is used to control the terminal device to display the target image in the target image set according to the display configuration information.
[0015] Thirdly, embodiments of this application also provide an electronic device, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the computer program is executed by the processor, it implements the steps in the video playback method described above.
[0016] Fourthly, embodiments of this application also provide a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in the video playback method described above.
[0017] Fifthly, embodiments of this application also provide a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various optional implementations described in embodiments of this application. Beneficial effects
[0018] In response to a video playback request, the terminal device of this application obtains playback configuration information, which includes video configuration information and display configuration information. Based on the video configuration information, it obtains a target video, generates a target image set for the target video according to the display configuration information, the target image set includes at least one target image, and controls the terminal device to display the target image in the target image set according to the display configuration information.
[0019] In this embodiment, a set of target images corresponding to the target video is generated, and the target images in the set are displayed instead of the video being played. The video playback effect is achieved by continuously displaying the target images. That is, the limitation of video playback is solved by replacing the direct playback of the video with image display. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 is a schematic diagram of a scenario in which an electronic device provided in an embodiment of this application executes the video playback method;
[0022] Figure 2 is a flowchart illustrating the video playback method provided in an embodiment of this application;
[0023] Figure 3 is a schematic diagram of the playback configuration information for advertisements provided in an embodiment of this application;
[0024] Figure 4 is a schematic diagram of the data structure of the ad group provided in an embodiment of this application;
[0025] Figure 5 is a schematic diagram of a sprite sheet provided in an embodiment of this application;
[0026] Figure 6 is a schematic diagram of window sliding provided in an embodiment of this application;
[0027] Figure 7 is a schematic diagram of the sprite image rendering effect provided in the embodiment of this application;
[0028] Figure 8 is a structural schematic diagram of the video playback device provided in an embodiment of this application;
[0029] Figure 9 is a schematic diagram of the structure of the electronic device provided in an embodiment of this application. Embodiments of the present invention
[0030] The technical solutions of this application will now be clearly and completely described with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0031] This application provides a video playback method, apparatus, electronic device, and computer-readable storage medium. Specifically, this application provides a video playback apparatus suitable for electronic devices, used to replace direct video playback with image display, thereby solving the limitations of video playback. The electronic device includes a terminal device or a server. The terminal device includes, but is not limited to, devices with image display capabilities such as mobile phones, tablets, laptops, and televisions. The server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. The server can be directly or indirectly connected via wired or wireless communication.
[0032] Please refer to Figure 1. Figure 1 is a schematic diagram of a scenario in which an electronic device according to an embodiment of this application executes the video playback method. The specific execution process of the electronic device executing the video playback method is as follows:
[0033] In response to a video playback request, the electronic device 10 obtains playback configuration information, which includes video configuration information and display configuration information. Based on the video configuration information, it obtains a target video, generates a target image set for the target video according to the display configuration information, the target image set includes at least one target image, and controls the terminal device to display the target image in the target image set according to the display configuration information.
[0034] For example, in response to a video playback request, the electronic device 10 obtains playback configuration information from the cloud 11. Then, the electronic device 10 obtains the target video from the service provider's server 12 based on the playback configuration information. Subsequently, the electronic device 10 can directly generate a target image set for the target video based on the display configuration information, or it can extract streaming media information from the target video and then send the streaming media information and display configuration information to the cloud 11 so that the cloud 11 can generate the target image set based on the streaming media information and display configuration information.
[0035] In summary, the embodiments of this application generate a set of target images corresponding to the target video, and replace video playback by displaying the target images in the target image set. The video playback effect is achieved by continuously displaying the target images. That is, the limitation problem of video playback is solved by replacing the direct playback of the video with image display.
[0036] The following sections provide detailed descriptions of each example. It should be noted that the order in which the embodiments are described is not intended to limit the priority of the embodiments.
[0037] Please refer to Figure 2, which is a flowchart illustrating the video playback method provided in an embodiment of this application. Although a logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than that shown in the flowchart. Specifically, this video playback method is applied to a terminal device, which includes devices with image display capabilities such as mobile phones, televisions, laptops, or desktop computers. Specifically, the process of the terminal device executing the video playback method includes:
[0038] 101. In response to a video playback request, obtain playback configuration information, which includes video configuration information and display configuration information.
[0039] The video playback request can be generated automatically when the application starts, or when the user clicks on the video file, or by the user clicking on the video playback control, or by the user clicking on the video playback control while the video is currently playing.
[0040] The playback configuration information describes or records the conditions or settings required for playback, such as the frame rate, width, or height settings for playback. The video configuration information, in this embodiment, primarily pertains to the configuration of the video to be acquired, indicating what kind of video to acquire, such as acquiring videos whose total duration, minimum duration, and maximum duration meet corresponding conditions. The display configuration information specifies the configuration requirements for display, i.e., the required playback and display configuration for the video.
[0041] In this embodiment, the playback configuration information can be set in the cloud. Users can obtain the playback configuration information by accessing the cloud and sending a request to it. The playback configuration information can be pre-configured and stored in the cloud, and its specific content can be defined and configured according to actual needs or playback display requirements.
[0042] The video playback request targets videos including advertisements. The following example uses obtaining an ad group through a video playback request to play multiple advertisements. The ad group includes a set of related advertisements. For example, please refer to Figure 3, which is a schematic diagram of the ad playback configuration information provided in this embodiment. The playback configuration information (adServerConfig) includes video configuration information and display configuration information. The video configuration information includes ad group duration (podDuration), minimum ad duration (minAdDuration), and maximum ad duration (maxAdDuration). The display configuration information includes frame width (width), frame height (height), ad group loop interval (loopTime), and frame rate (frameRate). The playback configuration information also includes the ad request address (serverUrl).
[0043] 102. Obtain the target video based on the video configuration information.
[0044] For example, based on the ad request address (serverUrl), an ad group with the set ad group duration (podDuration), minimum ad duration (minAdDuration), and maximum ad duration (maxAdDuration) can be obtained from the ad service provider. The ad group includes multiple ad videos.
[0045] 103. Generate a target image set for the target video according to the display configuration information, wherein the target image set includes at least one target image.
[0046] Since the display configuration information records information such as frame width, frame height, and frame rate, a target image set corresponding to the target video can be generated based on this information. For example, images can be extracted from the target video according to the frame rate, and the extracted images can be adjusted to the set frame width and frame height to obtain the target image. Furthermore, the target image set corresponding to each advertisement video in the ad group can be controlled for playback according to the ad group's loop interval.
[0047] 104. Control the terminal device to display the target image from the target image set according to the display configuration information. By controlling the terminal device to display the target image from the target image set, the effect of video playback is achieved by continuously displaying and updating the target image.
[0048] In summary, the embodiments of this application generate a set of target images corresponding to the target video, and replace video playback by displaying the target images in the target image set. The video playback effect is achieved by continuously displaying the target images. That is, the limitation problem of video playback is solved by replacing the direct playback of the video with image display.
[0049] Optionally, in this embodiment, the video playback method is applicable to multi-video playback scenarios. For example, for Roku devices, advertisements are usually delivered in the form of videos and played through video playback components. However, due to the limitations of the Roku operating system, only one video playback component can be in playback state at a time. This limitation prevents streaming media content from playing simultaneously with advertisements; for example, videos and advertisements cannot be played at the same time, thus affecting the ad delivery rate and exposure rate. Based on this, in this embodiment, the video playback method is applied to the Roku device to play ordinary videos through video playback components and achieve the effect of playing advertisements through image display, realizing the effect of dual playback of ordinary videos and advertisements. That is, optionally, in some embodiments of this application, the step "responding to a video playback request, obtaining playback configuration information" includes:
[0050] In response to a video playback request, the current playback status of the terminal device is identified;
[0051] If the current playback state indicates that the terminal device is currently playing the current video, then playback configuration information is obtained; controlling the terminal device to display the target image in the target image set according to the display configuration information includes:
[0052] The current video is played through the video playback component, and the target images in the target image set are displayed through the image display component according to the display configuration information.
[0053] In other words, in this embodiment, when a currently playing video is detected, the video playback method of this embodiment is used to play the video according to the video playback request. Specifically, when a currently playing video is detected, the advertisement is played using an image display method. This achieves dual playback of video + video (e.g., video + advertisement) on Roku terminal devices, overcoming video playback problems caused by playback limitations.
[0054] Optionally, in this embodiment, after obtaining the video configuration information, the terminal device can directly obtain the target video from the advertising service provider based on the video configuration information. That is, optionally, in this embodiment, the step "obtain the target video based on the video configuration information" includes:
[0055] The video configuration information is sent to the video source service device to generate a target video based on the video configuration information, and the target video returned by the video source service device is received.
[0056] The video configuration information includes at least one of the following: total video duration, minimum video duration, or maximum video duration.
[0057] Among them, video source service equipment includes service provider equipment, such as advertiser service equipment.
[0058] For example, referring to Figure 3, after the terminal device obtains the playback configuration information, it sends a request to the ad request address (serverUrl) to retrieve the ad group, using the ad group duration (podDuration), minimum ad duration (minAdDuration), and maximum ad duration (maxAdDuration) as parameters. The ad service provider then returns ad content conforming to the VAST protocol based on these parameters. The VAST protocol, developed by the Interactive Advertising Bureau (IAB), is a standard used to deliver ad content within video players. The VAST protocol defines the communication method between the ad server and the video player, enabling consistent ad display across different video players.
[0059] Optionally, in this embodiment of the application, after obtaining the target video, the target image set can be generated by the terminal device itself, or the target image set can be generated with the assistance of the cloud. That is, optionally, in some embodiments of this application, the step "generating a target image set for the target video according to the display configuration information" includes: generating a target image set for the target video by the terminal device according to the display configuration information; or, sending the streaming media information of the target video and the display configuration information to the processing service device, so that the processing service device can generate a target image set for the target video according to the streaming media information and the display configuration information, and receiving the target image set returned by the processing service device.
[0060] The processing service equipment includes cloud-based or cloud-equipped servers and other similar devices.
[0061] For the terminal device itself, the target image can be obtained by directly extracting frames from the acquired target video using the display configuration information, thus obtaining a set of target images. For the cloud, the target video can be obtained directly from the advertising service provider based on the advertising request address (serverUrl), and then the target image can be obtained by extracting frames according to the display configuration information, thus obtaining a set of target images.
[0062] In this embodiment, the terminal device can also acquire the target video using default acquisition rules. For example, video extraction can be performed according to rules of "minimum bitrate, minimum width, and minimum height" to obtain the ad group. Correspondingly, in this embodiment, the terminal device can also send the default acquisition rules to the cloud, whereby the cloud acquires the ad group based on the display configuration information and the default acquisition rules.
[0063] Please refer to Figure 4, which is a schematic diagram of the data structure of the ad group provided in the embodiment of this application. The ad group (AdPods) includes multiple ads. The information of each ad includes ad identifier (creativeID), ad duration, streaming media information (stream), and tracking events (TrackingEvents). The streaming media specifically includes bitrate, playback address (url), video width (width), video height (height), and video format (mimeType), etc. The tracking events specifically include event name (event), trigger time (time), whether it was triggered (triggered), and reporting address (url), etc.
[0064] Then, the terminal device can send the streaming media information and display configuration information of each advertisement in the ad group to the cloud. The cloud then uses this streaming media information, display configuration information, and ad request address (serverUrl) to obtain the target video and process it into a set of target images. That is, the cloud downloads the advertisement according to the ad request address (serverUrl), and then extracts frames from the ad video according to the frame rate, width and height information in the display configuration information to obtain several target images, and then generates a set of target images.
[0065] That is, the display configuration information includes the playback frame rate, and the step "generating a target image set for the target video according to the display configuration information" includes:
[0066] At least one target image is extracted from the target video according to the playback frame rate, and a target image set is generated based on the at least one target image;
[0067] Accordingly, the step "controlling the terminal device to display the target image in the target image set according to the display configuration information" includes:
[0068] The terminal device is controlled to display the target image from the target image set according to the playback frame rate.
[0069] Extracting images according to the playback frame rate and controlling image display according to the playback frame rate helps ensure the effectiveness and smoothness of image display, enabling the image display to achieve the effect of video playback.
[0070] In this embodiment, the target image set can be set in the form of a queue or in the form of a sprite sheet. That is, optionally, in some embodiments of this application, the step "generating a target image set based on the at least one target image" includes:
[0071] The display order of each target image is determined according to the playback order of each target image in the target video;
[0072] The at least one target image is stored in a target list according to the display order to obtain a target image set; or, a sprite sheet of the at least one target image is generated according to the display order, and the sprite sheet is used as the target image set. The display order can be obtained based on the playback order of the target images in the target video, and the playback order can be obtained based on playback timestamp analysis.
[0073] If the target image set is in the form of a target list, then when displaying images, the images are sequentially retrieved from the target list according to the playback frame rate and displayed. If the target image set is in the form of a sprite sheet, then when displaying images, the images are played in the order of the target images in the sprite sheet. For example, according to the display order, a sprite sheet of at least one target image is generated from left to right and from top to bottom, wherein the sprite sheet includes at least one image. Furthermore, the target images are extracted from the sprite sheet and played in the order from left to right and from top to bottom.
[0074] As shown in Figure 5, which is a schematic diagram of a sprite sheet provided in an embodiment of this application, the sprite sheet includes at least one target image arranged in a specific order. It should be noted that the sprite sheet follows the aforementioned display order from left to right and from top to bottom. When generating the sprite sheet, the number of rows and columns recorded in the display configuration information can be used; for example, the number of rows and columns can be used to control the generation of the sprite sheet. When there are a large number of target images, multiple sprite sheets can be generated.
[0075] It is understandable that advertisements typically use tracking beacons to detect ad playback. This tracking information can be triggered by the playback time of the target image. Optionally, in some embodiments of this application, after the step "controlling the terminal device to display the target image from the target image set according to the display configuration information," the method further includes:
[0076] Obtain the reporting time corresponding to the reporting event of the target video, wherein the reporting time is extracted from the target video;
[0077] The display time is determined based on the target image set at the current first display time and the initial second display time;
[0078] If the displayed time reaches the reporting time, the target progress beacon is triggered, which is used to report the current playback progress.
[0079] The first display time corresponds to the current display time, and the second display time corresponds to the time when the display started.
[0080] That is, after the target image in the target image set is triggered to be displayed, the display time is recorded, the current display time is determined based on the difference between the current time and the display start time, and the triggering of the target progress beacon is controlled based on whether the display time has reached the reporting time corresponding to the reporting event.
[0081] Among them, reported events include playback tracking events, which reflect the current playback progress through the reporting of progress beacons. Advertisers usually use progress beacons to analyze information such as ad playback rates.
[0082] It is understood that, in the embodiments of this application, when generating the target image set through the cloud, the terminal device still obtains the advertisement from the advertising service provider and extracts the streaming media. The purpose is to use the IP of the terminal device to make the advertising service provider believe that this is a valid acquisition of the advertisement, rather than a number of fixed IPs in the cloud, so as to help the advertising service provider fully understand the playback status of the advertisement.
[0083] In this embodiment, the display of the target image can be accomplished through a window, for example, by sliding the window across a sprite sheet to display each target image frame by frame. Specifically, the terminal device first acquires and renders the sprite sheet of the advertisement, and then displays each target image frame by frame by sliding the window. The window slides according to the playback frame rate, and during the window sliding process, the start display time and current display time of the advertisement are recorded. After calculating that the displayed time has exceeded the reporting time of the reporting event based on the current display time and the start display time, the target progress beacon is triggered.
[0084] As shown in Figure 6, which is a schematic diagram of window sliding provided in an embodiment of this application, after the terminal device renders the sprite image, the window slides from left to right and from top to bottom until the last target image of the sprite image. When the advertisement generates another sprite image, the sprite image is refreshed and the window is adjusted to the position of the first target image of the new sprite image. As shown in Figure 6, for the current sprite image, it first slides from left to right until the rightmost end of the current row, and then the window slides down to the leftmost target image of the next row.
[0085] In this embodiment, the window refers to the visible area of the sprite sheet image. The size of the window is the same as the size of the target avatar, meaning the width and height of the window are the same as the width and height of the target image. As shown in Figure 6, the black border represents the window, and the gray semi-transparent area is the invisible area of the sprite sheet image.
[0086] In this embodiment of the application, when multiple sprite images are involved, the sprite images are rendered and arranged based on the display order of the target images, that is, the display order of the first target image in each sprite image, as shown in Figure 7. Figure 7 is a schematic diagram of the sprite image rendering effect provided by this embodiment of the application. In this case, each sprite image is rendered on the canvas in sequence, and after the target image in each sprite image is displayed, the sprite image is deleted or hidden to achieve the effect of refreshing and displaying the next new sprite image.
[0087] In summary, the embodiments of this application generate a set of target images corresponding to the target video, and replace video playback by displaying the target images in the target image set. The video playback effect is achieved by continuously displaying the target images. That is, the limitation problem of video playback is solved by replacing the direct playback of the video with image display.
[0088] The video playback method of this application embodiment can realize dual video playback on terminal devices that do not support dual video playback, that is, the dual video playback effect is achieved by video playback + image display method of this application embodiment.
[0089] To facilitate better implementation of the video playback method of this application, this application also provides a video playback device based on the above-described video playback method. The meanings of the terms used are the same as in the video playback method described above, and specific implementation details can be found in the descriptions of the method embodiments.
[0090] Please refer to Figure 8, which is a schematic diagram of the structure of a video playback device provided in an embodiment of this application. The video playback device is applied to a terminal device, and the video playback device can be specifically as follows:
[0091] The response module 201 is used to respond to a video playback request and obtain playback configuration information, which includes video configuration information and display configuration information;
[0092] The acquisition module 202 is used to acquire the target video according to the video configuration information;
[0093] The generation module 203 is configured to generate a set of target images for the target video according to the display configuration information, wherein the set of target images includes at least one target image;
[0094] Display module 204 is used to control the terminal device to display the target image in the target image set according to the display configuration information.
[0095] Optionally, in some embodiments of this application, the display configuration information includes the playback frame rate;
[0096] The step of generating a target image set for the target video according to the display configuration information includes:
[0097] At least one target image is extracted from the target video according to the playback frame rate, and a target image set is generated based on the at least one target image;
[0098] The step of controlling the terminal device to display the target image from the target image set according to the display configuration information includes:
[0099] The terminal device is controlled to display the target image from the target image set according to the playback frame rate.
[0100] Optionally, in some embodiments of this application, generating a target image set based on the at least one target image includes:
[0101] The display order of each target image is determined according to the playback order of each target image in the target video;
[0102] Storing the at least one target image in a target list according to the display order to obtain a target image set; or, generating a sprite sheet of the at least one target image according to the display order, and using the sprite sheet as the target image set. Optionally, in some embodiments of this application, generating the target image set for the target video according to the display configuration information includes:
[0103] According to the display configuration information, the terminal device generates a target image set for the target video; or, the streaming media information of the target video and the display configuration information are sent to the processing service device, so that the processing service device generates a target image set for the target video based on the streaming media information and the display configuration information, and receives the target image set returned by the processing service device.
[0104] Optionally, in some embodiments of this application, after controlling the terminal device to display the target image from the target image set according to the display configuration information, the method further includes:
[0105] Obtain the reporting time corresponding to the reporting event of the target video, wherein the reporting time is extracted from the target video;
[0106] The display time is determined based on the target image set at the current first display time and the initial second display time;
[0107] If the displayed time reaches the reporting time, the target progress beacon is triggered, which is used to report the current playback progress.
[0108] Optionally, in some embodiments of this application, obtaining the target video based on the video configuration information includes: sending the video configuration information to a video source service device to generate a target video for the video configuration information through the video source service device, and receiving the target video returned by the video source service device;
[0109] The video configuration information includes at least one of the following: total video duration, minimum video duration, or maximum video duration.
[0110] Optionally, in some embodiments of this application, the step of obtaining playback configuration information in response to a video playback request includes:
[0111] In response to a video playback request, the current playback status of the terminal device is identified;
[0112] If the current playback status indicates that the terminal device is currently playing the current video, then the playback configuration information is obtained;
[0113] The step of controlling the terminal device to display the target image from the target image set according to the display configuration information includes:
[0114] The current video is played through the video playback component, and the target images in the target image set are displayed through the image display component according to the display configuration information.
[0115] In this embodiment of the application, a response module 201 is used to respond to a video playback request and obtain playback configuration information, which includes video configuration information and display configuration information. An acquisition module 202 obtains a target video according to the video configuration information. A generation module 203 generates a target image set for the target video according to the display configuration information. The target image set includes at least one target image. A display module 204 controls the terminal device to display the target image in the target image set according to the display configuration information.
[0116] In this embodiment, a set of target images corresponding to the target video is generated, and the target images in the set are displayed instead of the video being played. The video playback effect is achieved by continuously displaying the target images. That is, the limitation of video playback is solved by replacing the direct playback of the video with image display.
[0117] In addition, this application also provides an electronic device, as shown in FIG9, which illustrates a schematic diagram of the structure of the electronic device involved in this application. Specifically:
[0118] The electronic device may include components such as a processor 301 with one or more processing cores, a memory 302 with one or more computer-readable storage media, a power supply 303, and an input unit 304. Those skilled in the art will understand that the electronic device structure shown in FIG9 does not constitute a limitation on the electronic device, and may include more or fewer components than shown, or combine certain components, or have different component arrangements. Wherein:
[0119] The processor 301 is the control center of the electronic device. It connects various parts of the electronic device via various interfaces and lines. By running or executing software programs and / or modules stored in the memory 302, and by calling data stored in the memory 302, it performs various functions and processes data, thereby providing overall monitoring of the electronic device. Optionally, the processor 301 may include one or more processing cores; preferably, the processor 301 may integrate an application processor and a modem processor. The application processor mainly handles the operating system, user interface, and applications, while the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 301. The memory 302 can be used to store software programs and modules. The processor 301 executes various functional applications and data processing by running the software programs and modules stored in the memory 302. The memory 302 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, applications required for at least one function (such as sound playback, image playback, etc.), etc.; the data storage area may store data created based on the use of the electronic device. Furthermore, memory 302 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, memory 302 may also include a memory controller to provide processor 301 with access to memory 302.
[0120] The electronic device also includes a power supply 303 that supplies power to the various components. Preferably, the power supply 303 can be logically connected to the processor 301 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 303 may also include one or more DC or AC power supplies, recharging systems, power equipment debugging circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0121] The electronic device may further include an input unit 304, which can be used to receive input numerical or character information and generate keyboard, mouse, joystick, optical, or trackball signal inputs related to user settings and function control. Although not shown, the electronic device may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 301 in the electronic device loads the executable files corresponding to the processes of one or more application programs into the memory 302 according to the following instructions, and the processor 301 runs the application programs stored in the memory 302, thereby implementing the steps in any of the video playback methods provided in the embodiments of this application.
[0122] In response to a video playback request, the terminal device of this application obtains playback configuration information, which includes video configuration information and display configuration information. Based on the video configuration information, it obtains a target video, generates a target image set for the target video according to the display configuration information, the target image set includes at least one target image, and controls the terminal device to display the target image in the target image set according to the display configuration information.
[0123] In this embodiment, a set of target images corresponding to the target video is generated, and the target images in the set are displayed instead of the video being played. The video playback effect is achieved by continuously displaying the target images. That is, the limitation of video playback is solved by replacing the direct playback of the video with image display.
[0124] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0125] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by instructions, or by instructions controlling related hardware. These instructions can be stored in a computer-readable storage medium and loaded and executed by a processor.
[0126] Therefore, this application provides a computer-readable storage medium storing a computer program that can be loaded by a processor to execute the steps of any of the video playback methods provided in this application.
[0127] For details on the implementation of each of the above operations, please refer to the previous examples, which will not be repeated here.
[0128] The computer-readable storage medium may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0129] Since the instructions stored in the computer-readable storage medium can execute the steps of any of the video playback methods provided in this application, the beneficial effects that any of the video playback methods provided in this application can achieve can be realized, as detailed in the preceding embodiments, and will not be repeated here.
[0130] The foregoing has provided a detailed description of a video playback method, apparatus, electronic device, and computer-readable storage medium provided in this application. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The descriptions of the above embodiments are only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, those skilled in the art will recognize that, based on the ideas of the present invention, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of the present invention.
Claims
1. A video playback method, wherein, Applied to a terminal device, the method includes: In response to a video playback request, playback configuration information is obtained, which includes video configuration information and display configuration information; Obtain the target video based on the video configuration information; A target image set for the target video is generated according to the display configuration information, and the target image set includes at least one target image. The terminal device is controlled to display the target image from the target image set according to the display configuration information.
2. The video playback method according to claim 1, wherein, The display configuration information includes the playback frame rate; The step of generating a target image set for the target video according to the display configuration information includes: At least one target image is extracted from the target video according to the playback frame rate, and a target image set is generated based on the at least one target image; The step of controlling the terminal device to display the target image from the target image set according to the display configuration information includes: The terminal device is controlled to display the target image from the target image set according to the playback frame rate.
3. The video playback method according to claim 2, wherein, The step of generating a target image set based on the at least one target image includes: The display order of each target image is determined according to the playback order of each target image in the target video; The at least one target image is stored in the target list according to the display order to obtain a target image set; or, a sprite sheet of the at least one target image is generated according to the display order, and the sprite sheet is used as the target image set.
4. The video playback method according to claim 1, wherein, The step of generating a target image set for the target video according to the display configuration information includes: According to the display configuration information, the terminal device generates a target image set for the target video; or, the streaming media information of the target video and the display configuration information are sent to the processing service device, so that the processing service device generates a target image set for the target video based on the streaming media information and the display configuration information, and receives the target image set returned by the processing service device.
5. The video playback method according to claim 1, wherein, After controlling the terminal device to display the target image from the target image set according to the display configuration information, the method further includes: Obtain the reporting time corresponding to the reporting event of the target video, wherein the reporting time is extracted from the target video; The display time is determined based on the target image set at the current first display time and the initial second display time; If the displayed time reaches the reporting time, the target progress beacon is triggered, which is used to report the current playback progress.
6. The video playback method according to claim 1, wherein, The step of obtaining the target video based on the video configuration information includes: The video configuration information is sent to the video source service device to generate a target video based on the video configuration information, and the target video returned by the video source service device is received. The video configuration information includes at least one of the following: total video duration, minimum video duration, or maximum video duration.
7. The video playback method according to claim 1, wherein, The step of responding to a video playback request and obtaining playback configuration information includes: In response to a video playback request, the current playback status of the terminal device is identified; If the current playback status indicates that the terminal device is currently playing the current video, then the playback configuration information is obtained; The step of controlling the terminal device to display the target image from the target image set according to the display configuration information includes: The current video is played through the video playback component, and the target images in the target image set are displayed through the image display component according to the display configuration information.
8. The video playback method according to claim 1, wherein, The video configuration information includes the configuration information of the video to be acquired, which includes at least one of the total duration, minimum video duration, or maximum video duration. The display configuration information includes configuration information required for video display, including at least one of frame width, frame height, loop interval time, or frame rate.
9. The video playback method according to claim 1, wherein, The terminal device includes a Roku device.
10. The video playback method according to claim 1, wherein, The step of controlling the terminal device to display the target image from the target image set according to the display configuration information includes: If the target image set includes sprite sheets, the target image is extracted from the sprite sheets in a left-to-right, top-to-bottom order and then displayed.
11. The video playback method according to claim 1, wherein, The step of controlling the terminal device to display the target image from the target image set according to the display configuration information includes: If the target image set includes sprite sheets, slide the window according to the playback frame rate to display each target image frame by frame.
12. The video playback method according to claim 5, wherein, The first display time includes the current display time, and the second display time includes the time when the display started.
13. The video playback method according to claim 5, wherein, The reported events include playback tracking events, and the reported events include reporting progress beacons.
14. A video playback device, wherein, Applied to a terminal device, the device includes: The response module is used to respond to a video playback request and obtain playback configuration information, which includes video configuration information and display configuration information. The acquisition module is used to acquire the target video based on the video configuration information; The generation module is configured to generate a set of target images for the target video according to the display configuration information, wherein the set of target images includes at least one target image; The display module is used to control the terminal device to display the target image in the target image set according to the display configuration information.
15. The video playback device according to claim 14, wherein, The display configuration information includes the playback frame rate; The step of generating a target image set for the target video according to the display configuration information includes: At least one target image is extracted from the target video according to the playback frame rate, and a target image set is generated based on the at least one target image; The step of controlling the terminal device to display the target image from the target image set according to the display configuration information includes: The terminal device is controlled to display the target image from the target image set according to the playback frame rate.
16. The video playback device according to claim 15, wherein, The step of generating a target image set based on the at least one target image includes: The display order of each target image is determined according to the playback order of each target image in the target video; The at least one target image is stored in the target list according to the display order to obtain a target image set; or, a sprite sheet of the at least one target image is generated according to the display order, and the sprite sheet is used as the target image set.
17. The video playback device according to claim 14, wherein, The step of generating a target image set for the target video according to the display configuration information includes: According to the display configuration information, the terminal device generates a target image set for the target video; or, the streaming media information of the target video and the display configuration information are sent to the processing service device, so that the processing service device generates a target image set for the target video based on the streaming media information and the display configuration information, and receives the target image set returned by the processing service device.
18. The video playback device according to claim 14, wherein, After controlling the terminal device to display the target image from the target image set according to the display configuration information, the device further includes: Obtain the reporting time corresponding to the reporting event of the target video, wherein the reporting time is extracted from the target video; The display time is determined based on the target image set at the current first display time and the initial second display time; If the displayed time reaches the reporting time, the target progress beacon is triggered, which is used to report the current playback progress.
19. An electronic device, wherein, The device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the steps of the video playback method as described in any one of claims 1-13.
20. A computer-readable storage medium, wherein, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the video playback method as described in any one of claims 1-13.