Video detection method, device and equipment and computer readable storage medium
By playing preset test videos and analyzing the identification in the recorded video file, the problem of strong subjectivity of existing video detection methods is solved, objective recognition and accurate detection of video files are achieved, and the accuracy of video detection is improved.
Patent Information
- Application Number
- CN202310866572.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-07-14
- Publication Date
- 2025-01-14
AI Technical Summary
The existing video detection methods are highly subjective, resulting in low accuracy of video detection and inability to effectively detect whether there are lags and frame drops in videos.
By playing the preset test video, it contains the marks that conform to the preset rules, record the video file, and analyze the marks in the recorded video file to determine whether they conform to the preset rules, and identify video abnormal information, such as lag and frame drops.
It realizes a more objective identification of whether there are lags and frame drops in video files, avoids the subjectivity brought by manual detection, and improves the accuracy of video detection.
Smart Images

Figure CN119316663A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to a video detection method, device, equipment and computer-readable storage medium. Background Art
[0002] With the rapid development of science and technology, video has become more and more popular as an important way of information dissemination. Various types of video shooting equipment have emerged one after another, and it is necessary to evaluate the quality of the videos shot by the shooting equipment.
[0003] Currently, the common evaluation of video quality can usually be done through aspects such as Y (brightness), U (chroma), V (density), freeze, frame loss, and resolution that people can feel. Among them, YUV can be measured after being numerically transformed by sensors. However, there is no particularly effective detection method for video freezes and frame losses. The current way to detect whether a video has freezes, frame losses, and other problems is to watch and evaluate it manually. Due to differences in individual perception, the current video detection method is highly subjective, resulting in low accuracy of video detection. Summary of the invention
[0004] The main purpose of this application is to provide a video detection method, device, equipment and computer-readable storage medium, aiming to solve the technical problem that the current video detection method is highly subjective, resulting in low accuracy of video detection.
[0005] To achieve the above object, the present application provides a video detection method, which is applied to a video detection device. The video detection method includes:
[0006] Playing a preset test video, wherein each frame of the preset test video contains a corresponding first identifier that conforms to a preset rule;
[0007] The preset test video being played is shot based on a preset shooting device to obtain a recorded video file; the second identifier of each frame image in the recorded video file is analyzed to determine the video abnormality information of the recorded video file.
[0008] Optionally, before the step of playing the preset test video, the method further comprises:
[0009] Adding a first mark of a preset rule at a designated position of each preset image in sequence;
[0010] The preset images to which the first identification has been added are merged into a preset test video.
[0011] Optionally, the step of analyzing the second identifier of each frame image in the recorded video file to determine the video abnormality information of the recorded video file includes:
[0012] Identify each frame of the image in the recorded video file to obtain a second identifier of the recorded video file;
[0013] According to a preset rule corresponding to the second identifier and the first identifier, video abnormality information of the recorded video file is determined.
[0014] Optionally, the preset rule is an arithmetic progression, and the step of determining the video abnormality information of the recorded video file according to the preset rule corresponding to the second identifier and the first identifier includes:
[0015] Generate a corresponding identification difference sequence according to the identification value corresponding to the second identification;
[0016] Determine whether the identification difference sequence matches the difference of the arithmetic progression;
[0017] If the identification difference sequence does not match the difference of the arithmetic progression, it is determined that the recorded video file has a video anomaly, and peaks and troughs of the identification difference sequence are identified to obtain video anomaly information of the recorded video file.
[0018] Optionally, the step of performing peak and trough identification on the identification difference sequence to obtain video anomaly information of the recorded video file includes:
[0019] If a peak appears in the identification difference sequence and the identification difference of the peak is greater than a preset peak threshold, it is determined that frame loss occurs in the recorded video file as video abnormality information;
[0020] If a trough appears in the identification difference sequence and the identification difference of the trough is less than a preset trough threshold, it is determined that a freeze occurs in the recorded video file as video abnormality information.
[0021] Optionally, if a trough appears in the identification difference sequence and the identification difference of the trough is less than a preset trough threshold, the step of determining that a freeze occurs in the recorded video file as the video abnormality information further includes:
[0022] If a trough appears in the identification difference sequence and the identification difference of the trough is less than a preset trough threshold, then obtaining the number of continuous frames in which the identification difference is less than the preset trough threshold;
[0023] Determine whether the continuous frame number is greater than a preset frame number threshold;
[0024] If the continuous frame number is greater than a preset frame number threshold, determining that the recorded video file is stuck as video abnormality information;
[0025] If the continuous frame number is greater than a preset frame number threshold, it is determined that no freeze occurs in the recorded video file.
[0026] Optionally, before the step of analyzing the second identifier of each frame image in the recorded video file to determine the video abnormality information of the recorded video file, the step includes:
[0027] Converting the recorded video file into an audio-video interleaved format to obtain a file to be analyzed;
[0028] Generate a new recorded video file based on the file to be analyzed.
[0029] The present application also provides a video detection device, which is applied to a video detection device, and the video detection device includes:
[0030] A playing module, used for playing a preset test video, wherein each frame of the preset test video contains a corresponding first identifier that conforms to a preset rule;
[0031] A recording module, used to shoot the played preset test video based on a preset shooting device to obtain a recorded video file;
[0032] The identification module is used to analyze the second identifier of each frame image in the recorded video file to determine the video abnormality information of the recorded video file.
[0033] Optionally, the video detection device further includes: a video synthesis module, configured to:
[0034] Adding a first mark of a preset rule at a designated position of each preset image in sequence;
[0035] The preset images to which the first identification has been added are merged into a preset test video.
[0036] Optionally, the identification module is further configured to:
[0037] Identify each frame of the image in the recorded video file to obtain a second identifier of the recorded video file;
[0038] According to a preset rule corresponding to the second identifier and the first identifier, video abnormality information of the recorded video file is determined.
[0039] Optionally, the preset rule is an arithmetic progression, and the identification module is further used to:
[0040] Generate a corresponding identification difference sequence according to the identification value corresponding to the second identification;
[0041] Determine whether the identification difference sequence matches the difference of the arithmetic progression;
[0042] If the identification difference sequence does not match the difference of the arithmetic progression, it is determined that the recorded video file has a video anomaly, and peaks and troughs of the identification difference sequence are identified to obtain video anomaly information of the recorded video file.
[0043] Optionally, the identification module is further configured to:
[0044] If a peak appears in the identification difference sequence and the identification difference of the peak is greater than a preset peak threshold, it is determined that frame loss occurs in the recorded video file as video abnormality information;
[0045] If a trough appears in the identification difference sequence and the identification difference of the trough is less than a preset trough threshold, it is determined that a freeze occurs in the recorded video file as video abnormality information.
[0046] Optionally, the identification module is further configured to:
[0047] If a trough appears in the identification difference sequence and the identification difference of the trough is less than a preset trough threshold, then obtaining the number of continuous frames in which the identification difference is less than the preset trough threshold;
[0048] Determine whether the continuous frame number is greater than a preset frame number threshold;
[0049] If the continuous frame number is greater than a preset frame number threshold, determining that the recorded video file is stuck as video abnormality information;
[0050] If the continuous frame number is greater than a preset frame number threshold, it is determined that no freeze occurs in the recorded video file.
[0051] Optionally, the video detection device further includes: a format conversion module, configured to:
[0052] Converting the recorded video file into an audio-video interleaved format to obtain a file to be analyzed;
[0053] Generate a new recorded video file based on the file to be analyzed.
[0054] The present application also provides a video detection device, which includes: a memory, a processor, and a program of a video detection method stored in the memory and executable on the processor. When the program of the video detection method is executed by the processor, the steps of the video detection method as described above can be implemented.
[0055] The present application also provides a computer-readable storage medium, on which is stored a program for implementing the video detection method. When the program of the video detection method is executed by a processor, the steps of the video detection method as described above are implemented.
[0056] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned video detection method when executed by a processor.
[0057] The present application provides a video detection method, apparatus, device and computer-readable storage medium, which plays a preset test video, wherein each frame of the preset test video contains a corresponding first identifier that conforms to a preset rule, and then shoots the played preset test video based on a preset shooting device to obtain a recorded video file. Then, the second identifier of each frame of the recorded video file is analyzed, and the video anomaly information of the recorded video file is determined by judging whether the second identifier conforms to the preset rule. The present application can more objectively identify the difference between the recorded video file and the preset test video by determining whether the second identifier of the recorded video file conforms to the preset rule of the first identifier in the preset test video, thereby determining whether the recorded video file shot by the preset shooting device has anomalies such as freezes and frame drops, thereby avoiding the subjectivity brought by manual detection. Therefore, the present application solves the technical problem that the current video detection method is highly subjective, resulting in low accuracy of video detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0058] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0059] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0060] Figure 1 This is a flow chart of the first embodiment of the video detection method of the present application;
[0061] Figure 2 A schematic diagram of a preset image involved in an embodiment of the present application;
[0062] Figure 3 A schematic diagram of a recorded video file involved in the solution of this embodiment;
[0063] Figure 4 This is a flow chart of the second embodiment of the video detection method of the present application;
[0064] Figure 5 A schematic diagram of an identification difference sequence involved in an embodiment of the present application;
[0065] Figure 6 This is a schematic diagram of the structure of a video detection device in an embodiment of the present application;
[0066] Figure 7 A schematic diagram of the device structure of the hardware operating environment involved in the embodiments of the present application.
[0067] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0068] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and understandable, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work belong to the scope of protection of this application.
[0069] Reference Figure 1 , Figure 1 This is a flow chart of the first embodiment of the video detection method of the present application. The present application provides a video detection method. In the first embodiment of the video detection method of the present application, the video detection method includes:
[0070] Step S100, playing a preset test video, wherein each frame of the preset test video contains a corresponding first identifier that complies with a preset rule;
[0071] In this embodiment, it should be noted that each frame of the preset test video contains a corresponding first identifier that conforms to a preset rule. The first identifier can be used to identify each frame of the preset test video in the form of numbers, text, graphics, etc., and the preset rule is a change rule of the first identifier, such as an arithmetic progression, a geometric progression, an increasing rule, a cyclic rule, etc. Exemplarily, the first identifier can be an arithmetic progression of 289, 290, 291...314, or it can be an arithmetic progression starting from 285 and adding 1 successively, and then subtracting 1 successively after accumulating to 314, and then adding 1 again after reaching 285, and then repeating in this way (285, 286...314, 313...285, 286...).
[0072] As an example, a preset test video can be played through a display device, in which each frame of the preset test video includes a first identification of an identification number, and the identification numbers of each frame of the image are in an arithmetic progression. In order to improve the recognition of subsequent identification, the color of the identification number can be a differentiated color from the background color of the identification number (that is, the color of the identification number is different from the background color). For example, the color of the identification number is white, and the background color of the identification number is blue.
[0073] Before the step of playing the preset test video in step S100, the following steps are included:
[0074] Step S110, adding a first mark of a preset rule at a designated position of each preset image in sequence;
[0075] Step S120: merging the preset images to which the first mark has been added into a preset test video.
[0076] In this embodiment, it should be noted that the preset image may be a pure color image or an image with content (such as scenery, characters, etc.). The designated position may be any position of the preset image, such as the middle, corner, etc.
[0077] In this embodiment, the first mark of the preset rule can be added to the specified position of each preset image in sequence, wherein the number of the preset images can be selected according to specific needs, such as 30, 60, etc. Then, the preset images to which the first mark has been added are merged in the sequence, and the corresponding preset test video can be obtained. For example, referring to Figure 2 , Figure 2 A schematic diagram of a preset image involved in an embodiment of the present application. Figure 2 In the embodiment, the first identifiers 289, 290, 291, ..., 293 and other numerical values of the preset rules are sequentially added to the designated positions of the preset images. Then, the preset images to which the first identifiers have been added are merged into a preset test video. Thus, the present embodiment obtains a preset test video that can be used to detect the quality of the video shot by the shooting device.
[0078] Step S200, shooting the played preset test video based on a preset shooting device to obtain a recorded video file;
[0079] In this embodiment, it should be noted that the preset shooting device is a shooting device that needs to detect the quality of the shot video, such as a digital camera, a mobile phone, a camera and other devices.
[0080] As an example, a preset shooting device may be controlled to shoot the played preset test video to obtain a recorded video file.
[0081] Step S300: Analyze the second identifier of each frame image in the recorded video file to determine video abnormality information of the recorded video file.
[0082] In this embodiment, the second identifier is an identifier obtained by photographing the first identifier in the played preset test video.
[0083] As an example, the second identifier of each frame image in the recorded video file can be analyzed to determine whether the second identifier complies with the preset rule. If the second identifier complies with the preset rule, it means that the recorded video file recorded by the preset shooting device is consistent with the preset test video, and it is determined that the recorded video file has no freezes and / or frame drops. If the second identifier does not comply with the preset rule, it means that the recorded video file recorded by the preset shooting device is inconsistent with the preset test video, and it is determined that the recorded video file has freezes and / or frame drops. Therefore, whether the recorded video file has freezes and / or frame drops can be used as video abnormality information of the recorded video file.
[0084] Wherein, before the step of analyzing the second identifier of each frame image in the recorded video file to determine the video abnormality information of the recorded video file in step S300, the following steps are included:
[0085] Step S210, converting the recorded video file into an audio-video interleaved format to obtain a file to be analyzed;
[0086] Step S220: generating a new recorded video file according to the file to be analyzed.
[0087] In this embodiment, it should be noted that, see Figure 3 , Figure 3 FIG. 1 is a schematic diagram of a recorded video file involved in the solution of this embodiment. Figure 3 It can be seen that in the actual test, due to the key frame characteristics of the mp4 (Moving Picture Experts Group 4) format video file itself, in order to display more smoothly, there will be overlapping gradients between adjacent frames. Although this phenomenon of mp4 format video files will make the displayed picture smoother, it is indeed disastrous for the subsequent recognition process of the second logo, which may cause the failure to correctly recognize the overlapping numbers, or misrecognition caused by recognition errors.
[0088] As an example, the recorded video file can be converted into an audio video interleaved format (AVI) by a format conversion tool (such as FFmpeg, Fast Forward Mpeg) to obtain a file to be analyzed. Then, the file to be analyzed can be directly used as a new recorded video file. As another example, in order to improve the subsequent recognition efficiency of recorded video files, the file to be analyzed can be intercepted according to a preset number of intercepted frames (such as 30 frames, 60 frames, etc.) to obtain a new recorded video file. Therefore, there is no need to identify the entire video file, and only a portion of the frames can be intercepted for recognition.
[0089] In the first embodiment of the present application, a preset test video is played, wherein each frame image in the preset test video contains a corresponding first identifier that conforms to a preset rule, and then the played preset test video is photographed based on a preset shooting device to obtain a recorded video file. Then, the second identifier of each frame image in the recorded video file is analyzed, and by judging whether the second identifier conforms to the preset rule, the video anomaly information of the recorded video file is determined. The present application can more objectively identify the difference between the recorded video file and the preset test video by determining whether the second identifier of the recorded video file conforms to the preset rule of the first identifier in the preset test video, thereby determining whether the recorded video file shot by the preset shooting device has anomalies such as freezes and frame drops, thereby avoiding the subjectivity brought by manual detection. Therefore, the present application solves the technical problem that the current video detection method is highly subjective, resulting in low accuracy of video detection.
[0090] Further, refer to Figure 4 , Figure 4 This is a flow chart of the second embodiment of the video detection method of the present application.
[0091] Based on the first embodiment of the present application, in another embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above description, and will not be described in detail later. The step of analyzing the second identifier of each frame image in the recorded video file in step S300 to determine the video abnormality information of the recorded video file includes:
[0092] Step S310, identifying each frame of the image in the recorded video file to obtain a second identifier of the recorded video file;
[0093] Step S320: determining the video abnormality information of the recorded video file according to a preset rule corresponding to the second identifier and the first identifier.
[0094] In this embodiment, each frame of the recorded video file is obtained by splitting the recorded video file. Then, each frame of the recorded video file is identified to obtain the second identifier of the recorded video file. As an example, if the first identifier is text or numbers, each frame of the recorded video file can be identified by OCR (Optical Character Recognition) to obtain the second identifier of the recorded video file. If the first identifier is a graphic, each frame of the recorded video file can be identified by Hough transform, local operator extraction, grayscale extraction, etc. to obtain the second identifier of the recorded video file. Then, it can be determined whether the second identifier conforms to the preset rule corresponding to the first identifier, and the video abnormality information of the recorded video file is determined. If the second identifier conforms to the preset rule, it means that the recorded video file recorded by the preset shooting device is consistent with the preset test video, and it is determined that the recorded video file does not have freezes and / or frame drops. If the second identifier does not conform to the preset rule, it means that the recorded video file recorded by the preset shooting device is inconsistent with the preset test video, and it is determined that the recorded video file has freezes and / or frame drops. Therefore, whether the recorded video file has freezes and / or frame losses can be used as the video abnormality information of the recorded video file.
[0095] Wherein, the preset rule is an arithmetic progression, and the step of determining the video abnormality information of the recorded video file according to the preset rule corresponding to the second identifier and the first identifier in step S320 includes:
[0096] Step S321, generating a corresponding identification difference sequence according to the identification value corresponding to the second identification;
[0097] Step S322, determining whether the identification difference sequence matches the difference of the arithmetic progression;
[0098] Step S323: If the identification difference sequence does not match the difference of the arithmetic progression, it is determined that the recorded video file has a video anomaly, and peak and trough identification is performed on the identification difference sequence to obtain video anomaly information of the recorded video file.
[0099] In this embodiment, the preset rule is an arithmetic progression, and the difference value of the arithmetic progression can be 1, 2, 3, etc. Exemplarily, the arithmetic progression starts from 285 and adds 1 to the value of each frame image, accumulating to 314.
[0100] As an example, after obtaining the identification values corresponding to the second identification, by calculating the identification difference between the identification values of the previous and next frame images, a corresponding identification difference sequence can be generated according to the identification difference. Figure 5 , Figure 5 A schematic diagram of an identification difference sequence involved in an embodiment of the present application. Figure 5 The horizontal axis is the order of each frame image in the recorded video file, and the vertical axis is the identification difference. Therefore, it can be determined whether the recorded video file has a video anomaly by judging whether the identification difference sequence matches the difference of the arithmetic sequence. If the identification difference sequence does not match the difference of the arithmetic sequence, it is determined that the recorded video file has a video anomaly. If the identification difference sequence matches the difference of the arithmetic sequence, it is determined that the recorded video file does not have a video anomaly. That is, the identification difference in the identification difference sequence is consistent with the difference of the arithmetic sequence, which means that the recorded video file is consistent with the preset test video, and no frame loss or jamming occurs. If frame loss occurs, the identification difference in the identification difference sequence will be greater than the difference of the arithmetic sequence (i.e., a peak is generated). If jamming occurs, the identification difference in the identification difference sequence is zero (i.e., a trough is generated). Thus, the identification difference sequence is identified by peaks and troughs, and then it is specifically determined that the recorded video file has frame loss and / or jamming, and the video anomaly information of the recorded video file is obtained.
[0101] The step of performing peak and trough identification on the identification difference sequence to obtain video abnormality information of the recorded video file in step S323 includes:
[0102] Step A10, if a peak appears in the identification difference sequence and the identification difference of the peak is greater than a preset peak threshold, it is determined that frame loss occurs in the recorded video file as video abnormality information;
[0103] Step A20: If a trough appears in the identification difference sequence and the identification difference of the trough is less than a preset trough threshold, it is determined that a freeze occurs in the recorded video file as video abnormality information.
[0104] In this embodiment, it should be noted that the duration of each frame of the 30-frame video is 33ms. After actual experiments, if the video playback delay reaches 200ms, people will feel obvious freezes. The corresponding number of frames after conversion is 6 frames.
[0105] In this embodiment, if a peak appears in the identification difference sequence and the identification difference of the peak is greater than a preset peak threshold (such as 2, 3, 6), it is determined that frame loss occurs in the recorded video file as video abnormality information. The preset peak threshold is the frame loss difference of the arithmetic progression corresponding to the preset number of frame loss. Exemplarily, the difference of the arithmetic progression is 1, the preset number of frame loss is 6, and the preset peak threshold is 6. If a trough appears in the identification difference sequence and the identification difference of the trough is less than the preset trough threshold, it is determined that freeze occurs in the recorded video file as video abnormality information. The preset trough threshold is the frame loss difference of the arithmetic progression corresponding to the preset number of freeze frames.
[0106] This embodiment sets a preset peak threshold and a preset trough threshold to identify peaks and troughs of the identification difference sequence, thereby avoiding the situation where the recorded video file is judged to have video abnormalities due to frame loss and freezes that are difficult to detect with the naked eye, so that the detection results of the video detection method of this embodiment are more in line with the actual usage experience of the user.
[0107] Among them, if the identification difference sequence has a trough and the identification difference of the trough is less than a preset trough threshold, the step of determining that the recorded video file has a freeze as the video abnormality information in step A20 also includes:
[0108] Step B10, if a trough appears in the identification difference sequence and the identification difference of the trough is less than a preset trough threshold, obtaining the number of continuous frames in which the identification difference is less than the preset trough threshold;
[0109] Step B20, determining whether the continuous frame number is greater than a preset frame number threshold;
[0110] Step B30, if the continuous frame number is greater than a preset frame number threshold, determining that the recorded video file is stuck as video abnormality information;
[0111] Step B40: If the continuous frame number is greater than a preset frame number threshold, it is determined that there is no freeze in the recorded video file.
[0112] In this embodiment, it should be noted that if the second identifier of the first image in the recorded video file cannot be identified, the second identifier of the previous frame of the first image is used as the second identifier of the first image. This method will cause non-stuttering zero values to appear in the identifier difference sequence. Therefore, the judgment of stuttering requires that the identifier difference in the identifier difference sequence is not strictly required to be the difference of the arithmetic progression. When there are identifier differences that are continuously less than the preset trough threshold (such as continuous 0s), it is determined that stuttering occurs.
[0113] In this embodiment, when a trough appears in the identification difference sequence and the identification difference of the trough is less than the preset trough threshold, the number of continuous frames in which the identification difference is less than the preset trough threshold is obtained. Then, it is determined whether the continuous number of frames is greater than the preset frame number threshold. If the continuous number of frames is greater than the preset frame number threshold, it is determined that the recorded video file has a freeze as video abnormality information. If the continuous number of frames is greater than the preset frame number threshold, it is determined that the recorded video file has no freeze. Therefore, this embodiment further improves the accuracy of freeze detection in video detection.
[0114] Reference Figure 6 , Figure 6 A video detection device is also provided for an embodiment of the present application. The video detection device is applied to a video detection device. The video detection device includes:
[0115] A playing module 10 is used to play a preset test video, wherein each frame of the preset test video contains a corresponding first identifier that conforms to a preset rule;
[0116] The recording module 20 is used to shoot the played preset test video based on a preset shooting device to obtain a recorded video file;
[0117] The identification module 30 is used to analyze the second identifier of each frame image in the recorded video file to determine the video abnormality information of the recorded video file.
[0118] Optionally, the video detection device further includes: a video synthesis module, configured to:
[0119] Adding a first mark of a preset rule at a designated position of each preset image in sequence;
[0120] The preset images to which the first identification has been added are merged into a preset test video.
[0121] Optionally, the identification module 30 is further configured to:
[0122] Identify each frame of the image in the recorded video file to obtain a second identifier of the recorded video file;
[0123] According to a preset rule corresponding to the second identifier and the first identifier, video abnormality information of the recorded video file is determined.
[0124] Optionally, the preset rule is an arithmetic progression, and the identification module 30 is further used to:
[0125] Generate a corresponding identification difference sequence according to the identification value corresponding to the second identification;
[0126] Determine whether the identification difference sequence matches the difference of the arithmetic progression;
[0127] If the identification difference sequence does not match the difference of the arithmetic progression, it is determined that the recorded video file has a video anomaly, and peaks and troughs of the identification difference sequence are identified to obtain video anomaly information of the recorded video file.
[0128] Optionally, the identification module 30 is further configured to:
[0129] If a peak appears in the identification difference sequence and the identification difference of the peak is greater than a preset peak threshold, it is determined that frame loss occurs in the recorded video file as video abnormality information;
[0130] If a trough appears in the identification difference sequence and the identification difference of the trough is less than a preset trough threshold, it is determined that a freeze occurs in the recorded video file as video abnormality information.
[0131] Optionally, the identification module 30 is further configured to:
[0132] If a trough appears in the identification difference sequence and the identification difference of the trough is less than a preset trough threshold, then obtaining the number of continuous frames in which the identification difference is less than the preset trough threshold;
[0133] Determine whether the continuous frame number is greater than a preset frame number threshold;
[0134] If the continuous frame number is greater than a preset frame number threshold, determining that the recorded video file is stuck as video abnormality information;
[0135] If the continuous frame number is greater than a preset frame number threshold, it is determined that no freeze occurs in the recorded video file.
[0136] Optionally, the video detection device further includes: a format conversion module, configured to:
[0137] Converting the recorded video file into an audio-video interleaved format to obtain a file to be analyzed;
[0138] Generate a new recorded video file based on the file to be analyzed.
[0139] The video detection device provided by the present application adopts the video detection method in the above-mentioned embodiments, which solves the technical problem that the current video detection method is highly subjective, resulting in low accuracy of video detection. Compared with the prior art, the beneficial effects of the video detection device provided by the embodiment of the present application are the same as the beneficial effects of the video detection method provided by the above-mentioned embodiment, and other technical features in the video detection device are the same as the features disclosed in the above-mentioned embodiment method, which will not be described in detail here.
[0140] like Figure 7 As shown, Figure 7This is a schematic diagram of the device structure of the hardware operating environment involved in the embodiment of the present application.
[0141] Specifically, the video detection device may be a PC (Personal Computer), a tablet computer, a portable computer, a server or other device.
[0142] like Figure 7 As shown, the video detection device may include: a processor 1001, such as a central processing unit (CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface and a wireless interface. The network interface 1004 may optionally include a standard wired interface and a wireless interface (such as a wireless fidelity (WIreless-FIdelity, WI-FI) interface). The memory 1005 may be a high-speed random access memory (Random Access Memory, RAM) memory, or a stable non-volatile memory (Non-Volatile Memory, NVM), such as a disk memory. The memory 1005 may also be a storage device independent of the aforementioned processor 1001.
[0143] Those skilled in the art will understand that Figure 7 The device structure shown in the figure does not constitute a limitation on the video detection device, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0144] like Figure 7 As shown, the memory 1005 as a computer storage medium may include an operating system, a network communication module, a user interface module, and a video detection application.
[0145] exist Figure 7 In the device shown, the network interface 1004 is mainly used to connect to the background server and communicate data with the background server; the user interface 1003 is mainly used to connect to the client and communicate data with the client; and the processor 1001 can be used to call the video detection program stored in the memory 1005 to implement the operations in the video detection method provided in the above embodiment.
[0146] In addition, an embodiment of the present application further proposes a computer storage medium, on which a computer program is stored. When the computer program is executed by a processor, the operations in the video detection method provided in the above embodiment are implemented. The specific steps are not repeated here.
[0147] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity / operation / object from another entity / operation / object, and do not necessarily require or imply any such actual relationship or order between these entities / operations / objects; the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or system. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or system including the element.
[0148] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment. The device embodiment described above is only schematic, and the units described as separate components may or may not be physically separated. Some or all of the modules can be selected according to actual needs to achieve the purpose of the present application scheme. Those of ordinary skill in the art can understand and implement it without paying creative work.
[0149] The serial numbers of the above-mentioned embodiments of the present application are for description only and do not represent the advantages or disadvantages of the embodiments.
[0150] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, including a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server or network device, etc.) to execute the methods described in each embodiment of the present application.
[0151] The above are only preferred embodiments of the present application, and are not intended to limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A video detection method, characterized in that: The video detection method comprises: Playing a preset test video, wherein each frame of the preset test video contains a corresponding first identifier that conforms to a preset rule; Shooting the played preset test video based on the preset shooting device to obtain a recorded video file; The second identifier of each frame of the image in the recorded video file is analyzed to determine video abnormality information of the recorded video file.
2. The video detection method according to claim 1, characterized in that: Before the step of playing the preset test video, the method includes: Adding a first mark of a preset rule at a designated position of each preset image in sequence; The preset images to which the first identification has been added are merged into a preset test video.
3. The video detection method according to claim 1, characterized in that: The step of analyzing the second identifier of each frame of the image in the recorded video file to determine the video abnormality information of the recorded video file comprises: Identify each frame of the image in the recorded video file to obtain a second identifier of the recorded video file; According to a preset rule corresponding to the second identifier and the first identifier, video abnormality information of the recorded video file is determined.
4. The video detection method according to claim 3, characterized in that: The preset rule is an arithmetic progression, and the step of determining the video abnormality information of the recorded video file according to the preset rule corresponding to the second identifier and the first identifier includes: Generate a corresponding identification difference sequence according to the identification value corresponding to the second identification; Determine whether the identification difference sequence matches the difference of the arithmetic progression; If the identification difference sequence does not match the difference of the arithmetic progression, it is determined that the recorded video file has a video anomaly, and peaks and troughs of the identification difference sequence are identified to obtain video anomaly information of the recorded video file.
5. The video detection method according to claim 4, characterized in that: The step of performing peak and trough identification on the identification difference sequence to obtain video abnormality information of the recorded video file includes: If a peak appears in the identification difference sequence and the identification difference of the peak is greater than a preset peak threshold, it is determined that frame loss occurs in the recorded video file as video abnormality information; If a trough appears in the identification difference sequence and the identification difference of the trough is less than a preset trough threshold, it is determined that a freeze occurs in the recorded video file as video abnormality information.
6. The video detection method according to claim 5, characterized in that: The step of determining that a freeze occurs in the recorded video file as video abnormality information if a trough occurs in the identification difference sequence and the identification difference of the trough is less than a preset trough threshold value further includes: If a trough appears in the identification difference sequence and the identification difference of the trough is less than a preset trough threshold, then obtaining the number of continuous frames in which the identification difference is less than the preset trough threshold; Determine whether the continuous frame number is greater than a preset frame number threshold; If the continuous frame number is greater than a preset frame number threshold, determining that the recorded video file is stuck as video abnormality information; If the continuous frame number is greater than a preset frame number threshold, it is determined that no freeze occurs in the recorded video file.
7. The video detection method according to any one of claims 1 to 6, characterized in that: Before the step of analyzing the second identifier of each frame of the image in the recorded video file to determine the video abnormality information of the recorded video file, the method includes: Converting the recorded video file into an audio-video interleaved format to obtain a file to be analyzed; Generate a new recorded video file based on the file to be analyzed.
8. A video detection device, characterized in that: The video detection device comprises: A playing module, used for playing a preset test video, wherein each frame of the preset test video contains a corresponding first identifier that conforms to a preset rule; A recording module, used to shoot the played preset test video based on a preset shooting device to obtain a recorded video file; The identification module is used to analyze the second identifier of each frame image in the recorded video file to determine the video abnormality information of the recorded video file.
9. A video detection device, characterized in that: The video detection device comprises: a memory and a processor, wherein the memory stores a computer program that can be run on the processor, and when the computer program is executed by the processor, the steps of the video detection method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a video detection program, and when the video detection program is executed by a processor, the steps of the video detection method according to any one of claims 1 to 7 are implemented.