CN114143595A - Video wallpaper playing method and device, electronic equipment and readable storage medium - Google Patents

Video wallpaper playing method and device, electronic equipment and readable storage medium Download PDF

Info

Publication number
CN114143595A
CN114143595A CN202111496233.1A CN202111496233A CN114143595A CN 114143595 A CN114143595 A CN 114143595A CN 202111496233 A CN202111496233 A CN 202111496233A CN 114143595 A CN114143595 A CN 114143595A
Authority
CN
China
Prior art keywords
video frame
frame
played
video
time length
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111496233.1A
Other languages
Chinese (zh)
Inventor
李梓豪
叶进
陈春晓
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Zhuhai Baoqu Technology Co Ltd
Original Assignee
Zhuhai Baoqu Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Zhuhai Baoqu Technology Co Ltd filed Critical Zhuhai Baoqu Technology Co Ltd
Priority to CN202111496233.1A priority Critical patent/CN114143595A/en
Publication of CN114143595A publication Critical patent/CN114143595A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/431Generation of visual interfaces for content selection or interaction; Content or additional data rendering
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/433Content storage operation, e.g. storage operation in response to a pause request, caching operations
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/439Processing of audio elementary streams
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/40Client devices specifically adapted for the reception of or interaction with content, e.g. set-top-box [STB]; Operations thereof
    • H04N21/43Processing of content or additional data, e.g. demultiplexing additional data from a digital video stream; Elementary client operations, e.g. monitoring of home network or synchronising decoder's clock; Client middleware
    • H04N21/44Processing of video elementary streams, e.g. splicing a video clip retrieved from local storage with an incoming video stream, rendering scenes according to MPEG-4 scene graphs

Abstract

The embodiment of the application discloses a video wallpaper playing method and device, electronic equipment and a readable storage medium, relates to the technical field of video playing, and aims to improve fluency of video wallpaper playing. The method comprises the following steps: acquiring video wallpaper content to be played; respectively extracting the audio frame and the video frame in the video wallpaper to be played into a memory; converting the formats of the audio frame and the video frame by using a preset hard decoder, and sending the audio frame and the video frame after the formats are converted to an image processor, so that the image processor decodes the audio frame and the video frame; and sending the decoded audio frame and the decoded video frame to corresponding output equipment so as to play the decoded audio frame and the decoded video frame. The method and the device are suitable for playing the video wallpaper.

Description

Video wallpaper playing method and device, electronic equipment and readable storage medium
Technical Field
The present application relates to the field of video playing technologies, and in particular, to a method and an apparatus for playing a video wallpaper, an electronic device, and a readable storage medium.
Background
In the prior art, most of videos need to be decoded by soft solution, that is, the videos are decoded by a Central Processing Unit (CPU), with the development of the technology, more and more video wallpapers exist, but the decoding technology is not updated, the soft solution is still used for decoding, the CPU has more tasks to operate, and then the video data is decoded, so that the load and the occupancy rate of the CPU are further increased, and in an extreme case, the computer is jammed, thereby causing the problem that the video playing is not smooth.
Disclosure of Invention
In view of this, embodiments of the present application provide a method and an apparatus for playing video wallpaper, an electronic device, and a readable storage medium, which can improve fluency of playing video wallpaper.
In a first aspect, an embodiment of the present application provides a method for playing a video wallpaper, including: acquiring video wallpaper content to be played; respectively extracting the audio frame and the video frame in the video wallpaper to be played into a memory; converting the formats of the audio frame and the video frame by using a preset hard decoder, and sending the audio frame and the video frame after the formats are converted to an image processor, so that the image processor decodes the audio frame and the video frame; and sending the decoded audio frame and the decoded video frame to corresponding output equipment so as to play the decoded audio frame and the decoded video frame.
According to a specific implementation manner of the embodiment of the present application, before sending the decoded audio frame and the decoded video frame to the corresponding output device, the method further includes: determining whether to play a second video frame according to the actual playing time length and the theoretical playing time length of the first video frame; the first video frame is a played video frame closest to the current time, and the second video frame is an unplayed video frame which is adjacent to the first video frame and has a timestamp greater than the first timestamp; the theoretical playing time length is the playing time length under the condition that the first video frame is not delayed; under the condition that the second video frame is not played, determining a video frame to be played currently so as to synchronize the played video frame with the currently played audio frame; the sending the decoded video frame to a corresponding output device includes: and sending the video frame to be played to corresponding output equipment.
According to a specific implementation manner of the embodiment of the present application, determining whether to play the second video frame according to the actual playing time and the theoretical playing time of the first video frame includes: determining the actual playing time length of the first video frame according to the first starting time of the first video frame and the second starting time of the second video frame; determining the theoretical playing time length of the first video frame according to the first time stamp of the first video frame and the second time stamp of the second video frame; determining whether the difference between the actual playing time length and the theoretical playing time length exceeds a preset threshold value according to the actual playing time length and the theoretical playing time length; under the condition that the difference between the actual playing time length and the theoretical playing time length exceeds the preset threshold value, the second video frame is not played; and playing the second video frame under the condition that the difference between the first playing time length and the second playing time length does not exceed the preset threshold value.
According to a specific implementation manner of the embodiment of the present application, the determining the video frame to be currently played includes: acquiring currently played audio frame information; and determining the video frame to be played currently according to the audio frame information played currently.
According to a specific implementation manner of the embodiment of the present application, determining a video frame to be currently played according to the currently played audio frame information includes: and determining the video frame to be played currently according to the currently played audio frame information and a preset frame tracking strategy.
According to a specific implementation manner of the embodiment of the present application, the method further includes: creating a video frame buffer queue; storing the decoded video frame into the video frame buffer queue; the sending the video frame to be played to a corresponding output device includes: and acquiring the video frame to be played currently from the video frame buffer queue, and sending the video frame to be played currently to corresponding output equipment.
In a second aspect, an embodiment of the present application provides a video wallpaper playing apparatus, including: the acquisition module is used for acquiring the content of the video wallpaper to be played; the extracting module is used for respectively extracting the audio frame and the video frame in the video wallpaper to be played into an internal memory; the conversion module is used for converting the formats of the audio frame and the video frame by using a preset hard decoder and sending the audio frame and the video frame after the formats are converted to an image processor so that the image processor decodes the audio frame and the video frame; and the sending module is used for sending the decoded audio frame and the decoded video frame to corresponding output equipment so as to play the decoded audio frame and the decoded video frame.
According to a specific implementation manner of the embodiment of the present application, before sending the decoded audio frame and the decoded video frame to corresponding output devices, the apparatus further includes: a first determining module, configured to determine whether to play a second video frame according to an actual playing time length and a theoretical playing time length of a first video frame before the sending module sends the decoded audio frame and the decoded video frame to a corresponding output device; the first video frame is a played video frame closest to the current time, and the second video frame is an unplayed video frame which is adjacent to the first video frame and has a timestamp greater than the first timestamp; the theoretical playing time length is the playing time length under the condition that the first video frame is not delayed; a second determining module, configured to determine a video frame to be currently played under the condition that the second video frame is not played, so that the played video frame is synchronized with the currently played audio frame; the sending module comprises: and the sending submodule is used for sending the video frame to be played to corresponding output equipment.
According to a specific implementation manner of the embodiment of the present application, the first determining module is specifically configured to: determining the actual playing time length of the first video frame according to the first starting time of the first video frame and the second starting time of the second video frame; determining the theoretical playing time length of the first video frame according to the first time stamp of the first video frame and the second time stamp of the second video frame; determining whether the difference between the actual playing time length and the theoretical playing time length exceeds a preset threshold value according to the actual playing time length and the theoretical playing time length; under the condition that the difference between the actual playing time length and the theoretical playing time length exceeds the preset threshold value, the second video frame is not played; and playing the second video frame under the condition that the difference between the first playing time length and the second playing time length does not exceed the preset threshold value.
According to a specific implementation manner of the embodiment of the present application, the second determining module includes: the acquisition submodule is used for acquiring the currently played audio frame information; and the first determining submodule is used for determining the video frame to be played currently according to the audio frame information played currently.
According to a specific implementation manner of the embodiment of the present application, the first determining submodule is specifically configured to: and determining the video frame to be played currently according to the currently played audio frame information and a preset frame tracking strategy.
According to a specific implementation manner of the embodiment of the present application, the apparatus is further configured to: creating a video frame buffer queue; storing the decoded video frame into the video frame buffer queue; the sending submodule is specifically configured to: and acquiring the video frame to be played currently from the video frame buffer queue, and sending the video frame to be played currently to corresponding output equipment.
In a third aspect, an embodiment of the present application provides an electronic device, including: the device comprises a shell, a processor, a memory, a circuit board and a power circuit, wherein the circuit board is arranged in a space enclosed by the shell, and the processor and the memory are arranged on the circuit board; a power supply circuit for supplying power to each circuit or device of the electronic apparatus; the memory is used for storing executable program codes; the processor reads the executable program codes stored in the memory to run programs corresponding to the executable program codes, and is used for executing the video wallpaper playing method in any one of the implementation modes.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, where one or more programs are stored, and the one or more programs are executable by one or more processors to implement the video wallpaper playing method according to any one of the foregoing implementation manners.
In the video wallpaper playing method, the video wallpaper playing device, the electronic device and the readable storage medium of the embodiment, by acquiring the content of the video wallpaper to be played, an audio frame and a video frame in the video wallpaper to be played are respectively extracted into a memory, a preset hard decoder is used for carrying out format conversion on the audio frame and the video frame, and the audio frame and the video frame after format conversion are sent to an image processor, so that the image processor decodes the audio frame and the video frame, and sends the decoded audio frame and the decoded video frame to a corresponding output device, thereby playing the decoded audio frame and the decoded video frame, because the preset hard decoder is used for carrying out format conversion on the audio frame and the video frame, and sending the audio frame and the video frame after format conversion to the image processor, and the image processor is used for decoding the audio frame and the video frame, and in the process, less CPU resources are occupied, so that the fluency of playing the video wallpaper is improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative efforts.
Fig. 1 is a schematic flowchart of a video wallpaper playing method according to an embodiment of the present application;
FIG. 2 is a flowchart illustrating a process of determining whether to play a second video frame according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of a video wallpaper playback device according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The embodiments of the present application will be described in detail below with reference to the accompanying drawings. It should be understood that the embodiments described are only a few embodiments of the present application, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In order to make those skilled in the art better understand the technical concepts, embodiments and advantages of the examples of the present application, the following detailed description is given by way of specific examples.
An embodiment of the present application provides a method for playing a video wallpaper, including: acquiring video wallpaper content to be played; respectively extracting the audio frame and the video frame in the video wallpaper to be played into a memory; converting the formats of the audio frame and the video frame by using a preset hard decoder, and sending the audio frame and the video frame after the formats are converted to an image processor so that the image processor decodes the audio frame and the video frame; and sending the decoded audio frame and the decoded video frame to corresponding output equipment so as to play the decoded audio frame and the decoded video frame, thereby improving the fluency of playing the video wallpaper.
Fig. 1 is a schematic flow diagram of a video wallpaper playing method according to an embodiment of the present application, and as shown in fig. 1, the video wallpaper playing method according to the embodiment may be applied to a "vitality wallpaper" product, and the method may include:
s101, video wallpaper content to be played is obtained.
The video wallpaper in this embodiment may be a video played as wallpaper, and the video wallpaper may include an audio frame and a video frame corresponding to the audio frame.
S102, respectively extracting the audio frame and the video frame in the video wallpaper to be played to a memory.
The computer communication transmits binary data composed of '0' and '1', the binary data forms a 'Frame' (Frame), the Frame is the minimum unit of network transmission, in the embodiment, the audio Frame is the audio of the minimum unit, namely, the audio is transmitted in the form of an audio Frame, and the video Frame is the video of the minimum unit, namely, the video is transmitted in the form of a video Frame.
A thread for reading audio frames and a thread for reading video frames may be created, and audio frames may be read into the memory using the thread for reading audio frames, and video frames may be read into the memory using the thread for reading video frames as well.
S103, converting the formats of the audio frame and the video frame by using a preset hard decoder, and sending the audio frame and the video frame after the formats are converted to an image processor so that the image processor decodes the audio frame and the video frame.
In some examples, the predetermined hard decoder may be DXVA2 (Direct Video access), or D3D (Direct3D), and D3D is a display program interface developed by microsoft to improve the display performance of 3D games in Windows.
The preset hard decoder in this embodiment can convert the formats of the audio frame and the video frame into the format of the audio frame and the format of the video frame that can be recognized by the image processor, so as to provide a basis for the image processor to decode the audio frame and the video frame.
And an image processor (GPU) decodes the audio frame and the video frame after obtaining the audio frame and the video frame which are converted into formats by a preset hardware decoder.
Since the GPU is more suitable for processing parallel tasks, such as parallel operations of decoding, the GPU decoding is used in the embodiment, so that resources of the GPU can be fully utilized, and the decoding efficiency is improved.
S104, sending the decoded audio frame and the decoded video frame to corresponding output equipment so as to play the decoded audio frame and the decoded video frame.
And sending the decoded audio frame to a device for playing audio so as to play the audio frame, and sending the decoded video frame to a device for playing video frame so as to play the video frame.
In this embodiment, by obtaining content of a video wallpaper to be played, an audio frame and a video frame in the video wallpaper to be played are respectively extracted into a memory, a preset hard decoder is used to perform format conversion on the audio frame and the video frame, and the audio frame and the video frame after format conversion are sent to an image processor, so that the image processor decodes the audio frame and the video frame, and sends the decoded audio frame and the decoded video frame to a corresponding output device, thereby playing the decoded audio frame and the decoded video frame, because the preset hard decoder is used to perform format conversion on the audio frame and the video frame, and the audio frame and the video frame after format conversion are sent to the image processor, the image processor is used to decode the audio frame and the video frame, in the process, less CPU resources are occupied, so that the fluency of playing the video wallpaper is improved.
In the specific application of the embodiment, for example, when a video wallpaper is played in a product of "vitality wallpaper", in the prior art, the CPU occupies 20% on average, and after the scheme of the embodiment is used, the CPU occupies only 2%, the optimization rate reaches 90%, and the occupation of CPU resources is greatly reduced.
Since the audio frame reading and decoding time occupies a small amount and the delay is less likely to occur, in order to improve the synchronization between the audio frame and the video frame, the decoded audio frame may be directly played, and the played video frame may be adjusted based on the audio frame, in some examples, before the decoded audio frame and the decoded video frame are transmitted to the corresponding output device (S104), the method may further include:
and S105, determining whether to play the second video frame according to the actual playing time length and the theoretical playing time length of the first video frame.
In this embodiment, the first video frame is a played video frame closest to the current time; the second video frame is an unplayed video frame which is adjacent to the first video frame and has a timestamp greater than the first timestamp; the theoretical playing time length is the playing time length of the first video frame under the condition that the delay does not occur.
Referring to fig. 2, in some examples, determining whether to play the second video frame according to the actual playing time length and the theoretical playing time length of the first video frame (S105) may include:
s105, determining the actual playing time length of the first video frame according to the first starting time of the first video frame and the second starting time of the second video frame, and performing the step 105 a.
In this embodiment, the first video frame is a played video frame closest to the current time, the first start time of the first video frame is the start time of actually playing the first video frame, and the start time of the second video frame may be the time of ending the playing of the first video frame.
S105, 105b, determining the theoretical playing time length of the first video frame according to the first time stamp of the first video frame and the second time stamp of the second video frame.
The time stamp of the video frame may be a relative time when each video frame starts playing when the video is produced, the relative time is a time when the first frame starts playing, for example, generally, the time when the first frame starts playing is 0, the time when the second frame starts playing is 16ms, the time when the third frame starts playing is 32ms, then the time stamp of the first frame is 0, the time stamp of the second frame is 16ms, the time stamp of the third frame is 32ms, and the difference between two adjacent time stamps is the playing duration of one frame without pause or delay, so that the theoretical playing duration of the first video frame can be determined according to the first time stamp of the first video frame and the second time stamp of the second video frame.
S105c, determining whether the difference between the actual playing time length and the theoretical playing time length exceeds a preset threshold value according to the actual playing time length and the theoretical playing time length.
In some examples, the preset threshold may be a theoretical playing duration of one video frame.
S105d, under the condition that the difference between the actual playing time length and the theoretical playing time length exceeds a preset threshold value, the second video frame is not played.
When the difference between the actual playing time and the theoretical playing time exceeds the preset threshold, the playing time delay of the first video frame is more, and at this time, the playing of the second video frame is continued, which may cause the audio frame and the video frame to be seriously out of synchronization, and the user experience is poor.
S105e, under the condition that the difference between the first playing time length and the second playing time length does not exceed the preset threshold value, playing the second video frame.
When the difference between the actual playing time and the theoretical playing time does not exceed the preset threshold, the playing of the first video frame has time delay, but the time delay is not too much, the second video frame can be continuously played at the moment, the problem of serious asynchronism of the audio frame and the video frame can not be caused, and the user experience is not influenced.
S106, under the condition that the second video frame is not played, determining the video frame to be played currently so as to enable the played video frame to be synchronous with the audio frame played currently.
For convenience of data management, after the image processor decodes the audio frame, the decoded audio frame and video frame are returned to the memory, and the audio frame may be directly played, in some examples, for the video frame, this embodiment may include:
a video frame buffer queue is created.
And storing the decoded video frame into a video frame buffer queue.
And when the rendering thread needs to render, acquiring the video frame to be played currently from the video frame buffer queue.
Accordingly, transmitting the decoded video frame to a corresponding output device may include:
and acquiring the decoded video frame from the video frame buffer queue, and sending the video frame to be played to corresponding output equipment.
In some examples, the video frame buffer queue may store three video frames, namely, a first video frame that has been played closest to the current time and two pre-loaded video frames, namely, a second video frame that is adjacent to the first video frame and has not been played and has a timestamp greater than the first timestamp, and another video frame that is adjacent to the second video frame.
Because the playing of the first video frame has a relatively serious delay, in order to synchronize the played video frame with the currently played audio frame as much as possible and not to influence the user experience, the second video frame may not be played, and under such a condition, the video frame to be played currently needs to be determined again.
In some examples, determining the video frame to be currently played may include:
A. and acquiring the currently played audio frame information.
The currently played frame of audio is obtained, and the played frame can be determined by the timestamp information in the audio frame.
B. And determining the video frame to be played currently according to the audio frame information played currently.
The audio frames and the video frames are in one-to-one correspondence, such as the first frame of the audio frames corresponds to the first frame of the video frames; the fourth frame of the audio frame corresponds to the fourth frame of the video frame, and correspondingly, when the audio frame is played, in order to realize the synchronization of the audio frame and the video frame, when the first frame of the audio is played, the first frame of the video is played; and when the fourth frame of the audio is played, the fourth frame of the video is played, and based on the fourth frame of the video, the video frame to be played currently can be determined according to the currently played audio frame information.
In some examples, determining the video frame (B) to be currently played according to the currently played audio frame information may include:
and B1, determining the video frame to be played currently according to the currently played audio frame information and a preset frame tracking strategy.
For example, a seventh frame of the currently played audio and a second frame of the video frame just played are determined, according to the currently played audio frame information and a preset frame tracking strategy, that is, the video frame to be played is the seventh frame, that is, the video frame of the seventh frame is directly played without playing the third frame to the sixth frame; it may also be determined that the video frame to be currently played is the fourth frame, the video frame played after the fourth frame is the sixth frame or the seventh frame, and then the eighth frame or the ninth frame is played, that is, the frame skipping playing video frame, and a threshold may be set to limit the number of frame skipping, for example, skipping one frame at a time. After the eighth frame or the ninth frame is played, the audio frame information played at that time can be obtained again, and the video frame to be played corresponding to the audio frame information played at that time is determined according to the audio frame information played at that time and the frame tracking strategy, so that the synchronization of the played audio frame and the video frame is realized.
Transmitting (S103) the decoded video frame to a corresponding output device, which may include:
and sending the video frame to be played to the corresponding output equipment.
And sending the video frame to be played currently determined in the step S106 to corresponding output equipment.
The following describes the embodiments of the present application in detail with reference to a specific example.
The video wallpaper playing method of the embodiment may include:
the first step is as follows: 4 threads are initially created for reading and decoding of audio data and reading and decoding of video data, respectively.
The second step is that: and creating a buffer queue of video frame data, wherein the buffer queue only has 3 frames at most, and the two frames are respectively a pre-loaded frame and a current playing frame.
The currently played frame is a video frame which is not played yet, and whether the video frame is played or not needs to be determined according to whether frame tracing is needed or not.
The third step: decoders that create hard solutions, such as DXVA2 or D3D. When the reading thread loads each frame of data into the memory, the data is directly decoded in the GPU through the hard decoder, and is transmitted back to the memory from the GPU after being successfully decoded.
The fourth step: creating a chase frame system.
The audio data is selected as the reference data because the reading and decoding time of the audio data is less and more reliable. And the frame-chasing data is a video frame.
The fifth step: after each frame is decoded successfully and returned to the memory, the data is stored in a data queue, and the rendering thread only needs to fetch the data from the queue when the rendering is needed.
According to the decoding scheme provided by the embodiment, a user can flexibly select a soft solution or the decoding scheme in the embodiment according to the configuration condition of the device, and when the decoding scheme of the embodiment is used, the number of threads is reduced to 1, so that the occupation of a memory is greatly optimized.
An embodiment of the present application provides a video wallpaper playing device, including: the acquisition module is used for acquiring the content of the video wallpaper to be played; the extracting module is used for respectively extracting the audio frame and the video frame in the video wallpaper to be played into an internal memory; the conversion module is used for converting the formats of the audio frame and the video frame by using a preset hard decoder and sending the audio frame and the video frame after the formats are converted to an image processor so that the image processor decodes the audio frame and the video frame; the sending module is used for sending the decoded audio frame and the decoded video frame to corresponding output equipment so as to play the decoded audio frame and the decoded video frame, and the fluency of playing the video wallpaper can be improved.
Fig. 3 is a schematic structural diagram of a video wallpaper playback device according to an embodiment of the present application, and as shown in fig. 3, the video wallpaper playback device according to the embodiment may include: the acquisition module 11 is configured to acquire video wallpaper content to be played; the extracting module 12 is configured to respectively extract the audio frame and the video frame in the video wallpaper to be played into an internal memory; a conversion module 13, configured to perform format conversion on the audio frame and the video frame by using a preset hard decoder, and send the audio frame and the video frame after format conversion to an image processor, so that the image processor decodes the audio frame and the video frame; a sending module 14, configured to send the decoded audio frame and the decoded video frame to corresponding output devices, so as to play the decoded audio frame and the decoded video frame.
The apparatus of this embodiment may be used to implement the technical solution of the method embodiment shown in fig. 1, and the implementation principle and the technical effect are similar, which are not described herein again.
In the device of this embodiment, by acquiring content of a video wallpaper to be played, an audio frame and a video frame in the video wallpaper to be played are respectively extracted into a memory, a preset hard decoder is used to perform format conversion on the audio frame and the video frame, and the audio frame and the video frame after format conversion are sent to an image processor, so that the image processor decodes the audio frame and the video frame, and sends the decoded audio frame and the decoded video frame to corresponding output devices, thereby playing the decoded audio frame and the decoded video frame, because the preset hard decoder is used to perform format conversion on the audio frame and the video frame, and the audio frame and the video frame after format conversion are sent to the image processor, the image processor is used to decode the audio frame and the video frame, in the process, less CPU resources are occupied, so that the fluency of playing the video wallpaper is improved.
As an optional embodiment, the apparatus further comprises: a first determining module, configured to determine whether to play a second video frame according to an actual playing time length and a theoretical playing time length of a first video frame before the sending module sends the decoded audio frame and the decoded video frame to a corresponding output device; the first video frame is a played video frame closest to the current time, and the second video frame is an unplayed video frame which is adjacent to the first video frame and has a timestamp greater than the first timestamp; the theoretical playing time length is the playing time length under the condition that the first video frame is not delayed; a second determining module, configured to determine a video frame to be currently played under the condition that the second video frame is not played, so that the played video frame is synchronized with the currently played audio frame; the sending module comprises: and the sending submodule is used for sending the video frame to be played to corresponding output equipment.
As an optional implementation manner, the first determining module is specifically configured to: determining the actual playing time length of the first video frame according to the first starting time of the first video frame and the second starting time of the second video frame; determining the theoretical playing time length of the first video frame according to the first time stamp of the first video frame and the second time stamp of the second video frame; determining whether the difference between the actual playing time length and the theoretical playing time length exceeds a preset threshold value according to the actual playing time length and the theoretical playing time length; under the condition that the difference between the actual playing time length and the theoretical playing time length exceeds the preset threshold value, the second video frame is not played; and playing the second video frame under the condition that the difference between the first playing time length and the second playing time length does not exceed the preset threshold value.
As an optional implementation, the second determining module includes: the acquisition submodule is used for acquiring the currently played audio frame information; and the first determining submodule is used for determining the video frame to be played currently according to the audio frame information played currently.
As an optional implementation manner, the first determining submodule is specifically configured to: and determining the video frame to be played currently according to the currently played audio frame information and a preset frame tracking strategy.
As an optional embodiment, the apparatus is further configured to: creating a video frame buffer queue; storing the decoded video frame into the video frame buffer queue; the sending submodule is specifically configured to: and acquiring the video frame to be played currently from the video frame buffer queue, and sending the video frame to be played currently to corresponding output equipment.
The apparatus of the foregoing embodiment may be configured to implement the technical solution of the foregoing method embodiment, and the implementation principle and the technical effect are similar, which are not described herein again.
Fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application, and as shown in fig. 4, the electronic device may include: the electronic device comprises a shell 61, a processor 62, a memory 63, a circuit board 64 and a power circuit 65, wherein the circuit board 64 is arranged inside a space enclosed by the shell 61, and the processor 62 and the memory 63 are arranged on the circuit board 64; a power supply circuit 65 for supplying power to each circuit or device of the electronic apparatus; the memory 63 is used to store executable program code; the processor 62 reads the executable program code stored in the memory 63 to run a program corresponding to the executable program code, so as to execute any one of the video wallpaper playing methods provided in the foregoing embodiments, and therefore, corresponding advantageous technical effects can also be achieved.
The above electronic devices exist in a variety of forms, including but not limited to:
(1) a mobile communication device: such devices are characterized by mobile communications capabilities and are primarily targeted at providing voice, data communications. Such terminals include: smart phones (e.g., iphones), multimedia phones, functional phones, and low-end phones, among others.
(2) Ultra mobile personal computer device: the equipment belongs to the category of personal computers, has calculation and processing functions and generally has the characteristic of mobile internet access. Such terminals include: PDA, MID, and UMPC devices, etc., such as ipads.
(3) A portable entertainment device: such devices can display and play multimedia content. This type of device comprises: audio, video players (e.g., ipods), handheld game consoles, electronic books, and smart toys and portable car navigation devices.
(4) A server: the device for providing the computing service comprises a processor, a hard disk, a memory, a system bus and the like, and the server is similar to a general computer architecture, but has higher requirements on processing capacity, stability, reliability, safety, expandability, manageability and the like because of the need of providing high-reliability service.
(5) And other electronic equipment with data interaction function.
Accordingly, an embodiment of the present application further provides a computer-readable storage medium, where one or more programs are stored, and the one or more programs can be executed by one or more processors to implement any one of the video wallpaper playing methods provided in the foregoing embodiments, so that corresponding technical effects can also be achieved, which have been described in detail above and are not described herein again.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
All the embodiments in the present specification are described in a related manner, and the same and similar parts among the embodiments may be referred to each other, and each embodiment focuses on the differences from the other embodiments.
In particular, as for the apparatus embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
For convenience of description, the above devices are described separately in terms of functional division into various units/modules. Of course, the functionality of the units/modules may be implemented in one or more software and/or hardware implementations when the present application is implemented.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. The storage medium may be a magnetic disk, an optical disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), or the like.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any changes or substitutions that can be easily conceived by those skilled in the art within the technical scope of the present application should be covered within the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (10)

1. A video wallpaper playing method is characterized by comprising the following steps:
acquiring video wallpaper content to be played;
respectively extracting the audio frame and the video frame in the video wallpaper to be played into a memory;
converting the audio frame and the video frame by using a hard decoder, and sending the audio frame and the video frame after format conversion to an image processor so that the image processor decodes the audio frame and the video frame;
and sending the decoded audio frame and the decoded video frame to corresponding output equipment so as to play the decoded audio frame and the decoded video frame.
2. The method of claim 1, wherein before transmitting the decoded audio frames and the decoded video frames to a corresponding output device, the method further comprises:
determining whether to play a second video frame according to the actual playing time length and the theoretical playing time length of the first video frame; the first video frame is a played video frame closest to the current time, and the second video frame is an unplayed video frame which is adjacent to the first video frame and has a timestamp greater than the first timestamp; the theoretical playing time length is the playing time length under the condition that the first video frame is not delayed;
under the condition that the second video frame is not played, determining a video frame to be played currently so as to synchronize the played video frame with the currently played audio frame;
the sending the decoded video frame to a corresponding output device includes:
and sending the video frame to be played to corresponding output equipment.
3. The method of claim 2, wherein determining whether to play the second video frame according to the actual playing time length and the theoretical playing time length of the first video frame comprises:
determining the actual playing time length of the first video frame according to the first starting time of the first video frame and the second starting time of the second video frame;
determining the theoretical playing time length of the first video frame according to the first time stamp of the first video frame and the second time stamp of the second video frame;
determining whether the difference between the actual playing time length and the theoretical playing time length exceeds a preset threshold value according to the actual playing time length and the theoretical playing time length;
under the condition that the difference between the actual playing time length and the theoretical playing time length exceeds the preset threshold value, the second video frame is not played;
and playing the second video frame under the condition that the difference between the first playing time length and the second playing time length does not exceed the preset threshold value.
4. The method of claim 2, wherein the determining the video frame to be currently played comprises:
acquiring currently played audio frame information;
and determining the video frame to be played currently according to the audio frame information played currently.
5. The method according to claim 4, wherein the determining a video frame to be currently played according to the currently played audio frame information comprises:
and determining the video frame to be played currently according to the currently played audio frame information and a preset frame tracking strategy.
6. The method of claim 2, further comprising:
creating a video frame buffer queue;
storing the decoded video frame into the video frame buffer queue;
the sending the video frame to be played to a corresponding output device includes:
and acquiring the video frame to be played currently from the video frame buffer queue, and sending the video frame to be played currently to corresponding output equipment.
7. A video wallpaper playback device, comprising:
the acquisition module is used for acquiring the content of the video wallpaper to be played;
the extracting module is used for respectively extracting the audio frame and the video frame in the video wallpaper to be played into an internal memory;
the conversion module is used for converting the formats of the audio frame and the video frame by using a preset hard decoder and sending the audio frame and the video frame after the formats are converted to an image processor so that the image processor decodes the audio frame and the video frame;
and the sending module is used for sending the decoded audio frame and the decoded video frame to corresponding output equipment so as to play the decoded audio frame and the decoded video frame.
8. The apparatus of claim 7, further comprising:
a first determining module, configured to determine whether to play a second video frame according to an actual playing time length and a theoretical playing time length of a first video frame before the sending module sends the decoded audio frame and the decoded video frame to a corresponding output device; the first video frame is a played video frame closest to the current time, and the second video frame is an unplayed video frame which is adjacent to the first video frame and has a timestamp greater than the first timestamp; the theoretical playing time length is the playing time length under the condition that the first video frame is not delayed;
a second determining module, configured to determine a video frame to be currently played under the condition that the second video frame is not played, so that the played video frame is synchronized with the currently played audio frame;
the sending module comprises:
and the sending submodule is used for sending the video frame to be played to corresponding output equipment.
9. The apparatus of claim 8, wherein the first determining module is specifically configured to:
determining the actual playing time length of the first video frame according to the first starting time of the first video frame and the second starting time of the second video frame;
determining the theoretical playing time length of the first video frame according to the first time stamp of the first video frame and the second time stamp of the second video frame;
determining whether the difference between the actual playing time length and the theoretical playing time length exceeds a preset threshold value according to the actual playing time length and the theoretical playing time length;
under the condition that the difference between the actual playing time length and the theoretical playing time length exceeds the preset threshold value, the second video frame is not played;
and playing the second video frame under the condition that the difference between the first playing time length and the second playing time length does not exceed the preset threshold value.
10. The apparatus of claim 8, wherein the second determining module comprises:
the acquisition submodule is used for acquiring the currently played audio frame information;
and the first determining submodule is used for determining the video frame to be played currently according to the audio frame information played currently.
CN202111496233.1A 2021-12-08 2021-12-08 Video wallpaper playing method and device, electronic equipment and readable storage medium Pending CN114143595A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111496233.1A CN114143595A (en) 2021-12-08 2021-12-08 Video wallpaper playing method and device, electronic equipment and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111496233.1A CN114143595A (en) 2021-12-08 2021-12-08 Video wallpaper playing method and device, electronic equipment and readable storage medium

Publications (1)

Publication Number Publication Date
CN114143595A true CN114143595A (en) 2022-03-04

Family

ID=80385267

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111496233.1A Pending CN114143595A (en) 2021-12-08 2021-12-08 Video wallpaper playing method and device, electronic equipment and readable storage medium

Country Status (1)

Country Link
CN (1) CN114143595A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117278796A (en) * 2023-11-23 2023-12-22 深圳市泛联信息科技有限公司 Multi-area image data display method, device, playing equipment and storage medium

Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110268192A1 (en) * 2009-01-07 2011-11-03 Tatsuji Moriyoshi Moving image decoding device, moving image decoding method, and program
CN103716635A (en) * 2013-12-12 2014-04-09 浙江宇视科技有限公司 Method and device for improving intelligent analysis performance
CN104754349A (en) * 2013-12-25 2015-07-01 炫一下(北京)科技有限公司 Method and device for hardware decoding of audio/video
CN106034252A (en) * 2015-03-12 2016-10-19 深圳市腾讯计算机系统有限公司 Streaming media processing method and device
CN107509100A (en) * 2017-09-15 2017-12-22 深圳国微技术有限公司 Audio and video synchronization method, system, computer installation and computer-readable recording medium
CN107948735A (en) * 2017-12-06 2018-04-20 北京金山安全软件有限公司 Video playing method and device and electronic equipment
CN108495164A (en) * 2018-04-09 2018-09-04 珠海全志科技股份有限公司 Audio-visual synchronization processing method and processing device, computer installation and storage medium
CN108924491A (en) * 2018-07-04 2018-11-30 深圳市商汤科技有限公司 video stream processing method and device, electronic equipment and storage medium
CN111246214A (en) * 2018-11-28 2020-06-05 杭州海康威视数字技术股份有限公司 Video decoding method and device
US20210287715A1 (en) * 2018-11-27 2021-09-16 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Video decoding control method, electronic device, and storage medium

Patent Citations (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110268192A1 (en) * 2009-01-07 2011-11-03 Tatsuji Moriyoshi Moving image decoding device, moving image decoding method, and program
CN103716635A (en) * 2013-12-12 2014-04-09 浙江宇视科技有限公司 Method and device for improving intelligent analysis performance
CN104754349A (en) * 2013-12-25 2015-07-01 炫一下(北京)科技有限公司 Method and device for hardware decoding of audio/video
CN106034252A (en) * 2015-03-12 2016-10-19 深圳市腾讯计算机系统有限公司 Streaming media processing method and device
CN107509100A (en) * 2017-09-15 2017-12-22 深圳国微技术有限公司 Audio and video synchronization method, system, computer installation and computer-readable recording medium
CN107948735A (en) * 2017-12-06 2018-04-20 北京金山安全软件有限公司 Video playing method and device and electronic equipment
CN108495164A (en) * 2018-04-09 2018-09-04 珠海全志科技股份有限公司 Audio-visual synchronization processing method and processing device, computer installation and storage medium
CN108924491A (en) * 2018-07-04 2018-11-30 深圳市商汤科技有限公司 video stream processing method and device, electronic equipment and storage medium
US20210287715A1 (en) * 2018-11-27 2021-09-16 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Video decoding control method, electronic device, and storage medium
CN111246214A (en) * 2018-11-28 2020-06-05 杭州海康威视数字技术股份有限公司 Video decoding method and device

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
WANG, B.; ÁLVAREZ-MESA, M.; CHI, C. C.; JUURLINK, B.; DE SOUZA, D. F.; ILIC, A.; ROMA, N.; SOUSA, L.: "Efficient HEVC decoder for heterogeneous CPU with GPU systems", 《2016 IEEE 18TH INTERNATIONAL WORKSHOP ON MULTIMEDIA SIGNAL PROCESSING (MMSP)》, pages 1 - 7 *
徐圣凯;潘飞: "软硬结合解码方式的4K视频播放系统", 《计算机系统应用》, vol. 26, no. 4, pages 91 - 94 *
王代成;徐鹏;朱仁义: "嵌入式高清视频文件的硬解码播放实现", 《电子世界》, pages 157 - 158 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117278796A (en) * 2023-11-23 2023-12-22 深圳市泛联信息科技有限公司 Multi-area image data display method, device, playing equipment and storage medium
CN117278796B (en) * 2023-11-23 2024-04-19 深圳市泛联信息科技有限公司 Multi-area image data display method, device, playing equipment and storage medium

Similar Documents

Publication Publication Date Title
CN109167750B (en) Data packet transmission method and device, electronic equipment and storage medium
CN112272327B (en) Data processing method, device, storage medium and equipment
CN104837052A (en) Playing method of multimedia data and device
CN107274882B (en) Data transmission method and device
US20150109529A1 (en) Method and system of playing real time online video at variable speed
CN106131550A (en) Play the method and device of multimedia file
CN108777812B (en) Screen recording live broadcast method and device, electronic equipment and storage medium
CN106817613B (en) Method and device for playing audio and video contents
CN109672902A (en) A kind of video takes out frame method, device, electronic equipment and storage medium
CN104053073A (en) DISTRIBUTION CONTROL SYSTEM, DISTRIBUTION SYSTEM and DISTRIBUTION CONTROL METHOD
CN102123281A (en) Fast forward and fast backward treatment method and device during video playing and mobile terminal
CN112104909A (en) Interactive video playing method and device, computer equipment and readable storage medium
CN108156509A (en) Video broadcasting method, device and user terminal
CN114143595A (en) Video wallpaper playing method and device, electronic equipment and readable storage medium
CN113535063A (en) Live broadcast page switching method, video page switching method, electronic device and storage medium
CN107493478B (en) Method and device for setting coding frame rate
CN109547723A (en) A kind of game video method for recording, device and terminal
CN106331553B (en) Video storage method and device and electronic equipment
CN111147887A (en) Live broadcast service control method and device, computer readable medium and electronic equipment
CN114339325A (en) Multi-engine dynamic wallpaper playing method and device based on android system
CN114339404A (en) Display method and device of screen protection wallpaper in windows system and electronic equipment
CN105120323A (en) Distributed player task scheduling method and system
CN115633191A (en) Video playing method, device, system, electronic equipment and readable storage medium
CN114095781A (en) Multimedia data processing method and device, electronic equipment and storage medium
CN109787966B (en) Monitoring method and device based on wearable device and electronic device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination