CN116980682A - Method, device and storage medium for playing dynamic pictures - Google Patents

Method, device and storage medium for playing dynamic pictures Download PDF

Info

Publication number
CN116980682A
CN116980682A CN202210431060.3A CN202210431060A CN116980682A CN 116980682 A CN116980682 A CN 116980682A CN 202210431060 A CN202210431060 A CN 202210431060A CN 116980682 A CN116980682 A CN 116980682A
Authority
CN
China
Prior art keywords
moving picture
pictures
moving
frame rate
rendering
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
CN202210431060.3A
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.)
Beijing ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network 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 Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN202210431060.3A priority Critical patent/CN116980682A/en
Publication of CN116980682A publication Critical patent/CN116980682A/en
Pending legal-status Critical Current

Links

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/435Processing of additional data, e.g. decrypting of additional data, reconstructing software from modules extracted from the transport stream
    • 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/45Management operations performed by the client for facilitating the reception of or the interaction with the content or administrating data related to the end-user or to the client device itself, e.g. learning user preferences for recommending movies, resolving scheduling conflicts
    • H04N21/462Content or additional data management, e.g. creating a master electronic program guide from data received from the Internet and a Head-end, controlling the complexity of a video stream by scaling the resolution or bit-rate based on the client capabilities
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04NPICTORIAL COMMUNICATION, e.g. TELEVISION
    • H04N21/00Selective content distribution, e.g. interactive television or video on demand [VOD]
    • H04N21/80Generation or processing of content or additional data by content creator independently of the distribution process; Content per se
    • H04N21/81Monomedia components thereof
    • H04N21/8146Monomedia components thereof involving graphical data, e.g. 3D object, 2D graphics

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • Signal Processing (AREA)
  • Databases & Information Systems (AREA)
  • Computer Graphics (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The application provides a method, a device and a storage medium for playing a plurality of moving pictures, which are to be played by a client through a moving picture manager, namely when the client needs to play the plurality of moving pictures at the same time, the phase of the plurality of moving pictures is adjusted to adjust the mixed rendering frame rate corresponding to the plurality of moving pictures, and then the plurality of moving pictures are sent to a graphic processor of the client, so that the graphic processor renders and plays the plurality of moving pictures, and the problem that the prior art has higher moving picture playing mixed frame rate when the plurality of moving pictures are played together, resulting in higher APP rendering frame rate and higher resource consumption of the client is solved. In addition, the embodiment of the application further solves the problem of slow loading speed or a pause card when playing a large number of dynamic pictures due to reducing the consumption of dynamic picture playing to client resources, and improves the playing quality of the dynamic pictures.

Description

Method, device and storage medium for playing dynamic pictures
Technical Field
The present application relates to image processing technologies, and in particular, to a method and apparatus for playing a moving picture, and a storage medium.
Background
In information flow application, pictures are the most intuitive and effective way to present content. The picture display comprises a dynamic picture (abbreviated as a static picture) and a static picture (abbreviated as a static picture), wherein the static picture consists of a plurality of frames of static pictures, and more information can be provided compared with the static pictures. The dynamic diagram is similar to a small video, has simple production, small data volume and wide popularity, and has greater attraction to users.
Currently, there are a large number of graphs in content-based social Applications (APP), such as short videos, live broadcasts, communities, and the like. Common images include graphic exchange formats (Graphics Interchange Format, GIF), webP, etc., when WebP is used as an example, an existing client side usually creates a CADisplayLink object for each WebP image file separately, and plays the current frame while parsing and buffering the next frame.
However, when there are multiple moving pictures (e.g., webP images) on the client that need to be played together, the existing moving picture playing method tends to have a higher moving picture playing mixed frame rate, resulting in a larger APP rendering frame rate, which makes the client resources (e.g., graphics processor (graphics processing unit, GPU)) consume higher.
Disclosure of Invention
In order to solve the problems in the prior art, the application provides a method, a device and a storage medium for playing a moving picture.
In a first aspect, an embodiment of the present application provides a method for playing a plurality of moving pictures, where the method is applied to a moving picture manager, and the moving picture manager is configured to manage a plurality of moving pictures to be played by a client, and the method includes:
adjusting the phases of the plurality of moving pictures to adjust the mixed rendering frame rate corresponding to the plurality of moving pictures;
and sending the plurality of dynamic graphs to a graphic processor of the client so that the graphic processor renders and plays the plurality of dynamic graphs.
In one possible implementation manner, the adjusting the phases of the plurality of motion pictures to adjust the hybrid rendering frame rate corresponding to the plurality of motion pictures includes:
and aligning the initial phases of the plurality of moving pictures to adjust the mixed rendering frame rate corresponding to the plurality of moving pictures.
In one possible implementation, aligning initial phases of the plurality of motion pictures includes:
determining a preset phase;
and respectively aligning the initial phases of the plurality of graphs with the preset phases.
In one possible implementation, the method further includes:
determining rendering frame time corresponding to each of the plurality of moving pictures;
sending the plurality of motion pictures to a graphics processor of the client to enable the graphics processor to render and play the plurality of motion pictures, wherein the method comprises the following steps of: and sending the plurality of moving pictures to a graphic processor of the client so that the graphic processor renders and plays each moving picture according to the rendering frame time corresponding to each moving picture.
In a possible implementation manner, the determining a rendering frame time corresponding to each moving picture includes:
for any one of the plurality of moving pictures, determining a rendering frame time corresponding to the any one moving picture based on the aligned initial phase of the any one moving picture and the rendering frame rate when the rendering frame rate of the any one moving picture belongs to a reference rendering frame rate range.
In a possible implementation manner, the determining a rendering frame time corresponding to each moving picture includes:
for any one of the plurality of moving pictures, determining a rendering frame time corresponding to the any one moving picture based on a frame time of the graphics processor, a total refresh time per unit time of the graphics processor, a frame number of an image frame of the any one moving picture, and a rendering frame rate of the any one moving picture when the rendering frame rate of the any one moving picture does not belong to a reference rendering frame rate range.
In one possible implementation manner, the determining the rendering frame time corresponding to the arbitrary moving picture based on the frame time of the graphics processor corresponding to the arbitrary moving picture, the total refresh time in unit time of the graphics processor, the frame number of the image frame of the arbitrary moving picture, and the rendering frame rate of the arbitrary moving picture includes:
for any image frame of any image diagram, determining a first ratio according to the total refresh times in any frame time of the graphic processor and the unit time of the graphic processor;
determining a second ratio according to the frame sequence number of any image frame and the rendering frame rate of any image;
and if the first ratio is greater than or equal to the second ratio, determining the rendering frame time corresponding to any one of the images based on any one of the frame times of the graphics processor.
In a second aspect, an embodiment of the present application provides a device for playing a plurality of moving pictures, where the moving picture playing device is applied to a moving picture manager, and the moving picture manager is configured to manage a plurality of moving pictures to be played by a client, and the device includes:
the adjusting module is used for adjusting the phases of the plurality of moving pictures to adjust the mixed rendering frame rate corresponding to the plurality of moving pictures;
and the sending module is used for sending the plurality of dynamic graphs to a graphic processor of the client so that the graphic processor can render and play the plurality of dynamic graphs.
In one possible implementation manner, the adjusting module is specifically configured to:
and aligning the initial phases of the plurality of moving pictures to adjust the mixed rendering frame rate corresponding to the plurality of moving pictures.
In one possible implementation manner, the adjusting module is specifically configured to:
determining a preset phase;
and respectively aligning the initial phases of the plurality of graphs with the preset phases.
In one possible implementation, the apparatus further includes:
a determining module, configured to determine a rendering frame time corresponding to each of the plurality of motion pictures;
the sending module is used for sending the plurality of moving pictures to a graphic processor of the client so that the graphic processor renders and plays each moving picture according to the rendering frame time corresponding to each moving picture.
In one possible implementation manner, the determining module is specifically configured to:
for any one of the plurality of moving pictures, determining a rendering frame time corresponding to the any one moving picture based on the aligned initial phase of the any one moving picture and the rendering frame rate when the rendering frame rate of the any one moving picture belongs to a reference rendering frame rate range.
In one possible implementation manner, the determining module is specifically configured to:
for any one of the plurality of moving pictures, determining a rendering frame time corresponding to the any one moving picture based on a frame time of the graphics processor, a total refresh time per unit time of the graphics processor, a frame number of an image frame of the any one moving picture, and a rendering frame rate of the any one moving picture when the rendering frame rate of the any one moving picture does not belong to a reference rendering frame rate range.
In one possible implementation manner, the determining module is specifically configured to:
for any image frame of any image diagram, determining a first ratio according to the total refresh times in any frame time of the graphic processor and the unit time of the graphic processor;
determining a second ratio according to the frame sequence number of any image frame and the rendering frame rate of any image;
and if the first ratio is greater than or equal to the second ratio, determining the rendering frame time corresponding to any one of the images based on any one of the frame times of the graphics processor.
In a third aspect, an embodiment of the present application provides a system for playing a plurality of moving pictures, where the moving picture playing system includes a moving picture manager and a graphics processor, where the moving picture manager is configured to manage a plurality of moving pictures to be played by a client, and the graphics processor is disposed on the client;
the moving picture manager is used for adjusting the phases of the moving pictures to adjust the mixed rendering frame rate corresponding to the moving pictures and sending the moving pictures to the graphic processor;
the graphic processor is used for rendering and playing the plurality of dynamic pictures.
In a fourth aspect, an embodiment of the present application provides a motion picture manager, including:
a processor;
a memory; and
a computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor, the computer program comprising instructions for performing the method according to the first aspect.
In a fifth aspect, embodiments of the present application provide a computer-readable storage medium storing a computer program, the computer program causing a server to execute the method of the first aspect.
In a sixth aspect, embodiments of the present application provide a computer program product comprising computer instructions for performing the method of the first aspect by a processor.
The method and the device for playing the moving pictures and the storage medium provided by the embodiment of the application are characterized in that the moving pictures to be played by the client are uniformly managed through one moving picture manager, namely when the client needs to play the moving pictures at the same time, the phases of the moving pictures are adjusted to adjust the mixed rendering frame rate corresponding to the moving pictures, and then the moving pictures are sent to the graphic processor of the client, so that the graphic processor renders and plays the moving pictures, and the problems that the prior moving pictures play the mixed frame rate at a higher moving picture, the APP rendering frame rate is higher, and the resource consumption of the client is higher are solved. In addition, the embodiment of the application further solves the problem of slow loading speed or a pause card when playing a large number of dynamic pictures due to reducing the consumption of dynamic picture playing to client resources, and improves the playing quality of the dynamic pictures.
Drawings
In order to more clearly illustrate the embodiments of the application or the technical solutions of the prior art, the drawings which are used in the description of the embodiments or the prior art will be briefly described, it being obvious that the drawings in the description below are only some embodiments of the application, and that other drawings can be obtained according to these drawings without inventive faculty for a person skilled in the art.
Fig. 1 is a schematic diagram of a dynamic playing system architecture according to an embodiment of the present application;
fig. 2 is a schematic flow chart of a method for playing a moving picture according to an embodiment of the present application;
FIG. 3 is a schematic diagram of initial phase alignment of a plurality of motion pictures according to an embodiment of the present application;
fig. 4 is a flowchart of another method for playing a moving picture according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a periodic lunar phase diagram according to an embodiment of the present application;
FIG. 6 is a schematic diagram of a rectangular wave signal according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a moving picture playing device according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of another moving picture playing device according to an embodiment of the present application;
FIG. 9A is a schematic diagram of a basic hardware architecture of a dynamic diagram manager according to an embodiment of the present application;
fig. 9B is a schematic diagram of a basic hardware architecture of another diagram manager according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
The terms "first," "second," "third," and "fourth" and the like in the description and in the claims and in the above drawings, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that the embodiments of the application described herein may be implemented in sequences other than those illustrated or otherwise described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
With the development of internet technology, various types of application programs are layered endlessly, so that lives of people are greatly enriched. In APP such as short video, live broadcast, community, etc., content is displayed through pictures, where the pictures may specifically include a moving picture and a still picture, in short, the still picture is a still picture, and the moving picture is composed of multiple frames of still pictures.
In the traditional moving picture playing method, for example, a WebP is taken as an example, a general client side can independently create a CADisplayLink object for each WebP image file, and render a current frame while analyzing and caching a next frame to realize moving picture playing. Wherein CADisplayLink is a timer that can draw content onto a screen at the same frequency as the screen refresh rate. However, although the above-mentioned method for playing a moving picture can achieve the moving picture effect, when playing a plurality of moving pictures together, because the client creates a cadisplay object for each WebP image file separately, different moving picture parsing buffer rendering is controlled by the corresponding cadisplay object, so that a higher moving picture playing mixed frame rate may occur, resulting in a higher APP rendering frame rate, and thus higher consumption of client resources.
In order to solve the above problems, an embodiment of the present application provides a method for playing a plurality of moving pictures to be played by a client through a moving picture manager, that is, when the client needs to play a plurality of moving pictures at the same time, the phases of the plurality of moving pictures are adjusted, so as to adjust the hybrid rendering frame rate corresponding to the plurality of moving pictures, control a graphics processor to play the adjusted plurality of moving pictures after rendering, and solve the problem that when the plurality of moving pictures are commonly played, a higher moving picture playing hybrid frame rate occurs, resulting in a higher APP rendering frame rate, thereby causing higher consumption of resources by the client.
Optionally, the method for playing the moving pictures provided by the embodiment of the application can be applied to scenes in which a plurality of moving pictures are played simultaneously in live broadcasting or video playing, such as application scenes of various moving effect playing in a live broadcasting room. In addition, many application scenarios of the active-image playback are available, such as interactive feedback (dynamically displaying the course of a change from user-triggered behavior to expected result), games (dynamically guiding the user to understand the function or activity of the product), and any scenario using active-image playback is within the scope of the present application.
The method for playing the moving picture provided by the embodiment of the application can be applied to a moving picture playing system shown in fig. 1. In fig. 1, the moving picture playback system architecture may include a moving picture manager 101 and a graphics processor 102. The moving picture manager 101 and the graphics processor 102 may be disposed in the client, and the moving picture manager 101 may uniformly manage a plurality of moving pictures to be played by the client. Here, the APP of the function of playing the moving picture can be installed in the client, and the user can watch the moving picture through information interaction between the APP on the client and the server. The client and the server may communicate over a network. The network may include various connection types, such as wired, wireless communication links, or fiber optic cables, among others.
A user may interact with a server over a network using a client to receive or send messages, etc., e.g., the user may use the client to obtain a dynamic map resource from the server over the network. The client may be a variety of electronic devices with a display screen including, but not limited to, smartphones, tablet computers, portable computers, desktop computers, and the like. The server may be a server providing various services.
In a specific implementation process, if a user uses a client to obtain a moving picture resource from a server through a network, the moving picture manager 101 may adjust phases of a plurality of moving pictures to play the moving pictures at the same time at the client, thereby adjusting a mixed rendering frame rate corresponding to the plurality of moving pictures, and then controlling the graphic processor 102 to play the adjusted plurality of moving pictures after rendering, thereby reducing a moving picture playing mixed frame rate when the plurality of moving pictures are jointly played, reducing an APP rendering frame rate, and reducing consumption of resources at the client. In addition, the embodiment of the application reduces the consumption of the client resource by the moving picture playing through the moving picture manager 101 and the graphic processor 102, further solves the problem of slow loading speed or the stop card when playing a large number of moving pictures, and improves the moving picture playing quality.
It should be noted that, the network architecture and the service scenario described in the embodiments of the present application are for more clearly describing the technical solution of the embodiments of the present application, and do not constitute a limitation on the technical solution provided by the embodiments of the present application, and those skilled in the art can know that, with the evolution of the network architecture and the appearance of the new service scenario, the technical solution provided by the embodiments of the present application is equally applicable to similar technical problems.
The following description of the present application is given by taking several embodiments as examples, and the same or similar concepts or processes may not be described in detail in some embodiments.
Fig. 2 is a schematic flow chart of a method for playing a moving picture according to an embodiment of the present application, where an execution subject of the embodiment may be the moving picture manager in fig. 1, and a specific execution subject may be determined according to an actual application scenario, which is not particularly limited in the embodiment of the present application. As shown in fig. 2, the method for playing a moving picture provided by the embodiment of the present application may include the following steps:
s201: and adjusting the phases of the plurality of moving pictures to adjust the mixed rendering frame rate corresponding to the plurality of moving pictures.
Here, the above-mentioned moving picture manager may perform unified management on a plurality of moving pictures to be played by the client, that is, the embodiment of the present application uses the moving picture manager to perform global management on a plurality of moving pictures to be played by the client. Specifically, the phases of the plurality of moving pictures can be adjusted to adjust the mixed rendering frame rate corresponding to the plurality of moving pictures, thereby realizing the management of the plurality of moving picture frame rates.
When the moving picture manager adjusts the phases of the moving pictures, the moving picture manager can align the initial phases of the moving pictures so as to reduce the mixed rendering frame rate corresponding to the moving pictures. Of course, the phase is not limited to the initial phase, but may be a non-initial phase, for example, the phase of the second period starts to be aligned, and the frame rate of the hybrid rendering of multiple images may be reduced compared to the prior art.
For example, the moving picture manager may determine a preset phase, and then align initial phases of the moving pictures with the preset phase, respectively, thereby aligning the initial phases of the moving pictures. Furthermore, the initial phase of the plurality of moving pictures may be aligned to the initial phase of a certain moving picture of the plurality of moving pictures.
In the embodiment of the present application, the preset phase may be determined according to an actual situation, for example, the moving picture manager sets an initial phase of a first moving picture of the plurality of moving pictures to the preset phase. As shown in fig. 3, fig. 3 shows a schematic diagram of initial phases of a plurality of pictures (a plurality of pictures with rendering frame rates of 30fps, 20fps, 10fps, 15fps, 60fps, and 24fps in order) aligned with a predetermined phase.
Here, the moving picture manager aligns initial phases of each of the plurality of moving pictures with a preset phase, respectively, and determines relative and sequential rendering relations between the moving pictures after the respective moving pictures are aligned with the same.
S202: and sending the plurality of the images to a graphic processor of the client so that the graphic processor can render and play the plurality of the images.
Here, after the plurality of moving pictures are adjusted, the moving picture manager sends the adjusted plurality of moving pictures to the graphics processor, so that the graphics processor is controlled to play the adjusted plurality of moving pictures after rendering based on a preset starting time, the moving picture playing mixed frame rate when the plurality of moving pictures are jointly played is reduced, the APP rendering frame rate is reduced, and the resource consumption of a client is reduced.
The preset starting time may be a starting time of a first moving picture of the plurality of moving pictures.
In addition, the above-mentioned moving picture manager may perform other management on the multiple moving pictures to be played by the client, for example, set possible playing states of the multiple moving pictures, where the playing states include a ready state, a start state, a pause state, a resume state, and an end state. Where preparation may be understood as informing that the moving picture object is about to play. Pauses are understood to mean pauses that are selected at a reasonable time. Resume may be understood as being resumed from a suspended state. Ending may be understood as stopping the playback of the motion picture.
When the client needs to play a plurality of moving pictures at the same time, for example, when the state that the client has a plurality of moving pictures is the preparation state, the moving picture manager can adjust the plurality of moving pictures, so as to control the graphic processor to play the adjusted plurality of moving pictures after rendering based on a preset starting time.
According to the embodiment of the application, the plurality of moving pictures to be played by the client are uniformly managed through one moving picture manager, namely, when the client needs to play the plurality of moving pictures at the same time, the phases of the plurality of moving pictures are adjusted to adjust the mixed rendering frame rate corresponding to the plurality of moving pictures, and then the plurality of moving pictures are sent to the graphic processor of the client, so that the graphic processor renders and plays the plurality of moving pictures, and the problems that the APP rendering frame rate is high and the resource consumption of the client is high due to the fact that the mixed frame rate of playing the plurality of moving pictures is high when the plurality of moving pictures are commonly played are solved. In addition, the embodiment of the application further solves the problem of slow loading speed or a pause card when playing a large number of dynamic pictures due to reducing the consumption of dynamic picture playing to client resources, and improves the playing quality of the dynamic pictures.
In addition, after the initial phases of the plurality of moving pictures are aligned and the mixed rendering frame rate corresponding to the plurality of moving pictures is adjusted, the moving picture manager can further determine rendering frame time corresponding to each moving picture in the plurality of moving pictures, and further send the plurality of moving pictures to a graphics processor of a client, so that the graphics processor renders and plays each moving picture according to the rendering frame time corresponding to each moving picture, the mixed rendering frame rate of moving picture playing when the plurality of moving pictures are jointly played is reduced, the APP rendering frame rate is reduced, and the resource consumption of the client is reduced. Fig. 4 is a flowchart of another method for playing a moving picture according to an embodiment of the present application. As shown in fig. 4, the method includes:
s401: and aligning the initial phases of the plurality of moving pictures to adjust the mixed rendering frame rate corresponding to the plurality of moving pictures.
The implementation of step S401 is similar to that of step S201, and is not repeated herein with reference to the above description.
S402: and determining rendering frame time corresponding to each of the plurality of moving pictures.
Here, in a case where a rendering frame rate of any one of the plurality of moving pictures falls within a reference rendering frame rate range, the moving picture manager may determine a rendering frame time corresponding to the any one of the moving pictures based on the aligned initial phase of the any one of the moving pictures and the rendering frame rate.
The above-mentioned reference rendering frame rate range may be determined according to practical situations, and for example, the reference rendering frame rate range includes 60fps, 45fps, 30fps, 24fps, 20fps, 18fps, 15fps, 12fps, and the like.
For example, the above-mentioned moving picture manager may determine the rendering interval time of any moving picture according to the rendering frame rate of the any moving picture, and further determine the rendering frame time corresponding to the any moving picture based on the initial phase of the aligned moving picture and the rendering interval time.
In the case of multi-view playback, the view manager first determines a rendering interval time of any view of a plurality of views according to a rendering frame rate of the any view. For example, as shown in fig. 5, fig. 5 shows a full cycle schematic of rendering a phase change of one month in one minute. The rendering frame rate of the moving picture in fig. 5 is 15 frames per minute, and the moving picture manager determines that the rendering interval time of the moving picture is 4 seconds according to the rendering frame rate of the moving picture, that is, the moving picture can be rendered at the relative time of (0/4/8/. The main./56)/(60) seconds, and further, the mixed frame rate of the moving picture can be optimized based on the rendering interval time of each moving picture in the plurality of moving pictures, so that the performance consumption of the client is reduced.
Further, after determining the rendering interval time of the arbitrary moving picture, the moving picture manager may determine the number of times the arbitrary moving picture is rendered in a first preset time period based on the rendering interval time of the arbitrary moving picture, and further obtain the duty ratio of the arbitrary moving picture according to the number of times and the total refresh number of the graphics processor in the first preset time period, thereby determining the rendering frame time corresponding to the arbitrary moving picture according to the initial phase of the arbitrary moving picture after alignment and the duty ratio.
The duty ratio of any one of the motion pictures can be calculated for the motion picture manager to be the ratio of the number of times the any one of the motion pictures is rendered in a first preset time period to the total refresh number of the graphics processor in the first preset time period. The first preset time period may be determined according to practical situations, for example, 1 minute.
Here, if the rendering of a picture on a time scale is regarded as a rectangular wave signal, for example, as shown in fig. 6 (the abscissa in the figure represents time, and the ordinate represents signal amplitude), then a frame to be rendered can be regarded as a value in which the signal S amplitude is not 0 in this time, and the above duty ratio is understood to be a ratio of time in which the rectangular wave amplitude is not 0 to the period time in one period time, and also is understood to be a ratio of rendering of a picture, and is a value in which the number of times of rendering is required to be compared with the total number of refreshes in one period of time.
Taking two moving pictures as an example, the rendering frame time of each moving picture is index (rendering) = (f (moving picture rendering frame rate)/f (device rendering frame rate)). Index (device rendering time), rounded down. Each moving picture is provided with a corresponding rendering time queue, and as the phase alignment processing is carried out on the two moving pictures, the ratio of the number of the common rendering time of the two moving pictures to the refreshing times of the equipment per second is the mixed duty ratio. Of course, the method is not limited to two diagrams, and more than two diagrams are similar, and will not be described herein.
Illustratively, as shown in table 1, table 1 shows the mixed duty cycle corresponding to two graphs of a portion of different duty cycles.
TABLE 1
In addition, in a case where the rendering frame rate of any one of the plurality of moving pictures does not belong to the reference rendering frame rate range, the moving picture manager may determine the rendering frame time corresponding to the any one of the plurality of moving pictures based on the frame time of the graphic processor, the total refresh time per unit time (for example, per second) of the device (graphic processor), the frame number of the image frame of the any one of the plurality of moving pictures, and the rendering frame rate of the any one of the plurality of moving pictures, thereby improving compatibility.
Here, for any image Frame of any image, the image manager may determine a first ratio according to any Frame time frame_i of the image processor and a total refresh time maximumFramesPerSecond in a unit time of the image processor, determine a second ratio according to a Frame number frame_j of any image Frame and a rendering Frame rate fps_webp of any image, and determine a rendering Frame time corresponding to any image based on any Frame time frame_i of the image processor if the first ratio is greater than or equal to the second ratio.
The above-mentioned moving picture manager may determine a first ratio frame_i/maximumframesPersecond according to a frame_i of the graphics processor and a total refresh time maximumframesPersecond in a unit time of the graphics processor, and determine a second ratio frame_j/FPS_webp according to a Frame number frame_j of any image Frame and a rendering Frame rate FPS_webp of any moving picture. When the first ratio is greater than or equal to the second ratio, that is, when frame_i/maximumFramesPerSecond > =frame_j/fps_webp, the Frame manager determines that the j-th Frame of the Frame is played at the i+1 time and prepares the next Frame (j+1 Frame) of the Frame for play, thereby determining a rendering Frame time corresponding to any one of the frames (wherein frame_i represents the Frame time of the image processor, maximumFramesPerSecond represents the total refresh number per unit time of the image processor, that is, the maximum Frame rate of the image processor, that is, the frame_i ranges from 0 to 59, that is, frame_i: [0,59]; frame_j represents the Frame number of the image Frame, and fps_webp represents the rendering Frame rate of the Frame, that is, frame_j ranges from 0 to fps_webp-1, that is, j: [0, s_webp-1 ]).
S403: and sending the plurality of the moving pictures to a graphic processor of the client so that the graphic processor renders and plays each moving picture according to the rendering frame time corresponding to each moving picture. The implementation of step S403 is similar to that of step S202, and is not repeated herein with reference to the above description.
In the embodiment of the application, after the initial phases of a plurality of moving pictures are aligned and the mixed rendering frame rate corresponding to the moving pictures is adjusted, the rendering frame time corresponding to each moving picture in the moving pictures is further determined, when the rendering frame time corresponding to each moving picture in the moving pictures is determined, the situation that the rendering frame rate of the moving pictures belongs to the range of the reference rendering frame rate and the situation that the rendering frame rate of the moving pictures does not belong to the range of the reference rendering frame rate is considered, the normal proceeding of the subsequent processing is ensured, the different application requirements under different conditions are met, and finally, the moving pictures are sent to a graphic processor of a client side, so that the graphic processor performs rendering and playing on each moving picture according to the rendering frame time corresponding to each moving picture, and the problem that the prior moving pictures have higher playing mixed frame rate and result in higher APP rendering frame rate when being jointly played is solved, thereby causing higher resource consumption of the client side is solved. In addition, the embodiment of the application further solves the problem of slow loading speed or a pause card when playing a large number of dynamic pictures due to reducing the consumption of dynamic picture playing to client resources, and improves the playing quality of the dynamic pictures.
Fig. 7 is a schematic structural diagram of a moving picture playing device according to an embodiment of the present application, corresponding to the moving picture playing method of the above embodiment. For convenience of explanation, only portions relevant to the embodiments of the present application are shown. Fig. 7 is a schematic structural diagram of a moving picture playing device according to an embodiment of the present application, where the moving picture playing device 70 includes: the adjustment module 701 and the transmission module 702. The playback device may be the playback manager itself, or a chip or integrated circuit that implements the functions of the playback manager. Here, the division of the adjustment module and the transmission module is only a division of a logic function, and both may be integrated or independent physically.
The adjusting module 701 is configured to adjust phases of the plurality of motion pictures to adjust a hybrid rendering frame rate corresponding to the plurality of motion pictures.
And the sending module 702 is configured to send the plurality of motion pictures to a graphics processor of the client, so that the graphics processor renders and plays the plurality of motion pictures.
In one possible implementation manner, the adjusting module 701 is specifically configured to:
and aligning the initial phases of the plurality of moving pictures to adjust the mixed rendering frame rate corresponding to the plurality of moving pictures.
In one possible implementation manner, the adjusting module 701 is specifically configured to:
determining a preset phase;
and respectively aligning the initial phases of the plurality of graphs with the preset phases.
The device provided by the embodiment of the present application may be used to implement the technical scheme of the method embodiment shown in fig. 2, and its implementation principle and technical effects are similar, and the embodiment of the present application is not repeated here.
Fig. 8 is a schematic structural diagram of another moving picture playing device according to the embodiment of the present application, and on the basis of the embodiment shown in fig. 7, the moving picture playing device 70 further includes: a determination module 703.
Wherein in one possible implementation, the determining module 703 is configured to determine a rendering frame time corresponding to each of the plurality of motion pictures.
The sending module 702 is configured to send the plurality of motion pictures to a graphics processor of the client, so that the graphics processor performs rendering and playing on each motion picture according to a rendering frame time corresponding to each motion picture.
In one possible implementation manner, the determining module 703 is specifically configured to:
for any one of the plurality of moving pictures, determining a rendering frame time corresponding to the any one moving picture based on the aligned initial phase of the any one moving picture and the rendering frame rate when the rendering frame rate of the any one moving picture belongs to a reference rendering frame rate range.
In one possible implementation manner, the determining module 703 is specifically configured to:
for any one of the plurality of moving pictures, determining a rendering frame time corresponding to the any one moving picture based on a frame time of the graphics processor, a total refresh time per unit time of the graphics processor, a frame number of an image frame of the any one moving picture, and a rendering frame rate of the any one moving picture when the rendering frame rate of the any one moving picture does not belong to a reference rendering frame rate range.
In one possible implementation manner, the determining module 703 is specifically configured to:
for any image Frame of any image, determining a first ratio according to any Frame time frame_i of the graphic processor and the total refresh times maximumFramesPersecond of the graphic processor in unit time;
determining a second ratio according to the Frame sequence number frame_j of any image Frame and the rendering Frame rate FPS_webp of any image;
and if the first ratio is greater than or equal to the second ratio, determining a rendering Frame time corresponding to any one of the images based on any Frame time frame_i of the graphics processor.
The device provided by the embodiment of the present application may be used to implement the technical scheme of the method embodiment shown in fig. 4, and its implementation principle and technical effects are similar, and the embodiment of the present application is not repeated here.
Alternatively, fig. 9A and 9B schematically provide a schematic diagram of a possible basic hardware architecture of the diagram manager according to the present application.
Referring to fig. 9A and 9B, the diagram manager 900 includes at least one processor 901 and a communication interface 903. Further optionally, a memory 902 and a bus 904 may also be included.
Wherein the number of processors 901 in the diagram manager 900 may be one or more, fig. 9A and 9B illustrate only one of the processors 901. Optionally, the processor 901 may be a central processing unit (central processing unit, CPU), GPU, or digital signal processor (digital signal processor, DSP). If the map manager 900 has a plurality of processors 901, the types of the plurality of processors 901 may be different or may be the same. Optionally, the multiple processors 901 of the diagram manager 900 may also be integrated as a multi-core processor.
Memory 902 stores computer instructions and data; the memory 902 may store computer instructions and data required to implement the above-described moving picture playing method provided by the present application, for example, the memory 902 stores instructions for implementing the steps of the above-described moving picture playing method. The memory 902 may be any one or any combination of the following storage media: nonvolatile memory (e.g., read Only Memory (ROM), solid State Disk (SSD), hard disk (HDD), optical disk), volatile memory).
The communication interface 903 may provide an information input/output for the at least one processor. Any one or any combination of the following devices may also be included: a network interface (e.g., ethernet interface), a wireless network card, etc., having network access functionality.
Optionally, the communication interface 903 may also be used for data communication by the diagram manager 900 with other computing devices or terminals.
Further alternatively, fig. 9A and 9B represent bus 904 with a bold line. A bus 904 may connect the processor 901 with the memory 902 and the communication interface 903. Thus, through bus 904, processor 901 may access memory 902 and may also interact with other computing devices or terminals using communication interface 903.
In the present application, the moving picture manager 900 executes computer instructions in the memory 902, so that the moving picture manager 900 implements the moving picture playing method provided by the present application, or so that the moving picture manager 900 deploys the moving picture playing apparatus described above.
From a logical functional partitioning perspective, as illustrated in fig. 9A, the memory 902 may include an adjustment module 701 and a transmission module 702. The inclusion herein is not limited to a physical structure, and may involve only the functions of the adjustment module and the transmission module, respectively, when the instructions stored in the memory are executed.
For example, as shown in fig. 9B, a determination module 703 may be included in the memory 902. The inclusion herein is not limited to physical structures but rather merely relates to the functionality of the determining module when the instructions stored in the memory are executed.
In addition, the above-described moving picture manager may be implemented in hardware as a hardware module or as a circuit unit, in addition to the software as in fig. 9A and 9B.
The present application provides a computer readable storage medium, the computer program product comprising computer instructions for instructing a computing device to execute the above-described method for playing a moving picture provided by the present application.
The present application provides a computer program product comprising computer instructions for performing the method of the first aspect by a processor.
The application provides a chip comprising at least one processor and a communication interface providing information input and/or output for the at least one processor. Further, the chip may also include at least one memory for storing computer instructions. The at least one processor is configured to invoke and execute the computer instructions to execute the above-mentioned method for playing a video.
In the several embodiments provided by the present application, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in hardware plus software functional units.

Claims (12)

1. A method for playing a moving picture, wherein the method is applied to a moving picture manager, the moving picture manager is used for managing a plurality of moving pictures to be played by a client, and the method comprises:
adjusting the phases of the plurality of moving pictures to adjust the mixed rendering frame rate corresponding to the plurality of moving pictures;
and sending the plurality of dynamic graphs to a graphic processor of the client so that the graphic processor renders and plays the plurality of dynamic graphs.
2. The method of claim 1, wherein the adjusting the phase of the plurality of motion pictures to adjust the hybrid rendering frame rate corresponding to the plurality of motion pictures comprises:
and aligning the initial phases of the plurality of moving pictures to adjust the mixed rendering frame rate corresponding to the plurality of moving pictures.
3. The method of claim 2, wherein aligning initial phases of the plurality of motion pictures comprises:
determining a preset phase;
and respectively aligning the initial phases of the plurality of graphs with the preset phases.
4. A method according to claim 2 or 3, further comprising:
determining rendering frame time corresponding to each of the plurality of moving pictures;
sending the plurality of motion pictures to a graphics processor of the client to enable the graphics processor to render and play the plurality of motion pictures, wherein the method comprises the following steps of: and sending the plurality of moving pictures to a graphic processor of the client so that the graphic processor renders and plays each moving picture according to the rendering frame time corresponding to each moving picture.
5. The method of claim 4, wherein the determining a rendering frame time corresponding to the respective map comprises:
for any one of the plurality of moving pictures, determining a rendering frame time corresponding to the any one moving picture based on the aligned initial phase of the any one moving picture and the rendering frame rate when the rendering frame rate of the any one moving picture belongs to a reference rendering frame rate range.
6. The method of claim 4, wherein the determining a rendering frame time corresponding to the respective map comprises:
for any one of the plurality of moving pictures, determining a rendering frame time corresponding to the any one moving picture based on a frame time of the graphics processor, a total refresh time per unit time of the graphics processor, a frame number of an image frame of the any one moving picture, and a rendering frame rate of the any one moving picture when the rendering frame rate of the any one moving picture does not belong to a reference rendering frame rate range.
7. The method of claim 6, wherein the determining the rendering frame time corresponding to the arbitrary moving picture based on the frame time of the graphics processor corresponding to the arbitrary moving picture, the total refresh time per unit time of the graphics processor, the frame number of the image frame of the arbitrary moving picture, and the rendering frame rate of the arbitrary moving picture comprises:
for any image frame of any image diagram, determining a first ratio according to the total refresh times in any frame time of the graphic processor and the unit time of the graphic processor;
determining a second ratio according to the frame sequence number of any image frame and the rendering frame rate of any image;
and if the first ratio is greater than or equal to the second ratio, determining the rendering frame time corresponding to any one of the images based on any one of the frame times of the graphics processor.
8. A device for playing a moving picture, the device being applied to a moving picture manager for managing a plurality of moving pictures to be played by a client, the device comprising:
the adjusting module is used for adjusting the phases of the plurality of moving pictures to adjust the mixed rendering frame rate corresponding to the plurality of moving pictures;
and the sending module is used for sending the plurality of dynamic graphs to a graphic processor of the client so that the graphic processor can render and play the plurality of dynamic graphs.
9. The system is characterized by comprising a moving picture manager and a graphic processor, wherein the moving picture manager is used for managing a plurality of moving pictures to be played by a client, and the graphic processor is arranged on the client;
the moving picture manager is used for adjusting the phases of the moving pictures to adjust the mixed rendering frame rate corresponding to the moving pictures and sending the moving pictures to the graphic processor;
the graphic processor is used for rendering and playing the plurality of dynamic pictures.
10. A diagram manager, comprising:
a processor;
a memory; and
a computer program;
wherein the computer program is stored in the memory and configured to be executed by the processor, the computer program comprising instructions for performing the method of any of claims 1-7.
11. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program, which causes a server to perform the method of any one of claims 1-7.
12. A computer program product comprising computer instructions for execution by a processor of the method of any one of claims 1-7.
CN202210431060.3A 2022-04-22 2022-04-22 Method, device and storage medium for playing dynamic pictures Pending CN116980682A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210431060.3A CN116980682A (en) 2022-04-22 2022-04-22 Method, device and storage medium for playing dynamic pictures

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210431060.3A CN116980682A (en) 2022-04-22 2022-04-22 Method, device and storage medium for playing dynamic pictures

Publications (1)

Publication Number Publication Date
CN116980682A true CN116980682A (en) 2023-10-31

Family

ID=88471819

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210431060.3A Pending CN116980682A (en) 2022-04-22 2022-04-22 Method, device and storage medium for playing dynamic pictures

Country Status (1)

Country Link
CN (1) CN116980682A (en)

Similar Documents

Publication Publication Date Title
CN113347466B (en) Data processing method, device and storage medium
CN111988392B (en) Resource allocation method based on cloud service, related device, equipment and system
US10037070B2 (en) Image display method and display system
WO2021159770A1 (en) Video playback method, device, apparatus, and storage medium
CN103581754A (en) Data display method and intelligent equipment
CN102905170A (en) Screen popping method and system for video
CN105337901A (en) Router intelligent bandwidth allocation method and device
CN111031376B (en) Bullet screen processing method and system based on WeChat applet
KR20100036256A (en) Digital data management using shared memory pool
US20230405455A1 (en) Method and apparatus for processing cloud gaming resource data, computer device, and storage medium
CN117041623A (en) Digital person live broadcasting method and device
JP7179194B2 (en) Variable endpoint user interface rendering
CN116980682A (en) Method, device and storage medium for playing dynamic pictures
Mazzuca et al. Towards a Resource-aware Middleware Support for Distributed Game Engine Design
US11689749B1 (en) Centralized streaming video composition
CN111586454B (en) Large screen splicing synchronization method and system
TW202226809A (en) Intelligent management of application layer rendering
CN113891136A (en) Video playing method and device, electronic equipment and storage medium
US10514959B2 (en) Distributed virtual local operating system stored in cloud and its method
CN114265648A (en) Code scheduling method, server, client and system for acquiring remote desktop
CN115278278B (en) Page display method and device, electronic equipment and storage medium
US11614853B1 (en) Method for desktop widgets to play video content automatically
CN115190340B (en) Live broadcast data transmission method, live broadcast equipment and medium
CN114727137B (en) Video playing method and device, storage medium and computer equipment
CN112887742B (en) Live stream processing method, device, equipment and storage medium

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