CN114630103A - Video processing method and device - Google Patents
Video processing method and device Download PDFInfo
- Publication number
- CN114630103A CN114630103A CN202011450293.5A CN202011450293A CN114630103A CN 114630103 A CN114630103 A CN 114630103A CN 202011450293 A CN202011450293 A CN 202011450293A CN 114630103 A CN114630103 A CN 114630103A
- Authority
- CN
- China
- Prior art keywords
- video
- frame
- transcoding
- initial
- sequences
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N17/00—Diagnosis, testing or measuring for television systems or their details
- H04N17/004—Diagnosis, testing or measuring for television systems or their details for digital television systems
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04N—PICTORIAL COMMUNICATION, e.g. TELEVISION
- H04N19/00—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals
- H04N19/40—Methods or arrangements for coding, decoding, compressing or decompressing digital video signals using video transcoding, i.e. partial or full decoding of a coded input stream followed by re-encoding of the decoded output stream
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Signal Processing (AREA)
- Health & Medical Sciences (AREA)
- Biomedical Technology (AREA)
- General Health & Medical Sciences (AREA)
- Compression Or Coding Systems Of Tv Signals (AREA)
Abstract
The application provides a video processing method and a video processing device, wherein the video processing method comprises the steps of generating an initial video comprising a plurality of video frames based on a preset video rule; sending the initial video to a preset video transcoding system for video transcoding, and receiving a 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 sequence of the video frames in the transcoded video; comparing the number of the test objects contained in each video frame in the initial video with the number of the test objects contained in each video frame in the transcoded video to determine a transcoding result of the initial video; by comparing whether the number of the test objects in each video frame of the initial video is consistent with the number of the test objects in each video frame of the transcoded video, whether the transcoded video loses frames or drops frames can be judged quickly and accurately.
Description
Technical Field
The present application relates to the field of computer technologies, and in particular, to a video processing method. The application also relates to a video processing apparatus, a computing device, and a computer-readable storage medium.
Background
At present, in the video industry, the original video of a user is generally transcoded to obtain videos with different definitions through transcoding, so that the user can selectively play and watch the original video according to definition requirements, but video transcoding can involve reprocessing of the original video of the user, various problems may occur due to compatibility problems of various packaging and encoding protocols in the transcoding process, for example, the transcoded video can have the problems of frame loss and frame drop, and the user's video watching experience is greatly influenced.
Disclosure of Invention
In view of this, the present application provides a video processing method. The application also relates to a video processing device, a computing device and a computer readable storage medium, which are used for solving the technical defects that the transcoded video can have frame loss and frame drop in the prior art.
According to a first aspect of embodiments of the present application, there is provided a video processing method, including:
generating an initial video comprising a plurality of video frames based on a preset video rule, wherein each video frame comprises at least one test object with the quantity increasing frame by frame;
sending the initial video to a preset video transcoding system for video transcoding, and receiving a 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 sequence of the video frames in the transcoded video;
and comparing the number of the test objects contained in each video frame in the initial video with the number of the test objects contained in each video frame in the transcoded video to determine the transcoding result of the initial video.
According to a second aspect of embodiments of the present application, there is provided a video processing apparatus including:
the video generation module is configured to generate an initial video comprising a plurality of video frames based on a preset video rule, wherein each video frame comprises at least one test object with the quantity increasing frame by frame;
the video transcoding module is configured to send the initial video to a preset video transcoding system for video transcoding and receive a transcoded video returned by the video transcoding system;
the object quantity determining module is configured to determine the quantity of test objects contained in each video frame in the transcoded video according to the arrangement sequence of the video frames in the transcoded video;
the transcoding result determining module is configured to compare the number of the test objects contained in each video frame in the initial video with the number of the test objects contained in each video frame in the transcoded video to determine the transcoding result of the initial video.
According to a third aspect of embodiments herein, there is provided a computing device comprising a memory, a processor and computer instructions stored on the memory and executable on the processor, the processor implementing the steps of the video processing method when executing the instructions.
According to a fourth aspect of embodiments of the present application, there is provided a computer-readable storage medium storing computer instructions which, when executed by a processor, implement the steps of the video processing method.
The video processing method comprises the steps of generating an initial video comprising a plurality of video frames based on a preset video rule, wherein each video frame comprises at least one test object with the quantity increasing frame by frame; sending the initial video to a preset video transcoding system for video transcoding, and receiving a 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 sequence of the video frames in the transcoded video; and comparing the number of the test objects contained in each video frame in the initial video with the number of the test objects contained in each video frame in the transcoded video to determine the transcoding result of the initial video.
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 can quickly and accurately judge whether the transcoded video has the problems of frame loss and frame drop by comparing whether the number of the test objects in each video frame of the initial video is consistent with the number of the test objects in each video frame of the transcoded video according to the arrangement sequence of the video frames.
Drawings
Fig. 1 is a flowchart of a video processing method according to an embodiment of the present application;
fig. 2 is a schematic diagram of a video frame of an initial video in a video processing method according to an embodiment of the present application;
fig. 3 is a schematic diagram of a plurality of video frames of an initial video in a video processing method according to an embodiment of the present application;
fig. 4 is a schematic diagram of a number display area in each video frame of an initial video in a video processing method according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of a video processing apparatus according to an embodiment of the present application;
fig. 6 is a block diagram of a computing device according to an embodiment of the present application.
Detailed Description
In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present application. This application is capable of implementation in many different ways than those herein set forth and of similar import by those skilled in the art without departing from the spirit of this application and is therefore not limited to the specific implementations disclosed below.
The terminology used in the one or more embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the one or more embodiments of the present application. As used in one or more embodiments of the present application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used in one or more embodiments of the present application refers to and encompasses any and all possible combinations of one or more of the associated listed items.
It will be understood that, although the terms first, second, etc. may be used herein in one or more embodiments of the present application to describe various information, these information should not be limited by these terms. These terms are only used to distinguish one type of information from another. For example, a first aspect may be termed a second aspect, and, similarly, a second aspect may be termed a first aspect, without departing from the scope of one or more embodiments of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
First, the noun terms to which one or more embodiments of the present application relate are explained.
Transcoding: and recoding the audio and video.
Frame loss: video transcoding results in the loss of video pictures at some frame level.
Frame dropping: video transcoding results in some frame-level video pictures being lost and supplemented by adjacent frame copies, but video pictures may appear unsmooth during this time period as if stuck.
Video watermarking: some texts or pictures are added on the video picture, such as station logo/logo on the video.
OCR: optical Character Recognition, refers to the electronic Recognition of textual Character content by machine.
At present, a machine is difficult to actively identify frame loss and frame drop phenomena after video transcoding, and people who need to be particularly sensitive to a frame rate can see the frame loss and the frame drop phenomena after the video transcoding is judged by eyes, so that the video quality detection after the video transcoding is a pain point in the prior art.
Based on this, in the present application, a video processing method is provided, and the present application simultaneously relates to a video processing apparatus, a computing device, and a computer-readable storage medium, which are individually detailed in the following embodiments.
Referring to fig. 1, fig. 1 shows a flowchart of a video processing method according to an embodiment of the present application, which specifically includes the following steps:
step 102: and generating an initial video comprising a plurality of video frames based on a preset video rule, wherein each video frame comprises at least one test object with the number increasing from frame to frame.
The video processing method provided by the embodiment of the application is applied to a quality detection scene of a video transcoding system, a special initial video is generated based on user requirements, the generated initial video is input into a video transcoding system to be subjected to quality detection, and whether the initial video before transcoding and the transcoded video after transcoding are different is judged by comparing the initial video before transcoding with the transcoded video after transcoding is detected, so that whether the transcoding quality problem exists in the video transcoding system is determined; if the initial video before transcoding and the transcoded video after transcoding are different, it is indicated that the video transcoding system has the transcoding quality problem, and the transcoding may have the problems of frame loss or frame drop and the like, so that the video transcoding system needs to be repaired.
The preset video rule may be understood as a user requirement, for example, the user requirement is an initial video that is intended to generate a video frame including a plurality of base images in white, or the user requirement is an initial video that is intended to generate a video frame including a plurality of base images in black, and the like.
Specifically, the generating an initial video including a plurality of video frames based on a preset video rule includes:
generating an initial video comprising a plurality of video frames composed of a base map of a first pixel and a test object of a second pixel based on a preset video rule, wherein the similarity of the first pixel and the second pixel is less than or equal to a preset similarity threshold.
The pixel values of the first pixel and the second pixel are different, and the similarity of 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 in the case where the first pixel is white, the second pixel is black, purple, green, or the like, which is in contrast with the white first pixel.
For example, if the first pixel is white and the second pixel is black, the initial video of the video frame composed of the base image of the first pixel and the test object of the second pixel is generated based on the preset video rule, which can be understood as the initial video of the video frame composed of the base image of white and the test object of black based on the preset video rule.
The test object includes, but is not limited to, a test block of any shape, such as a square, circle, or rectangle black test block.
Referring to fig. 2, fig. 2 is a schematic diagram illustrating a video frame of an initial video in a video processing method according to an embodiment of the present application.
Fig. 2 is a schematic diagram of a video frame in the initial video, the video frame being composed of a white base image and a black rectangular test block, wherein the black rectangular test block is the test object.
In the embodiment of the application, the video frames are generated through the base image and the test object with large pixel value contrast, then the initial video is composed of a plurality of video frames, and the test object with large color contrast in each video can be conveniently and quickly extracted when the number of the test objects in each video frame of the initial video is counted in the subsequent process, so that the situation that the outline of the test object cannot be accurately found and the test object cannot be accurately obtained when the colors of the test object and the base image are close is avoided.
In specific implementation, the initial video generated based on the preset rule includes a plurality of video frames, each video frame is composed of a base map with a large color contrast and a test object, and the number of the 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 under the condition that 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 included in each video frame of the initial video is increased from frame to frame according to the arrangement order of each video frame of the initial video.
Referring to fig. 3, fig. 3 is a schematic diagram illustrating a plurality of video frames of an initial video in a video processing method according to an embodiment of the present application.
The initial video of fig. 3 includes a video frame 1, a video frame 2, and a video frame 3, where the video frame 1 includes 10 test objects, the video frame 2 includes 11 test objects, and the video frame 3 includes 12 test objects.
Specifically, in order to extract the test objects in each video frame, the test objects in each video frame may be uniformly arranged at a fixed position of the video frame, although the arrangement is not limited in practical application, and the test objects in each video frame may be arranged at different positions, for example, the test objects in the video frame 1 are arranged at the upper left corner of the video frame 1, the test objects in the video frame 2 are arranged at the upper right corner of the video frame 2, and the test objects in the video frame 3 are arranged in the middle of the video frame 3.
Specifically, after the generating an initial video including a plurality of video frames based on a preset video rule, the method further includes:
setting a number display area of a test object at a preset position of each video frame of the initial video;
and placing the number of the test objects contained in each video frame of the initial video in the number display area.
In this embodiment, since the test object is represented by a digital pixel, the computer can directly count the number of second pixels (e.g., black pixels) included in each video frame, that is, the number of test objects in each video frame can be obtained by counting the number of second pixels (e.g., black pixels) included in each video frame.
In practical application, in order to conveniently obtain the number of the test objects in each video frame of the initial video, a number display area for one test object may be set at a preset position of each video frame of the initial video, and then the number of the test objects included in each video frame of the initial video is displayed in the number display area, where the preset position may be any position of each video frame, such as four corners or a middle area. In order to avoid the number display area from shielding the test object, the test object and the number display area may be respectively disposed at different positions of each video frame, for example, the test object is arranged at the upper left corner of the video frame, the number display area is disposed at the upper right corner of the video frame, and the like.
In this case, the number display area places the number of test objects included in each video frame of the initial video, and along with the above example, the number display area of video frame 1 places the number 10 of test objects included in video frame 1, the number display area of video frame 2 places the number 11 of test objects included in video frame 2, and the number display area of video frame 3 places the number 12 of test objects included in video frame 3.
Referring to fig. 4, fig. 4 is a schematic diagram illustrating a number display area in each video frame of an initial video in a video processing method according to an embodiment of the present application.
The initial video of fig. 4 includes a video frame 1, a video frame 2, and a video frame 3, where the video frame 1 includes 10 test objects, the video frame 2 includes 11 test objects, and the video frame 3 includes 12 test objects.
The testing objects are arranged at the upper left corner of each video frame, and the upper right corner of each video frame is provided with a quantity display area for displaying the quantity of the testing objects included in each video frame; that is, the number display area in the upper right corner of video frame 1 places the number 10 of test objects contained in video frame 1, the number display area in the upper right corner of video frame 2 places 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 places the number 12 of test objects contained in video frame 3.
In the embodiment of the application, in order to more conveniently determine the number of the test objects contained in each video frame of the initial video, a number display area of one test object may be set in each video frame of the initial video, and the number of the test objects contained in each video frame of the initial video is placed and displayed in the corresponding number display area.
Step 104: and sending the initial video to a preset video transcoding system for video transcoding, and receiving a transcoded video returned by the video transcoding system.
The preset video transcoding system comprises any video transcoding system to be subjected to transcoding quality testing.
Specifically, after an initial video comprising a plurality of video frames is generated, the initial video is sent to a specific video transcoding system needing transcoding quality testing for transcoding, and then a transcoded video generated after the initial video is transcoded and returned by the video transcoding system is received.
In specific implementation, after sending the initial video to a preset video transcoding system for video transcoding and receiving a transcoded video returned by the video transcoding system, the method further includes:
and identifying the number of the test objects displayed in the number display area by each video frame in the transcoded video through a preset identification algorithm.
In practical application, because the number display area of each video frame of the initial video carries the number of the test objects contained in the video frame, and in the transcoding process, the number of the test objects placed in the number display area and the number of the test objects placed in the number display area are generally not lost due to transcoding, or random codes occur, and the like, after transcoding, the number display area also exists in each video frame of the transcoded video, and each number display area contains the number of one test object.
Therefore, after the transcoded video is obtained, the number of the test objects displayed in the number display area by each video frame in the transcoded video can be identified through a preset identification algorithm (for example, an OCR identification algorithm).
In the embodiment of the application, the number of the test objects displayed in the number display area by each video frame in the transcoded video is identified through an identification algorithm, and then the number of the test objects displayed in the number display area by each video frame in the transcoded video can be compared with the number of the test objects displayed in the number display area by each video frame in the initial video, so that whether frame loss or frame drop occurs after the initial video is transcoded into the transcoded video is accurately determined.
Step 106: and determining the number of the test objects contained in each video frame in the transcoded video according to the arrangement sequence of the video frames in the transcoded video.
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 sequence of the video frames in the transcoded video.
In specific implementation, after the transcoded video is obtained, the number of the test objects contained in each video frame needs to be counted by a computer according to the arrangement sequence of the video frames in the transcoded video, rather than identifying the number of the test objects in the number display area in each video frame of the transcoded video by an identification algorithm.
Due to the fact that frame loss or frame drop may occur in the process of initial video transcoding, the video frames in the transcoded video after transcoding may be disordered, and at the moment, the number of test objects contained in each video frame of the transcoded video is counted again, so that subsequent comparison is more accurate.
Step 108: and comparing the number of the test objects contained in each video frame in the initial video with the number of the test objects contained in each video frame in the transcoded video to determine the transcoding result of the initial video.
The method comprises the following steps of comparing the number of test objects contained in each video frame in an initial video with the number of test objects contained in each video frame in a transcoded video to determine that the transcoding result of the initial video at least comprises two conditions, wherein one is realized by comparing the number of test objects counted by a computer, and the other is realized by comparing the number of test objects directly displayed in a number display area of each video frame, and the specific implementation mode is as follows:
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 initial 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;
and comparing the first number of sequences with the second number of sequences, and determining that the initial video transcoding is successful under the condition that the first number of sequences and the second number of sequences are all matched.
Specifically, the number of test objects contained in each video frame in the initial video is arranged frame by frame according to the arrangement sequence of all video frames in the initial video to form a first number sequence.
Along 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 sequence of all video frames in the initial video, and the formed first number sequence is [ 10, 11, 12 ].
Meanwhile, the number of the test objects contained in each video frame in the transcoded video is arranged frame by frame according to the arrangement sequence of all the video frames in the transcoded video to form a second number sequence.
For example, transcoded video still includes three sequentially arranged video frames: video frames 1, 2 and 3, and then arranging the number of test objects contained in each video frame in the transcoded video frame by frame according to the arrangement sequence of all the video frames in the transcoded video, wherein the formed second number sequence is [ 10, 11 and 12 ].
Comparing the first number of sequences with the second number of sequences can determine that the first number of sequences and the second number of sequences are all matched, and at this time, it can be determined that the initial video transcoding is successful, and the successful initial video transcoding can indicate that the transcoding quality of the current video transcoding system is good.
In the embodiment of the application, the number of the test objects contained in each video frame of the initial video is compared with the number of the test objects contained in each video frame of the transcoded video after statistics, whether the transcoding result of the initial video is correct or not can be judged quickly and accurately according to the comparison result, and user experience is improved.
In practical applications, after the comparing the first number of sequences with the second number of sequences, the method further comprises:
under the condition that the first number sequence does not match with the second number sequence, determining video frames in the second number sequence corresponding to the number of unmatched first number sequence, and taking the video frames in the second number sequence corresponding to the number of unmatched first number sequence as verification video frames;
and under the condition that the verification video frame meets the preset transcoding condition, determining that the initial video transcoding is successful.
The preset transcoding condition is set according to practical application, and is not limited in this application, for example, the preset transcoding condition is that the video frame 1 may have repeated frames or the video frame 2 may drop frames in the transcoding process.
Following the above example, if the transcoded video includes three video frames arranged in sequence: the method comprises the steps that video frames 1 and 3 are obtained, the number of test objects contained in each video frame in the transcoded video is arranged frame by frame according to the arrangement sequence of all the video frames in the transcoded video, and the formed second number sequence is [ 10 ], 12 and 11 ]; then the first number sequence [ 10, 11, 12 ] does not match the second number sequence [ 10, 12 ], the number of the test objects in the determined second number sequence that do not match the first number sequence is 11, the video frame corresponding to the number of the unmatched test objects is the video frame 2 in the initial video, and the video frame 2 is the verification video frame.
If the preset transcoding condition is that the video frame 2 needs to be dropped in the video transcoding process, it can be determined that the verified video frame meets the preset transcoding condition according to the preset transcoding condition, and at this time, the success of the initial video transcoding can also be described.
In the embodiment of the specification, specific video transcoding scenes are different, and situations such as frame loss and frame dropping in the video transcoding process can be allowed to occur for the requirements of video special effects and the like in some special video transcoding scenes, so that whether the initial video is transcoded successfully needs to be verified again based on a preset transcoding condition in the specific application scene under the condition that the first number sequence and the second number sequence are not matched, so that the application scene of the video processing method provided by the application scene is enlarged, and the user experience is improved.
In addition, after the aligning the first number of sequences to the second number of sequences, the method further comprises:
and under the condition that the first number sequence is not matched with the second number sequence, determining that the initial video transcoding is failed, and analyzing the transcoded video based on the video frames corresponding to the number in the first number sequence and the second number sequence which are not matched so as to repair the video transcoding system.
Or under the condition that the verification video frame does not meet the preset transcoding condition, analyzing the transcoded video based on the verification video frame so as to repair the video transcoding system.
Following the above example, if the transcoded video still includes three video frames arranged in sequence: the method comprises the steps that video frames 1, 3 and 2 are obtained, the number of test objects contained in each video frame in the transcoded video is arranged frame by frame according to the arrangement sequence of all the video frames in the transcoded video, and the formed second number sequence is [ 10, 12 and 11 ].
Comparing the first number sequence with the second number sequence to determine that the first number sequence is not matched with the second number sequence, and determining that the initial video transcoding fails, namely, the sequence of the video frames 2 and 3 after transcoding is disordered, which can indicate that the transcoding quality of the current video transcoding system is not good, the video transcoding system needs to be repaired subsequently, and by the method, the error problem video frame can be quickly positioned according to the unmatched number, and when the video transcoding system is repaired, problem analysis can be performed based on the error problem video frame.
In another case, if the transcoded video still includes three video frames arranged in sequence: the method comprises the steps that video frames 1, 3 and 2 are obtained, the number of test objects contained in each video frame in the transcoded video is arranged frame by frame according to the arrangement sequence of all the video frames in the transcoded video, and the formed second number sequence is [ 10, 10 and 11 ].
Comparing the first number sequence with the second number sequence, determining that the first number sequence is not matched with the second number sequence, at this time, determining that the initial video transcoding fails, that is, the transcoded video frame 2 is lost, and the video frame 1 generates repeated frames, where the situation of repeated transcoding of the video frame is different from the situation of video frame scrambling occurring in video frame transcoding, and in this case, when the transcoded video is played, not only is the front-back relevance of the video frame poor, but also a pause feeling is generated due to the repeated video frames. Therefore, in such a situation, the video transcoding system also needs to be repaired, and the error problem video frame is quickly located according to the unmatched numbers in the above manner, so that when the video transcoding system is repaired, problem analysis can be performed based on the error problem video frame.
Still following the above example, in practical applications, the transcoded video after the initial video transcoding may further include four video frames, for example, a certain video frame is repeatedly transcoded (i.e., frame dropping), or includes two video frames, for example, a certain video frame is frame dropping, and in these cases, the obtained second number sequence does not match the first number sequence.
In the embodiment of the application, the number of the test objects contained in each video frame of the initial video is compared with the number of the test objects contained in each video frame of the transcoded video after statistics, whether the transcoding result of the initial video is correct or not can be judged quickly and accurately according to the comparison result, when the transcoding result of the initial video is inaccurate, the situation that the transcoded video loses frames or falls frames is determined through analysis of the transcoded video, and then the video transcoding system is repaired in a targeted mode based on the determined situation.
In another case, the comparing the number of test objects included in each video frame in the initial video with the number of test objects included in each video frame in the transcoded video to determine the transcoding result of the initial video includes:
arranging the number of the test objects displayed in the number display area by each video frame in the initial video frame to form a third number sequence, and arranging the number of the test objects displayed in the number display area by each video frame in the transcoded video frame to form a fourth number sequence;
comparing the third number of sequences with the fourth number of sequences, and determining that the initial video transcoding is successful under the condition that the third number of sequences and the fourth number of sequences are all matched.
Specifically, the number of the test objects displayed in the corresponding number display area by each video frame in the initial video is arranged frame by frame according to the arrangement sequence of all the video frames in the initial video to form a third number sequence.
According to the above example, the number of the test objects displayed in the corresponding number display area by each video frame in the initial video is arranged frame by frame according to the arrangement sequence of all the video frames in the initial video, and the third number sequence is [ 10, 11, 12 ].
And simultaneously, arranging the number of the test objects displayed by each video frame in the transcoded video in the corresponding number display area frame by frame according to the arrangement sequence of all the video frames in the transcoded video to form a second number sequence.
For example, transcoded video still includes three sequentially arranged video frames: and video frames 1, 2 and 3, arranging the number of the test objects displayed in the corresponding number display area by each video frame in the transcoded video frame by frame according to the arrangement sequence of all the video frames in the transcoded video, wherein the fourth number sequence is [ 10, 11 and 12 ].
Comparing the third number of sequences with the fourth number of sequences can determine that the third number of sequences and the fourth number of sequences are all matched, and at this time, it can be determined that the initial video transcoding is successful, and the successful initial video transcoding can indicate that the transcoding quality of the current video transcoding system is good.
In the embodiment of the application, the number of the test objects displayed in the corresponding number display area by each video frame of the initial video is compared with the number of the test objects displayed in the corresponding number display area by each video frame of the transcoded video, and whether the transcoding result of the initial video is correct or not can be rapidly and accurately judged according to the comparison result, so that the user experience is improved.
In practical applications, after the comparing the third number of sequences with the fourth number of sequences, the method further comprises:
under the condition that the third number of sequences does not match with the fourth number of sequences, determining video frames corresponding to the number of unmatched sequences in the third number of sequences and the fourth number of sequences, and taking the video frames corresponding to the number of unmatched sequences in the third number of sequences and the fourth number of sequences as verification video frames;
and under the condition that the verification video frame meets the preset transcoding condition, determining that the initial video transcoding is successful.
The preset transcoding condition is set according to practical application, and is not limited in this application, for example, the preset transcoding condition is that the video frame 1 may have repeated frames or the video frame 2 may drop frames in the transcoding process.
Following the above example, if the transcoded video includes two video frames arranged in sequence: the method comprises the steps that video frames 1 and 3, the number of test objects contained in each video frame in the transcoded video is arranged frame by frame according to the arrangement sequence of all the video frames in the transcoded video, and the formed fourth number sequence is [ 10 ] and [ 12 ]; then the third number sequence [ 10, 11, 12 ] does not match the fourth number sequence [ 10, 12 ], the number of the test objects in the determined third number sequence that do not match the fourth number sequence is 11, the video frame corresponding to the number of the unmatched test objects is the video frame 2 in the initial video, and the video frame 2 is the verification video frame.
If the preset transcoding condition is that the video frame 2 needs to be dropped in the video transcoding process, it can be determined that the verified video frame meets the preset transcoding condition according to the preset transcoding condition, and at this time, the success of the initial video transcoding can also be described.
In the embodiment of the description, specific video transcoding scenes are different, and situations such as frame loss and frame dropping are allowed to occur in the video transcoding process for the requirements of video special effects and the like in some special video transcoding scenes, so that whether the initial video is transcoded successfully needs to be verified again based on the preset transcoding condition in the specific application scene under the condition that the third number sequence is not matched with the fourth number sequence, so that the application scene of the video processing method provided by the application is enlarged, and the user experience is improved.
In addition, after the comparing the third number of sequences to the fourth number of sequences, the method further comprises:
and under the condition that the third number of sequences and the fourth number of sequences are not matched, determining that the initial video transcoding is failed, and analyzing the transcoded video based on the video frames corresponding to the numbers in the third number of sequences and the fourth number of sequences which are not matched so as to repair the video transcoding system.
Or under the condition that the verification video frame does not meet the preset transcoding condition, analyzing the transcoded video based on the verification video frame so as to repair the video transcoding system.
Following the above example, if the transcoded video still includes three video frames arranged in sequence: the method comprises the steps that video frames 1, 3 and 2 are obtained, the number of test objects displayed in a number display area corresponding to each video frame in the transcoded video is arranged frame by frame according to the arrangement sequence of all the video frames in the transcoded video, and the formed second number sequence is [ 10, 12 and 11 ].
Comparing the first number sequence with the second number sequence to determine that the first number sequence is not matched with the second number sequence, and determining that the initial video transcoding fails, namely, the sequence of the video frames 2 and 3 after transcoding is disordered, which can indicate that the transcoding quality of the current video transcoding system is not good, the video transcoding system needs to be repaired subsequently, and by the method, the error problem video frame can be quickly positioned according to the unmatched number, and when the video transcoding system is repaired, problem analysis can be performed based on the error problem video frame.
In practical applications, the transcoded video after the initial video transcoding may further include four video frames, for example, if a certain video frame is transcoded repeatedly, the third number sequence includes the number of 4 test objects; or two video frames are included, for example, if a video frame is lost, the fourth number sequence includes the number of 2 test objects, and in these cases, the obtained third number sequence and the fourth number sequence do not match.
In the embodiment of the application, the number of the test objects displayed in the number display area corresponding to each video frame of the initial video is compared with the number of the test objects displayed in the number display area corresponding to each video frame of the transcoded video identified based on the preset identification algorithm, whether the transcoding result of the initial video is correct or not can be judged quickly and accurately according to the comparison result, under the condition that the transcoding result of the initial video is inaccurate, the condition that the transcoded video loses frames or drops frames is determined through analysis of the transcoded video, and then the video transcoding system is repaired in a targeted manner based on the determined condition.
In another embodiment of the present application, the comparing the number of test objects included in each video frame in the initial video with the number of test objects included 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 initial 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 the test objects displayed in the number display area by each video frame in the initial video frame to form a third number sequence, and arranging the number of the test objects displayed in the number display area by each video frame in the transcoded video frame to form a fourth number sequence;
comparing the first number of sequences to the second number of sequences and the third number of sequences to the fourth number of sequences;
determining that the initial video transcoding is successful if the first number of sequences and the second number of sequences all match or the third number of sequences and the fourth number of sequences all match.
In practical application, the initial video may be lost in the transcoding process or the number of test objects in the number display area, and the possibility of losing the two at the same time is low, so that the number of test objects before and after transcoding and the number of test objects in the number display area before and after transcoding are compared and counted at the same time, and when the number of any one test object is matched, the initial video transcoding can be successfully performed, and when the number of any one test object is not matched, the initial video transcoding can be failed.
In specific implementation, the manner of obtaining and comparing the first number of sequences, the second number of sequences, the third number of sequences and the fourth number of sequences may be referred to the above embodiments, and will not be described herein again.
In the embodiment of the application, in order to guarantee the accuracy of initial video transcoding result, compare two kinds of test object's quantity simultaneously, under the condition that arbitrary comparison result matches, then can think that the transcoding result of initial video is successful, video transcoding system does not have the transcoding quality problem, can pass through the difference of the video before and after the transcoding through this kind of mode, and whether automatic judgement this video transcoding system has the transcoding quality problem, promotes user experience.
Corresponding to the above method embodiment, the present application further provides an embodiment of a video processing apparatus, and fig. 5 shows a schematic structural diagram of a video processing apparatus provided in an embodiment of the present application. As shown in fig. 5, the apparatus includes:
a video generating module 502 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 with an increasing number frame by frame;
the video transcoding module 504 is configured to send the initial video to a preset video transcoding system for video transcoding, and receive a transcoded video returned by the video transcoding system;
an object number determination module 506, configured to 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;
a transcoding result determining module 508 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 a transcoding result of the initial video.
Optionally, the apparatus further includes:
a quantity presentation module configured to:
setting a number display area of a test object at a preset position of each video frame of the initial video;
and placing the number of the test objects contained in each video frame of the initial video in the number display area.
Optionally, the apparatus further includes:
the number identification module is configured to identify the number of the test objects displayed in the number display area by each video frame in the transcoded video through a preset identification algorithm.
Optionally, the transcoding result determining module 508 is configured to:
arranging the number of test objects contained in each video frame in the initial 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;
and comparing the first number of sequences with the second number of sequences, and determining that the initial video transcoding is successful under the condition that the first number of sequences and the second number of sequences are all matched.
Optionally, the transcoding result determining module 508 is configured to:
arranging the number of the test objects displayed in the number display area by each video frame in the initial video frame to form a third number sequence, and arranging the number of the test objects displayed in the number display area by each video frame in the transcoded video frame to form a fourth number sequence;
comparing the third number of sequences with the fourth number of sequences, and determining that the initial video transcoding is successful under the condition that the third number of sequences and the fourth number of sequences are all matched.
Optionally, the apparatus further includes: a first verification module configured to:
under the condition that the first number sequence does not match with the second number sequence, determining video frames corresponding to the number of unmatched first number sequence and the second number sequence, and taking the video frames corresponding to the number of unmatched first number sequence and the number of unmatched second number sequence as verification video frames;
and under the condition that the verification video frame meets the preset transcoding condition, determining that the initial video transcoding is successful.
Optionally, the apparatus further includes: a first verification module configured to:
under the condition that the third number of sequences does not match with the fourth number of sequences, determining video frames corresponding to the number of unmatched sequences in the third number of sequences and the fourth number of sequences, and taking the video frames corresponding to the number of unmatched sequences in the third number of sequences and the fourth number of sequences as verification video frames;
and under the condition that the verification video frame meets the preset transcoding condition, determining that the initial video transcoding is successful.
Optionally, the transcoding result determining module 508 is configured to:
arranging the number of test objects contained in each video frame in the initial 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 the test objects displayed in the number display area by each video frame in the initial video frame to form a third number sequence, and arranging the number of the test objects displayed in the number display area by each video frame in the transcoded video frame to form a fourth number sequence;
comparing the first number of sequences to the second number of sequences and the third number of sequences to the fourth number of sequences;
determining that the initial video transcoding is successful if the first number of sequences and the second number of sequences all match or the third number of sequences and the fourth number of sequences all match.
Optionally, the video generating module 502 is configured to:
generating an initial video comprising a plurality of video frames composed of a base map of a first pixel and a test object of a second pixel based on a preset video rule, wherein the similarity of the first pixel and the second pixel is less than or equal to a preset similarity threshold.
According to the video processing device provided by the embodiment of the application, the test object is arranged in each video frame of the initial video, the test object in each video frame of the transcoded video corresponding to the initial video is obtained, and whether the number of the test objects in each video frame of the initial video is consistent with the number of the test objects in each video frame of the transcoded video or not is compared according to the arrangement sequence of the video frames, so that whether the problems of frame loss and frame drop of the transcoded video occur or not can be quickly and accurately judged.
The above is a schematic scheme of a video processing apparatus of the present embodiment. It should be noted that the technical solution of the video processing apparatus belongs to the same concept as the technical solution of the video processing method, and details that are not described in detail in the technical solution of the video processing apparatus can be referred to the description of the technical solution of the video processing method.
Referring to fig. 6, fig. 6 illustrates a block diagram of a computing device 600 provided in accordance with an embodiment of the present application. The components of the computing device 600 include, but are not limited to, a memory 610 and a processor 620. The processor 620 is coupled to the memory 610 via a bus 630 and a database 650 is used to store data.
Computing device 600 also includes access device 640, access device 640 enabling computing device 600 to communicate via one or more networks 660. Examples of such networks include the 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. 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 IEEE802.11 Wireless Local Area Network (WLAN) wireless interface, a worldwide 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 so forth.
In one embodiment of the present application, the above-described components of computing device 600, as well as other components not shown in FIG. 6, may also be connected to each other, such as by a bus. It should be understood that the block diagram of the computing device architecture shown in FIG. 6 is for purposes of example only and is not limiting as to the scope of the present application. Those skilled in the art may add or replace other components as desired.
Computing device 600 may be any type of stationary or mobile computing device, including a mobile computer or mobile computing device (e.g., tablet, personal digital assistant, laptop, notebook, netbook, etc.), mobile phone (e.g., smartphone), wearable computing device (e.g., smartwatch, smartglasses, etc.), or other type of mobile device, or a stationary computing device such as a desktop computer or PC. Computing device 600 may also be a mobile or stationary server.
Wherein the processor 620 is configured to execute computer-executable instructions that when executed by the processor 620 implement the steps of the video processing method.
The above is an illustrative scheme of a computing device of the present embodiment. It should be noted that the technical solution of the computing device and the technical solution of the video processing method belong to the same concept, and for details that are not described in detail in the technical solution of the computing device, reference may be made to the description of the technical solution of the video processing method.
An embodiment of the present application further provides a computer readable storage medium, which stores computer instructions, and when the instructions are executed by a processor, the instructions implement the steps of the video processing method as described above.
The above is an illustrative scheme of a computer-readable storage medium of the present embodiment. It should be noted that the technical solution of the storage medium belongs to the same concept as the technical solution of the above-mentioned video processing method, and details that are not described in detail in the technical solution of the storage medium can be referred to the description of the technical solution of the above-mentioned video processing method.
The foregoing description has been directed to specific embodiments of this application. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing may also be possible or may be advantageous.
The computer instructions comprise computer program code which may be in the form of source code, object code, an executable file or some intermediate form, or the like. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
It should be noted that, for the sake of simplicity, the above-mentioned method embodiments are described as a series of acts or combinations, but those skilled in the art should understand that the present application is not limited by the described order of acts, as some steps may be performed in other orders or simultaneously according to the present application. Further, those skilled in the art should also appreciate that the embodiments described in the specification are preferred embodiments and that the acts and modules referred to are not necessarily required in this application.
In the foregoing embodiments, the descriptions of the respective embodiments have respective emphasis, and for parts that are not described in detail in a certain embodiment, reference may be made to the related descriptions of other embodiments.
The preferred embodiments of the present application disclosed above are intended only to aid in the explanation of the application. Alternative embodiments are not exhaustive and do not limit the invention to the precise embodiments described. Obviously, many modifications and variations are possible in light of the above teaching. The embodiments were chosen and described in order to best explain the principles of the application and its practical applications, to thereby enable others skilled in the art to best understand and utilize the application. The application is limited only by the claims and their full scope and equivalents.
Claims (12)
1. A video processing method, comprising:
generating an initial video comprising a plurality of video frames based on a preset video rule, wherein each video frame comprises at least one test object with the quantity increasing frame by frame;
sending the initial video to a preset video transcoding system for video transcoding, and receiving a 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 sequence of the video frames in the transcoded video;
and comparing the number of the test objects contained in each video frame in the initial video with the number of the test objects contained in each video frame in the transcoded video to determine the transcoding result of the initial video.
2. The video processing method according to claim 1, wherein after generating the initial video comprising a plurality of video frames based on the preset video rule, further comprising:
setting a number display area of a test object at a preset position of each video frame of the initial video;
and placing the number of the test objects contained in each video frame of the initial video in the number display area.
3. The video processing method according to claim 2, wherein after sending the initial video to a preset video transcoding system for video transcoding and receiving a transcoded video returned by the video transcoding system, the method further comprises:
and identifying the number of the test objects displayed in the number display area by each video frame in the transcoded video through a preset identification algorithm.
4. The method according to claim 1 or 3, wherein the 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 to determine the transcoding result of the initial video comprises:
arranging the number of test objects contained in each video frame in the initial 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;
and comparing the first number sequence with the second number sequence, and determining that the initial video transcoding is successful under the condition that the first number sequence is completely matched with the second number sequence.
5. The method of claim 3, wherein 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 to determine the transcoding result of the initial video comprises:
arranging the number of the test objects displayed in the number display area by each video frame in the initial video frame to form a third number sequence, and arranging the number of the test objects displayed in the number display area by each video frame in the transcoded video frame to form a fourth number sequence;
comparing the third number of sequences with the fourth number of sequences, and determining that the initial video transcoding is successful under the condition that the third number of sequences and the fourth number of sequences are all matched.
6. The method of claim 4, wherein after the comparing the first number of sequences to the second number of sequences, further comprising:
under the condition that the first number sequence does not match with the second number sequence, determining video frames corresponding to the number of unmatched first number sequence and the second number sequence, and taking the video frames corresponding to the number of unmatched first number sequence and the number of unmatched second number sequence as verification video frames;
and under the condition that the verification video frame meets the preset transcoding condition, determining that the initial video transcoding is successful.
7. The method of claim 5, wherein after the comparing the third number of sequences to the fourth number of sequences, further comprising:
under the condition that the third number of sequences does not match with the fourth number of sequences, determining video frames corresponding to the number of unmatched sequences in the third number of sequences and the fourth number of sequences, and taking the video frames corresponding to the number of unmatched sequences in the third number of sequences and the fourth number of sequences as verification video frames;
and under the condition that the verification video frame meets the preset transcoding condition, determining that the initial video transcoding is successful.
8. The method of claim 3, wherein 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 to determine the transcoding result of the initial video comprises:
arranging the number of test objects contained in each video frame in the initial 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 the test objects displayed in the number display area by each video frame in the initial video frame to form a third number sequence, and arranging the number of the test objects displayed in the number display area by each video frame in the transcoded video frame to form a fourth number sequence;
aligning the first number of sequences to the second number of sequences and the third number of sequences to the fourth number of sequences;
determining that the initial video transcoding is successful if the first number of sequences and the second number of sequences all match or the third number of sequences and the fourth number of sequences all match.
9. The video processing method according to any one of claims 1 to 3, wherein the generating an initial video comprising a plurality of video frames based on a preset video rule comprises:
generating an initial video comprising a plurality of video frames composed of a base map of a first pixel and a test object of a second pixel based on a preset video rule, wherein the similarity of the first pixel and the second pixel is less than or equal to a preset similarity threshold.
10. A video processing apparatus, comprising:
the video generation module is configured to generate an initial video comprising a plurality of video frames based on a preset video rule, wherein each video frame comprises at least one test object with the quantity increasing frame by frame;
the video transcoding module is configured to send the initial video to a preset video transcoding system for video transcoding and receive a transcoded video returned by the video transcoding system;
the object quantity determining module is configured to determine the quantity of test objects contained in each video frame in the transcoded video according to the arrangement sequence of the video frames in the transcoded video;
the transcoding result determining module is configured to compare the number of the test objects contained in each video frame in the initial video with the number of the 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 on the memory and executable on the processor, wherein the processor implements the steps of the method of any one of claims 1-9 when executing the instructions.
12. A computer-readable storage medium storing computer instructions, which when executed by a processor, perform the steps of the method of any one of claims 1 to 9.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011450293.5A CN114630103A (en) | 2020-12-11 | 2020-12-11 | Video processing method and device |
US17/547,165 US12113993B2 (en) | 2020-12-11 | 2021-12-09 | Video processing method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202011450293.5A CN114630103A (en) | 2020-12-11 | 2020-12-11 | Video processing method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114630103A true CN114630103A (en) | 2022-06-14 |
Family
ID=81895569
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202011450293.5A Pending CN114630103A (en) | 2020-12-11 | 2020-12-11 | Video processing method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114630103A (en) |
-
2020
- 2020-12-11 CN CN202011450293.5A patent/CN114630103A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20230116801A1 (en) | Image authenticity detection method and device, computer device, and storage medium | |
CN111767883B (en) | Question correction method and device | |
CN111343496A (en) | Video processing method and device | |
CN114170468B (en) | Text recognition method, storage medium and computer terminal | |
CN111985281A (en) | Image generation model generation method and device and image generation method and device | |
CN112381092A (en) | Tracking method, device and computer readable storage medium | |
CN112163993A (en) | Image processing method, device, equipment and storage medium | |
CN115396705A (en) | Screen projection operation verification method, platform and system | |
CN112183594B (en) | Bill image processing method and device, storage medium and electronic equipment | |
CN114630103A (en) | Video processing method and device | |
CN111666884A (en) | Living body detection method, living body detection device, computer-readable medium, and electronic apparatus | |
CN116434312A (en) | Safety detection method and device for image recognition model | |
CN107563362B (en) | Method, client and system for evaluation operation | |
CN114356860B (en) | Dialog generation method and device | |
CN113365145B (en) | Video processing method, video playing method, video processing device, video playing device, computer equipment and storage medium | |
US12113993B2 (en) | Video processing method and device | |
CN114630147B (en) | Video processing method and device | |
CN114630148B (en) | Video processing method and device | |
CN111754518A (en) | Image set expansion method and device and electronic equipment | |
CN113128261A (en) | Data processing method and device and video processing method and device | |
CN115965848B (en) | Image processing method and related device | |
CN115604448B (en) | Projection method, projection system and projector for improving color gamut | |
CN113709563B (en) | Video cover selecting method and device, storage medium and electronic equipment | |
CN114070950B (en) | Image processing method, related device and equipment | |
CN115049746B (en) | Image color correction method, device, electronic equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination |