Wallpaper video playback method, device, electronic device and storage medium

By dividing wallpaper videos into multiple video slice files and generating index files, decoding only the required parts, the high power consumption and memory usage problems during wallpaper video playback are solved, and fast display and smooth playback are achieved.

CN115695946BActive Publication Date: 2024-12-27VIVO MOBILE COMM CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202211360401.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-31
Publication Date
2024-12-27
Estimated Expiration
2042-10-31

AI Technical Summary

Technical Problem

When playing wallpaper videos, the entire video needs to be pre-decoded, resulting in high power consumption and large memory usage, and may cause lag during jumps.

Method used

Divide wallpaper video into multiple video slice files and generate an index file for each playback interval, decode only the required video slice files, avoid decoding unnecessary parts, reduce power consumption and memory usage, and avoid jumping during playback change.

Benefits of technology

It effectively reduces the power consumption and memory usage during wallpaper video playback, ensures the fast display of the first frame image, and avoids lag during jumps.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115695946B_ABST
    Figure CN115695946B_ABST
Patent Text Reader

Abstract

The present application discloses a wallpaper video playback method, device, electronic device and storage medium, which belongs to the field of video playback technology. The method includes: generating multiple video slice files based on wallpaper video; generating index files corresponding to each playback interval according to multiple playback intervals of the wallpaper video and the multiple video slice files, each of the index files includes an identifier of at least one video slice file, and the at least one video slice file is a file used for playback in the corresponding playback interval among the multiple video slice files; playing the at least one video slice file according to the identifier of at least one video slice file included in the index file corresponding to the interval to be played, and the interval to be played is any one of the multiple playback intervals.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] When playing a wallpaper video, you may only need to play a section of the wallpaper video, and you do not need to play the entire wallpaper video. When playing, jump to the start of the playback section to play. In order to avoid freezes during playback, the video after the current playback time point will be pre-decoded and cached when playing the video. Since only one section of the wallpaper video needs to be played, the content of the pre-decoded cache may exceed the playback section, that is, the decoder also decodes the video outside the playback section that does not need to be played, which increases the power consumption of the wallpaper video when playing and the memory occupied by the wallpaper application. Summary of the invention

[0003] The purpose of the embodiments of the present application is to provide a wallpaper video playback method, device, electronic device and storage medium, which can solve the problem of high power consumption when playing wallpaper videos.

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

[0005] Generate multiple video slice files based on wallpaper video;

[0006] Generate an index file corresponding to each of the playback intervals according to the multiple playback intervals of the wallpaper video and the multiple video slice files, wherein each of the index files includes an identifier of at least one video slice file, and the at least one video slice file is a file among the multiple video slice files used for playing in the corresponding playback interval;

[0007] According to an identifier of at least one video slice file included in an index file corresponding to a to-be-played interval, the at least one video slice file is played, and the to-be-played interval is any one of the multiple play intervals.

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

[0009] A first generating module, used to generate a plurality of video slice files based on the wallpaper video;

[0010] A second generating module is used to generate an index file corresponding to each of the multiple playback intervals of the wallpaper video and the multiple video slice files, each of the index files including an identifier of at least one video slice file, and the at least one video slice file is a file among the multiple video slice files used for playing in the corresponding playback interval;

[0011] The playing module is used to play at least one video slice file according to the identifier of at least one video slice file included in the index file corresponding to the interval to be played, and the interval to be played is any one of the multiple playback intervals.

[0012] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor and a memory, wherein the memory stores programs or instructions that can be run on the processor, and when the program or instructions are executed by the processor, the steps of the method described in the first aspect are implemented.

[0013] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.

[0014] In a fifth aspect, an embodiment of the present application provides a chip, comprising a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run a program or instruction to implement the method described in the first aspect.

[0015] In a sixth aspect, an embodiment of the present application provides a computer program product, which is stored in a storage medium and is executed by at least one processor to implement the method described in the first aspect.

[0016] In the embodiment of the present application, multiple video slice files are generated according to the wallpaper video, and a corresponding index file is generated for each playback interval of the wallpaper video. The identifier of the video slice file for playing in the corresponding playback interval is stored in the index file. When playing, only the video slice file in the playback interval needs to be decoded, and the video outside the playback interval does not need to be decoded, thereby reducing the power consumption when playing the wallpaper video and the memory occupied by the wallpaper application. In addition, there is no need to jump during playback, which avoids the jamming during the jump and ensures the fast display of the first frame image. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] Figure 1 It is a flowchart of the wallpaper video playing method in an embodiment of the present application.

[0018] Figure 2 It is a schematic diagram of wallpaper video segmentation in an embodiment of the present application.

[0019] Figure 3 It is a schematic diagram of a wallpaper video playback device in an embodiment of the present application.

[0020] Figure 4 It is a schematic diagram of an electronic device in an embodiment of the present application.

[0021] Figure 5 It is a schematic diagram of the hardware structure of the electronic device in the embodiment of the present application. DETAILED DESCRIPTION

[0022] The following will be combined with the drawings in the embodiments of the present application to clearly describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, rather than all the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments in the present application belong to the scope of protection of this application.

[0023] The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and / or" in the specification and claims represents at least one of the connected objects, and the character " / " generally indicates that the objects associated with each other are in an "or" relationship.

[0024] The wallpaper video playback method provided by the embodiment of the present application is described in detail below through specific embodiments and application scenarios in conjunction with the accompanying drawings.

[0025] like Figure 1 As shown, this embodiment introduces a wallpaper video playing method, which includes steps S1100-S1300.

[0026] S1100: Generate multiple video slice files based on the wallpaper video.

[0027] Wallpaper videos can be played when the desktop is displayed, and wallpaper videos can also be played in the lock screen interface. Wallpaper videos can be video files in MP4 format or in other formats. Video slice files can be video files in TS format. Video slice files correspond to different stages of wallpaper videos. For example, for a wallpaper video with a duration of three seconds, three video slice files can be generated, the first video slice file corresponds to the first second of the wallpaper video, the second video slice file corresponds to the second second of the wallpaper video, and the third video slice file corresponds to the third second of the wallpaper video. The number of video slice files can be determined based on actual business needs, and this embodiment does not limit this.

[0028] S1200: Generate an index file corresponding to each playback interval according to the multiple playback intervals of the wallpaper video and the multiple video slice files, each of the index files including an identifier of at least one video slice file, and the at least one video slice file is a file among the multiple video slice files for playing in the corresponding playback interval.

[0029] One video slice file can be played in one playback interval. Multiple video slice files can also be played in one playback interval. The playback interval can be determined according to specific business logic. For example, the video slice files include a first video slice file, a second video slice file, and a third video slice file. When the desktop is displayed, it corresponds to the first playback interval, and the first video slice file and the second video slice file are played in the first playback interval. When the lock screen interface is displayed, it corresponds to the second playback interval, and the third video slice file is played in the second playback interval.

[0030] Each playback interval corresponds to an index file, and the index file can be a streaming media file in m3u8 format. The index file includes the identifier of the video slice file played in the corresponding playback interval. For example, if the first video slice file and the second video slice file are played in the first playback interval, the identifier of the first video slice file and the identifier of the second video slice file are stored in the index file corresponding to the first playback interval. The identifier of the video slice file can be the storage path of the video slice file.

[0031] S1300: Play at least one video slice file according to an identifier of at least one video slice file included in an index file corresponding to a to-be-played interval, where the to-be-played interval is any one of the multiple play intervals.

[0032] The interval to be played can be any one of the multiple playback intervals of the wallpaper video. The interval to be played is determined according to actual needs. For example, the wallpaper video has a first playback interval and a second playback interval. When the desktop is displayed, the interval to be played is the first playback interval. When the lock screen interface is displayed, the interval to be played is the second playback interval. Query the corresponding index file according to the interval to be played. Obtain the identifier of the video slice file from the index file corresponding to the interval to be played. Play the video slice file according to the identifier of the video slice file included in the index file corresponding to the interval to be played. For example, when the index file corresponding to the interval to be played includes the identifier of the first video slice file and the identifier of the second video slice file, play the first video slice file and the second video slice file.

[0033] In this embodiment, multiple video slice files are generated according to the wallpaper video, and a corresponding index file is generated for each playback interval of the wallpaper video. The identifier of the video slice file used to play in the corresponding playback interval is stored in the index file. When playing, only the video slice files in the playback interval need to be decoded, and the videos outside the playback interval do not need to be decoded, which reduces the power consumption when the wallpaper video is played and the memory occupied by the wallpaper application. In addition, there is no need to jump during playback, which avoids the freeze during the jump and ensures the fast display of the first frame.

[0034] In this embodiment, step S1100 includes steps S1110-S1140.

[0035] S1110: According to a plurality of video stages corresponding to the wallpaper video, an image frame corresponding to each video stage is acquired, wherein a playback interval includes at least one video stage.

[0036] Wallpaper video includes multiple video stages. You can set the number of video stages included in the wallpaper video according to business needs. Figure 2 As shown, the wallpaper video may include three video stages, and the three video stages of the wallpaper video are s1, s2, and s3 in chronological order.

[0037] A playback interval may include one video stage, and a playback interval may also include multiple video stages. Multiple video stages within a playback interval may be continuous. For example, for three video stages s1, s2, and s3, there may be six corresponding playback intervals, namely s1, s2, s3, s1s2, s2s3, and s1s2s3. In playback interval s1, only video stage s1 is played. In playback interval s1s2, video stage s1 and video stage s2 are played. In playback interval s1s2s3, video stage s1, video stage s2, and video stage s3 are played.

[0038] Each video stage corresponds to multiple image frames. The image frames corresponding to each video stage can be output using rendering software. For example, a wallpaper video includes three video stages, the wallpaper video includes 720 image frames, and each video stage includes 240 image frames. The 720 image frames included in the wallpaper video are numbered img001-img720. The image frames corresponding to the first video stage s1 are numbered img001-img240. The image frames corresponding to the second video stage s2 are numbered img241-img480. The image frames corresponding to the third video stage s3 are numbered img481-img720.

[0039] S1120: Generate a front video slice file corresponding to the video stage according to first N image frames among the image frames corresponding to the video stage and a first frame rate, where N is a positive integer.

[0040] The first video segment is synthesized according to the first N image frames in the image frames corresponding to each video stage. The frame rate of the first video segment is consistent with the frame rate of the wallpaper video. The first video segment can be a video file in mp4 format, and the corresponding first video segment slice file in ts format can be generated according to the first video segment. The duration of the first video segment is determined according to the first frame rate and the number N. For example, the first video segment includes 180 image frames, and the first frame rate is 120fps, then the duration of the first video segment is 1.5 seconds.

[0041] In an example, for the three video stages of the wallpaper video, each video stage includes 240 image frames, and the corresponding front video is synthesized according to the first 180 image frames of each video stage. The image frames of the front video corresponding to the first video stage s1 are numbered img001-img180, the image frames of the front video corresponding to the second video stage s2 are numbered img241-img420, and the image frames of the front video corresponding to the third video stage s3 are numbered img481-img660. The front videos corresponding to the three video stages can be named s1_front.mp4, s2_front.mp4, and s3_front.mp4, respectively. The front video slice files corresponding to the three video stages can be named s1_front.ts, s2_front.ts, and s3_front.ts, respectively.

[0042] S1130: Generate a latter video slice file corresponding to the video stage according to the last M image frames among the image frames corresponding to the video stage and the first frame rate, where M is a positive integer, and the number of image frames corresponding to the video stage is the sum of N and M.

[0043] The latter video is synthesized according to the last M image frames in the image frames corresponding to each video stage. The frame rate of the latter video is the same as that of the former video. The latter video can be a video file in mp4 format, and the corresponding latter video slice file in ts format can be generated according to the latter video. The number of image frames corresponding to the video stage is the sum of the number of image frames corresponding to the former video and the number of image frames corresponding to the latter video. For example, a video stage includes 240 image frames, the former video includes the first 180 image frames, and the latter video includes the last 60 image frames. The frame rate of the latter video is 120fps, and the duration of the latter video is 0.5 seconds.

[0044] In one example, for the three video stages of the wallpaper video, the corresponding back-end video is synthesized according to the last 60 image frames of each video stage. The image frames of the back-end video corresponding to the first video stage s1 are numbered img181-img240, the image frames of the back-end video corresponding to the second video stage s2 are numbered img421-img480, and the image frames of the back-end video corresponding to the third video stage s3 are numbered img661-img720. The back-end videos corresponding to the three video stages can be named s1_back.mp4, s2_back.mp4, and s3_back.mp4, respectively. The back-end video slice files corresponding to the three video stages can be named s1_back.ts, s2_back.ts, and s3_back.ts, respectively.

[0045] S1140: Generate a rear-end slow-stop video slice file corresponding to the video stage according to the last M image frames in the image frames corresponding to the video stage and a second frame rate, wherein the second frame rate is lower than the first frame rate.

[0046] The image frames of the slow-stop video are the same as those of the video at the end. If the frame rate of the slow-stop video is lower than that of the video at the end, the duration of the slow-stop video is longer than that of the video at the end. For example, if the frame rate of the video at the end is 120fps and the frame rate of the slow-stop video is 60fps, the video at the end includes 60 image frames, the duration of the slow-stop video is 1 second, and the duration of the video at the end is 0.5 seconds. According to the slow-stop video at the end, the corresponding ts format video slice file can be generated.

[0047] In one example, for the three video stages of the wallpaper video, the corresponding back-end slow-stop videos are synthesized according to the last 60 image frames of each video stage. The back-end slow-stop videos corresponding to the three video stages can be named s1_backslow.mp4, s2_backslow.mp4, and s3_backslow.mp4, respectively. The back-end slow-stop video slice files corresponding to the three video stages can be named s1_backslow.ts, s2_backslow.ts, and s3_backslow.ts, respectively.

[0048] In this embodiment, the image frames of the rear slow-stop video are the same as the image frames of the rear video, and the frame rate of the rear slow-stop video is less than the frame rate of the rear video, so that the duration of the rear slow-stop video is greater than the duration of the rear video, achieving a slow-stop effect. And for each video stage, a front video slice file, a rear video slice file, and a rear slow-stop video slice file are generated to ensure that the slow-stop effect can be achieved for any playback interval. In addition, the present invention can also reduce the difficulty of developing such video wallpapers. During the development process, there is no need to control the stage interval of video playback, nor is there any need to control the video playback speed or use video connection to process the slow-stop effect.

[0049] In this embodiment, the step S1200 includes S1210-S1220.

[0050] S1210: Obtain the identifier of at least one video slice file corresponding to the playback interval, wherein the identifier includes the identifier of the front video slice files of the K video stages corresponding to the playback interval, the identifier of the rear video slice files of the first K-1 video stages, and the identifier of the rear slow-stop video slice file of the last video stage among the K video stages, where K is a positive integer.

[0051] When the playback interval includes only one video stage, K takes the value of 1, and the video slice files corresponding to the playback interval include the front video slice file and the back slow-stop video slice file of the video stage. For example, the playback interval includes only the video stage s1, and the video slice files corresponding to the playback interval include the front video slice file s1_front.ts of the video stage s1 and the back slow-stop video slice file s1_backslow.ts of the video stage s1.

[0052] In the case where the playback interval includes multiple video stages, the value of K is greater than or equal to 2. The video slice files corresponding to the playback interval include the front video slice files of K video stages, the back video slice files of the first K-1 video stages, and the back slow-stop video slice file of the Kth video stage. The Kth video stage is the last video stage of the playback interval. For example, the playback interval s1s2 includes 2 video stages, namely video stage s1 and video stage s2. The last video stage of the playback interval s1s2 is video stage s2. The video slice files corresponding to the playback interval s1s2 include the front video slice file s1_front.ts of video stage s1, the back video slice file s1_back.ts of video stage s1, the front video slice file s2_front.ts of video stage s2, and the back slow-stop video slice file s2_backslow.ts of video stage s2. Exemplarily, the playback interval s1s2s3 includes 3 video stages, namely video stage s1, video stage s2, and video stage s3. The last video stage of the playback interval s1s2s3 is the video stage s3. The video slice files corresponding to the playback interval s1s2s3 include the front video slice file s1_front.ts of the video stage s1, the back video slice file s1_back.ts of the video stage s1, the front video slice file s2_front.ts of the video stage s2, the back video slice file s2_back.ts of the video stage s2, the front video slice file s3_front.ts of the video stage s3, and the back slow-stop video slice file s3_backslow.ts of the video stage s3.

[0053] S1220: Writing an identifier of at least one video slice file corresponding to the playback interval into an index file according to a playback order of at least one video slice file corresponding to the playback interval.

[0054] Write the identifier of the video slice file that is in the front of the playback order into the index file first. For example, if the playback interval includes the front video slice file s1_front.ts of the video stage s1 and the back slow-stop video slice file s1_backslow.ts of the video stage s1, first write the identifier of the front video slice file s1_front.ts into the index file, and then write the identifier of the back slow-stop video slice file s1_backslow.ts into the index file.

[0055] In this embodiment, the index file includes an identifier of at least one video slice file corresponding to the playback interval. When playing to the last video stage, the video slice file at the front of the last video stage is switched to the video slice file at the back of the last video stage. Since the switching overhead of the video slice file is small, the freeze of the wallpaper video when it stops is reduced.

[0056] In this embodiment, the wallpaper video includes a first scene video, a second scene video and a transition effect video, the first scene video includes at least one video stage, and the second scene video includes at least one video stage. The waiting playback interval includes the last video stage in at least one video stage of the first scene video, the transition effect video, and the last video stage in at least one video stage of the second scene video. The index file corresponding to the waiting playback interval contains the identifier of the video slice file corresponding to the last video stage in at least one video stage of the first scene video, the identifier of the video slice file corresponding to the transition effect video, and the identifier of the video slice file corresponding to the first video stage in at least one video stage of the second scene video.

[0057] When it is necessary to play videos of two different scenes, a transitional animation video is added between the two scenes. The transitional animation video can transition from one scene video to another scene video, thereby reducing the sense of separation between the different scene videos.

[0058] The first scene video includes at least one video stage. A video slice file corresponding to the last video stage in at least one video stage of the first scene video is generated. For example, if the first scene video includes video stage 1 and video stage 2, then the last video stage in at least one video stage of the first scene video is video stage 2, and a video slice file corresponding to video stage 2 is generated.

[0059] The second scene video includes at least one video stage. A video slice file corresponding to the first video stage in at least one video stage of the second scene video is generated. For example, if the second scene video includes video stage 3 and video stage 4, then the first video stage in at least one video stage of the second scene video is video stage 3, and a video slice file corresponding to video stage 3 is generated.

[0060] Generate a corresponding video slice file according to the transition effect video. The interval to be played includes the last video stage in at least one video stage of the first scene video, the transition effect video, and the first video stage in at least one video stage of the second scene video. The playback order is to first play the last video stage in at least one video stage of the first scene video, then play the transition effect video, and finally play the first video stage in at least one video stage of the second scene video. The index file corresponding to the playback interval includes the identifier of the video slice file corresponding to the first stage, the identifier of the video slice file corresponding to the transition effect video, and the identifier of the video slice file corresponding to the second stage. For example, the interval to be played includes video stage 2 of the first scene video, video stage 4 of the second scene video, and the transition effect video. Then, the index file corresponding to the interval to be played includes the identifier of the video slice file corresponding to video stage 2, the identifier of the video slice file corresponding to the transition effect video, and the identifier of the video slice file corresponding to video stage 4.

[0061] In this embodiment, when two videos of different scenes need to be played, a transitional dynamic effect video is added between the two videos of different scenes, so that a smooth transition between different scenes can be achieved, thereby improving the user experience. At the same time, only the identifier of the video slice file needs to be added to the index file, and there is no need to synthesize the videos of different scenes and the transitional dynamic effect video, thereby avoiding taking up too much storage space.

[0062] In this embodiment, the wallpaper video includes multiple front videos and one back video, and the multiple front videos correspond to screen-off pictures at different positions on the screen. The step S1100 includes: generating a video slice file corresponding to each front video based on the multiple front videos; generating a video slice file corresponding to the back video based on the back video. Before the step S1300, the method also includes: determining a corresponding interval to be played according to the position of the screen-off picture on the screen, and the index file corresponding to the interval to be played includes an identifier of the video slice file of the front video corresponding to the position of the screen-off picture on the screen and an identifier of the video slice file of the back video.

[0063] Always on display means that when the screen of an electronic device is off, the image is still displayed in some areas of the screen. When a part of the screen displays the same color for a long time, it will cause aging of the area. To avoid this problem, the image displayed in the off state is repeatedly moved to different positions on the screen.

[0064] For the screen-off screen displayed in each position, set a corresponding front video. At the same time, for the screen-off screen displayed in all positions, set a common back video, and all front videos can smoothly transition to the back video. While maintaining a smooth transition effect, the size of the front video can be reduced, thereby reducing the total size of the wallpaper video. The same back video will be played after each front video is played. For example, the screen-off screen can be displayed in four different positions on the screen, and the screen-off screen has four states. Set four front videos to correspond to the four states of the screen-off screen. The four front videos share one back video.

[0065] For each front video, a corresponding video slice file is generated. Similarly, for the back video, a corresponding video slice file is also generated. For example, if the wallpaper video includes four front videos and one back video, then four video slice files corresponding to the four front videos are generated, and one video slice file corresponding to the back video is generated.

[0066] A playback interval is preset for each front video, and the playback interval includes the front video and the back video. The identifier of the video slice file corresponding to the front video and the identifier of the video slice file corresponding to the back video are written into the index file corresponding to the playback interval. After the screen is turned on, the corresponding interval to be played is determined according to the position of the screen-off image on the screen.

[0067] For example, the four types of front videos are front video 1, front video 2, front video 3, and front video 4. When the screen-off image is displayed at position 1 on the screen, the interval 1 to be played is determined after the screen is turned on, and the interval 1 to be played includes the front video 1 and the back video. The video slice file corresponding to the front video 1 and the video slice file corresponding to the back video are played in sequence. When the screen-off image is displayed at position 2 on the screen, the interval to be played is determined after the screen is turned on, and the interval to be played includes the front video 2 and the back video. The video slice file corresponding to the front video 2 and the video slice file corresponding to the back video are played in sequence.

[0068] In this embodiment, corresponding front videos are set according to different positions of the screen-off picture on the screen, and a back video is shared. When the screen is on, the playback interval is determined according to the position of the screen-off picture on the screen, and the identifier of the video slice file of the front video corresponding to the position of the screen-off picture on the screen is obtained from the index file, and the back video is reused to reduce the total size of the wallpaper video.

[0069] The wallpaper video playback method provided in the embodiment of the present application can be executed by a wallpaper video playback device. In the embodiment of the present application, the wallpaper video playback device performing the wallpaper video playback method is taken as an example to illustrate the wallpaper video playback device provided in the embodiment of the present application.

[0070] like Figure 3As shown, this embodiment provides a wallpaper video playback device 300, the device comprising:

[0071] A first generating module 301, configured to generate a plurality of video slice files based on a wallpaper video;

[0072] A second generating module 302 is used to generate an index file corresponding to each of the multiple playback intervals of the wallpaper video and the multiple video slice files, each of the index files including an identifier of at least one video slice file, and the at least one video slice file is a file among the multiple video slice files used for playing in the corresponding playback interval;

[0073] The playing module 303 is used to play the at least one video slice file according to the identifier of the at least one video slice file included in the index file corresponding to the interval to be played, and the interval to be played is any one of the multiple playback intervals.

[0074] In this embodiment, multiple video slice files are generated according to the wallpaper video, and a corresponding index file is generated for each playback interval of the wallpaper video. The identifier of the video slice file played in the corresponding playback interval is stored in the index file. When playing, only the video slice files in the playback interval need to be decoded, and the videos outside the playback interval do not need to be decoded, which reduces the power consumption when the wallpaper video is played and the memory occupied by the wallpaper application. In addition, there is no need to jump during playback, which avoids the freeze during the jump and ensures the fast display of the first frame image.

[0075] In one embodiment, the first generating module includes:

[0076] A first acquisition submodule is used to acquire an image frame corresponding to each video stage according to multiple video stages corresponding to the wallpaper video, and a playback interval includes at least one video stage;

[0077] A first generating submodule, configured to generate a front-segment video slice file corresponding to the video stage according to first N image frames in the image frames corresponding to the video stage and a first frame rate, where N is a positive integer;

[0078] A second generating submodule is used to generate a latter video slice file corresponding to the video stage according to the latter M image frames among the image frames corresponding to the video stage and the first frame rate, where M is a positive integer, and the number of image frames corresponding to the video stage is the sum of N and M;

[0079] The third generating submodule is used to generate a rear-segment slow-stop video slice file corresponding to the video stage according to the rear M image frames corresponding to the video stage and a second frame rate, wherein the second frame rate is lower than the first frame rate.

[0080] In one embodiment, the second generating module includes:

[0081] A second acquisition submodule is used to acquire an identifier of at least one video slice file corresponding to the playback interval, wherein the identifier includes an identifier of a front video slice file of K video stages corresponding to the playback interval, an identifier of a rear video slice file of the first K-1 video stages, and an identifier of a rear slow-stop video slice file of the last video stage in the K video stages, where K is a positive integer;

[0082] The writing submodule is used to write the identifier of the at least one video slice file corresponding to the playback interval into the index file according to the playback order of the at least one video slice file corresponding to the playback interval.

[0083] In one implementation, the wallpaper video includes a first scene video, a second scene video, and a transition effect video, the first scene video includes at least one video stage, and the second scene video includes at least one video stage;

[0084] The interval to be played includes the last video stage in at least one video stage of the first scene video, a transition animation video, and the first video stage in at least one video stage of the second scene video. The index file corresponding to the interval to be played includes the identifier of the video slice file corresponding to the last video stage in at least one video stage of the first scene video, the identifier of the video slice file corresponding to the transition animation video, and the identifier of the video slice file corresponding to the first video stage in at least one video stage of the second scene video.

[0085] In one embodiment, the wallpaper video includes a plurality of front-end videos and a rear-end video, and the plurality of front-end videos correspond to screen-off images at different positions on the screen;

[0086] The first generating module is specifically used to generate a video slice file corresponding to each front video based on the multiple front videos.

[0087] The first generating module is further used to generate a video slice file corresponding to the latter video based on the latter video.

[0088] The device also includes: a determination module, which is used to determine the corresponding interval to be played according to the position of the screen-off image on the screen, and the index file corresponding to the interval to be played includes the identifier of the video slice file of the previous video corresponding to the position of the screen-off image on the screen and the identifier of the video slice file of the subsequent video.

[0089] The wallpaper video playback device in the embodiment of the present application can be an electronic device, or a component in the electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal, or it can be other devices other than a terminal. Exemplarily, the electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a mobile Internet device (Mobile Internet Device, MID), an augmented reality (augmented reality, AR) / virtual reality (virtual reality, VR) device, a robot, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc. It can also be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.

[0090] The wallpaper video playback device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.

[0091] The wallpaper video playback device provided in the embodiment of the present application can achieve Figure 1 and Figure 2 To avoid repetition, the various processes implemented by the method embodiment are not described here.

[0092] Alternatively, if Figure 4 As shown, an embodiment of the present application further provides an electronic device 400, including a processor 401 and a memory 402, wherein the memory 402 stores a program or instruction that can be executed on the processor 401, and when the program or instruction is executed by the processor 401, each step of the above-mentioned wallpaper video playback method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0093] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.

[0094] Figure 5 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.

[0095] The electronic device 1000 includes but is not limited to: a radio frequency unit 1001, a network module 1002, an audio output unit 1003, an input unit 1004, a sensor 1005, a display unit 1006, a user input unit 1007, an interface unit 1008, a memory 1009, and a processor 1010 and other components.

[0096] Those skilled in the art will appreciate that the electronic device 1000 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 1010 through a power management system, thereby implementing functions such as managing charging, discharging, and power consumption management through the power management system. Figure 5 The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently, which will not be described in detail here.

[0097] The processor 1010 is used to generate a plurality of video slice files based on the wallpaper video;

[0098] The processor 1010 is further configured to generate an index file corresponding to each playback interval according to the multiple playback intervals of the wallpaper video and the multiple video slice files, wherein each of the index files includes an identifier of at least one video slice file, and the at least one video slice file is a file among the multiple video slice files for playing in a corresponding playback interval;

[0099] The display unit 1006 is used to play the at least one video slice file according to the identifier of the at least one video slice file included in the index file corresponding to the interval to be played, and the interval to be played is any one of the multiple playback intervals.

[0100] In this embodiment, multiple video slice files are generated according to the wallpaper video, and a corresponding index file is generated for each playback interval of the wallpaper video. The identifier of the video slice file used to play in the corresponding playback interval is stored in the index file. When playing, only the video slice files in the playback interval need to be decoded, and the videos outside the playback interval do not need to be decoded, which reduces the power consumption when the wallpaper video is played and the memory occupied by the wallpaper application. In addition, there is no need to jump during playback, which avoids the freeze during the jump and ensures the fast display of the first frame.

[0101] Optionally, the processor 1010 is further configured to obtain an image frame corresponding to each video stage according to multiple video stages corresponding to the wallpaper video, and a playback interval includes at least one video stage;

[0102] The processor 1010 is further configured to generate a front-segment video slice file corresponding to the video stage according to first N image frames in the image frames corresponding to the video stage and a first frame rate, where N is a positive integer;

[0103] The processor 1010 is further configured to generate a latter video slice file corresponding to the video stage according to the latter M image frames among the image frames corresponding to the video stage and the first frame rate, where M is a positive integer, and the number of image frames corresponding to the video stage is the sum of N and M;

[0104] Processor 1010 is further configured to generate a rear-end slow-stop video slice file corresponding to the video stage according to the last M image frames in the image frames corresponding to the video stage and a second frame rate, wherein the second frame rate is less than the first frame rate.

[0105] Optionally, the processor 1010 is further configured to obtain an identifier of at least one video slice file corresponding to the playback interval, the identifier comprising an identifier of a front video slice file of K video stages corresponding to the playback interval, an identifier of a rear video slice file of the first K-1 video stages, and an identifier of a rear slow-stop video slice file of the last video stage in the K video stages, where K is a positive integer;

[0106] The processor 1010 is further configured to write an identifier of at least one video slice file corresponding to the playback interval into an index file according to a playback order of at least one video slice file corresponding to the playback interval.

[0107] Optionally, the wallpaper video includes a first scene video, a second scene video and a transition effect video, the first scene video includes at least one video stage, and the second scene video includes at least one video stage;

[0108] The interval to be played includes the last video stage in at least one video stage of the first scene video, a transition animation video, and the first video stage in at least one video stage of the second scene video. The index file corresponding to the interval to be played includes the identifier of the video slice file corresponding to the last video stage in at least one video stage of the first scene video, the identifier of the video slice file corresponding to the transition animation video, and the identifier of the video slice file corresponding to the first video stage in at least one video stage of the second scene video.

[0109] Optionally, the wallpaper video includes a plurality of front-end videos and a rear-end video, and the plurality of front-end videos correspond to screen-off images at different positions on the screen.

[0110] The processor 1010 is further configured to generate a video slice file corresponding to each previous video based on the multiple previous videos.

[0111] The processor 1010 is further configured to generate a video slice file corresponding to the latter video based on the latter video.

[0112] Processor 1010 is also used to determine a corresponding interval to be played based on the position of the screen-off image on the screen, and the index file corresponding to the interval to be played includes an identifier of a video slice file of the previous video corresponding to the position of the screen-off image on the screen and an identifier of a video slice file of the subsequent video.

[0113] It should be understood that in the embodiment of the present application, the input unit 1004 may include a graphics processor (Graphics Processing Unit, GPU) 10041 and a microphone 10042, and the graphics processor 10041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 1006 may include a display panel 10061, and the display panel 10061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 1007 includes a touch panel 10071 and at least one of other input devices 10072. The touch panel 10071 is also called a touch screen. The touch panel 10071 may include two parts: a touch detection device and a touch controller. Other input devices 10072 may include, but are not limited to, a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.

[0114] The memory 1009 can be used to store software programs and various data. The memory 1009 may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory 1009 may include a volatile memory or a non-volatile memory, or the memory 1009 may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. The volatile memory may be a random access memory (RAM), a static random access memory (SRAM), a dynamic random access memory (DRAM), a synchronous dynamic random access memory (SDRAM), a double data rate synchronous dynamic random access memory (DDRSDRAM), an enhanced synchronous dynamic random access memory (ESDRAM), a synchronous link dynamic random access memory (SLDRAM) and a direct memory bus random access memory (DRRAM). The memory 1009 in the embodiment of the present application includes but is not limited to these and any other suitable types of memory.

[0115] The processor 1010 may include one or more processing units; optionally, the processor 1010 integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to an operating system, a user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor 1010.

[0116] The embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned wallpaper video playback method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.

[0117] The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory ROM, a random access memory RAM, a magnetic disk or an optical disk.

[0118] An embodiment of the present application further provides a chip, which includes a processor and a communication interface, wherein the communication interface is coupled to the processor, and the processor is used to run programs or instructions to implement the various processes of the above-mentioned wallpaper video playback method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0119] It should be understood that the chip mentioned in the embodiments of the present application can also be called a system-level chip, a system chip, a chip system or a system-on-chip chip, etc.

[0120] An embodiment of the present application provides a computer program product, which is stored in a storage medium. The program product is executed by at least one processor to implement the various processes of the above-mentioned wallpaper video playback method embodiment, and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0121] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.

[0122] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a computer software product, which is stored in a storage medium (such as ROM / RAM, a disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application.

[0123] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.

Claims

1. A wallpaper video playing method, characterized in that: The method comprises: Generate multiple video slice files based on wallpaper video; Generate an index file corresponding to each of the playback intervals according to the multiple playback intervals of the wallpaper video and the multiple video slice files, wherein each of the index files includes an identifier of at least one video slice file, the identifier of the video slice file is a storage path of the video slice file, and the at least one video slice file is a file among the multiple video slice files used for playing in the corresponding playback interval; Playing the at least one video slice file according to an identifier of the at least one video slice file included in the index file corresponding to the interval to be played, wherein the interval to be played is any one of the multiple playback intervals; The generating of multiple video slice files based on the wallpaper video includes: According to a plurality of video stages corresponding to the wallpaper video, an image frame corresponding to each video stage is acquired, wherein a playback interval includes at least one video stage; Generate a front-segment video slice file corresponding to the video stage according to the first N image frames in the image frames corresponding to the video stage and the first frame rate, where N is a positive integer; Generate a latter video slice file corresponding to the video stage according to the last M image frames among the image frames corresponding to the video stage and the first frame rate, where M is a positive integer, and the number of image frames corresponding to the video stage is the sum of N and M; A rear slow-stop video slice file corresponding to the video stage is generated according to the last M image frames in the image frames corresponding to the video stage and a second frame rate, wherein the second frame rate is lower than the first frame rate.

2. The method according to claim 1, characterized in that The step of generating an index file corresponding to each of the playback intervals according to the multiple playback intervals of the wallpaper video and the multiple video slice files includes: Obtaining an identifier of at least one video slice file corresponding to the playback interval, the identifier comprising identifiers of the first video slice files of K video stages corresponding to the playback interval, identifiers of the second video slice files of the first K-1 video stages, and identifiers of the second slow-stop video slice files of the last video stage of the K video stages, where K is a positive integer; According to the playback order of the at least one video slice file corresponding to the playback interval, an identifier of the at least one video slice file corresponding to the playback interval is written into an index file.

3. The method according to claim 1, characterized in that The wallpaper video includes a first scene video, a second scene video and a transition effect video, the first scene video includes at least one video stage, and the second scene video includes at least one video stage; The interval to be played includes the last video stage in at least one video stage of the first scene video, a transition animation video, and the first video stage in at least one video stage of the second scene video. The index file corresponding to the interval to be played includes the identifier of the video slice file corresponding to the last video stage in at least one video stage of the first scene video, the identifier of the video slice file corresponding to the transition animation video, and the identifier of the video slice file corresponding to the first video stage in at least one video stage of the second scene video.

4. The method according to claim 1, characterized in that: The wallpaper video includes a plurality of front-end videos and a rear-end video, wherein the plurality of front-end videos correspond to screen-off images at different positions on the screen; The generating of multiple video slice files based on the wallpaper video includes: Generate a video slice file corresponding to each front segment video based on the multiple front segment videos; Generate a video slice file corresponding to the latter video based on the latter video; Before playing the at least one video slice file according to the identifier of the at least one video slice file included in the index file corresponding to the to-be-played interval, the method further includes: The corresponding interval to be played is determined according to the position of the screen-off image on the screen, and the index file corresponding to the interval to be played includes the identifier of the video slice file of the previous video corresponding to the position of the screen-off image on the screen and the identifier of the video slice file of the subsequent video.

5. A wallpaper video playback device, characterized in that: The device comprises: A first generating module, used to generate a plurality of video slice files based on the wallpaper video; A second generating module is used to generate an index file corresponding to each playback interval according to the multiple playback intervals of the wallpaper video and the multiple video slice files, each of the index files includes an identifier of at least one video slice file, the identifier of the video slice file is a storage path of the video slice file, and the at least one video slice file is a file among the multiple video slice files for playing in the corresponding playback interval; a playing module, configured to play the at least one video slice file according to an identifier of the at least one video slice file included in the index file corresponding to the interval to be played, wherein the interval to be played is any one of the multiple playing intervals; The first generating module comprises: A first acquisition submodule is used to acquire an image frame corresponding to each video stage according to multiple video stages corresponding to the wallpaper video, and a playback interval includes at least one video stage; A first generating submodule, configured to generate a front-segment video slice file corresponding to the video stage according to first N image frames in the image frames corresponding to the video stage and a first frame rate, where N is a positive integer; A second generating submodule is used to generate a latter video slice file corresponding to the video stage according to the last M image frames in the image frames corresponding to the video stage and the first frame rate, where M is a positive integer, and the number of image frames corresponding to the video stage is the sum of N and M; The third generating submodule is used to generate a rear-segment slow-stop video slice file corresponding to the video stage according to the rear M image frames corresponding to the video stage and a second frame rate, wherein the second frame rate is lower than the first frame rate.

6. The device according to claim 5, characterized in that The second generating module comprises: A second acquisition submodule is used to acquire an identifier of at least one video slice file corresponding to the playback interval, wherein the identifier includes an identifier of a front video slice file of K video stages corresponding to the playback interval, an identifier of a rear video slice file of the first K-1 video stages, and an identifier of a rear slow-stop video slice file of the last video stage in the K video stages, where K is a positive integer; The writing submodule is used to write the identifier of the at least one video slice file corresponding to the playback interval into the index file according to the playback order of the at least one video slice file corresponding to the playback interval.

7. An electronic device, characterized in that: It comprises a processor and a memory, wherein the memory stores a program or instruction that can be run on the processor, and when the program or instruction is executed by the processor, the steps of the wallpaper video playback method according to any one of claims 1 to 4 are implemented.

8. A readable storage medium, characterized in that: The readable storage medium stores a program or instruction, and when the program or instruction is executed by the processor, the steps of the wallpaper video playback method according to any one of claims 1 to 4 are implemented.

Citation Information

Patent Citations

  • Dynamic wallpaper playing method and device, equipment and storage medium

    CN111880879A

  • Video buffering method and device, electronic equipment and computer readable storage medium

    CN112040302A

  • Video playing method, related equipment and readable storage medium

    CN114630176A

  • Browsing videos via a segment list

    US20150234919A1