Video processing method and device

By setting up frame-by-frame test objects in the video transcoding system and comparing the number of test objects in the initial video and the transcoding video, the problem of frame drop and frame drop after video transcoding is solved, and the rapid and accurate judgment of the quality of video transcoding and the improvement of user experience is achieved.

CN114630103BActive Publication Date: 2025-04-08SHANGHAI BILIBILI TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202011450293.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-12-11
Publication Date
2025-04-08
Estimated Expiration
2040-12-11

AI Technical Summary

Technical Problem

In the prior art, the problem of frame dropping and frame dropping is prone to occur after transcoding of videos, which affects the user's video viewing experience.

Method used

By setting up frame-by-frame test objects in each video frame of the initial video, and sending the initial video to the video transcoding system for transcoding, the number of test objects contained in each video frame in the initial video and the transcoding video is compared, and the transcoding results are judged to determine whether there is a frame drop or frame drop problem.

Benefits of technology

This method can quickly and accurately judge the quality of video transcoding, avoiding the problem of unsmooth video playback caused by frame drop or frame drop, and improving user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114630103B_ABST
    Figure CN114630103B_ABST
Patent Text Reader

Abstract

The present application provides a video processing method and device, wherein the video processing method includes generating an initial video including multiple video frames based on preset video rules; sending the initial video to a preset video transcoding system for video transcoding, and receiving the transcoded video returned by the video transcoding system; determining the number of test objects contained in each video frame in the transcoded video according to the arrangement order of the video frames in the transcoded video; comparing the number of test objects contained in each video frame in the initial video with the number of test objects contained in each video frame in the transcoded video to determine the transcoding result of the initial video; by comparing the number of test objects in each video frame of the initial video with the number of test objects in each video frame of the transcoded video to see whether they are consistent, it is possible to quickly and accurately determine whether the transcoded video has frame loss or dropped frames.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and more particularly to a video processing method, a video processing device, a computing device, and a computer-readable storage medium. Background Art

[0002] Currently in the video industry, users' original videos are generally transcoded to obtain videos of different clarity through transcoding, so that users can selectively play and watch according to their clarity requirements. However, video transcoding involves reprocessing the user's original video. Due to the compatibility issues of various packaging and encoding protocols in the transcoding process, various problems may arise. For example, the transcoded video may have frame loss or dropped frames, which greatly affects the user's video viewing experience. Summary of the invention

[0003] In view of this, the embodiment of the present application provides a video processing method. The present application also relates to a video processing device, a computing device, and a computer-readable storage medium to solve the technical defect that the transcoded video may lose frames or drop frames in the prior art.

[0004] According to a first aspect of an embodiment of the present application, a video processing method is provided, including:

[0005] Generate an initial video including a plurality of video frames based on a preset video rule, wherein each video frame includes at least one test object whose number increases frame by frame;

[0006] Sending the initial video to a preset video transcoding system for video transcoding, and receiving the transcoded video returned by the video transcoding system;

[0007] Determining the number of test objects contained in each video frame in the transcoded video according to the arrangement order of the video frames in the transcoded video;

[0008] The number of test objects contained in each video frame in the original video is compared with the number of test objects contained in each video frame in the transcoded video to determine the transcoding result of the original video.

[0009] According to a second aspect of an embodiment of the present application, a video processing device is provided, including:

[0010] A video generation module is configured to generate an initial video including a plurality of video frames based on a preset video rule, wherein each video frame includes at least one test object whose number increases frame by frame;

[0011] A video transcoding module is configured to send the initial video to a preset video transcoding system for video transcoding, and receive the transcoded video returned by the video transcoding system;

[0012] an object quantity determination module, configured to determine the quantity of test objects contained in each video frame in the transcoded video according to the arrangement order of the video frames in the transcoded video;

[0013] The transcoding result determination module is configured to compare the number of test objects contained in each video frame in the initial video with the number of test objects contained in each video frame in the transcoded video to determine the transcoding result of the initial video.

[0014] According to a third aspect of an embodiment of the present application, a computing device is provided, comprising a memory, a processor, and computer instructions stored in the memory and executable on the processor, wherein the processor implements the steps of the video processing method when executing the instructions.

[0015] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, which stores computer instructions, and when the instructions are executed by a processor, the steps of the video processing method are implemented.

[0016] The video processing method provided by the present application includes generating an initial video including multiple video frames based on preset video rules, wherein each video frame contains at least one test object whose number increases frame by frame; sending the initial video to a preset video transcoding system for video transcoding, and receiving the transcoded video returned by the video transcoding system; determining the number of test objects contained in each video frame in the transcoded video according to the arrangement order of video frames in the transcoded video; and comparing the number of test objects contained in each video frame in the initial video with the number of test objects contained in each video frame in the transcoded video to determine the transcoding result of the initial video.

[0017] Specifically, the video processing method sets a test object in each video frame of the initial video, obtains the test object in each video frame of the transcoded video corresponding to the initial video, and compares the number of test objects in each video frame of the initial video with the number of test objects in each video frame of the transcoded video according to the arrangement order of the video frames. It can quickly and accurately determine whether the transcoded video has frame loss or dropped frames. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] Figure 1 is a flow chart of a video processing method provided by an embodiment of the present application;

[0019] Figure 2is a schematic diagram of a video frame of an initial video in a video processing method provided by an embodiment of the present application;

[0020] Figure 3 is a schematic diagram of multiple video frames of an initial video in a video processing method provided by an embodiment of the present application;

[0021] Figure 4 It is a schematic diagram of a quantity display area in each video frame of an initial video in a video processing method provided by an embodiment of the present application;

[0022] Figure 5 is a structural schematic diagram of a video processing device provided by an embodiment of the present application;

[0023] Figure 6 It is a structural block diagram of a computing device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0024] 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.

[0025] The terms used in one or more embodiments of the present application are only for the purpose of describing specific embodiments, and are not intended to limit one or more embodiments of the present application. The singular forms of "a", "said" and "the" used in one or more embodiments of the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. It should also be understood that the term "and / or" used in one or more embodiments of the present application refers to and includes any or all possible combinations of one or more associated listed items.

[0026] It should be understood that, although the terms first, second, etc. may be used to describe various information in one or more embodiments of the present application, these information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of one or more embodiments of the present application, the first may also be referred to as the second, and similarly, the second may also be referred to as the first. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".

[0027] First, the terms involved in one or more embodiments of the present application are explained.

[0028] Transcoding: The process of re-encoding audio and video.

[0029] Frame loss: After video transcoding, some frames of the video are lost.

[0030] Frame drop: After video transcoding, some frame levels of video images are lost and supplemented by adjacent frames. However, the video images will not look smooth during this period, as if it is stuck.

[0031] Video watermark: Add some text or stickers to the video screen, such as the station logo / logo on the video.

[0032] OCR: Optical Character Recognition, optical character recognition, refers to the use of machines to electronically recognize text character content.

[0033] Currently, it is difficult for machines to actively identify the phenomenon of frame loss and frame drops after video transcoding, and human eyes also need people who are particularly sensitive to frame rate to see it. Therefore, video quality detection after video transcoding is a pain point in existing technologies.

[0034] Based on this, in the present application, a video processing method is provided. The present application also relates to a video processing device, a computing device, and a computer-readable storage medium, which are described in detail one by one in the following embodiments.

[0035] See also Figure 1 , Figure 1 A flowchart of a video processing method provided according to an embodiment of the present application is shown, which specifically includes the following steps:

[0036] Step 102: Generate an initial video including a plurality of video frames based on a preset video rule, wherein each video frame includes at least one test object whose number increases frame by frame.

[0037] The video processing method provided in the embodiment of the present application is applied to the quality detection scenario of the video transcoding system. First, a special initial video is generated based on user needs, and then the generated initial video is input into the video transcoding system to be quality detected. By comparing the initial video before transcoding and the transcoded video after transcoding, it is determined whether there is a difference between the initial video before transcoding and the transcoded video after transcoding, so as to determine whether there is a transcoding quality problem in the video transcoding system. For example, if there is no difference between the initial video before transcoding and the transcoded video after transcoding, it means that there is no transcoding quality problem in the video transcoding system and the transcoding is successful. If there is a difference between the initial video before transcoding and the transcoded video after transcoding, it means that there is a transcoding quality problem in the video transcoding system and the transcoding may have problems such as frame loss or dropped frames, so the video transcoding system needs to be repaired.

[0038] Among them, the preset video rules can be understood as user needs. For example, the user needs to generate an initial video including multiple video frames with a white background, or the user needs to generate an initial video including multiple video frames with a black background, etc. During specific implementation, the preset video rules can be set according to actual applications, and this application does not impose any limitations on this.

[0039] Specifically, the generating of an initial video including a plurality of video frames based on a preset video rule includes:

[0040] An initial video is generated based on a preset video rule, comprising a plurality of video frames consisting of a base image of a first pixel and a test object of a second pixel, wherein a similarity between the first pixel and the second pixel is less than or equal to a preset similarity threshold.

[0041] Among them, the pixel values ​​of the first pixel and the second pixel are different, and the similarity between the pixel values ​​of the first pixel and the second pixel is less than or equal to a preset similarity threshold; that is, it can be understood that when the first pixel is white, the second pixel is black, purple or green, etc. with a large contrast with the white first pixel.

[0042] For example, if the first pixel is white and the second pixel is black, then an initial video including multiple video frames consisting of a base image of the first pixel and a test object of the second pixel is generated based on the preset video rules. This can be understood as generating an initial video including multiple video frames consisting of a white base image and a black test object based on the preset video rules.

[0043] The test object includes but is not limited to a test block of any shape, such as a square, round or rectangular black test block.

[0044] See also Figure 2 , Figure 2 A schematic diagram of a video frame of an initial video in a video processing method provided according to an embodiment of the present application is shown.

[0045] Figure 2 It is a schematic diagram of a video frame in the initial video, and the video frame consists of a white background image and a black rectangular test block, wherein the black rectangular test block is the above-mentioned test object.

[0046] In an embodiment of the present application, video frames are generated by using a base map and a test object with a large contrast in pixel values, and an initial video is then composed of a plurality of such video frames. When the number of test objects in each video frame of the initial video is subsequently counted, the test objects with a large color contrast in each video can be easily and quickly extracted, thereby avoiding the situation where the outline of the test object cannot be accurately found when the color of the test object is similar to that of the base map, and the test object cannot be accurately acquired.

[0047] In a specific implementation, the initial video generated based on a preset rule includes multiple video frames, each video frame consists of a background image and a test object with a large color contrast, and the number of test objects in each video frame increases linearly. For example, if the initial video includes 3 video frames: video frame 1, video frame 2, and video frame 3, then if video frame 1 includes 10 test objects, video frame 2 includes 11 test objects, and video frame 3 includes 12 test objects; that is, the number of test objects contained in each video frame of the initial video increases frame by frame according to the arrangement order of each video frame of the initial video.

[0048] See also Figure 3 , Figure 3 A schematic diagram of multiple video frames of an initial video in a video processing method provided according to an embodiment of the present application is shown.

[0049] Figure 3 The initial video includes video frame 1, video frame 2 and video frame 3, wherein video frame 1 includes 10 test objects, video frame 2 includes 11 test objects, and video frame 3 includes 12 test objects.

[0050] Specifically, in order to facilitate the extraction of the test objects in each video frame, the test objects in each video frame can be uniformly arranged in a fixed position in the video frame. Of course, the actual application is not limited to this arrangement. The test objects in each video frame can also be arranged in different positions. For example, the test object in video frame 1 is arranged in the upper left corner of video frame 1, the test object in video frame 2 is arranged in the upper right corner of video frame 2, and the test object in video frame 3 is arranged in the middle of video frame 3, etc.

[0051] Specifically, after generating an initial video including a plurality of video frames based on a preset video rule, the method further includes:

[0052] Setting a test object quantity display area at a preset position of each video frame of the initial video;

[0053] The number of test objects contained in each video frame of the initial video is placed in the number display area.

[0054] Among them, the quantity display area can be understood as a digital watermark set at a preset position of each video frame of the initial video. The purpose of using the digital watermark is to facilitate people to identify and watch the number of test objects contained in each video frame. Different from setting the test objects in each video frame, the test objects contained in each video frame are for the convenience of machine recognition and statistics. In specific implementation, since the test objects are represented by digital pixels to represent colors, the computer can directly count the number of second pixels (such as black pixels) contained in each video frame to obtain the number of test objects in each video frame.

[0055] In practical applications, in order to conveniently obtain the number of test objects in each video frame of the initial video, a number display area for the test objects can be set at a preset position of each video frame of the initial video, and then the number of test objects contained in each video frame of the initial video can be displayed in the number display area, wherein the preset position can be any position of each video frame, such as the four corners or the middle area. In order to avoid the number display area blocking the test object, the test object and the number display area can be set at different positions of each video frame, such as arranging the test object in the upper left corner of the video frame, and placing the number display area in the upper right corner of the video frame, etc.

[0056] Among them, the number display area is placed with the number of test objects contained in each video frame of the initial video. Using the above example, the number display area of ​​video frame 1 is placed with the number of test objects contained in video frame 1, which is 10; the number display area of ​​video frame 2 is placed with the number of test objects contained in video frame 2, which is 11; and the number display area of ​​video frame 3 is placed with the number of test objects contained in video frame 3, which is 12.

[0057] See also Figure 4 , Figure 4 A schematic diagram of a quantity display area in each video frame of an initial video in a video processing method provided according to an embodiment of the present application is shown.

[0058] Figure 4 The initial video includes video frame 1, video frame 2 and video frame 3, wherein video frame 1 includes 10 test objects, video frame 2 includes 11 test objects, and video frame 3 includes 12 test objects.

[0059] Among them, the test objects are arranged in the upper left corner of each video frame, and a quantity display area is set in the upper right corner of each video frame to display the number of test objects included in each video frame; that is, the quantity display area in the upper right corner of video frame 1 is placed with the number 10 of test objects contained in video frame 1, the number display area in the upper right corner of video frame 2 is placed with the number 11 of test objects contained in video frame 2, and the number display area in the upper right corner of video frame 3 is placed with the number 12 of test objects contained in video frame 3.

[0060] In an embodiment of the present application, in order to more conveniently determine the number of test objects contained in each video frame in the initial video, a test object quantity display area can be set in each video frame of the initial video, and the number of test objects contained in each video frame of the initial video can be placed and displayed in the corresponding quantity display area.

[0061] Step 104: Send the initial video to a preset video transcoding system for video transcoding, and receive the transcoded video returned by the video transcoding system.

[0062] The preset video transcoding system includes any video transcoding system to be tested for transcoding quality.

[0063] Specifically, after generating an initial video including multiple video frames, the initial video is sent to a specific video transcoding system that needs to undergo a transcoding quality test for transcoding, and then the transcoded video generated after transcoding the initial video is received from the video transcoding system.

[0064] In a specific implementation, after sending the initial video to a preset video transcoding system for video transcoding and receiving the transcoded video returned by the video transcoding system, the method further includes:

[0065] The number of test objects displayed in the number display area for each video frame in the transcoded video is identified by a preset recognition algorithm.

[0066] In actual applications, since the number display area of ​​each video frame of the initial video carries the number of test objects contained in the video frame, and during the transcoding process, the number display area and the number of test objects placed in the number display area are generally not lost due to transcoding, or garbled characters appear, etc., then after transcoding, there is also a number display area in each video frame of the transcoded video, and each number display area contains the number of a test object.

[0067] Therefore, after obtaining the transcoded video, the number of test objects displayed in the number display area for each video frame in the transcoded video can be identified through a preset recognition algorithm (such as an OCR recognition algorithm).

[0068] In an embodiment of the present application, the number of test objects displayed in the number display area for each video frame in the transcoded video is identified through an identification algorithm. Subsequently, the number of test objects displayed in the number display area for each video frame in the transcoded video can be compared with the number of test objects displayed in the number display area for each video frame of the initial video, thereby accurately determining whether frame loss or frame drop occurs in the initial video after transcoding into the transcoded video.

[0069] Step 106: Determine the number of test objects contained in each video frame in the transcoded video according to the arrangement order of the video frames in the transcoded video.

[0070] Specifically, after the transcoded video is obtained, the number of test objects contained in each video frame in the transcoded video is determined according to the arrangement order of the video frames in the transcoded video.

[0071] In specific implementation, after obtaining the transcoded video, it is necessary to count the number of test objects contained in each video frame by computer according to the arrangement order of the video frames in the transcoded video, rather than identifying the number of test objects in the number display area in each video frame of the transcoded video through a recognition algorithm.

[0072] Since frame loss or dropped frames may occur during the initial video transcoding process, the video frames in the transcoded video after transcoding may be disordered. At this time, re-counting the number of test objects contained in each video frame of the transcoded video will make the subsequent comparison more accurate.

[0073] Step 108: Compare the number of test objects contained in each video frame in the original video with the number of test objects contained in each video frame in the transcoded video to determine the transcoding result of the original video.

[0074] Among them, the number of test objects contained in each video frame of the original video is compared with the number of test objects contained in each video frame of the transcoded video to determine the transcoding result of the original video. There are at least two situations in which this can be achieved. One is to compare the number of test objects counted by a computer, and the other is to compare the number of test objects directly displayed in the number display area of ​​each video frame. The specific implementation method is as follows:

[0075] The comparing the number of test objects contained in each video frame in the initial video with the number of test objects contained in each video frame in the transcoded video to determine the transcoding result of the initial video includes:

[0076] Arranging the number of test objects contained in each video frame in the original video frame by frame to form a first number sequence, and arranging the number of test objects contained in each video frame in the transcoded video frame by frame to form a second number sequence;

[0077] The first number sequence is compared with the second number sequence, and when the first number sequence and the second number sequence completely match, it is determined that the initial video transcoding is successful.

[0078] Specifically, the number of test objects contained in each video frame in the initial video is arranged frame by frame according to the arrangement order of all video frames in the initial video to form a first number sequence.

[0079] Continuing with the above example, the number of test objects contained in each video frame in the initial video is arranged frame by frame according to the arrangement order of all video frames in the initial video, and the first number sequence formed is [10, 11, 12].

[0080] At the same time, the number of test objects contained in each video frame in the transcoded video is arranged frame by frame according to the arrangement order of all video frames in the transcoded video to form a second number sequence.

[0081] For example, the transcoded video still includes three sequentially arranged video frames: video frame 1, video frame 2, and video frame 3. Then the number of test objects contained in each video frame in the transcoded video is arranged frame by frame according to the arrangement order of all video frames in the transcoded video, and the second quantity sequence formed is [10, 11, 12].

[0082] Then, by comparing the first number sequence with the second number sequence, it can be determined that the first number sequence and the second number sequence all match, and then it can be determined that the initial video transcoding is successful, and the success of the initial video transcoding indicates that the transcoding quality of the current video transcoding system is good.

[0083] In an embodiment of the present application, by comparing the number of test objects contained in each video frame of the initial video with the number of test objects contained in each video frame of the transcoded video after transcoding, it is possible to quickly and accurately determine whether the transcoding result of the initial video is correct based on the comparison result, thereby improving the user experience.

[0084] In practical applications, after comparing the first quantity sequence with the second quantity sequence, the method further includes:

[0085] In the case that the first number sequence does not match the second number sequence, determining the video frames in the second number sequence corresponding to the number that does not match the first number sequence, and using the video frames in the second number sequence corresponding to the number that does not match the first number sequence as verification video frames;

[0086] When the verification video frame meets the preset transcoding condition, it is determined that the initial video transcoding is successful.

[0087] Among them, the preset transcoding condition is set according to the actual application, and this application does not impose any limitation on this. For example, the preset transcoding condition is that video frame 1 can have repeated frames or video frame 2 can lose frames during the transcoding process.

[0088] Continuing with the above example, if the transcoded video includes three video frames arranged in sequence: video frame 1 and video frame 3, the number of test objects contained in each video frame in the transcoded video is arranged frame by frame according to the arrangement order of all video frames in the transcoded video, and the second number sequence formed is [10, 12, 11]; then the first number sequence [10, 11, 12] does not match the second number sequence [10, 12], and the number of test objects in the second number sequence that does not match the first number sequence is 11. The video frame corresponding to the number of unmatched test objects is video frame 2 in the initial video, and video frame 2 is the verification video frame.

[0089] If the preset transcoding condition is that video frame 2 needs to drop frames during the video transcoding process, it can be determined that the verification video frame meets the preset transcoding condition based on the preset transcoding condition, which also indicates that the initial video transcoding is successful.

[0090] In the embodiments of this specification, due to the different specific video transcoding scenarios, some special video transcoding scenarios may allow frame loss and frame drops to occur during the video transcoding process for the sake of video special effects and other requirements. Therefore, when the first number sequence and the second number sequence do not match, it is necessary to verify again whether the initial video is successfully transcoded based on the preset transcoding conditions in the specific application scenario, so as to expand the application scenarios of the video processing method provided in this application and enhance the user experience.

[0091] In addition, after comparing the first quantity sequence with the second quantity sequence, the method further includes:

[0092] In the case where the first number sequence does not match the second number sequence, it is determined that the initial video transcoding has failed, and the transcoded video is parsed based on video frames corresponding to the numbers in the mismatched first number sequence and second number sequence to repair the video transcoding system.

[0093] Alternatively, when the verification video frame does not satisfy a preset transcoding condition, the transcoded video is parsed based on the verification video frame to repair the video transcoding system.

[0094] Continuing with the above example, if the transcoded video still includes three sequentially arranged video frames: video frame 1, video frame 3, and video frame 2, the number of test objects contained in each video frame in the transcoded video is arranged frame by frame according to the arrangement order of all video frames in the transcoded video, and the second quantity sequence formed is [10, 12, 11].

[0095] Then, by comparing the first number sequence with the second number sequence, it can be determined that the first number sequence and the second number sequence do not match. At this time, it can be determined that the initial video transcoding has failed, that is, the order of video frame 2 and video frame 3 after transcoding is disordered, which means that the transcoding quality of the current video transcoding system is not very good, and the video transcoding system needs to be repaired later. In this way, the erroneous problem video frame can be quickly located according to the mismatched numbers. When repairing the video transcoding system, the problem analysis can be performed based on the erroneous problem video frame.

[0096] In another case, if the transcoded video still includes three sequentially arranged video frames: video frame 1, video frame 3, and video frame 2, the number of test objects contained in each video frame in the transcoded video is arranged frame by frame according to the arrangement order of all video frames in the transcoded video, and the second quantity sequence formed is [10, 10, 11].

[0097] Then, by comparing the first number sequence with the second number sequence, it can be determined that the first number sequence and the second number sequence do not match. At this time, it can be determined that the initial video transcoding failed, that is, the video frame 2 after transcoding was lost, and the video frame 1 produced a duplicate frame. At this time, the situation of repeated transcoding of video frames is different from the situation where the number of video frames is disordered during video frame transcoding. In this case, when the transcoded video is played, not only will the correlation between the front and back of the video screen be poor, but also a sense of stuttering will be produced due to repeated video frames. Therefore, for this situation, it is also necessary to repair the video transcoding system, and quickly locate the erroneous problem video frame according to the unmatched numbers in the above manner. When repairing the video transcoding system, the problem analysis can be performed based on the erroneous problem video frame.

[0098] Still using the above example, in actual applications, the transcoded video after the initial video transcoding may also include four video frames, for example, a video frame is repeatedly transcoded (i.e., frame is dropped), or include two video frames, for example, a video frame is dropped. In these cases, the obtained second quantity sequence will not match the first quantity sequence.

[0099] In an embodiment of the present application, by comparing the number of test objects contained in each video frame of the counted initial video with the number of test objects contained in each video frame of the transcoded video after transcoding, it is possible to quickly and accurately determine whether the transcoding result of the initial video is correct based on the comparison result. In the case that the transcoding result of the initial video is inaccurate, by analyzing the transcoded video, it is determined whether the transcoded video has lost frames or dropped frames, and then the video transcoding system is repaired in a targeted manner based on the determined situation.

[0100] In another case, comparing the number of test objects contained in each video frame in the original video with the number of test objects contained in each video frame in the transcoded video to determine the transcoding result of the original video includes:

[0101] Arranging the number of test objects displayed in the number display area for each video frame in the initial video frame by frame to form a third number sequence, and arranging the number of test objects displayed in the number display area for each video frame in the transcoded video frame by frame to form a fourth number sequence;

[0102] The third number sequence is compared with the fourth number sequence, and when the third number sequence and the fourth number sequence all match, it is determined that the initial video transcoding is successful.

[0103] Specifically, the number of test objects displayed in the corresponding number display area of ​​each video frame in the initial video is arranged frame by frame according to the arrangement order of all video frames in the initial video to form a third number sequence.

[0104] Continuing with the above example, the number of test objects displayed in the corresponding number display area of ​​each video frame in the initial video is arranged frame by frame according to the arrangement order of all video frames in the initial video, and the third number sequence formed is [10, 11, 12].

[0105] At the same time, the number of test objects displayed in the corresponding number display area of ​​each video frame in the transcoded video is arranged frame by frame according to the arrangement order of all video frames in the transcoded video to form a second number sequence.

[0106] For example, the transcoded video still includes three sequentially arranged video frames: video frame 1, video frame 2, and video frame 3. Then the number of test objects displayed in the corresponding quantity display area of ​​each video frame in the transcoded video is arranged frame by frame according to the arrangement order of all video frames in the transcoded video, and the fourth quantity sequence formed is [10, 11, 12].

[0107] Then, by comparing the third number sequence with the fourth number sequence, it can be determined that the third number sequence and the fourth number sequence all match, and then it can be determined that the initial video transcoding is successful, and the success of the initial video transcoding indicates that the transcoding quality of the current video transcoding system is good.

[0108] In an embodiment of the present application, by comparing the number of test objects displayed in the corresponding number display area for each video frame of the counted initial video with the number of test objects displayed in the corresponding number display area for each video frame of the transcoded video after transcoding, it is possible to quickly and accurately determine whether the transcoding result of the initial video is correct based on the comparison result, thereby improving the user experience.

[0109] In practical applications, after comparing the third quantity sequence with the fourth quantity sequence, the method further includes:

[0110] In the case that the third number sequence does not match the fourth number sequence, determining video frames corresponding to the number of mismatches between the third number sequence and the fourth number sequence, and using the video frames corresponding to the number of mismatches between the third number sequence and the fourth number sequence as verification video frames;

[0111] When the verification video frame meets the preset transcoding condition, it is determined that the initial video transcoding is successful.

[0112] Among them, the preset transcoding condition is set according to the actual application, and this application does not impose any limitation on this. For example, the preset transcoding condition is that video frame 1 can have repeated frames or video frame 2 can lose frames during the transcoding process.

[0113] Continuing with the above example, if the transcoded video includes two video frames arranged in sequence: video frame 1 and video frame 3, the number of test objects contained in each video frame in the transcoded video is arranged frame by frame according to the arrangement order of all video frames in the transcoded video, and the fourth number sequence formed is [10, 12]; then the third number sequence [10, 11, 12] does not match the fourth number sequence [10, 12]. At this time, the number of test objects in the third number sequence that do not match the fourth number sequence is 11, and the video frame corresponding to the number of unmatched test objects is video frame 2 in the initial video, and video frame 2 is the verification video frame.

[0114] If the preset transcoding condition is that video frame 2 needs to drop frames during the video transcoding process, it can be determined that the verification video frame meets the preset transcoding condition based on the preset transcoding condition, which also indicates that the initial video transcoding is successful.

[0115] In the embodiments of this specification, due to the different specific video transcoding scenarios, some special video transcoding scenarios may allow frame loss and frame drops to occur during the video transcoding process for the sake of video special effects and other requirements. Therefore, when the third number sequence and the fourth number sequence do not match, it is necessary to verify again whether the initial video is successfully transcoded based on the preset transcoding conditions in the specific application scenario, so as to expand the application scenarios of the video processing method provided by this application and enhance the user experience.

[0116] In addition, after comparing the third quantity sequence with the fourth quantity sequence, the method further includes:

[0117] In the case where the third number sequence does not match the fourth number sequence, it is determined that the initial video transcoding has failed, and the transcoded video is parsed based on the video frames corresponding to the numbers in the unmatched third number sequence and the fourth number sequence to repair the video transcoding system.

[0118] Alternatively, when the verification video frame does not satisfy a preset transcoding condition, the transcoded video is parsed based on the verification video frame to repair the video transcoding system.

[0119] Continuing with the above example, if the transcoded video still includes three video frames arranged in sequence: video frame 1, video frame 3, and video frame 2, the number of test objects displayed in the quantity display area corresponding to each video frame in the transcoded video is arranged frame by frame according to the arrangement order of all video frames in the transcoded video, and the second quantity sequence formed is [10, 12, 11].

[0120] Then, by comparing the first number sequence with the second number sequence, it can be determined that the first number sequence and the second number sequence do not match. At this time, it can be determined that the initial video transcoding has failed, that is, the order of video frame 2 and video frame 3 after transcoding is disordered, which means that the transcoding quality of the current video transcoding system is not very good, and the video transcoding system needs to be repaired later. In this way, the erroneous problem video frame can be quickly located according to the mismatched numbers. When repairing the video transcoding system, the problem analysis can be performed based on the erroneous problem video frame.

[0121] In actual applications, the transcoded video after the initial video transcoding may also include four video frames. For example, a video frame is repeatedly transcoded, then the third number sequence will include the number of 4 test objects; or it may include two video frames. For example, a video frame is lost, then the fourth number sequence will include the number of 2 test objects. In these cases, the third number sequence and the fourth number sequence obtained will not match.

[0122] In an embodiment of the present application, by comparing the number of test objects displayed in the number display area corresponding to each video frame of the initial video with the number of test objects displayed in the number display area corresponding to each video frame of the transcoded video after transcoding based on a preset recognition algorithm, it is possible to quickly and accurately determine whether the transcoding result of the initial video is correct based on the comparison result. In the case that the transcoding result of the initial video is inaccurate, by analyzing the transcoded video, it is determined whether the transcoded video has lost frames or dropped frames, and then the video transcoding system is repaired in a targeted manner based on the determined situation.

[0123] In another embodiment of the present application, comparing the number of test objects contained in each video frame in the original video with the number of test objects contained in each video frame in the transcoded video to determine the transcoding result of the original video includes:

[0124] Arranging the number of test objects contained in each video frame in the original video frame by frame to form a first number sequence, and arranging the number of test objects contained in each video frame in the transcoded video frame by frame to form a second number sequence;

[0125] Arranging the number of test objects displayed in the number display area for each video frame in the initial video frame by frame to form a third number sequence, and arranging the number of test objects displayed in the number display area for each video frame in the transcoded video frame by frame to form a fourth number sequence;

[0126] Comparing the first number sequence with the second number sequence, and comparing the third number sequence with the fourth number sequence;

[0127] When the first number sequence and the second number sequence all match, or the third number sequence and the fourth number sequence all match, it is determined that the initial video transcoding is successful.

[0128] In actual applications, during the transcoding process of the initial video, the test objects may be lost or the number of test objects in the quantity display area may be lost, and the possibility of both being lost at the same time is small. Therefore, the number of test objects before and after transcoding and the number of test objects in the quantity display area before and after transcoding are compared and counted at the same time. When any one of the numbers of test objects matches, it can be said that the initial video transcoding is successful. When both do not match, it can be said that the initial video transcoding has failed.

[0129] In specific implementation, the acquisition and comparison methods of the first quantity sequence, the second quantity sequence, the third quantity sequence and the fourth quantity sequence can refer to the above embodiments, which will not be described in detail here.

[0130] In an embodiment of the present application, in order to ensure the accuracy of the initial video transcoding result, the number of the two test objects is compared at the same time. If any one of the comparison results matches, it can be determined that the transcoding result of the initial video is successful, and the video transcoding system has no transcoding quality problems. In this way, the difference between the videos before and after transcoding can be used to automatically determine whether the video transcoding system has transcoding quality problems, thereby improving the user experience.

[0131] Corresponding to the above method embodiment, the present application also provides a video processing device embodiment, Figure 5 FIG. 2 shows a schematic diagram of the structure of a video processing device provided by an embodiment of the present application. Figure 5 As shown, the device comprises:

[0132] The video generation module 502 is configured to generate an initial video including a plurality of video frames based on a preset video rule, wherein each video frame includes at least one test object whose number increases frame by frame;

[0133] The video transcoding module 504 is configured to send the initial video to a preset video transcoding system for video transcoding, and receive the transcoded video returned by the video transcoding system;

[0134] The object quantity determination module 506 is configured to determine the quantity of test objects contained in each video frame in the transcoded video according to the arrangement order of the video frames in the transcoded video;

[0135] The transcoding result determination module 508 is configured to compare the number of test objects contained in each video frame in the initial video with the number of test objects contained in each video frame in the transcoded video to determine the transcoding result of the initial video.

[0136] Optionally, the device further includes:

[0137] The quantity display module is configured as follows:

[0138] Setting a test object quantity display area at a preset position of each video frame of the initial video;

[0139] The number of test objects contained in each video frame of the initial video is placed in the number display area.

[0140] Optionally, the device further includes:

[0141] The quantity recognition module is configured to recognize the quantity of the test objects displayed in the quantity display area for each video frame in the transcoded video through a preset recognition algorithm.

[0142] Optionally, the transcoding result determination module 508 is configured to:

[0143] Arranging the number of test objects contained in each video frame in the original video frame by frame to form a first number sequence, and arranging the number of test objects contained in each video frame in the transcoded video frame by frame to form a second number sequence;

[0144] The first number sequence is compared with the second number sequence, and when the first number sequence and the second number sequence completely match, it is determined that the initial video transcoding is successful.

[0145] Optionally, the transcoding result determination module 508 is configured to:

[0146] Arranging the number of test objects displayed in the number display area for each video frame in the initial video frame by frame to form a third number sequence, and arranging the number of test objects displayed in the number display area for each video frame in the transcoded video frame by frame to form a fourth number sequence;

[0147] The third number sequence is compared with the fourth number sequence, and when the third number sequence and the fourth number sequence all match, it is determined that the initial video transcoding is successful.

[0148] Optionally, the device further includes: a first verification module configured to:

[0149] In the case that the first number sequence does not match the second number sequence, determining video frames corresponding to the number of mismatches between the first number sequence and the second number sequence, and using the video frames corresponding to the number of mismatches between the first number sequence and the second number sequence as verification video frames;

[0150] When the verification video frame meets the preset transcoding condition, it is determined that the initial video transcoding is successful.

[0151] Optionally, the device further includes: a first verification module configured to:

[0152] In the case that the third number sequence does not match the fourth number sequence, determining video frames corresponding to the number of mismatches between the third number sequence and the fourth number sequence, and using the video frames corresponding to the number of mismatches between the third number sequence and the fourth number sequence as verification video frames;

[0153] When the verification video frame meets the preset transcoding condition, it is determined that the initial video transcoding is successful.

[0154] Optionally, the transcoding result determination module 508 is configured to:

[0155] Arranging the number of test objects contained in each video frame in the original video frame by frame to form a first number sequence, and arranging the number of test objects contained in each video frame in the transcoded video frame by frame to form a second number sequence;

[0156] Arranging the number of test objects displayed in the number display area for each video frame in the initial video frame by frame to form a third number sequence, and arranging the number of test objects displayed in the number display area for each video frame in the transcoded video frame by frame to form a fourth number sequence;

[0157] Comparing the first number sequence with the second number sequence, and comparing the third number sequence with the fourth number sequence;

[0158] When the first number sequence and the second number sequence all match, or the third number sequence and the fourth number sequence all match, it is determined that the initial video transcoding is successful.

[0159] Optionally, the video generation module 502 is configured to:

[0160] An initial video is generated based on a preset video rule, comprising a plurality of video frames consisting of a base image of a first pixel and a test object of a second pixel, wherein a similarity between the first pixel and the second pixel is less than or equal to a preset similarity threshold.

[0161] The video processing device provided in the embodiment of the present application sets a test object in each video frame of the initial video, obtains the test object in each video frame of the transcoded video corresponding to the initial video, and compares the number of test objects in each video frame of the initial video with the number of test objects in each video frame of the transcoded video according to the arrangement order of the video frames. It can quickly and accurately determine whether the transcoded video has frame loss or dropped frames.

[0162] The above is a schematic scheme of a video processing device of this embodiment. It should be noted that the technical scheme of the video processing device and the technical scheme of the above video processing method belong to the same concept, and the details not described in detail in the technical scheme of the video processing device can be referred to the description of the technical scheme of the above video processing method.

[0163] See also Figure 6 , Figure 6 The block diagram of a computing device 600 according to an embodiment of the present application is shown. The components of the computing device 600 include but are not limited to a memory 610 and a processor 620. The processor 620 is connected to the memory 610 via a bus 630, and the database 650 is used to store data.

[0164] The computing device 600 also includes an access device 640 that enables the computing device 600 to communicate via one or more networks 660. Examples of these networks include a public switched telephone network (PSTN), a local area network (LAN), a wide area network (WAN), a personal area network (PAN), or a combination of communication networks such as the Internet. The access device 640 may include one or more of any type of network interface (e.g., a network interface card (NIC)) whether wired or wireless, such as an IEEE 802.11 wireless local area network (WLAN) wireless interface, a World Wide Interoperability for Microwave Access (Wi-MAX) interface, an Ethernet interface, a universal serial bus (USB) interface, a cellular network interface, a Bluetooth interface, a near field communication (NFC) interface, and the like.

[0165] In one embodiment of the present application, the above components of the computing device 600 and Figure 6 Other components not shown in the figure may also be connected to each other, for example, via a bus. It should be understood that Figure 6 The computing device structure block diagram shown is only for the purpose of illustration, and is not intended to limit the scope of the present application. Those skilled in the art may add or replace other components as needed.

[0166] The computing device 600 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., a tablet computer, a personal digital assistant, a laptop computer, a notebook computer, a netbook, etc.), a mobile phone (e.g., a smart phone), a wearable computing device (e.g., a smart watch, smart glasses, etc.), or other types of mobile devices, or a stationary computing device such as a desktop computer or PC. The computing device 600 may also be a mobile or stationary server.

[0167] The processor 620 is used to execute the following computer executable instructions, and the processor 620 implements the steps of the video processing method when executing the instructions.

[0168] The above is a schematic scheme of a computing device of this embodiment. It should be noted that the technical scheme of the computing device and the technical scheme of the above video processing method belong to the same concept, and the details not described in detail in the technical scheme of the computing device can be referred to the description of the technical scheme of the above video processing method.

[0169] An embodiment of the present application further provides a computer-readable storage medium storing computer instructions, which, when executed by a processor, implement the steps of the video processing method described above.

[0170] The above is a schematic scheme of a computer-readable storage medium of this embodiment. It should be noted that the technical scheme of the storage medium and the technical scheme of the above video processing method belong to the same concept, and the details not described in detail in the technical scheme of the storage medium can be referred to the description of the technical scheme of the above video processing method.

[0171] The above describes specific embodiments of the present application. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0172] The computer instructions include computer program codes, which may be in source code form, object code form, executable files or some intermediate forms, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc. It should be noted that the content contained in the computer-readable medium may be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.

[0173] It should be noted that, for the above-mentioned method embodiments, for the sake of simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present application is not limited by the described action sequence, because according to the present application, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present application.

[0174] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0175] The preferred embodiments of the present application disclosed above are only used to help explain the present application. The optional embodiments do not describe all the details in detail, nor do they limit the invention to the specific implementation methods described. Obviously, many modifications and changes can be made according to the content of the present application. The present application selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present application, so that those skilled in the art can understand and use the present application well. The present application is only limited by the claims and their full scope and equivalents.

Claims

1. A video processing method, characterized in that: include: Generate an initial video including a plurality of video frames based on a preset video rule, wherein each video frame includes at least one test object whose number increases frame by frame; Sending the initial video to a preset video transcoding system for video transcoding, and receiving the transcoded video returned by the video transcoding system; Determining the number of test objects contained in each video frame in the transcoded video according to the arrangement order of the video frames in the transcoded video; The number of test objects contained in each video frame in the original video is compared with the number of test objects contained in each video frame in the transcoded video to determine the transcoding result of the original video.

2. The video processing method according to claim 1, characterized in that: After the initial video including a plurality of video frames is generated based on the preset video rule, the method further includes: Setting a test object quantity display area at a preset position of each video frame of the initial video; The number of test objects contained in each video frame of the initial video is placed in the number display area.

3. The video processing method according to claim 2, characterized in that: After sending the initial video to a preset video transcoding system for video transcoding and receiving the transcoded video returned by the video transcoding system, the method further includes: The number of test objects displayed in the number display area for each video frame in the transcoded video is identified by a preset recognition algorithm.

4. The video processing method according to claim 1 or 3, characterized in that: The comparing the number of test objects contained in each video frame in the initial video with the number of test objects contained in each video frame in the transcoded video to determine the transcoding result of the initial video includes: Arranging the number of test objects contained in each video frame in the original video frame by frame to form a first number sequence, and arranging the number of test objects contained in each video frame in the transcoded video frame by frame to form a second number sequence; The first number sequence is compared with the second number sequence, and when the first number sequence and the second number sequence completely match, it is determined that the initial video transcoding is successful.

5. The video processing method according to claim 3, characterized in that: The comparing the number of test objects contained in each video frame in the initial video with the number of test objects contained in each video frame in the transcoded video to determine the transcoding result of the initial video includes: Arranging the number of test objects displayed in the number display area for each video frame in the initial video frame by frame to form a third number sequence, and arranging the number of test objects displayed in the number display area for each video frame in the transcoded video frame by frame to form a fourth number sequence; The third number sequence is compared with the fourth number sequence, and when the third number sequence and the fourth number sequence all match, it is determined that the initial video transcoding is successful.

6. The video processing method according to claim 4, characterized in that: After comparing the first quantity sequence with the second quantity sequence, the method further includes: In the case that the first number sequence does not match the second number sequence, determining video frames corresponding to the number of mismatches between the first number sequence and the second number sequence, and using the video frames corresponding to the number of mismatches between the first number sequence and the second number sequence as verification video frames; When the verification video frame meets the preset transcoding condition, it is determined that the initial video transcoding is successful.

7. The video processing method according to claim 5, characterized in that: After comparing the third quantity sequence with the fourth quantity sequence, the method further includes: In the case that the third number sequence does not match the fourth number sequence, determining video frames corresponding to the number of mismatches between the third number sequence and the fourth number sequence, and using the video frames corresponding to the number of mismatches between the third number sequence and the fourth number sequence as verification video frames; When the verification video frame meets the preset transcoding condition, it is determined that the initial video transcoding is successful.

8. The video processing method according to claim 3, characterized in that: The comparing the number of test objects contained in each video frame in the initial video with the number of test objects contained in each video frame in the transcoded video to determine the transcoding result of the initial video includes: Arranging the number of test objects contained in each video frame in the original video frame by frame to form a first number sequence, and arranging the number of test objects contained in each video frame in the transcoded video frame by frame to form a second number sequence; Arranging the number of test objects displayed in the number display area for each video frame in the initial video frame by frame to form a third number sequence, and arranging the number of test objects displayed in the number display area for each video frame in the transcoded video frame by frame to form a fourth number sequence; Comparing the first number sequence with the second number sequence, and comparing the third number sequence with the fourth number sequence; When the first number sequence and the second number sequence all match, or the third number sequence and the fourth number sequence all match, it is determined that the initial video transcoding is successful.

9. The video processing method according to any one of claims 1 to 3, characterized in that: The generating of an initial video including a plurality of video frames based on a preset video rule comprises: An initial video including a plurality of video frames consisting of a base image of first pixels and a test object of second pixels is generated based on a preset video rule, wherein the similarity between the first pixels and the second pixels is less than or equal to a preset similarity threshold.

10. A video processing device, characterized in that: include: A video generation module is configured to generate an initial video including a plurality of video frames based on a preset video rule, wherein each video frame includes at least one test object whose number increases frame by frame; A video transcoding module is configured to send the initial video to a preset video transcoding system for video transcoding, and receive the transcoded video returned by the video transcoding system; an object quantity determination module, configured to determine the quantity of test objects contained in each video frame in the transcoded video according to the arrangement order of the video frames in the transcoded video; The transcoding result determination module is configured to compare the number of test objects contained in each video frame in the initial video with the number of test objects contained in each video frame in the transcoded video to determine the transcoding result of the initial video.

11. A computing device comprising a memory, a processor, and computer instructions stored in the memory and executable on the processor, characterized in that: When the processor executes the instructions, the steps of the method according to any one of claims 1 to 9 are implemented.

12. A computer-readable storage medium storing computer instructions, characterized in that: When the instruction is executed by a processor, the steps of the method described in any one of claims 1 to 9 are implemented.

Citation Information

Patent Citations

  • Video classification feature extraction method, transcoding recompression detection method and storage medium

    CN108366295A

  • Video testing method and system

    CN110049313A