CN110019866B - Dynamic picture playing method, device and storage medium - Google Patents

Dynamic picture playing method, device and storage medium Download PDF

Info

Publication number
CN110019866B
CN110019866B CN201710916466.XA CN201710916466A CN110019866B CN 110019866 B CN110019866 B CN 110019866B CN 201710916466 A CN201710916466 A CN 201710916466A CN 110019866 B CN110019866 B CN 110019866B
Authority
CN
China
Prior art keywords
playing
picture
dynamic
dynamic picture
control data
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.)
Active
Application number
CN201710916466.XA
Other languages
Chinese (zh)
Other versions
CN110019866A (en
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.)
Tencent Technology Shenzhen Co Ltd
Original Assignee
Tencent Technology Shenzhen 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 Tencent Technology Shenzhen Co Ltd filed Critical Tencent Technology Shenzhen Co Ltd
Priority to CN201710916466.XA priority Critical patent/CN110019866B/en
Publication of CN110019866A publication Critical patent/CN110019866A/en
Application granted granted Critical
Publication of CN110019866B publication Critical patent/CN110019866B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Human Computer Interaction (AREA)
  • Processing Or Creating Images (AREA)
  • Two-Way Televisions, Distribution Of Moving Picture Or The Like (AREA)

Abstract

The application relates to a dynamic picture playing method, a dynamic picture playing device and a storage medium, wherein the method comprises the following steps: acquiring a dynamic picture to be played; decoding the dynamic picture to obtain a decoding result, wherein the decoding result comprises each static picture frame of the dynamic picture; receiving control data based on a dynamic picture playing device; determining the playing mode of the dynamic picture according to the control data, wherein the playing mode comprises a playing sequence or/and a playing speed; and playing each static picture frame according to the playing sequence or/and the playing speed. The control data can be received in a mode of receiving the control data, and then the playing mode of the dynamic picture is determined according to the control data, wherein the playing mode comprises a playing sequence or/and a playing speed; and finally, playing the static picture frames according to the playing sequence or/and the playing speed. Therefore, the dynamic picture playing method, the dynamic picture playing device and the storage medium improve the interactivity compared with the traditional dynamic picture playing mode.

Description

Dynamic picture playing method, device and storage medium
Technical Field
The present invention relates to the field of picture processing technologies, and in particular, to a method and an apparatus for playing a dynamic picture, and a storage medium.
Background
Motion pictures refer to a set of specific static images, such as geometric figures, that are switched at a specified frequency to create a certain dynamic picture effect. Compared with static pictures, the picture effect of the dynamic pictures is more vivid and popular with users, and the application of the dynamic pictures is very wide.
The conventional playing mode of the dynamic pictures is to directly play the dynamic pictures according to playing attributes such as playing sequence, interval time and the like preset in the dynamic pictures. The preset playing attribute is set in the process of making the dynamic picture, and a user playing the dynamic picture cannot control the playing mode of the dynamic picture. Therefore, the traditional playing mode of the dynamic pictures has the problem of poor interactivity.
Disclosure of Invention
In view of the above, it is necessary to provide a moving picture playing method, a moving picture playing apparatus, and a storage medium, which can improve interactivity, in order to solve the problem of poor interactivity.
A dynamic picture playing method includes:
acquiring a dynamic picture to be played;
decoding the dynamic picture to obtain a decoding result, wherein the decoding result comprises each static picture frame of the dynamic picture;
receiving control data based on a dynamic picture playing device;
determining the playing mode of the dynamic picture according to the control data, wherein the playing mode comprises a playing sequence or/and a playing speed;
and playing each static picture frame according to the playing sequence or/and the playing speed.
A moving picture playback apparatus comprising:
the dynamic picture acquisition module is used for acquiring a dynamic picture to be played;
the dynamic picture decoding module is used for decoding the dynamic picture to obtain a decoding result, and the decoding result comprises each static picture frame of the dynamic picture;
the control instruction receiving module is used for receiving control data based on the dynamic picture playing device;
a playing mode determining module, configured to determine a playing mode of the dynamic picture according to the control data, where the playing mode includes a playing sequence and/or a playing speed;
and the picture playing control module is used for playing each static picture frame according to the playing sequence or/and the playing speed.
A moving picture playback device comprising a memory and a processor, the memory storing a computer program which, when executed by the processor, causes the processor to carry out the steps of the method as described above.
A storage medium storing a computer program which, when executed by a processor, causes the processor to perform the steps of the method described above.
According to the dynamic picture playing method, the dynamic picture playing device and the storage medium, the control data can be received in a mode of receiving the control data based on the dynamic picture playing device, and then the playing mode of the dynamic picture is determined according to the control data, wherein the playing mode comprises the playing sequence or/and the playing speed; and finally, playing each static picture frame according to the playing sequence or/and the playing speed. Therefore, the dynamic picture playing method, the dynamic picture playing device and the storage medium improve the interactivity compared with the traditional dynamic picture playing mode.
Drawings
FIG. 1 is a flowchart illustrating a method for playing a moving picture according to a first embodiment;
FIG. 2 is a flowchart illustrating a method for playing a moving picture according to a second embodiment;
FIG. 3 is a flowchart illustrating a method for playing a moving picture according to a third embodiment;
FIG. 4 is a diagram illustrating a hardware structure of a method for playing a dynamic image according to an embodiment;
FIG. 5 is a system diagram of a method for displaying moving pictures according to an embodiment;
FIG. 6 is a flowchart illustrating a method for playing a moving picture according to a fourth embodiment;
FIG. 7 is a block diagram illustrating a method for establishing a three-dimensional coordinate system when the motion picture playing apparatus is vertically disposed according to an embodiment;
FIG. 8 is a block diagram illustrating a method for creating a three-dimensional coordinate system when the motion picture display device is horizontally positioned according to an embodiment;
FIG. 9 is a flowchart illustrating a method for playing a moving picture according to a fifth embodiment;
FIG. 10 is a diagram illustrating a control process for moving pictures from the perspective of a user in one embodiment;
FIG. 11 is a timing diagram illustrating a method for displaying a moving picture in accordance with an embodiment;
FIG. 12 is a block diagram showing the construction of a moving picture playback apparatus according to the first embodiment;
FIG. 13 is a block diagram of a moving picture playback device according to a second embodiment;
FIG. 14 is a block diagram showing a structure of a moving picture playback apparatus according to a third embodiment;
FIG. 15 is a block diagram of a moving picture playback device according to a fourth embodiment;
fig. 16 is an internal configuration diagram of an execution device of an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
An application scenario of an embodiment relates to playing of a dynamic picture, and includes a publishing page of the dynamic picture, a list page of the dynamic picture, a preview interface of the dynamic picture, a detail page of the dynamic picture, and the like.
As shown in fig. 1, in one embodiment, a method for playing a moving picture is provided. The dynamic picture playing method is executed on an execution device, and the execution device can be a computer device, a mobile device and other devices capable of playing dynamic pictures. Computer devices include desktop computers, handheld computers, and the like; the mobile device comprises an intelligent mobile terminal, such as a smart phone, a tablet computer and the like. The dynamic picture playing method comprises the following steps:
s110: and acquiring the dynamic picture to be played.
The dynamic picture is a picture with a dynamic effect obtained by encoding a group of static pictures according to a preset format. The group of still pictures includes a plurality of still pictures, each of which can be a frame, i.e., a still picture frame. The preset format is a format of a dynamic picture, and may be a GIF format. GIF is an abbreviation of Graphics exchange Format, and is originally an "image Interchange Format", which is an image file Format. The GIF format can store a plurality of still pictures, such as a plurality of color still pictures, and the simplest animation can be constructed by reading the plurality of still pictures stored in one GIF format moving picture file one by one and displaying the still pictures on a screen.
The dynamic picture to be played may be downloaded by a dynamic picture downloader (such as a GIF downloader) on the execution device, so as to acquire the dynamic picture.
S120: and decoding the dynamic picture to obtain a decoding result, wherein the decoding result comprises each static picture frame of the dynamic picture.
The decoding mode corresponds to the format of the dynamic picture, that is, what format is adopted to encode the static picture to obtain the dynamic picture, and then the decoding mode corresponding to the format of the dynamic picture is adopted to decode to obtain a decoding result. The decoding result necessarily includes each still picture frame. The still picture frame is a frame of data composed of a still picture.
Each still picture frame (e.g., GIF picture frame) may be obtained by decoding a moving picture with a moving picture decoder (e.g., GIF decoder) on the device.
S130: control data based on the moving picture playback device is received.
The moving picture playing apparatus is an apparatus for playing the moving picture, and may be an execution device, for example. The control data is an instruction for controlling the playing of the dynamic picture. The control data is received by the execution device. Specifically, the control data may be acquired by an equipment sensor of the execution equipment to obtain acquired data and control data obtained by processing the acquired data; acquiring the acquired data by a touch screen of the execution equipment and processing the acquired data to obtain control data; it is also possible that after an input operation by a user, the input is directly mapped to corresponding control data.
If the control data is control data obtained by acquiring the acquired data by the device sensor of the execution device and processing the acquired data, the input operation is an operation such as a motion condition of the execution device, for example, a rotation. The device sensor may be an acceleration sensor, a magnetic sensor, a gyroscope, etc., and the acquired sensor data may be processed by a data processor of the device sensor to obtain control data such as a rotational angular velocity and a rotational angle of the actuator.
And if the control data is the control data acquired by the touch screen of the execution equipment and obtained by processing the acquired data. The user can perform action operations on the touch screen of the execution device, for example, gesture action operations such as leftward sliding, rightward sliding, pre-pattern drawing and the like, and after the data of the action operations are collected by the touch screen, the action operation data are processed to obtain control data which can be recognized by the execution device.
If the control data is input by the user and then the input is directly mapped to a corresponding command, the input operation is to input data, a character string, or an action through the input device. The control data is the input data or the control data corresponding to the character string or the action, and the action can be a single click or a double click or a selection of a preset position.
S140: and determining the playing mode of the dynamic pictures according to the control data, wherein the playing mode comprises a playing sequence or/and a playing speed.
The execution device analyzes the control data, and can determine the playing mode of the dynamic picture represented by the control data. The playing sequence can be forward playing or reverse playing, wherein the forward playing is to play the dynamic pictures according to the sequence of the analyzed static picture frames, and the reverse playing is to play the dynamic pictures according to the reverse sequence of the analyzed static picture frames.
The playing speed can be represented by an acceleration factor, and the playing can be carried out according to the preset playing speed and then multiplied by the acceleration factor; the playing speed can also be represented by the interval time of each still picture frame, and the playing speed can be controlled according to the interval time of each still picture frame.
The playing mode of the dynamic pictures can be determined by the dynamic picture playing controller according to the control data, and the static picture frames to be played and the playing speed under the playing sequence are sent to the dynamic picture player. The play speed may be represented by a time interval at which a still picture frame to be played is played.
S150: and playing the static picture frames according to the playing sequence or/and the playing speed.
And the dynamic picture player of the execution equipment plays each static picture frame according to the playing sequence or/and the playing speed determined by the dynamic picture playing controller according to the control data, thereby controlling the playing of the dynamic picture. It is understood that the motion picture play controller is responsible for rendering and playing each still picture frame.
According to the dynamic picture playing method, the control data can be received in a mode of receiving the control data based on the dynamic picture playing device, and then the playing mode of the dynamic picture is determined according to the control data, wherein the playing mode comprises the playing sequence or/and the playing speed; and finally, playing the static picture frames according to the playing sequence or/and the playing speed. Therefore, the dynamic picture playing method improves the interactivity compared with the traditional dynamic picture playing mode.
It should be understood that, although the steps in the flowchart of fig. 1 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not limited to being performed in the exact order illustrated and, unless explicitly stated herein, may be performed in other orders. Moreover, at least a portion of the steps in fig. 1 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
Referring to fig. 2, in one embodiment, the decoding result includes still picture frames arranged in a forward order and still picture frames arranged in a reverse order.
Each static picture frame arranged in the positive sequence can be obtained by decoding the dynamic picture in the positive sequence; and obtaining each static picture frame arranged in a reverse order by decoding the dynamic picture in a reverse order.
The step of playing each still picture frame according to the playing sequence or/and the playing speed comprises the following steps:
s252: and when the playing sequence is the positive sequence playing, playing the static picture frames arranged in the positive sequence according to the playing sequence.
S254: and when the playing sequence is the reverse order, playing the static picture frames arranged in the reverse order according to the playing sequence.
Thus, two playing modes of the forward playing sequence and the reverse playing sequence are realized.
It should be noted that, according to the file structure of the motion picture, the current still picture frame decoding may depend on the picture data of the previous still picture frame, and in the forward decoding process of the motion picture, the decoding is started from the 1 st frame, and when the next frame is decoded, the decoding result of the previous frame is used, so as to improve the decoding efficiency and achieve the expected animation effect of the motion picture. The difficulty in implementing the reverse decoding of the dynamic picture is high, when the nth static picture frame is randomly decoded, decoding needs to be started from the 1 st frame and is decoded to the current frame all the time, and when the decoding time consumption is equal to the total consumption of decoding the 1 st to nth frames, the decoding time is uncontrollable, and the dynamic picture cannot be guaranteed to achieve the expected animation effect.
Further, referring to fig. 3, the motion pictures include forward motion pictures and reverse motion pictures; decoding the positive sequence dynamic picture to obtain a decoding result comprising all static picture frames which are arranged in a positive sequence; the decoding result obtained by decoding the reverse order dynamic picture includes the static picture frames arranged in the reverse order.
The step of obtaining the dynamic picture to be played comprises the following steps:
s312: and acquiring a positive sequence dynamic picture.
S314: and decoding the positive sequence dynamic picture to obtain a first decoding result, wherein the first decoding result comprises all static picture frames which are arranged in a positive sequence.
S316: and combining the static picture frames into an inverted dynamic picture, wherein a second decoding result obtained after decoding the inverted dynamic picture comprises the static picture frames which are arranged in an inverted order.
The static picture frames are combined into the reverse order dynamic picture, and the static picture frames obtained by analyzing the forward order dynamic picture can be recoded by the dynamic picture coder, so that the reverse order dynamic picture is combined.
It can be understood that the decoding in this embodiment is forward decoding, so that the decoding efficiency can be improved, and the expected dynamic effect of the reverse dynamic picture can be achieved.
Therefore, before the dynamic picture is decoded to obtain a decoding result, the forward-sequence dynamic picture is decoded, and a reverse-sequence dynamic picture which is sequenced according to the reverse sequence arrangement sequence of the static picture frames in the forward-sequence dynamic picture is recombined. Before decoding the motion picture to obtain the decoding result, the motion picture is substantially changed from a forward motion picture to a combination of a forward motion picture and a reverse motion picture. Thus, each still picture frame of the forward-order moving picture arranged in the reverse order can be obtained by only performing forward decoding on the reverse-order moving picture without performing reverse decoding on the forward-order moving picture, and each still picture frame of the reverse-order moving picture arranged in the forward order can be obtained in accordance with the arrangement order of the still picture frames of the forward-order moving picture arranged in the reverse order. Therefore, the purposes of improving the decoding efficiency and achieving the expected dynamic picture playing effect are achieved.
In one embodiment, after the step of receiving the control data based on the moving picture playing apparatus, the method further includes: and updating the control data at preset time intervals. It can be understood that, after the control data is updated each time, the dynamic picture to be played needs to be obtained again, and the dynamic picture is decoded to obtain a decoding result, where the decoding result includes each static picture frame of the dynamic picture; determining the playing mode of the dynamic picture according to the control data, wherein the playing mode comprises a playing sequence or/and a playing speed; and playing the static picture frames according to the playing sequence or/and the playing speed. Therefore, the playing mode of the dynamic picture can be flexibly controlled.
In one embodiment, as shown in fig. 4, a hardware structure diagram of playing motion pictures is shown in accordance with an embodiment of the present invention. The moving picture is a moving picture in a GIF format. The positive sequence GIF dynamic picture can be obtained through a GIF downloader, and the positive sequence GIF dynamic picture is decoded through a GIF coder to obtain a first decoding result and is recoded to obtain a negative sequence GIF dynamic picture. In this embodiment, the sensor data is acquired by the device sensor, specifically, the sensor data is acquired once by being recalled every preset time (e.g., 100 ms), and the sensor data is processed by the data processor of the device sensor to obtain control data, such as the rotation angle and the pointing relationship. And the GIF playing controller calls a GIF decoder to decode the positive order GIF dynamic picture or the negative order GIF dynamic picture according to the directional relation in the control data to obtain each static picture frame arranged according to the positive order or the negative order, namely the GIF picture frame. And after the GIF picture frames are obtained, determining the playing speed according to the rotation angle of the control data, wherein the playing speed is represented by the playing time interval of each GIF picture frame to be played. And finally, playing the GIF picture frame to be played according to the time interval by using the GIF player, thereby realizing the playing control of the GIF dynamic picture.
In one embodiment, a system diagram of a video playback method presented in a class diagram format is shown in fig. 5. The system mainly comprises four modules of GIF downloading, GIF coding and decoding, frame data rendering and sensor control.
Among them, genericNewGifDecoder and NewGifDecoder are responsible for GIF decoding, newGifDrawable (gifcanvas) and AutoGifDrawable (autogifcanvas) are responsible for GIF rendering and playing, autoGifCallback is used for monitoring playing callback, gifloadlistener (gifdownload monitor) is responsible for GIF download callback monitoring, gifcontrolcallback (GIF play control callback) is responsible for GIF play control callback, gifPlayControllerCallback (GIF play controller) acquires sensor data and transfers the data to sensorgifdrawable (sensor autogirf canvas) to control GIF playing.
Referring to fig. 6, in one embodiment, the step of receiving control data based on the motion picture playing apparatus includes:
s432: and establishing a three-dimensional coordinate system based on the dynamic picture playing device.
In this embodiment, the moving picture playing apparatus may be an execution device. The enforcement device may be a mobile device. The three-dimensional coordinate system includes two mutually perpendicular x-axis, y-axis and z-axis. As shown in fig. 7, when the moving picture playing apparatus is vertically placed, the direction facing the screen horizontally to the right may be a positive x-axis direction, the direction facing vertically upward may be a positive y-axis direction, and the direction in which the vertical x-axis and y-axis screens are aligned may be a positive z-axis direction. As shown in fig. 8, when the moving picture playing device is placed horizontally and the screen is facing upward, the direction facing the horizontal right of the screen may be the positive direction of the x-axis, the vertical upward direction may be the positive direction of the z-axis, and the direction perpendicular to the x-axis and the z-axis and pointing from the lower end of the screen to the upper end of the screen may be the positive direction of the y-axis.
S436: and acquiring the directional relation between the positive direction of the first preset axis of the three-dimensional coordinate system and the horizontal plane, or/and acquiring the rotation angle or rotation angular velocity of the second preset axis of the three-dimensional coordinate system around the third preset axis of the three-dimensional coordinate system.
The first predetermined axis may be an x-axis, a y-axis, or a z-axis. The pointing relation may be that the positive direction of the first preset axis points above or below the horizontal plane. The second preset axis may also be an x axis, a y axis, or a z axis, and the second preset axis may be a coordinate axis different from the first preset axis, or may be the same as the first preset axis.
The control data comprise the rotation angle or rotation angular velocity or/and the directional relation. The step of determining the playing mode of the dynamic picture according to the control data comprises the following steps:
s442: and determining the playing sequence according to the directional relation, or/and determining the playing speed according to the rotation angle or the rotation angular speed.
When the pointing relationship is the first pointing relationship, it can be determined that the playing sequence is the forward playing sequence; when the pointing relationship is the second pointing relationship, it may be determined that the playing order is the reverse order playing. The first pointing relation may be that the positive direction of the first preset axis points to the upper side or the lower side of the horizontal plane; the second pointing relationship is a different pointing than the first pointing relationship. When the first pointing relationship is that the positive direction of the first preset axis points to the lower part of the horizontal plane, the second pointing relationship is that the positive direction of the first preset axis points to the upper part of the horizontal plane; when the first directional relation is that the positive direction of the first preset axis points to the upper part of the horizontal plane, the second directional relation is that the positive direction of the first preset axis points to the lower part of the horizontal plane.
When the playback speed is determined by the rotation angle, the playback speed is faster as the rotation angle is larger. When the playback speed is determined by the rotation angular velocity, the playback speed is faster as the rotation angle is larger. It is to be understood that, in the present embodiment, the playback speed is expressed by an acceleration factor, and playback is performed at a preset playback speed that is expressed by the interval time of each still picture frame recorded in the file format of the moving picture, multiplied by the acceleration factor. Specifically, the rotation angle or rotation angular velocity may be divided by a preset value, for example, 10, the obtained value is used as the acceleration factor, and the acceleration factor is multiplied by the preset playing speed to obtain the actual playing speed.
Referring to fig. 9, in an embodiment, before the step of obtaining the pointing relationship between the positive direction of the first preset axis of the three-dimensional coordinate system and the horizontal plane, or/and obtaining the rotation angular velocity of the second preset axis of the three-dimensional coordinate system around the third preset axis of the three-dimensional coordinate system, the method further includes the steps of:
s534: and acquiring an included angle between a fourth preset axis of the three-dimensional coordinate system and the horizontal plane.
The control data further includes an included angle; the step of determining the playing mode of the dynamic picture according to the control data comprises the following steps:
s542: and when the included angle meets a preset condition, determining a playing sequence according to the directional relation, or/and determining a playing speed according to the rotation angle or the rotation angular speed.
The fourth predetermined axis may be an x-axis, a y-axis or a z-axis in this embodiment. And determining the playing sequence according to the directional relation only when the included angle between the fourth preset axis of the three-dimensional coordinate axis and the horizontal plane meets the preset condition, or/and determining the playing speed according to the rotation angle or the rotation angular speed. The playing sequence is determined according to the pointing relationship, or/and the playing speed is determined according to the rotation angle or the rotation angular speed, so that the mode for controlling the playing of the dynamic pictures can be recorded as the device sensor control mode. In one embodiment, the fourth predetermined axis is the x-axis, and the predetermined condition is greater than 15 °. In this case, the playing sequence is determined according to the directional relationship only when the angle between the x-axis and the horizontal plane is greater than 15 °, or/and the playing speed is determined according to the rotation angle or the rotation angular speed.
Further, the decoding result further includes a preset playing mode. The preset playing mode may be a playing mode recorded in a file format of the moving picture, and may also include a playing sequence and/or a playing speed.
The step of determining the playing mode of the dynamic picture according to the control data further comprises the following steps:
s544: and when the included angle does not meet the preset condition, playing the dynamic picture according to a preset playing mode.
And when the included angle between the fourth preset axis and the horizontal plane does not meet the preset condition, the equipment sensor control mode is not entered, and the preset playing mode is entered. The preset playing mode is a mode for playing the dynamic picture according to the preset playing mode. It is understood that the predetermined playing mode also includes a playing sequence and/or a playing speed, and the predetermined playing sequence and/or the predetermined playing speed can be defined for the purpose of distinction. The preset playing sequence is carried in a file format of the dynamic pictures; the preset playing speed is the playing speed carried in the file format of the dynamic picture.
Therefore, the user can control the dynamic picture playing device, so that the included angle between the fourth preset axis of the dynamic picture playing device and the horizontal plane meets or does not meet the preset condition, and the dynamic picture is controlled to be played and controlled according to the subsequently input control data or the preset playing mode. The interactivity of the dynamic picture playing mode can be further improved, and meanwhile, the flexibility of the dynamic picture playing mode can be improved.
In one embodiment, a control process of a moving picture is described from the perspective of a user, and as shown in fig. 10, first, a device sensor acquires sensor data of a moving picture playing device, and processes the sensor data to obtain control data, that is, a rotation condition of the moving picture playing device. When the included angle between the fourth preset axis of the three-dimensional coordinate system and the horizontal plane is not more than 15 degrees, entering a preset playing mode; when the included angle between the fourth preset axis of the three-dimensional coordinate system and the horizontal plane is larger than 15 degrees, entering a sensor playing mode, and determining the pointing relation between the positive direction of the first preset axis of the three-dimensional coordinate system and the horizontal plane according to whether the rotation angle around the y axis is larger than 0, namely the first preset axis is the x axis. When the rotation angle of the y axis is greater than 0, the pointing relation is that the positive direction of the first preset axis points to the upper part of the horizontal plane, and the playing sequence is determined to be sequential playing; and when the rotation angle of the y axis is less than 0, the positive direction of the first preset axis points to the lower part of the horizontal plane, and the playing sequence is determined to be reverse playing. The second preset axis is an x-axis, the third preset axis is a y-axis, and the playing speed is determined according to the rotation angle of the x-axis of the three-dimensional coordinate system around the y-axis of the three-dimensional coordinate system, and is represented by an acceleration factor a, specifically, a = rotation angle/10 °. Therefore, when a dynamic picture appears on a browsing interface, such as a GIF dynamic picture, the dynamic picture playing device is rotated around the y axis, a sensor control mode can be entered, and then the playing sequence can be controlled by utilizing the included angle between the x axis of the dynamic picture playing device and the horizontal plane, when the x axis points to the lower part of the horizontal plane, the GIF dynamic picture is played in a positive sequence, otherwise, the GIF dynamic picture is played in a reverse sequence, and when a user wants to recover the normal playing mode, the included angle between the x axis of the dynamic picture playing device and the horizontal plane is smaller than 15 degrees.
In one embodiment, a timing diagram of the moving picture playing method is shown in fig. 11. Firstly, a user rotates the dynamic picture playing device, the dynamic picture playing device transmits the rotation to the equipment sensor, namely, the equipment sensor acquires sensor data and processes the sensor data to obtain control data. The pointing relation between the positive direction of the first preset axis and the horizontal plane is represented by whether the rotating angle is larger than 0 degrees, and the included angle between the preset axis and the horizontal plane can be represented by the rotating angle of the x axis. There are three cases, such as 1.1.1, 2.1.1 and 3.1.1 in the timing diagram. When the rotation angle is larger than 15 degrees, the sensor control mode is adopted, and the playing sequence is positive sequence playing; when the rotating angle is less than-15 degrees, the sensor control mode is also adopted, and the playing sequence is in reverse order; when the rotation angle is between-15 ° and 15 °, the playback mode is the preset playback mode, and the playback sequence is the preset playback sequence. And after the decoder decodes the dynamic pictures according to the control data, returning the static picture frames obtained by decoding to the player, so that the dynamic picture playing device plays the dynamic pictures according to the playing sequence.
As shown in fig. 12, the present invention further provides a moving picture playing apparatus corresponding to the moving picture playing method, including:
a dynamic picture acquiring module 110, configured to acquire a dynamic picture to be played;
a dynamic picture decoding module 120, configured to decode the dynamic picture to obtain a decoding result, where the decoding result includes each static picture frame of the dynamic picture;
a control instruction receiving module 130, configured to receive control data based on the moving picture playing apparatus;
a playing mode determining module 140, configured to determine a playing mode of the dynamic picture according to the control data, where the playing mode includes a playing sequence and/or a playing speed;
the picture playing control module 150 is configured to play each still picture frame according to the playing sequence and/or the playing speed.
The dynamic picture playing device can receive the control data by receiving the control data based on the dynamic picture playing device, and then determine the playing mode of the dynamic picture according to the control data, wherein the playing mode comprises a playing sequence or/and a playing speed; and finally, playing the static picture frames according to the playing sequence or/and the playing speed. Therefore, the dynamic picture playing device improves the interactivity compared with the traditional dynamic picture playing mode.
Referring to fig. 13, in one embodiment, the decoding result includes the still picture frames arranged in a forward order and the still picture frames arranged in a reverse order;
the picture play control module 250 includes:
a forward play control unit 252, configured to play each of the still picture frames arranged in forward order according to the play order when the play order is forward play;
a reverse playing control unit 254, configured to play each of the still picture frames arranged in a reverse order according to the playing order when the playing order is reverse playing.
In one embodiment, the motion pictures comprise forward motion pictures and reverse motion pictures; decoding the positive sequence dynamic picture to obtain a decoding result which comprises all the static picture frames arranged in a positive sequence; decoding the reverse order dynamic picture to obtain a decoding result comprising each static picture frame arranged in a reverse order;
referring to fig. 14, the motion picture acquiring module 310 includes:
a positive sequence picture acquiring unit 312, configured to acquire the positive sequence moving picture;
a positive sequence picture decoding unit 314, configured to decode the positive sequence dynamic picture to obtain a first decoding result, where the first decoding result includes each static picture frame arranged in a positive sequence;
the reverse-order picture synthesizing unit 316 is configured to combine the still picture frames into a reverse-order moving picture, where a second decoding result obtained after decoding the reverse-order moving picture includes the still picture frames arranged in a reverse order.
In one embodiment, the method further comprises: a control data updating module (not shown) for updating the control data at preset time intervals after the control instruction receiving module receives the control data based on the moving picture playing device; and after the control data is updated, the dynamic picture acquisition module, the dynamic picture decoding module, the playing mode determination module and the picture playing control module are called again.
Referring to fig. 15, in an embodiment, the control command receiving module 430 includes:
a three-dimensional coordinate establishing unit 432 for establishing a three-dimensional coordinate system based on the moving picture playing apparatus;
a control command obtaining unit 436, configured to obtain a pointing relationship between a positive direction of a first preset axis of the three-dimensional coordinate system and a horizontal plane, or/and obtain a rotation angle or a rotation angular velocity of a second preset axis of the three-dimensional coordinate system around a third preset axis of the three-dimensional coordinate system;
the control data comprises the rotation angle or the rotation angular velocity or/and the directional relation;
the playing mode determining module 440 is configured to determine a playing sequence according to the directional relationship, or/and determine a playing speed according to the rotation angle or the rotation angular speed.
Referring to fig. 15, in an embodiment of the present invention, the control instruction receiving module 430 further includes:
an included angle obtaining unit 434, configured to obtain an included angle between a fourth preset axis of the three-dimensional coordinate system and a horizontal plane;
the control data further comprises the included angle;
the playing mode determining module 440 is configured to determine a playing sequence according to the directional relationship when the included angle satisfies a preset condition, or/and determine a playing speed according to the rotation angle or the rotation angular speed.
In one embodiment, the decoding result further includes a preset playing mode;
the playing mode determining module 440 is further configured to play the dynamic picture according to the preset playing mode when the included angle does not meet the preset condition.
FIG. 16 is a diagram illustrating an internal architecture of an execution device in one embodiment. The execution device may be a moving picture playing apparatus. The execution device comprises the processor, the memory, the network interface, the input device and the display screen which are connected through the system bus. Wherein the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the execution device stores an operating system and may also store a computer program, which, when executed by the processor, causes the processor to implement the moving picture playing method. The internal memory may also store a computer program, and the computer program, when executed by the processor, may cause the processor to execute the motion picture playing method. The display screen of the execution device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the execution device can be a touch layer covered on the display screen, a key, a track ball or a touch pad arranged on the shell of the execution device, an external keyboard, a touch pad or a mouse, and the like.
Those skilled in the art will appreciate that the configuration shown in fig. 16 is a block diagram of only a portion of the configuration associated with the present application, and does not constitute a limitation on the implementation to which the present application is applied, and that a particular implementation may include more or less components than those shown, or combine certain components, or have a different arrangement of components.
In one embodiment, the moving picture playing apparatus provided in the present application may be implemented in the form of a computer program, and the computer program may be executed on an execution device as shown in fig. 16. The memory of the execution device may store various program modules constituting the moving picture playing apparatus, such as the moving picture acquiring module 110, the moving picture decoding module 120, the control instruction receiving module 130, the playing mode determining module 140, and the picture playing control module 150 shown in fig. 12. The computer program constituted by the respective program modules causes the processor to execute the steps in the moving picture playing method of the embodiments of the present application described in the present specification.
For example, referring to fig. 1, 12 and 16 in combination, the execution device shown in fig. 16 can execute step S110 through the motion picture obtaining module 110 in the motion picture playing apparatus shown in fig. 12. The execution device may perform step S120 by the moving picture decoding module 120. The execution device may execute step S130 through the control instruction receiving module 130. The execution device may execute step S140 through the play mode determination module 140. The execution device may execute step S150 through the picture play control module 150.
The invention also provides a dynamic picture playing device corresponding to the method, which comprises a memory and a processor, wherein the memory stores a computer program, and the computer program causes the processor to execute the steps of the method when being executed by the processor.
The present invention also provides a storage medium corresponding to the above method and apparatus, storing a computer program, which, when executed by a processor, causes the processor to perform the steps of the above method.
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 non-volatile computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the program is executed. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), rambus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, and these are all within the scope of protection of the present application. Therefore, the protection scope of the present patent application shall be subject to the appended claims.

Claims (14)

1. A method for playing a moving picture, comprising:
acquiring a dynamic picture to be played; the dynamic picture is a picture with a dynamic effect obtained by coding a group of static pictures according to a preset format; the dynamic pictures comprise forward-order dynamic pictures and reverse-order dynamic pictures;
respectively carrying out forward decoding on the forward-sequence dynamic picture and the reverse-sequence dynamic picture to obtain a decoding result, wherein the decoding result comprises all static picture frames which are arranged in a forward sequence and all the static picture frames which are arranged in a reverse sequence;
receiving control data based on a dynamic picture playing device; the dynamic picture playing device is an executing device for playing the dynamic picture; the control data comprises control data which is acquired by an equipment sensor of the execution equipment and is obtained by processing the acquired data;
determining the playing mode of the dynamic picture according to the control data, wherein the playing mode comprises a playing sequence and a playing speed;
when the playing sequence is positive order playing, playing each static picture frame arranged in positive order according to the playing speed;
and when the playing sequence is the reverse playing, playing each static picture frame arranged in the reverse sequence according to the playing speed.
2. The moving picture playing method according to claim 1, wherein: the step of obtaining the dynamic picture to be played comprises the following steps:
acquiring the positive sequence dynamic picture;
decoding the positive sequence dynamic picture to obtain a first decoding result, wherein the first decoding result comprises all static picture frames which are arranged in a positive sequence;
and combining the static picture frames which are arranged in the forward order into a reverse order dynamic picture, wherein a second decoding result obtained after the reverse order dynamic picture is decoded comprises the static picture frames which are arranged in the reverse order.
3. The moving picture playback method according to any one of claims 1 to 2, wherein the step of receiving control data based on the moving picture playback device further comprises: updating the control data at preset time intervals; and after updating the control data, re-executing the step of obtaining the dynamic picture to be played, the step of respectively performing forward decoding on the forward dynamic picture and the reverse dynamic picture to obtain a decoding result, the step of determining the playing mode of the dynamic picture according to the control data, and the step of playing each static picture frame.
4. The moving picture playback method according to claim 1, wherein the step of receiving control data based on the moving picture playback device includes:
establishing a three-dimensional coordinate system based on the dynamic picture playing device;
acquiring the pointing relation between the positive direction of a first preset axis of the three-dimensional coordinate system and a horizontal plane, and acquiring the rotation angle or rotation angular velocity of a second preset axis of the three-dimensional coordinate system around a third preset axis of the three-dimensional coordinate system;
the control data includes the rotation angle or the rotation angular velocity, and the directional relationship; the step of determining the playing mode of the dynamic picture according to the control data comprises:
determining a playback order based on the directional relationship, and determining a playback speed based on the rotation angle or the rotation angular speed.
5. The moving picture displaying method according to claim 4, wherein said step of obtaining a directional relationship between a positive direction of a first predetermined axis of said three-dimensional coordinate system and a horizontal plane, and obtaining a rotational angular velocity of a second predetermined axis of said three-dimensional coordinate system around a third predetermined axis of said three-dimensional coordinate system, further comprises the steps of:
acquiring an included angle between a fourth preset shaft of the three-dimensional coordinate system and a horizontal plane;
the control data further comprises the included angle;
the step of determining the playing mode of the dynamic picture according to the control data comprises:
and when the included angle meets a preset condition, determining a playing sequence according to the directional relation, and determining a playing speed according to the rotation angle or the rotation angular speed.
6. The method according to claim 5, wherein the decoding result further includes a preset playback mode; the step of determining the playing mode of the dynamic picture according to the control data further includes:
and when the included angle does not meet the preset condition, playing the dynamic picture according to the preset playing mode.
7. A moving picture playback apparatus, comprising:
the dynamic picture acquisition module is used for acquiring a dynamic picture to be played; the dynamic picture is a picture with dynamic effect obtained by coding a group of static pictures according to a preset format; the dynamic pictures comprise forward-order dynamic pictures and reverse-order dynamic pictures;
a dynamic picture decoding module, configured to perform forward decoding on the forward-order dynamic picture and the reverse-order dynamic picture respectively to obtain decoding results, where the decoding results include each static picture frame arranged in forward order and each static picture frame arranged in reverse order;
the control instruction receiving module is used for receiving control data based on the dynamic picture playing device; the dynamic picture playing device is an executing device for playing the dynamic picture; the control data are used for representing the motion condition of the execution equipment, and are acquired by an equipment sensor of the execution equipment to acquire acquired data and process the acquired data;
a playing mode determining module, configured to determine a playing mode of the dynamic picture according to the control data, where the playing mode includes a playing sequence and a playing speed;
and the picture playing control module is used for playing each static picture frame which is arranged in the forward sequence according to the playing speed when the playing sequence is played in the forward sequence, and playing each static picture frame which is arranged in the reverse sequence according to the playing speed when the playing sequence is played in the reverse sequence.
8. The moving picture playback device according to claim 7, wherein: the dynamic picture acquisition module comprises:
a positive sequence picture acquiring unit, configured to acquire the positive sequence dynamic picture;
the positive sequence picture decoding unit is used for decoding the positive sequence dynamic picture to obtain a first decoding result, and the first decoding result comprises all static picture frames which are arranged in a positive sequence;
and the reverse order picture synthesis unit is used for combining the static picture frames which are arranged in the normal order into a reverse order dynamic picture, and a second decoding result obtained after the reverse order dynamic picture is decoded comprises the static picture frames which are arranged in the reverse order.
9. The moving picture playback device according to claim 7, wherein the control instruction receiving module includes:
a three-dimensional coordinate establishing unit for establishing a three-dimensional coordinate system based on the dynamic picture playing device;
the control instruction acquisition unit is used for acquiring the pointing relation between the positive direction of a first preset axis of the three-dimensional coordinate system and a horizontal plane and acquiring the rotation angle or rotation angular velocity of a second preset axis of the three-dimensional coordinate system around a third preset axis of the three-dimensional coordinate system;
the control data includes the rotation angle or the rotation angular velocity, and the directional relationship;
and the playing mode determining module is used for determining a playing sequence according to the pointing relationship, or/and determining a playing speed according to the rotation angle or the rotation angular speed.
10. The apparatus for playing moving picture according to claim 9, wherein said control command receiving module further comprises:
the included angle acquisition unit is used for acquiring an included angle between a fourth preset axis of the three-dimensional coordinate system and a horizontal plane;
the control data further comprises the included angle;
and the playing mode determining module is used for determining a playing sequence according to the directional relation and determining a playing speed according to the rotation angle or the rotation angular speed when the included angle meets a preset condition.
11. The moving picture playback device according to claim 10, wherein the decoding result further includes a preset playback mode;
and the playing mode determining module is further configured to play the dynamic picture according to the preset playing mode when the included angle does not meet the preset condition.
12. The moving picture playback device according to any one of claims 7 to 11, wherein the device further comprises: a control data updating module, configured to update the control data at preset time intervals after the control instruction receiving module receives the control data based on the moving picture playing apparatus; and after updating the control data, the dynamic picture acquisition module, the dynamic picture decoding module, the playing mode determination module and the picture playing control module are called again.
13. A moving picture playback device comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to carry out the steps of the method according to any one of claims 1 to 6.
14. A storage medium, characterized in that a computer program is stored which, when being executed by a processor, causes the processor to carry out the steps of the method according to any one of claims 1-6.
CN201710916466.XA 2017-09-30 2017-09-30 Dynamic picture playing method, device and storage medium Active CN110019866B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710916466.XA CN110019866B (en) 2017-09-30 2017-09-30 Dynamic picture playing method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710916466.XA CN110019866B (en) 2017-09-30 2017-09-30 Dynamic picture playing method, device and storage medium

Publications (2)

Publication Number Publication Date
CN110019866A CN110019866A (en) 2019-07-16
CN110019866B true CN110019866B (en) 2023-03-10

Family

ID=67186368

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710916466.XA Active CN110019866B (en) 2017-09-30 2017-09-30 Dynamic picture playing method, device and storage medium

Country Status (1)

Country Link
CN (1) CN110019866B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113096218A (en) * 2019-12-20 2021-07-09 腾讯科技(深圳)有限公司 Dynamic image playing method, device, storage medium and computer equipment
CN111443914B (en) * 2020-03-30 2023-07-14 北京字节跳动网络技术有限公司 Animation display method and device
CN112650872A (en) * 2020-12-15 2021-04-13 歌尔光学科技有限公司 Dynamic picture playing method, device and equipment and computer readable storage medium
CN112861811B (en) * 2021-03-24 2023-08-01 北京百度网讯科技有限公司 Target identification method, device, equipment, storage medium and radar
CN114924825A (en) * 2022-06-01 2022-08-19 咪咕文化科技有限公司 Expression package presenting method, device, equipment and computer readable storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103986933A (en) * 2014-04-24 2014-08-13 小米科技有限责任公司 Dynamic picture displaying method and device
CN106385635A (en) * 2016-09-18 2017-02-08 福建天泉教育科技有限公司 GIF animation real-time control method and player
CN106657836A (en) * 2016-11-28 2017-05-10 合网络技术(北京)有限公司 Method and device for making graphics interchange format chart
CN106803856A (en) * 2016-12-09 2017-06-06 重庆零度智控智能科技有限公司 video playing control method and device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3403166B2 (en) * 1999-12-15 2003-05-06 三洋電機株式会社 Image reproducing method, image reproducing apparatus and television receiver that can use this method
JP2013058853A (en) * 2011-09-07 2013-03-28 Casio Comput Co Ltd Moving image reproduction device, moving image reproduction method, and program
RU2573768C2 (en) * 2014-01-09 2016-01-27 Андрей Иванович Широбоков Method of protecting video materials from unauthorised reproduction and copying

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103986933A (en) * 2014-04-24 2014-08-13 小米科技有限责任公司 Dynamic picture displaying method and device
CN106385635A (en) * 2016-09-18 2017-02-08 福建天泉教育科技有限公司 GIF animation real-time control method and player
CN106657836A (en) * 2016-11-28 2017-05-10 合网络技术(北京)有限公司 Method and device for making graphics interchange format chart
CN106803856A (en) * 2016-12-09 2017-06-06 重庆零度智控智能科技有限公司 video playing control method and device

Also Published As

Publication number Publication date
CN110019866A (en) 2019-07-16

Similar Documents

Publication Publication Date Title
CN110019866B (en) Dynamic picture playing method, device and storage medium
US10143924B2 (en) Enhancing user experience by presenting past application usage
WO2020186935A1 (en) Virtual object displaying method and device, electronic apparatus, and computer-readable storage medium
CN108156520B (en) Video playing method and device, electronic equipment and storage medium
CN108574806B (en) Video playing method and device
US11341706B2 (en) Virtual scene display method and apparatus, and storage medium
CN112933606B (en) Game scene conversion method and device, storage medium and computer equipment
CN109309842B (en) Live broadcast data processing method and device, computer equipment and storage medium
JP2009518103A (en) Method and system for enabling a user to play a large screen game with a mobile device
CN109788212A (en) A kind of processing method of segmenting video, device, terminal and storage medium
CN113630615A (en) Live broadcast room virtual gift display method and device
US20150227291A1 (en) Information processing method and electronic device
CN110750664A (en) Picture display method and device
CN107592118B (en) Decoding method and device for variable-length coded file
CN113949821A (en) Video playing method and device, computer equipment and storage medium
CN111131882A (en) Screen recording method and device and electronic equipment
US9948691B2 (en) Reducing input processing latency for remotely executed applications
CN109525880A (en) Synthetic method, device, equipment and the storage medium of video data
CN110049347B (en) Method, system, terminal and device for configuring images on live interface
CN114445600A (en) Method, device and equipment for displaying special effect prop and storage medium
CN115834889A (en) Video encoding and decoding method and device, electronic equipment and medium
CN114449305A (en) Gift animation playing method and device in live broadcast room
CN114820318A (en) Wallpaper display method and device, electronic equipment and readable storage medium
CN114827737A (en) Image generation method and device and electronic equipment
CN114513692A (en) Video preview method, terminal 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
GR01 Patent grant
GR01 Patent grant