Video reverse playback method and device, computer storage medium and electronic device
By organizing the video data in reverse order and predetermining the decoding route, the problem of low efficiency and high processing complexity of reverse video playback is solved, and efficient reverse video playback is achieved.
Patent Information
- Application Number
- CN202010709412.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-07-22
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2040-07-22
AI Technical Summary
In the existing technology, video playback in reverse order has low efficiency and high processing complexity. Transcoding takes a long time and multiple jumps lead to an increase in the amount of calculation.
By organizing the original video data in reverse playback order, the decoding route is determined in advance, transcoding preprocessing operations are reduced, and it is judged during playback whether the current time is in the cached decoded image group, and if not, jumps to the next decoded image group. to avoid multiple jumps.
It improves the efficiency of video playback in reverse order, reduces transcoding time and processing complexity, and avoids an increase in calculations caused by multiple jumps.
Smart Images

Figure CN113973225B
Abstract
Description
Technical Field
[0001] The present application relates to computer application technology, and more particularly to a video reversal method and device. The present application also relates to a computer storage medium and an electronic device. Background Art
[0002] As a medium for information transmission, video has been regarded as an indispensable form of entertainment in the lives of the general public. In order to improve the fun of video playback, reverse video playback came into being.
[0003] Existing reverse playback of videos usually requires adding a transcoding preprocessing to the video to reduce the key frame (I frame) interval of the video, or converting all P frames and B frames in the video into key frames (I frames), or directly transcoding them into other simple encoding types, and achieving reverse playback by repeatedly jumping during playback.
[0004] However, transcoding is a relatively time-consuming operation. Usually, the time taken to transcode is 2 to 3 times the length of the original video (the larger the target resolution, the greater the time taken); in addition, the transcoded video needs to be redirected before each decoding. Therefore, the existing reverse playback method not only has the problem of low playback efficiency and high processing complexity of converting video data into reverse playback video, but also has the problem of increased processing calculation due to the number of jumps. Summary of the invention
[0005] The present application provides a video reverse playback method to solve the problems in the prior art due to the reverse video playback efficiency and processing complexity.
[0006] The present application provides a video reverse playback method, comprising:
[0007] The original image groups in the acquired original video data are organized in a reverse playback order to obtain target video data for reverse playback;
[0008] Determining a display time of a to-be-played video image frame in the target video data corresponding to a current playback time of the target video data;
[0009] Play the to-be-played video image frame in the target video data corresponding to the display time.
[0010] In some embodiments, the original image groups in the acquired original video data are organized in the order of reverse playback to obtain target video data for reverse playback, including:
[0011] Obtaining a length value of the original image group according to parsing the original image group in the acquired original video data;
[0012] Determining whether the length value meets the requirement of the set picture group length reference value;
[0013] If the conditions are met, the original image group is organized in the order of reverse playback to obtain target video data for reverse playback.
[0014] In some embodiments, determining whether the length value meets the requirement of a set picture group length reference value includes:
[0015] Compare the length value with the GOP length reference value to determine whether the length value is less than or equal to the GOP length reference value;
[0016] If so, it is determined that the length value meets the requirement of the picture group length reference value.
[0017] In some embodiments, the method further includes: if the length value determined does not meet the requirement of the set picture group length reference value, transcoding the original video data;
[0018] Adjusting the length value of the picture group in the original video data processed by the transcoding process to meet the requirement of the picture group length reference value;
[0019] The adjusted image group is used as the original image group, and is organized in the order of reverse playback to obtain the target video data for reverse playback.
[0020] In some embodiments, adjusting the length value of the picture group in the original video data processed by the transcoding process to meet the requirement of the picture group length reference value includes:
[0021] The length value of the picture group in the original video data processed by the transcoding is adjusted to be less than or equal to the picture group length reference value.
[0022] In some embodiments, it also includes:
[0023] The reference value of the length of the group of pictures is adjusted according to the requirement of reversing the target video data.
[0024] In some embodiments, the playing of the to-be-played video image frame in the target video data corresponding to the display time includes:
[0025] The to-be-played video image frame corresponding to the display time and located in the decoding target image group of the target video data is played.
[0026] In some embodiments, the playing of the to-be-played video image frame in the target video data corresponding to the display time includes:
[0027] Determine whether the display time of the to-be-played video image frame corresponding to the current playback time is within the display time range of the current decoded image group in the target video data;
[0028] If not, jump to the next decoded picture group adjacent to the current decoded picture group;
[0029] Determining the next adjacent decoded picture group as the current decoded picture group;
[0030] Play the to-be-played video image frame determined in the currently decoded image group and matching the current playback time.
[0031] In some embodiments, it also includes:
[0032] If the display time of the to-be-played video image frame corresponding to the current playback time is within the display time range of the current decoded image group in the target video data, the step of playing the playback video image frame determined in the current decoded image group and matching the current playback time is executed.
[0033] In some embodiments, the playing of the video image frame to be played that matches the current playing time and is determined in the current decoded image group includes:
[0034] In the cache space of the cache decoded image group, searching whether there is a decoded image frame that matches the display time of the video image frame to be played;
[0035] If not, waiting for the decoding operation required for the video image frame to be played;
[0036] Play the decoded image frame obtained after the decoding operation on the video image frame to be played.
[0037] In some embodiments, it also includes:
[0038] Updating the current playback time;
[0039] Determining whether the target video data has been played out according to the updated current play time;
[0040] If not, the process returns to the step of determining the display time of the to-be-played video image frame in the target video data corresponding to the current playback time of the target video data.
[0041] In some embodiments, it also includes:
[0042] If it is determined that the target video data has finished playing according to the updated current playing time, the playing of the target video data is exited.
[0043] In some embodiments, determining the display time of the to-be-played video image frame in the target video data corresponding to the current playback time of the target video data includes:
[0044] Obtaining the current playback time of the target video data;
[0045] The current play time is mapped to the display time of the play video image in the target video data according to the reverse play order.
[0046] The present application also provides a video playback device, comprising:
[0047] An organizing unit, used for organizing the original image groups in the acquired original video data in a reverse playback order to obtain target video data for reverse playback;
[0048] A determination unit, configured to determine a display time of a to-be-played video image frame in the target video data corresponding to a current playback time of the target video data;
[0049] The playing unit is used to play the to-be-played video image frame corresponding to the display time and located in the decoding target image group of the target video data.
[0050] The present application also provides a computer storage medium for storing data generated by a network platform, and a program for processing the data generated by the network platform;
[0051] When the program is read and executed, the steps of the video reverse playback method described above are executed.
[0052] The present application also provides an electronic device, comprising:
[0053] processor;
[0054] The memory is used to store a program for processing data generated by a network platform. When the program is read and executed by the processor, the steps of the video reversal method as described above are executed.
[0055] Compared with the prior art, this application has the following advantages:
[0056] The present application provides a video reverse playback method, which obtains target video data for reverse playback by organizing the original image group in the acquired original video data in the order of reverse playback; determining the display time of the video image frame to be played in the target video data corresponding to the current playback time of the target video data; and playing the video image frame to be played in the decoded target image group of the target video data corresponding to the display time. Since the video reverse playback method provided by the present application can reorganize the GOP of the video data in advance and determine the decoding route before the video is reversed, the operation of pre-transcoding preprocessing of the video data is reduced, and the problem of low efficiency of reverse playback of the video due to the time-consuming transcoding operation is avoided; in addition, before playing the target video, the present application needs to determine whether the current playback time and the image frame display time in the corresponding image group are in the cache of the current decoded image group. If not, jump to the next adjacent decoded image group, thereby avoiding the problem of increased processing calculation due to multiple jumps. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1 It is a flow chart of an embodiment of a video reverse playback method provided by the present application;
[0058] Figure 2 It is a structural schematic diagram of original video data in an embodiment of a video reverse playback method provided by the present application;
[0059] Figure 3 It is a structural schematic diagram of an embodiment of a video reverse playback device provided in the present application. DETAILED DESCRIPTION
[0060] Many specific details are described in the following description to facilitate a full understanding of the present application. However, the present application can be implemented in many other ways than those described herein, and those skilled in the art can make similar generalizations without violating the connotation of the present application, so the present application is not limited by the specific implementation disclosed below.
[0061] The terms used in this application are only for the purpose of describing specific embodiments and are not intended to limit this application. The descriptions used in this application and the appended claims, such as "a", "first", and "second", are not limitations on quantity or sequence, but are used to distinguish the same type of information from each other.
[0062] The main purpose of the video reverse playback method provided by the present application is to play the original video data in reverse order, that is, for a complete video data, it can be played from the last frame in a backward order until the first frame is played. Of course, the reverse video can be a part of the original video data, and the part of the data can be played in reverse order from the back to the front.
[0063] In combination with the above background technology, it can be understood that in the prior art, when performing video reverse playback, it is achieved by transcoding the video data. However, transcoding is relatively time-consuming, which will cause the problem of reverse playback efficiency. Therefore, this application provides an embodiment of a video reverse playback method, please refer to Figure 1 As shown, the reverse broadcast method embodiment includes:
[0064] Step S101: organizing the original image groups in the acquired original video data in the order of reverse playback to obtain target video data for reverse playback.
[0065] Before describing the specific implementation process of step S101, the structure of the video data is first described.
[0066] like Figure 2 As shown, video playback is the process of displaying a series of captured images (called frames) at a given frequency. Usually, the encoder encodes multiple images and produces them into GOPs (Group of Pictures) one by one. When playing, the decoder reads the GOPs one by one in the playback order, decodes them, reads the pictures, and then renders and displays them, thereby completing the video playback. GOP (Group of Pictures) is a group of continuous pictures, usually including I frames, B frames, and P frames, which are the basic units accessed by video image encoders and decoders. I frames are internally coded frames (also called key frames), P frames are forward predicted frames (also called forward reference frames), and B frames are bidirectional interpolated frames (also called bidirectional reference frames). In short, I frames are complete pictures, and P frames and B frames record changes relative to I frames.
[0067] In video data, images are organized in sequences, which may include multiple GOPs (Group of Pictures), which refers to the distance between two I frames, and Reference (reference period) refers to the distance between two P frames. A group of images is formed between two I frames, which is the GOP group of pictures. That is, the GOP group of pictures refers to the image group composed of the image between two IDR (Instantaneous Decoding Refresh) frames and the referenced IDR frames. Both IDR frames and I frames use intra-frame prediction. For the convenience of encoding and decoding, the first I frame needs to be distinguished from other I frames, so the first I frame of each group of pictures is called an IDR frame to control the encoding and decoding process. The role of the IDR frame is to refresh immediately, starting from the IDR frame, and recalculate a new sequence to start encoding. Usually, IDR frames are I frames, but I frames are not necessarily IDR frames.
[0068] The purpose of step S101 is to reorganize the original image group of the original video data to obtain the target video data for reverse playback or reverse playback video data. That is, the original image group in the original video data is organized in the order of reverse playback. For example, for a 3s video, each second corresponds to a GOP. For a 3s video, the decoding order of the GOP for forward playback is usually 0s-1s, 1s-2s, 2s-3s. After being organized in the order of reverse playback, the decoding order of the GOP can be 2s-3s, 1s-2s, 0s-1s.
[0069] Based on the above content, the specific implementation process of step S101 may include:
[0070] Step S101-1: acquiring a length value of the original image group according to parsing the original image group in the acquired original video data;
[0071] The parameters that the original image group may include are: Length, i.e., GOP length (N), i.e., the number of frames between two I frames; Type, i.e., Slice type (coding type of the identification strip); Poc: the display order of images in the GOP; QPOffset: indicates that the frame actually encoded is equal to the initial QP+QPOffset; temporal_id: the temporal sublayer sequence number of the current frame; num_ref_pics_active: the size of the reference frame image list L0 and L1; num_ref_pics: the number of reference frames saved by the current frame, indicating the reference frames required for the current frame and future frames; reference_pictures: indicates the reference frame list of the current frame, etc. Therefore, by parsing the GOP, the length value, position and other related information of the GOP can be obtained. In this embodiment, the GOP parameter is mainly used as the length N.
[0072] Step S101-2: Determine whether the length value meets the set image group length reference value requirement;
[0073] The specific implementation process of step S101 - 2 may include two situations, one is satisfied, and the other is not satisfied.
[0074] The conditions that meet the requirements include:
[0075] Step S101-2-11: Compare the length value with the set image group length reference value. If the length value is less than or equal to the image group length reference value, determine that the length value meets the requirement of the set image group length reference value.
[0076] The picture group length reference value may be a preset empirical value or a test value, which is set according to the size or performance of the video, and of course the length reference value is optimized in the continuous iteration of the setting. The length reference value is compared with the length value of the original picture group, with the purpose of reducing the transcoding operation of the original video before the video is played in reverse order when the length value of the original picture group is less than or equal to the length reference value.
[0077] In this embodiment, the picture group length reference value can be adjusted according to the demand of reversing the target video data, that is, the picture group length reference value is not a fixed value, and it can be adjusted accordingly according to the demand of different target video data. Of course, whether the picture group length reference value needs to be adjusted can be set according to the acquisition of the target video data, for example, the corresponding picture group length reference value is pre-set according to the resolution of the target video data.
[0078] Step S101-2-12: Organize the original image group in the order of reverse playback to obtain target video data for reverse playback.
[0079] Dissatisfaction includes:
[0080] Step S101-2-21: transcoding the original video data;
[0081] Step S101-2-22: adjusting the length value of the picture group in the original video data subjected to the transcoding process to meet the requirement of the picture group length reference value;
[0082] The specific implementation process of step S101-22 may be that, during the transcoding process, the length value of the picture group needs to be controlled so that the length value of the picture group in the transcoded video data meets the requirement of the picture group length reference value. In this embodiment, the adjustment method may be to adjust the length value of the picture group in the transcoded video data to be less than or equal to the picture group length reference value. That is, the picture group length value is controlled during the transcoding process.
[0083] Step S101-2-23: The adjusted image group is used as the original image group, and is organized in the order of reverse playback to obtain the target video data for reverse playback.
[0084] Based on the above content, it can be known that in this embodiment, the specific implementation process of step S101 may include two situations, one is a satisfied situation, and the other is a not satisfied situation.
[0085] Step S102: Determine the display time of the to-be-played video image frame in the target video data corresponding to the current playback time of the target video data.
[0086] The current play time in step S102 can be understood as the play time for the target video data. The display time can be understood as the PTS of the image frame in the target video data. The PTS is the display timestamp, which is called Presentation Time Stamp in English. The PTS timestamp is used to know when the player should display the data corresponding to the timestamp. That is, PTS is used to guide the behavior of the playback end and is generated by the encoder during encoding. For example: the length of the target video data is 40s-30s, the start of playback is the current play time, and the current play time is 0s, then the PTS corresponding to 0s is 40s, 0s-1s corresponds to the video data of 40s-39s, 1s corresponds to the PTS of 39s, 1s-2s corresponds to the video data of 39s-38s, 2s corresponds to 38s, 2s-3s corresponds to the video data of 38s-37s, and so on. The target video data can be a part of a certain original video data, or it can be the complete content of the original video data.
[0087] In this embodiment, the specific implementation process of step S102 may include:
[0088] Step S102-1: Obtain the current play time of the target video data;
[0089] Step S102-2: Establishing a correspondence between the current playback time and the display time of the target video data according to the reverse playback order.
[0090] In this embodiment, the step S102-2 may specifically be to establish a mapping relationship between the current play time and the display time, that is, to map the current play time to the display time of the video image played in the target video data in the reverse play order. Thus, when the target video data is played, the corresponding video frame, also called image frame, can be known through the current play time.
[0091] Step S103: playing the to-be-played video image frame in the target video data corresponding to the display time.
[0092] The purpose of step S103 is to play the target video data, that is, after the processing of the above steps S101 to S102, the original video data is played in reverse order to achieve the purpose of reverse playback of the video.
[0093] Because the target video data may include one or more image groups. Therefore, the playback of step S103 may be: playing the to-be-played video image frame corresponding to the display time and located in the decoded target image group of the target video data. There may be two situations in the specific playback process. In short, when the target video data includes only one image group, no jump operation is required; then, when the target video data includes at least two image groups, it is necessary to jump to the next image group for playback after playing the previous image group. Therefore, the step S103 needs to determine the position of the played video frame in the GOP, or the position of the image frame in the GOP. It needs to be explained that GOP is a group of images, which is composed of image frames one by one. The image frame can also be understood as a video frame. Therefore, in the following description process, the video frame is the image frame.
[0094] Therefore, step S103 may include:
[0095] Step S103 - 1 : Determine whether the display time of the to-be-played video image frame corresponding to the current playback time is within the display time range of the current decoded image group in the target video data.
[0096] The determination result of step S103-1 generally includes two types, one is yes and the other is no. Different determination results are described below:
[0097] When the result is determined to be negative, it includes:
[0098] Step S103-1-11: Jump to the next decoded picture group adjacent to the current decoded picture group;
[0099] It is understandable that different image groups may include different or the same image frames, and the display time (PTS) of the image frames in each image group is different. Therefore, if the display time of the to-be-played video image frame corresponding to the current playback time is not within the display time range of the current decoded image group, it is necessary to jump (seek) to the next decoded image group adjacent to the current decoded image group to find the corresponding image frame. Because the image groups in the organized target video data are organized in the order of reverse playback, and then the decoding is also decoded in the reverse playback order, therefore, if there is no image frame corresponding to the display time in the current decoded image group, it is necessary to jump to the next adjacent image group.
[0100] Step S103-1-12: determining the adjacent decoded picture group as the current decoded picture group;
[0101] Step S103-1-13: Play the to-be-played video image frame determined in the current decoded image group and matching the current playback time.
[0102] If the answer is yes, it includes:
[0103] Step S103-1-2: Play the playback video image determined in the current decoded image group and matching the current playback time.
[0104] In this embodiment, step S103-1-13 and step S103-1-2 are playing steps that need to be performed in two different embodiments. The specific implementation process may include:
[0105] In the cache space of the cache decoded image group, searching whether there is a decoded image frame that matches the display time of the video image frame to be played;
[0106] If not, waiting for the decoding operation required for the video image frame to be played;
[0107] Play the decoded image frame obtained after the decoding operation on the video image frame to be played.
[0108] If the query in the cache space of the cached decoded image group whether there is a decoded image frame matching the display time of the video image frame to be played is yes, then the obtained matching decoded image frame is directly played.
[0109] Based on the above content, after playing the decoded image frame obtained after the decoding operation on the to-be-played video image frame, this embodiment further includes:
[0110] Updating the current playback time;
[0111] Determining whether the target video data has been played out according to the updated current play time;
[0112] If not, the process returns to the step of determining the display time of the to-be-played video image frame in the target video data corresponding to the current playback time of the target video data, and determines the PTS of the to-be-played video image frame corresponding to the updated current playback time.
[0113] If the updated current play time determines that the target video data has finished playing, then the play of the target video data is exited. In this embodiment, exiting the play of the target video data may be freezing the play of the target video data at the last frame image, or directly closing the target video data.
[0114] Whether the playback is finished can be determined when there is no display time of the decoded image frame with the current playback time, or when the display time of the decoded image frame is the minimum value within the display time range of the target video, which means that the decoded image frame is the last frame of the image and the playback is finished. For example, if the target video data is 40s-30s long and the decoded image frame display time is 30s, it means that the last frame has been played and the reverse playback of the target video data ends with the playback of the 30s image frame.
[0115] The above is a description of an embodiment of a video replay method provided in the present application. The video replay method can be applied not only to video on demand scenarios, but also to various application scenarios such as media processing and media production, for example: video editing, video production, etc.
[0116] The above is a specific description of an embodiment of a video reverse playback method provided by the present application. Corresponding to the embodiment of a video reverse playback method provided above, the present application also discloses an embodiment of a video reverse playback device, please refer to Figure 3 Since the device embodiment is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The device embodiment described below is only illustrative.
[0117] like Figure 3 As shown, Figure 3 : is a structural schematic diagram of an embodiment of a video reversal device provided by the present application, the device comprising:
[0118] The organizing unit 301 is used to organize the original image groups in the acquired original video data according to the order of reverse playback to obtain target video data for reverse playback.
[0119] The organizing unit 301 includes: an analyzing subunit, a determining subunit and an organizing subunit.
[0120] The parsing subunit is used to obtain the length value of the original image group according to the analysis of the original image group in the obtained original video data;
[0121] The determining subunit is used to determine whether the length value meets the requirement of the set picture group length reference value;
[0122] The organizing subunit is used to organize the original image group in the order of reverse playback to obtain target video data for reverse playback when the determination result of the determining subunit is satisfied.
[0123] The determining subunit includes: a comparing subunit, configured to compare the length value with the GOP length reference value to determine whether the length value is less than or equal to the GOP length reference value.
[0124] The determining subunit is specifically configured to determine, if the comparison result of the comparing subunit is yes, whether the length value meets the requirement of the image group length reference value.
[0125] The determination subunit further includes: a transcoding subunit, an adjustment subunit and an organization subunit.
[0126] The transcoding subunit is used to perform transcoding processing on the original video data;
[0127] The adjusting subunit is used to adjust the length value of the picture group in the original video data processed by the transcoding process to meet the requirement of the picture group length reference value;
[0128] The organizing subunit is used to use the adjusted image group as the original image group, organize it in the order of reverse playback, and obtain the target video data for reverse playback.
[0129] The adjustment subunit is specifically used to adjust the length value of the picture group in the original video data processed by the transcoding process to be less than or equal to the picture group length reference value.
[0130] In order to meet the requirements of different target video data, the system may further include: a length reference value adjustment unit, which is used to adjust the picture group length reference value according to the requirements of replaying the target video data, so as to avoid too many jumps when replaying the target video data.
[0131] A determination unit 302, configured to determine a display time of a to-be-played video image frame in the target video data corresponding to a current playback time of the target video data;
[0132] The determining unit 302 includes: an acquiring subunit and an establishing subunit.
[0133] The acquisition subunit is used to acquire the current playback time of the target video data;
[0134] The establishing subunit is used to establish a corresponding relationship between the current playback time and the display time of the target video data according to the order of the reverse playback. Specifically, it can be to map the current playback time to the display time of the video image played in the target video data according to the order of the reverse playback.
[0135] The playing unit 303 is configured to play the to-be-played video image frame corresponding to the display time and located in the decoding target image group of the target video data.
[0136] The playing unit 303 includes: a first determining subunit, a jumping subunit, a second determining subunit, and a playing subunit.
[0137] The first determining subunit is used to determine whether the display time of the to-be-played video image frame corresponding to the current playback time is within the display time range of the current decoded image group in the target video data;
[0138] The jumping subunit is configured to jump to a next decoded picture group adjacent to the current decoded picture group when the determination result of the first determining subunit is no;
[0139] The second determining subunit is used to determine the adjacent next decoded picture group as the current decoded picture group;
[0140] The playing subunit is used to play the to-be-played video image frame determined in the current decoded image group and matching the current playing time.
[0141] The above is a description of the specific process when the determination result of the first determination subunit is no. It can be understood that the determination result of the first determination subunit also includes the case of yes. When the determination result of the first determination subunit is yes, the playback subunit directly plays the playback video image frame determined in the current decoded image group and matching the current playback time.
[0142] In this embodiment, the playing subunit includes: a searching subunit and a waiting subunit.
[0143] The search subunit is used to search whether there is a decoded image frame matching the display time of the video image frame to be played in the cache space of the cache decoded image group;
[0144] The waiting subunit is used for waiting for a decoding operation for the to-be-played video image frame to be acquired when the search result of the searching subunit is no.
[0145] The playing subunit is specifically used for playing the decoded image frame obtained after the decoding operation on the video image frame to be played.
[0146] The implementation process of this embodiment may also include:
[0147] An updating unit, used for updating the current playing time;
[0148] a playback end determination unit, used to determine whether the playback of the target video data has ended according to the updated current playback time;
[0149] The return unit is used to return to the determination unit 302 to execute, when the determination result of the playback end determination unit is no, that is, to determine the display time of the to-be-played video image frame in the target video data corresponding to the current playback time of the target video data.
[0150] The system further comprises: an exit playback unit, configured to exit playback of the target video data when the determination result of the playback end determination unit is yes. In this embodiment, exiting playback of the target video data may be freezing the playback of the target video data at the last frame image, or directly closing the target video data.
[0151] Whether the playback is finished can be determined when there is no display time of the decoded image frame with the current playback time, or when the display time of the decoded image frame is the minimum value within the display time range of the target video, which means that the decoded image frame is the last frame of the image and the playback is finished. For example, if the target video data is 40s-30s long and the decoded image frame display time is 30s, it means that the last frame has been played and the reverse playback of the target video data ends with the playback of the 30s image frame.
[0152] The above is a description of an embodiment of a video replay device provided in the present application. The description of the embodiment of the Guangyu video replay device is relatively simple and concise. For specific contents, please refer to the description of the above steps S101 to S103, which will not be repeated here.
[0153] Based on the above content, the present application also provides a computer storage medium for storing data generated by a network platform, and a program for processing the data generated by the network platform;
[0154] When the program is read and executed, the following steps are performed:
[0155] The original image groups in the acquired original video data are organized in a reverse playback order to obtain target video data for reverse playback;
[0156] Determining a display time of a to-be-played video image frame in the target video data corresponding to a current playback time of the target video data;
[0157] Play the to-be-played video image frame corresponding to the display time and located in the decoding target image group of the target video data.
[0158] Based on the above content, the present application also provides an electronic device, including:
[0159] processor;
[0160] The memory is used to store a program for processing data generated by the network platform, and when the program is read and executed by the processor, the following steps are performed:
[0161] The original image groups in the acquired original video data are organized in a reverse playback order to obtain target video data for reverse playback;
[0162] Determining a display time of a to-be-played video image frame in the target video data corresponding to a current playback time of the target video data;
[0163] Play the to-be-played video image frame corresponding to the display time and located in the decoding target image group of the target video data.
[0164] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0165] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0166] 1. Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include non-transitory media such as modulated data signals and carrier waves.
[0167] 2. Those skilled in the art should understand that the embodiments of the present application can be provided as methods, systems or computer program products. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0168] Although the present application is disclosed as above in the form of a preferred embodiment, it is not intended to limit the present application. Any technical personnel in this field may make possible changes and modifications without departing from the spirit and scope of the present application. Therefore, the scope of protection of the present application shall be based on the scope defined by the claims of the present application.
Claims
1. A video reverse playback method, characterized in that: include: The original image groups in the acquired original video data are organized in a reverse playback order to obtain target video data for reverse playback; Determining a display time of a to-be-played video image frame in the target video data corresponding to a current playback time of the target video data; Play the to-be-played video image frame in the target video data corresponding to the display time; The original image groups in the acquired original video data are organized in the order of reverse playback to obtain target video data for reverse playback, including: Obtaining a length value of the original image group according to parsing the original image group in the acquired original video data; Determining whether the length value meets the requirement of the set picture group length reference value; Target video data for reverse playback is acquired according to the determination result.
2. The video reverse broadcast method according to claim 1, characterized in that: The step of obtaining target video data for reverse playback according to the determination result of the original image group in the obtained original video data includes: Based on the requirement that the length value meets the set picture group length reference value, the original picture group is organized in the order of reverse playback to obtain target video data for reverse playback.
3. The video reverse broadcast method according to claim 2, characterized in that: The determining whether the length value meets the requirement of the set picture group length reference value includes: Compare the length value with the GOP length reference value to determine whether the length value is less than or equal to the GOP length reference value; If so, it is determined that the length value meets the requirement of the picture group length reference value.
4. The video reverse broadcast method according to claim 2, characterized in that: Also includes: If the determined length value does not meet the requirement of the set picture group length reference value, transcoding the original video data; Adjusting the length value of the picture group in the original video data processed by the transcoding process to meet the requirement of the picture group length reference value; The adjusted image group is used as the original image group, and is organized in the order of reverse playback to obtain the target video data for reverse playback.
5. The video reverse broadcast method according to claim 4, characterized in that: The step of adjusting the length value of the group of pictures in the original video data processed by the transcoding process to meet the requirement of the reference value of the group of pictures length includes: The length value of the picture group in the original video data processed by the transcoding is adjusted to be less than or equal to the picture group length reference value.
6. The video reverse broadcast method according to claim 1, characterized in that: Also includes: The reference value of the length of the group of pictures is adjusted according to the requirement of reversing the target video data.
7. The video reverse broadcast method according to claim 1, characterized in that: The playing of the to-be-played video image frame in the target video data corresponding to the display time includes: The to-be-played video image frame corresponding to the display time and located in the decoding target image group of the target video data is played.
8. The video reverse broadcast method according to claim 7 or 1, characterized in that: The playing of the to-be-played video image frame in the target video data corresponding to the display time includes: Determine whether the display time of the to-be-played video image frame corresponding to the current playback time is within the display time range of the current decoded image group in the target video data; If not, jump to the next decoded picture group adjacent to the current decoded picture group; Determining the next adjacent decoded picture group as the current decoded picture group; Play the to-be-played video image frame determined in the currently decoded image group and matching the current playback time.
9. The video reverse broadcast method according to claim 8, characterized in that: Also includes: If the display time of the to-be-played video image frame corresponding to the current playback time is within the display time range of the current decoded image group in the target video data, the step of playing the playback video image frame determined in the current decoded image group and matching the current playback time is executed.
10. The video reverse broadcast method according to claim 8, characterized in that: The playing of the video image frame to be played that is determined in the current decoded image group and matches the current playing time includes: In the cache space of the cache decoded image group, searching whether there is a decoded image frame matching the display time of the video image frame to be played; If not, waiting for the decoding operation required for the video image frame to be played; Play the decoded image frame obtained after the decoding operation on the video image frame to be played.
11. The video reverse broadcast method according to claim 1, characterized in that: Also includes: Updating the current playback time; Determining whether the target video data has been played out according to the updated current play time; If not, the process returns to the step of determining the display time of the to-be-played video image frame in the target video data corresponding to the current playback time of the target video data.
12. The video reverse broadcast method according to claim 10, characterized in that: Also includes: If it is determined that the target video data has finished playing according to the updated current playing time, the playing of the target video data is exited.
13. The video reverse broadcast method according to claim 1, characterized in that: The determining of the display time of the to-be-played video image frame in the target video data corresponding to the current playback time of the target video data comprises: Obtaining the current playback time of the target video data; The current play time is mapped to the display time of the play video image in the target video data according to the reverse play order.
14. A video reverse playback device, characterized in that: include: An organizing unit, used for organizing the original image groups in the acquired original video data in a reverse playback order to obtain target video data for reverse playback; A determination unit, configured to determine a display time of a to-be-played video image frame in the target video data corresponding to a current playback time of the target video data; A playback unit, configured to play the to-be-played video image frame of the target video data corresponding to the display time; The organizing unit includes a parsing subunit, a determining subunit and an organizing subunit; The parsing subunit is used to obtain the length value of the original image group according to the analysis of the original image group in the obtained original video data; The determining subunit is used to determine whether the length value meets the requirement of the set picture group length reference value; The organizing subunit is used to obtain target video data for reverse playback according to the determination result.
15. A computer storage medium for storing data generated by a network platform and a program for processing the data generated by the network platform; When the program is read and executed, the steps of the video reversal method according to any one of claims 1 to 13 are performed.
16. An electronic device, comprising: processor; A memory for storing a program for processing data generated by a network platform, wherein when the program is read and executed by the processor, the steps of the video reversal method as described in any one of claims 1 to 13 are executed.
