Inspection method, system and equipment for video containing dynamic metadata and medium
By decapsulating and analyzing video streams and metadata, video flickering can be quickly identified and repaired, solving the problem of time-consuming and labor-intensive video flickering detection in existing technologies and improving video production efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-02
- Publication Date
- 2026-03-10
AI Technical Summary
Current video technology is time-consuming and labor-intensive for detecting video flicker, and it is also time-consuming to recreate the video after flickering occurs.
By decapsulating the video stream, extracting NAL units frame by frame, parsing metadata and calculating the video playback order, judging video flickering based on metadata differences, displaying flickering alarms, and repairing the video when necessary.
It effectively saves time in video flicker inspection, improves inspection efficiency, and can quickly generate repair videos, saving manpower and time.
Smart Images

Figure CN121644848A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of video processing technology, and in particular to a method, system, device and medium for inspecting videos containing dynamic metadata. Background Technology
[0002] With the development of high-definition video technology, people have increasingly higher requirements for video quality. To avoid video flicker, some video flicker detection schemes have been proposed. However, these schemes are time-consuming and labor-intensive; if flickering occurs, the video needs to be remade, which is also very time-consuming. Summary of the Invention
[0003] To address the aforementioned technical problems, this application provides a method, system, electronic device, and computer-readable storage medium for inspecting videos containing dynamic metadata.
[0004] Firstly, this application provides a method for inspecting videos containing dynamic metadata, the method comprising: The video stream is decapsulated, and NAL units are extracted frame by frame from the decapsulated data. It is then determined whether the extracted NAL units are of the NAL type that stores metadata. If yes, then the metadata is parsed; if no, then it is determined whether it is a NAL unit that can be used to calculate POC. If yes, then the syntax elements used to calculate POC are parsed; if no, then the NAL unit is skipped. After obtaining all the parameters used to calculate POC, the video playback order is calculated based on all the parameters used to calculate POC. The storage order of dynamic metadata is adjusted according to the video playback order, and the metadata difference between the current frame data and each target frame data in the preset window is obtained based on the adjusted dynamic metadata. Based on the metadata difference and preset flickering judgment parameters, determine whether there is video flickering within the preset window; if so, display a flickering alarm.
[0005] In one embodiment, the number of preset windows is 3, the metadata difference includes a first metadata deviation and a second metadata deviation, and the preset flickering decision parameter includes a preset deviation threshold. The step of obtaining the metadata difference between the current frame data and the target frame data within the preset window includes: The second frame data of the preset window is used as the current frame data, and the first and third frame data of the preset window are used as the target frame data respectively. The first metadata deviation between the second frame data and the first frame data is calculated, and the second metadata deviation between the second frame data and the third frame data is calculated. The step of determining whether video flicker exists within the preset window based on the metadata difference and preset flicker judgment parameters includes: Determine whether both the first metadata deviation and the second metadata deviation are greater than the preset deviation threshold; If so, then it is determined that video flickering exists within the preset window.
[0006] In one embodiment, the number of preset windows is 2N+1, where N is greater than or equal to 2, the metadata difference includes a first metadata deviation and a second metadata deviation, and the preset flickering decision parameter includes a preset deviation threshold and a preset flickering decision threshold. The step of obtaining the metadata difference between the current frame data and the target frame data within the preset window includes: Take the N+1th frame data of the preset window as the current frame data, take the previous N frames data and the next N frames data as the target frame data respectively, calculate the first metadata deviation between the N+1th frame data and the previous N frames data respectively, and obtain N first metadata deviations. Calculate the second metadata deviation between the N+1th frame data and the next N frames data respectively, and obtain N second metadata deviations. The step of determining whether video flicker exists within the preset window based on the metadata difference and preset flicker judgment parameters includes: Determine whether there is a first target metadata deviation greater than the preset deviation threshold among the N first metadata deviations; if so, calculate the number of first target metadata deviations. Determine whether there is a second target metadata deviation greater than the preset deviation threshold among the N second metadata deviations; if so, calculate the number of second target metadata deviations. Determine whether the number of deviations of the first target metadata and the number of deviations of the second target metadata are both greater than the preset flickering judgment parameter. If so, determine that there is video flickering within the preset window.
[0007] In one embodiment, the number of preset windows is 3, the metadata difference includes a first curve deviation and a second curve deviation, and the preset flickering decision parameter includes a preset curve deviation threshold. The step of obtaining the metadata difference between the current frame data and the target frame data within the preset window includes: The second frame data of the preset window is used as the current frame data, and the first and third frame data of the preset window are used as the target frame data respectively. The first curve deviation between the second frame data and the first frame data is calculated, and the second curve deviation between the second frame data and the third frame data is calculated. The step of determining whether video flicker exists within the preset window based on the metadata difference and preset flicker judgment parameters includes: Determine whether both the first curve deviation and the second curve deviation are greater than the preset curve deviation threshold; If so, then it is determined that video flickering exists within the preset window.
[0008] In one embodiment, the number of preset windows is 2N+1, where N is greater than or equal to 2, the metadata difference includes a first curve deviation and a second curve deviation, and the preset flickering decision parameter includes a preset curve deviation threshold and a preset flickering decision threshold. The step of obtaining the metadata difference between the current frame data and the target frame data within the preset window includes: Take the N+1th frame data of the preset window as the current frame data, take the previous N frames data and the next N frames data as the target frame data respectively, calculate the first curve deviation between the N+1th frame data and the previous N frames data respectively, and obtain N first curve deviations. Calculate the second curve deviation between the N+1th frame data and the next N frames data respectively, and obtain N second curve deviations. The step of determining whether video flicker exists within the preset window based on the metadata difference and preset flicker judgment parameters includes: Determine whether there is a first target curve deviation greater than the preset curve deviation threshold among the N first curve deviations; if so, calculate the number of first target curve deviations. Determine whether there is a second target curve deviation greater than the preset curve deviation threshold among the N second curve deviations; if so, calculate the number of second target curve deviations. Determine whether the number of deviations of the first target curve and the number of deviations of the second target curve are both greater than the preset flicker judgment parameter. If so, determine that there is video flickering within the preset window.
[0009] In one embodiment, the number of preset windows is 3, the metadata difference includes a first metadata similarity and a second metadata similarity, and the preset flickering decision parameter includes a preset similarity threshold; The step of obtaining the metadata difference between the current frame data and the target frame data within the preset window includes: The second frame data of the preset window is used as the current frame data, and the first and third frame data of the preset window are used as the target frame data respectively. The first metadata similarity between the second frame data and the first frame data is calculated, and the second metadata similarity between the second frame data and the third frame data is calculated. The step of determining whether video flicker exists within the preset window based on the metadata difference and preset flicker judgment parameters includes: Determine whether the similarity of the first metadata and the similarity of the second metadata are both less than the preset similarity threshold; If so, then it is determined that video flickering exists within the preset window.
[0010] In one embodiment, the metadata difference includes a first metadata similarity and a second metadata similarity, the number of preset windows is 2N+1, where N is greater than or equal to 2, and the preset flickering decision parameter includes a preset similarity threshold and a preset flickering decision threshold. The step of obtaining the metadata difference between the current frame data and the target frame data within the preset window includes: Take the N+1th frame data in the preset window as the current frame data, and take the previous N frames data and the next N frames data as the target frame data respectively. Calculate the first metadata similarity between the N+1th frame data and the previous N frames data to obtain N first metadata similarities. Calculate the second metadata similarity between the N+1th frame data and the next N frames data to obtain N second metadata similarities. The step of determining whether video flicker exists within the preset window based on the metadata difference and preset flicker judgment parameters includes: Determine whether there is a first target metadata similarity less than the preset similarity threshold among the N first metadata similarities; if so, calculate the number of first target metadata similarities. Determine whether there is a second target metadata similarity less than the preset similarity threshold among the N second metadata similarities; if so, calculate the number of second target metadata similarities. Determine whether the number of similarities of the first target metadata and the number of similarities of the first target metadata are both greater than the preset flickering judgment parameter. If so, determine that there is video flickering within the preset window.
[0011] In one embodiment, the number of preset windows is 2N+1, where N is greater than or equal to 1, and the metadata difference includes a first metadata deviation and a second metadata deviation. The step of obtaining the metadata difference between the current frame data and each target frame data within a preset window based on the adjusted dynamic metadata includes: The N+1th frame data of the preset window is used as the current frame data, and the previous N frames data and the next N frames data are respectively used as the target frame data; For the adjusted dynamic metadata, obtain the first set of dynamic metadata corresponding to the N+1th frame data, and obtain the second set of dynamic metadata corresponding to the previous N frames data and the third set of dynamic metadata corresponding to the next N frames data. The first metadata deviation is calculated based on the first preset deviation calculation formula, the first group of dynamic metadata, and each of the second group of dynamic metadata; the second metadata deviation is calculated based on the first preset deviation calculation formula, the first group of dynamic metadata, and each of the third group of dynamic metadata; or, The first metadata deviation is calculated based on the second preset deviation calculation formula, the first group of dynamic metadata, each of the second group of dynamic metadata, and the preset weight value; the second metadata deviation is calculated based on the second preset deviation calculation formula, the first group of dynamic metadata, each of the third group of dynamic metadata, and the preset weight value.
[0012] In one embodiment, the number of preset windows is 2N+1, where N is greater than or equal to 1, and the metadata difference includes a first curve deviation and a second curve deviation. The step of obtaining the metadata difference between the current frame data and each target frame data within a preset window based on the adjusted dynamic metadata includes: The N+1th frame data of the preset window is used as the current frame data, and the previous N frames data and the next N frames data are respectively used as the target frame data; For the adjusted dynamic metadata, obtain the first set of dynamic metadata corresponding to the N+1th frame data, and obtain the second set of dynamic metadata corresponding to the previous N frames data and the third set of dynamic metadata corresponding to the next N frames data. A first mapping curve is obtained based on the first group of dynamic metadata, a second mapping curve is obtained based on each of the second group of dynamic metadata, and a third mapping curve is obtained based on each of the third group of dynamic metadata. The coordinate values of the first mapping curve, the coordinate values of each of the second mapping curves, and the coordinate values of each of the third mapping curves are determined respectively. The first curve deviation is calculated based on the preset curve deviation calculation formula, the coordinate values of the first mapping curve and the coordinate values of each of the second mapping curves; the second curve deviation is calculated based on the preset curve deviation calculation formula, the coordinate values of the first mapping curve and the coordinate values of each of the third mapping curves.
[0013] In one embodiment, the number of preset windows is 2N+1, where N is greater than or equal to 1, and the metadata difference includes a first metadata similarity and a second metadata similarity; The step of obtaining the metadata difference between the current frame data and each target frame data within a preset window based on the adjusted dynamic metadata includes: The N+1th frame data of the preset window is used as the current frame data, and the previous N frames data and the next N frames data are respectively used as the target frame data; For the adjusted dynamic metadata, obtain the first set of dynamic metadata corresponding to the N+1th frame data, and obtain the second set of dynamic metadata corresponding to the previous N frames data and the third set of dynamic metadata corresponding to the next N frames data. The first metadata similarity is calculated based on the preset similarity calculation formula, the first group of dynamic metadata, and each of the second group of dynamic metadata; the second metadata similarity is calculated based on the preset similarity calculation formula, the first group of dynamic metadata, and each of the third group of dynamic metadata.
[0014] In one embodiment, the method further includes: Display video repair controls, which are used to receive video repair operations input by the user; If the video repair operation is received, repair parameters are obtained based on the dynamic metadata of the current frame data and the dynamic metadata of the target frame data; based on the repair parameters, the dynamic metadata of the current frame data and / or the dynamic metadata of the target frame data are optimized. The video is re-encoded and packaged based on optimized dynamic metadata.
[0015] In one embodiment, obtaining the repair parameters based on the dynamic metadata of the current frame data and the dynamic metadata of the target frame data includes any of the following steps: Copy the dynamic metadata of the current frame data to the dynamic metadata of the target frame data; Copy the dynamic metadata of the target frame data to the dynamic metadata of the current frame data; Calculate the average dynamic metadata value of the preset window, and use the average dynamic metadata value as the repair parameter.
[0016] Secondly, this application provides an inspection system for videos containing dynamic metadata, the inspection system for videos containing dynamic metadata comprising: The first judgment module is used to decapsulate the video stream, extract NAL units frame by frame from the decapsulated data, and determine whether the extracted NAL units are of the NAL type that stores metadata. The parsing module is used to parse the metadata if it is true; otherwise, it determines whether it is a NAL unit that can be used to calculate the POC. If it is true, it parses the syntax elements used to calculate the POC; otherwise, it skips the NAL unit, obtains all the parameters used to calculate the POC, and calculates the video playback order based on all the parameters used to calculate the POC. The acquisition module is used to adjust the storage order of dynamic metadata according to the video playback order, and to acquire the metadata difference between the current frame data and each target frame data within the preset window based on the adjusted dynamic metadata. The second judgment module is used to determine whether there is video flickering in the preset window based on the metadata difference degree and the preset flickering judgment parameters; if there is flickering, a flickering alarm is displayed.
[0017] In one embodiment, it further includes: The display module is used to display video repair controls, which are used to receive video repair operations input by the user. An optimization module is configured to, upon receiving the video repair operation, obtain repair parameters based on the dynamic metadata of the current frame data and the dynamic metadata of the target frame data; and optimize the dynamic metadata of the current frame data and / or the dynamic metadata of the target frame data based on the repair parameters. The encoding and encapsulation module is used to re-encode and encapsulate video based on optimized dynamic metadata.
[0018] Thirdly, this application provides an electronic device, including a memory and a processor, wherein the memory is used to store a computer program, and the computer program executes the inspection method for video containing dynamic metadata provided in the first aspect when the processor is running.
[0019] Fourthly, this application provides a computer-readable storage medium storing a computer program that, when run on a processor, executes the inspection method for video containing dynamic metadata provided in the first aspect.
[0020] The method for inspecting video containing dynamic metadata provided in this application involves decapsulating the video stream, extracting NAL units frame by frame from the decapsulated data, and determining whether the extracted NAL units are of the NAL type used to store metadata. If yes, the metadata is parsed; if no, it is determined whether the NAL units are NAL units that can be used to calculate the Proof of Concept (POC). If yes, the syntactic elements used to calculate the POC are parsed; if no, the NAL units are skipped. After obtaining all the parameters used to calculate the POC, the video playback order is calculated based on all the parameters used to calculate the POC. The storage order of the dynamic metadata is adjusted according to the video playback order. Based on the adjusted dynamic metadata, the metadata difference between the current frame data and each target frame data within a preset window is obtained. Based on the metadata difference and a preset flicker judgment parameter, it is determined whether video flicker exists within the preset window. If it exists, a flicker alarm is displayed. In this way, only the metadata in the video needs to be parsed, and the video does not need to be fully decoded. The metadata difference between the current frame data and the target frame data is calculated by adjusting the dynamic metadata. Based on the calculated metadata difference, it is determined whether the video may flicker, which effectively saves video flicker inspection time and greatly improves video flicker inspection efficiency. Attached Figure Description
[0021] To more clearly illustrate the technical solutions of this application, the accompanying drawings used in the embodiments will be briefly described below. It should be understood that the following drawings only show some embodiments of this application and should not be considered as a limitation on the scope of protection of this application. In the various drawings, similar components are numbered similarly.
[0022] Figure 1 A first flowchart of the inspection method for video containing dynamic metadata provided in this application is shown; Figure 2 The second flowchart of the inspection method for video containing dynamic metadata provided in this application is shown; Figure 3 A schematic diagram of the third process of the inspection method for video containing dynamic metadata provided in this application is shown; Figure 4 The fourth flowchart of the inspection method for video containing dynamic metadata provided in this application is shown; Figure 5 The fifth flowchart of the inspection method for video containing dynamic metadata provided in this application is shown; Figure 6 The sixth flowchart of the inspection method for video containing dynamic metadata provided in this application is shown; Figure 7 A schematic diagram of the structure of the inspection system containing dynamic metadata video provided in this application is shown; Figure 8 Another structural diagram of the inspection system containing dynamic metadata video provided in this application is shown.
[0023] Icons: 700 - Inspection system for video with dynamic metadata, 701 - First judgment module, 702 - Parsing module, 703 - Acquisition module, 704 - Second judgment module, 705 - Display module, 706 - Optimization module, 707 - Encoding and encapsulation module. Detailed Implementation
[0024] The technical solutions of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments.
[0025] The components of this application, typically described and illustrated in the accompanying drawings, can be arranged and designed in a variety of different configurations. Therefore, the following detailed description of embodiments of this application provided in the drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0026] In the following, the terms “comprising,” “having,” and their cognates, which may be used in various embodiments of this application, are intended only to indicate a particular feature, number, step, operation, element, component, or combination thereof, and should not be construed as excluding, firstly, the presence of one or more other features, numbers, steps, operations, elements, components, or combinations thereof, or adding the possibility of one or more features, numbers, steps, operations, elements, components, or combinations thereof.
[0027] Furthermore, the terms "first," "second," and "third" are used only to distinguish descriptions and should not be interpreted as indicating or implying relative importance.
[0028] Unless otherwise specified, all terms used herein (including technical and scientific terms) shall have the same meaning as commonly understood by one of ordinary skill in the art to which the various embodiments of this application pertain. Terms (such as those defined in commonly used dictionaries) shall be interpreted as having the same meaning as in their contextual meaning in the relevant technical field and shall not be construed as having an idealized or overly formal meaning, unless clearly defined in the various embodiments of this application.
[0029] Example 1 Traditional methods for checking video flicker are time-consuming and labor-intensive, and remaking a video if flickering occurs is also time-consuming. This application provides a method for checking videos with dynamic metadata. This method does not require complete decoding, which can greatly reduce the time for video flicker checking. If video flickering occurs, users can quickly generate repaired videos that do not affect the video quality of other frames. Ultimately, video flicker detection and repair can be achieved in batches and automatically, saving users manpower and time and improving the efficiency of producing high-quality videos.
[0030] See Figure 1 Methods for inspecting videos containing dynamic metadata include: Step S101: Decapsulate the video stream, extract NAL units frame by frame from the decapsulated data, and determine whether the extracted NAL units are of the NAL type that stores metadata.
[0031] In this embodiment, the video stream is a video stream containing dynamic metadata, such as High Dynamic Range (HDR) video, HDR Vivid, HDR 10+, Dolby Vision, etc., without limitation. The dynamic metadata is stored in Supplemental Enhancement Information (SEI) or a custom Network Abstraction Layer Unit (NAL). It is understood that metadata can include both static and dynamic metadata. Static metadata applies uniformly to the entire video file or segment only once and does not change with each frame. Dynamic metadata changes every frame or every few frames, describing information such as brightness and color gamut in real time.
[0032] Additionally, the decapsulation of the video stream includes: determining whether the video stream is in a preset encapsulation format; if the video stream is in a preset encapsulation format, then decapsulating the video stream to obtain the video bitstream. The preset encapsulation format can be MP4, TS, MOV, etc., and is not limited here.
[0033] To further clarify, extracting NAL units frame by frame from the decapsulated data includes: determining whether the video stream is a preset encoding type; if the video stream is a preset encoding type, then extracting all frame data from the video stream. The preset encoding type can be h265, etc., and is not limited here.
[0034] In step S102, if yes, the metadata is parsed and obtained; if no, it is determined whether it is a NAL unit that can be used to calculate POC. If yes, the syntax element used to calculate POC is parsed; if no, the NAL unit is skipped. After obtaining all the parameters used to calculate POC, the video playback order is calculated based on all the parameters used to calculate POC.
[0035] It is understandable that when calculating the Picture Order Count (POC), the required parameters are distributed across the Sequence Parameter Set (SPS), the Picture Parameter Set (PPS), and the Slice Header. All parameters need to be parsed to calculate the playback order of the video.
[0036] Step S103: Adjust the storage order of dynamic metadata according to the video playback order, and obtain the metadata difference between the current frame data and each target frame data in the preset window according to the adjusted dynamic metadata.
[0037] In this embodiment, the number of frame data in the preset window can be customized, for example, it can be 3, 5, 7, ..., 2N+1, etc. The current frame is the Nth frame data, and the target frame data is the frame data from the previous N frames and the frame data from the next N frames. For example, when the number of frame data in the preset window is 3, the current frame data is the 2nd frame data, and the target frame data is the 1st and 3rd frames data. When the number of frame data in the preset window is 5, the current frame data is the 3rd frame data, and the target frame data is the 1st, 2nd, 4th, and 5th frames data.
[0038] It should be noted that adjusting the storage order of dynamic metadata according to the video playback order ensures that the adjusted dynamic metadata is sorted according to the actual playback order, which can ensure the accuracy of subsequent video flicker detection.
[0039] In one embodiment, the number of preset windows is 3, the metadata difference includes a first metadata deviation and a second metadata deviation, and the preset flickering decision parameter includes a preset deviation threshold. The preset deviation threshold can be determined according to the actual situation or empirical value. For example, the preset deviation threshold can be set to 0.023, 0.024, 0.025, etc., or it can be set to other data.
[0040] In one embodiment, the step S103 of obtaining the metadata difference between the current frame data and each target frame data within a preset window includes: The second frame data of the preset window is used as the current frame data, and the first and third frame data of the preset window are used as the target frame data respectively. The first metadata deviation between the second frame data and the first frame data is calculated, and the second metadata deviation between the second frame data and the third frame data is calculated.
[0041] In one embodiment, the number of preset windows is 2N+1, where N is greater than or equal to 2. The metadata difference includes a first metadata deviation and a second metadata deviation. The preset flickering decision parameter includes a preset deviation threshold and a preset flickering decision threshold. The preset flickering decision threshold can be determined based on the actual situation and the number of preset windows. For example, when the number of preset windows is 7, the preset flickering decision threshold can be set to 2 or 3, without limitation.
[0042] In one embodiment, step 103, obtaining the metadata difference between the current frame data and the target frame data within the preset window, includes: Take the N+1th frame data of the preset window as the current frame data, and take the previous N frames data and the next N frames data as the target frame data respectively. Calculate the first metadata deviation between the N+1th frame data and the previous N frames data to obtain N first metadata deviations. Calculate the second metadata deviation between the N+1th frame data and the next N frames data to obtain N second metadata deviations.
[0043] In one embodiment, the number of preset windows is 3, the metadata difference includes a first curve deviation and a second curve deviation, and the preset flickering decision parameter includes a preset curve deviation threshold. The step of obtaining the metadata difference between the current frame data and the target frame data within the preset window includes: The second frame data of the preset window is used as the current frame data, and the first and third frame data of the preset window are used as the target frame data respectively. The first curve deviation between the second frame data and the first frame data is calculated, and the second curve deviation between the second frame data and the third frame data is calculated.
[0044] In one embodiment, the number of preset windows is 2N+1, where N is greater than or equal to 2, the metadata difference includes a first curve deviation and a second curve deviation, and the preset flickering decision parameter includes a preset curve deviation threshold and a preset flickering decision threshold. The step of obtaining the metadata difference between the current frame data and the target frame data within the preset window includes: Take the (N+1)th frame data of the preset window as the current frame data, and take the previous N frames data and the next N frames data as the target frame data respectively. Calculate the first curve deviation between the (N+1)th frame data and the previous N frames data to obtain N first curve deviations. Calculate the second curve deviation between the (N+1)th frame data and the next N frames data to obtain N second curve deviations.
[0045] In one embodiment, the number of preset windows is 3, the metadata difference includes a first metadata similarity and a second metadata similarity, and the preset blinking decision parameter includes a preset similarity threshold. The preset similarity threshold can be determined according to the actual situation, for example, it can be set to 0.985, 0.982, 0.981, etc.
[0046] In one embodiment, step 103, obtaining the metadata difference between the current frame data and the target frame data within the preset window, includes: The second frame data of the preset window is used as the current frame data, and the first and third frame data of the preset window are used as the target frame data respectively. The first metadata similarity between the second frame data and the first frame data is calculated, and the second metadata similarity between the second frame data and the third frame data is calculated.
[0047] In one embodiment, the number of preset windows is 2N+1, where N is greater than or equal to 2, and the preset flickering decision parameters include a preset similarity threshold and a preset flickering decision threshold.
[0048] In one embodiment, step 103, obtaining the metadata difference between the current frame data and the target frame data within the preset window, includes: Take the N+1th frame data in the preset window as the current frame data, and take the previous N frames data and the next N frames data as the target frame data respectively. Calculate the first metadata similarity between the N+1th frame data and the previous N frames data to obtain N first metadata similarities. Calculate the second metadata similarity between the N+1th frame data and the next N frames data to obtain N second metadata similarities.
[0049] In one embodiment, the number of preset windows is 2N+1, where N is greater than or equal to 1, and the metadata difference includes a first metadata deviation and a second metadata deviation.
[0050] See Figure 2 Step S103 includes: Step S1031: Take the N+1th frame data of the preset window as the current frame data, and take the previous N frames data and the next N frames data as the target frame data respectively. Step S1032: For the adjusted dynamic metadata, obtain the first set of dynamic metadata corresponding to the N+1th frame data, and obtain the second set of dynamic metadata corresponding to the previous N frames data and the third set of dynamic metadata corresponding to the next N frames data. Step S1033: Calculate the first metadata deviation according to the first preset deviation calculation formula, the first group of dynamic metadata and each of the second group of dynamic metadata; calculate the second metadata deviation according to the first preset deviation calculation formula, the first group of dynamic metadata and each of the third group of dynamic metadata.
[0051] In this embodiment, the first preset deviation calculation formula may include, but is not limited to, the Euclidean distance calculation formula. It can also be noted that the first metadata deviation can be calculated based on the second preset deviation calculation formula, the first group of dynamic metadata, each of the second group of dynamic metadata, and the preset weight value; and the second metadata deviation can be calculated based on the second preset deviation calculation formula, the first group of dynamic metadata, each of the third group of dynamic metadata, and the preset weight value.
[0052] To further clarify, the formula for calculating the first preset deviation is: (1) In the first case, when x i This represents the parameter values of the first group of dynamic metadata, which have a quantity of n, y i This represents the parameter values of the second group of dynamic metadata, which have a quantity of n, x i y i The parameter value that represents the same dynamic metadata name will be x. i y i Substituting into formula (1), the calculated d1 is the first data deviation. In the first case, when x i The parameter value representing the first group of dynamic metadata, y i The parameter value representing the third group of dynamic metadata, x i y i The parameter value that represents the same dynamic metadata name will be x. i y i Substituting into formula (1), the calculated d1 is the second data deviation degree.
[0053] It should be noted that the formula for calculating the second preset deviation is as follows: (2) In the first case, x i This represents the parameter values of the first group of dynamic metadata, which have a quantity of n, y iThis represents the parameter values of the second group of dynamic metadata, which have a quantity of n, (x i y i ) represents a dynamic metadata parameter pair, x i y i The parameter value that represents the same dynamic metadata name, w i The weight values of different dynamic metadata are calculated according to formula (2), and d2 is the first metadata deviation.
[0054] In the second case, x i This represents the parameter values of the first group of dynamic metadata, which have a quantity of n, y i This represents the parameter values of the third group of dynamic metadata, and its quantity is n, (x i y i ) represents a dynamic metadata parameter pair, x i y i The parameter value that represents the same dynamic metadata name, w i The weight values of different dynamic metadata are calculated according to formula (2), and d3 is the second metadata deviation.
[0055] Among them, w i The larger the value, the more important the corresponding dynamic metadata. This weight value can be customized based on user experience or obtained through experiments using historical data.
[0056] In one embodiment, the number of preset windows is 2N+1, where N is greater than or equal to 1, and the metadata difference includes a first curve deviation and a second curve deviation.
[0057] See Figure 3 Step S103 includes: Step S1031: Take the N+1th frame data of the preset window as the current frame data, and take the previous N frames data and the next N frames data as the target frame data respectively. Step S1032: For the adjusted dynamic metadata, obtain the first set of dynamic metadata corresponding to the N+1th frame data, and obtain the second set of dynamic metadata corresponding to the previous N frames data and the third set of dynamic metadata corresponding to the next N frames data. Step S1034: Obtain a first mapping curve based on the first group of dynamic metadata, obtain a second mapping curve based on each of the second group of dynamic metadata, and obtain a third mapping curve based on each of the third group of dynamic metadata; Step S1035: Determine the coordinate values of the first mapping curve, each of the second mapping curves, and each of the third mapping curves, respectively. Step S1036: Calculate the first curve deviation according to the preset curve deviation calculation formula, the coordinate values of the first mapping curve and the coordinate values of each of the second mapping curves; calculate the second curve deviation according to the preset curve deviation calculation formula, the coordinate values of the first mapping curve and the coordinate values of each of the third mapping curves.
[0058] It should be noted that the formula for calculating the preset curve deviation is: (3) In the formula, in the first case, when Y1 j Y2 represents the j-th coordinate Y value of the first mapping curve. j When representing the j-th coordinate Y value of the second mapping curve, S calculated according to formula (3) represents the deviation of the first curve. In the second case, when Y1 j Y2 represents the j-th coordinate Y value of the first mapping curve. j When the j-th coordinate Y value of the third mapping curve is represented, S calculated according to formula (3) represents the deviation of the second curve.
[0059] It should be noted that a preset number of coordinate values can be obtained from both the first and second mapping curves. The preset number can be customized; for example, it could be 200 or 1000, with no specific limitation. The selected coordinate values include key coordinate values, such as the endpoints of linear splines and cubic splines.
[0060] In this implementation, the number of frame data in the preset window can be customized, for example, it can be 3, 5, 7, ..., 2N+1, etc.
[0061] In one embodiment, the number of preset windows is 2N+1, where N is greater than or equal to 1, and the metadata difference includes a first metadata similarity and a second metadata similarity; The step of obtaining the metadata difference between the current frame data and each target frame data within a preset window based on the adjusted dynamic metadata includes: The N+1th frame data of the preset window is used as the current frame data, and the previous N frames data and the next N frames data are respectively used as the target frame data; For the adjusted dynamic metadata, obtain the first set of dynamic metadata corresponding to the N+1th frame data, and obtain the second set of dynamic metadata corresponding to the previous N frames data and the third set of dynamic metadata corresponding to the next N frames data. The first metadata similarity is calculated based on the preset similarity calculation formula, the first group of dynamic metadata, and each of the second group of dynamic metadata; the second metadata similarity is calculated based on the preset similarity calculation formula, the first group of dynamic metadata, and each of the third group of dynamic metadata.
[0062] In this embodiment, the preset similarity calculation formula can be a cosine similarity calculation formula, an average matching similarity calculation formula, etc., and there is no limitation.
[0063] As an example, the formula for calculating cosine similarity can be the formula for calculating cosine similarity using the Discrete Cosine Transform (DCT), which can be specifically as follows: (4) In one of the cases, Let represent the DCT feature vectors of the first group of dynamic metadata and the second group of dynamic metadata, respectively. The result is calculated according to formula (4). This indicates the similarity of the first metadata. In one case, Let represent the DCT feature vectors of the first group of dynamic metadata and the third group of dynamic metadata, respectively. The result is calculated according to formula (4). This indicates the similarity of the second metadata.
[0064] Step S104: Based on the metadata difference and the preset flickering judgment parameters, determine whether there is video flickering within the preset window; if so, display a flickering alarm.
[0065] It should be noted that if video flickering occurs within a preset window, the next preset window will be selected sequentially to detect and determine video flickering.
[0066] See Figure 4 When the number of preset windows is 3, step S104 includes the following steps: Step S1041: Determine whether both the first metadata deviation and the second metadata deviation are greater than the preset deviation threshold. Step S1042: If yes, then it is determined that video flickering exists within the preset window.
[0067] It should be noted that the preset difference threshold can be customized; for example, the preset difference threshold can be set to 0.025.
[0068] Thus, when the number of preset windows is 3, the deviation of the first metadata between the current frame data and the previous frame data is greater than the preset deviation threshold, and the difference of the second metadata between the current frame and the next frame is greater than the preset deviation threshold, indicating that the dynamic metadata of the current frame is significantly different from the dynamic cloud data of the adjacent frames, thus confirming that video flickering has occurred.
[0069] See Figure 5 Step S104 includes the following steps: Step S1043: Determine whether there is a first target metadata deviation greater than the preset deviation threshold among the N first metadata deviations. If so, calculate the number of first target metadata deviations. Step S1044: Determine whether there is a second target metadata deviation greater than the preset deviation threshold among the N second metadata deviations. If so, calculate the number of second target metadata deviations. Step S1045: Determine whether the number of the first target metadata deviation and the number of the second target metadata deviation are both greater than the preset flickering judgment parameter. If so, determine that there is video flickering within the preset window.
[0070] It should be noted that the preset flickering decision parameter is determined based on the number of frame data in the preset window. When the number of frame data in the preset window is 2N+1, the preset flickering decision parameter can be set to a positive integer less than or equal to N. For example, when the number of frame data in the preset window is 7, the preset flickering decision parameter can be set to 2; when the number of frame data in the preset window is 9, the preset flickering decision parameter can be set to 3. There are no restrictions here.
[0071] Thus, when the number of preset windows is 2N+1, the number of deviations of the first target metadata is greater than the preset flicker judgment parameter, and the number of deviations of the second target metadata is greater than the preset flicker judgment parameter, indicating that the dynamic metadata of the current frame is significantly different from the dynamic metadata of the previous N frames and the dynamic metadata of the next N frames, thus confirming that video flicker has occurred.
[0072] In one embodiment, the number of preset windows is 3, and determining whether video flicker exists within the preset windows based on the metadata difference and preset flicker judgment parameters includes: Determine whether both the first curve deviation and the second curve deviation are greater than the preset curve deviation threshold; If so, then it is determined that video flickering exists within the preset window.
[0073] Thus, when the number of preset windows is 3, the difference between the first curve of the current frame data and the previous frame data is greater than the preset curve deviation threshold, and the difference between the second curve of the current frame and the next frame is greater than the preset curve deviation threshold, indicating that the dynamic metadata of the current frame is significantly different from the dynamic cloud data of the adjacent frames, thus confirming that video flickering has occurred.
[0074] In one embodiment, the number of preset windows is 2N+1, where N is greater than or equal to 2. The step of determining whether video flicker exists within the preset windows based on the metadata difference and preset flicker judgment parameters includes: Determine whether there is a first target curve deviation greater than the preset curve deviation threshold among the N first curve deviations; if so, calculate the number of first target curve deviations. Determine whether there is a second target curve deviation greater than the preset curve deviation threshold among the N second curve deviations; if so, calculate the number of second target curve deviations. Determine whether the number of deviations of the first target curve and the number of deviations of the second target curve are both greater than the preset flicker judgment parameter. If so, determine that there is video flickering within the preset window.
[0075] Thus, when the number of preset windows is 2N+1, the number of deviations of the first target curve is greater than the preset flicker judgment parameter, and the number of deviations of the second target curve is greater than the preset flicker judgment parameter, indicating that the dynamic metadata of the current frame is significantly different from the dynamic metadata of the previous N frames and the dynamic metadata of the next N frames, thus confirming that video flicker has occurred.
[0076] In one embodiment, the number of preset windows is 3, and determining whether video flicker exists within the preset windows based on the metadata difference and preset flicker judgment parameters includes: Determine whether the similarity of the first metadata and the similarity of the second metadata are both less than the preset similarity threshold; If so, then it is determined that video flickering exists within the preset window.
[0077] Thus, when the number of preset windows is 3, the similarity of the first metadata between the current frame data and the previous frame data is less than the preset similarity threshold, and the difference between the second metadata between the current frame and the next frame is less than the preset similarity threshold, indicating that the dynamic metadata of the current frame is significantly different from the dynamic cloud data of the adjacent frames, thus confirming that video flickering has occurred.
[0078] In one embodiment, the number of preset windows is 2N+1, where N is greater than or equal to 2. The step of determining whether video flicker exists within the preset windows based on the metadata difference and preset flicker judgment parameters includes: Determine whether there is a first target metadata similarity less than the preset similarity threshold among the N first metadata similarities; if so, calculate the number of first target metadata similarities. Determine whether there is a second target metadata similarity less than the preset similarity threshold among the N second metadata similarities; if so, calculate the number of second target metadata similarities. Determine whether the number of similarities of the first target metadata and the number of similarities of the first target metadata are both greater than the preset flickering judgment parameter. If so, determine that there is video flickering within the preset window.
[0079] Thus, when the number of preset windows is 2N+1, the number of similarities of the first target metadata is greater than the preset flickering judgment parameter, and the number of similarities of the second target metadata is greater than the preset flickering judgment parameter, indicating that the dynamic metadata of the current frame is significantly different from the dynamic metadata of the previous N frames and the dynamic metadata of the next N frames, thus confirming that video flickering has occurred.
[0080] See Figure 6 This application includes a method for inspecting dynamic metadata videos, which further includes the following steps: Step 105: Display the video repair control, which is used to receive video repair operations input by the user.
[0081] In this embodiment, a user interface is provided, which displays video editing controls. After the user clicks the video repair control, the system receives the user's video repair operation.
[0082] Step 106: If the video repair operation is received, repair parameters are obtained based on the dynamic metadata of the current frame data and the dynamic metadata of the target frame data; based on the repair parameters, the dynamic metadata of the current frame data and / or the dynamic metadata of the target frame data are optimized.
[0083] The step of obtaining repair parameters based on the dynamic metadata of the current frame data and the dynamic metadata of the target frame data includes any of the following steps: Copy the dynamic metadata of the current frame data to the dynamic metadata of the target frame data; Copy the dynamic metadata of the target frame data to the dynamic metadata of the current frame data; Calculate the average dynamic metadata value of the preset window, and use the average dynamic metadata value as the repair parameter.
[0084] Step 107: Re-encode and encapsulate the video based on the optimized dynamic metadata.
[0085] It is understandable that by optimizing the dynamic metadata based on the obtained repair parameters, and then re-encoding and encapsulating the video according to the optimized dynamic metadata, the video can be made to avoid video flickering, thus achieving the purpose of video repair.
[0086] The method for inspecting videos containing dynamic metadata provided in this embodiment decapsulates the video stream, extracts NAL units frame by frame from the decapsulated data, and determines whether the extracted NAL unit is of the type that stores metadata. If yes, the metadata is parsed; if not, it is determined whether it is a NAL unit that can be used to calculate the Proof of Concept (POC). If yes, the syntax elements used to calculate the POC are parsed; if not, the NAL unit is skipped. After obtaining all the parameters used to calculate the POC, the video playback order is calculated based on all the parameters used to calculate the POC. The storage order of the dynamic metadata is adjusted according to the video playback order. Based on the adjusted dynamic metadata, the metadata difference between the current frame data and each target frame data within a preset window is obtained. Based on the metadata difference and preset flicker judgment parameters, it is determined whether video flicker exists within the preset window. If it exists, a flicker alarm is displayed. In this way, only the metadata in the video needs to be parsed, and the video does not need to be fully decoded. The metadata difference between the current frame data and the target frame data is calculated using the adjusted dynamic metadata, and the video flickering is determined based on the calculated metadata difference. This effectively saves video flicker inspection time and greatly improves video flicker inspection efficiency.
[0087] Example 2 In addition, this application provides an inspection system for videos containing dynamic metadata.
[0088] See Figure 7 The inspection system 700, which includes dynamic metadata for video, includes: The first judgment module 701 is used to decapsulate the video stream, extract NAL units frame by frame from the decapsulated data, and determine whether the extracted NAL units are of the NAL type that stores metadata. The parsing module 702 is used to parse the metadata if it is true; otherwise, it determines whether it is a NAL unit that can be used to calculate POC. If it is true, it parses the syntax elements used to calculate POC; otherwise, it skips the NAL unit, obtains all the parameters used to calculate POC, and calculates the video playback order based on all the parameters used to calculate POC. The acquisition module 703 is used to adjust the storage order of dynamic metadata according to the video playback order, and to acquire the metadata difference between the current frame data and each target frame data within the preset window based on the adjusted dynamic metadata. The second judgment module 704 is used to determine whether there is video flickering in the preset window based on the metadata difference degree and the preset flickering judgment parameters; if there is flickering, a flickering alarm is displayed.
[0089] See Figure 8 The inspection system 700, which includes dynamic metadata for video, also includes: Display module 705 is used to display video repair controls, which are used to receive video repair operations input by the user. The optimization module 706 is configured to, upon receiving the video repair operation, obtain repair parameters based on the dynamic metadata of the current frame data and the dynamic metadata of the target frame data; and optimize the dynamic metadata of the current frame data and / or the dynamic metadata of the target frame data based on the repair parameters. Encoding and encapsulation module 707 is used to re-encode and encapsulate video based on optimized dynamic metadata.
[0090] The inspection system 700 containing dynamic metadata provided in this embodiment can implement the inspection method containing dynamic metadata provided in Embodiment 1. To avoid duplication, it will not be described again here.
[0091] The video inspection system containing dynamic metadata provided in this embodiment decapsulates the video stream and extracts NAL units frame by frame from the decapsulated data. It determines whether the extracted NAL unit is of the type storing metadata; if so, the metadata is parsed; otherwise, it determines whether it is a NAL unit that can be used to calculate the Proof of Concept (POC). If so, the syntactic elements used for POC calculation are parsed; otherwise, the NAL unit is skipped. After obtaining all parameters used for POC calculation, the video playback order is calculated based on these parameters. The storage order of the dynamic metadata is adjusted according to the video playback order. Based on the adjusted dynamic metadata, the metadata difference between the current frame data and each target frame data within a preset window is obtained. Based on the metadata difference and preset flicker judgment parameters, it is determined whether video flicker exists within the preset window; if it exists, a flicker alarm is displayed. In this way, only the metadata in the video needs to be parsed; the video does not need to be fully decoded. The metadata difference between the current frame data and target frame data is calculated using the adjusted dynamic metadata, thereby determining whether the video may flicker based on the calculated metadata difference. This effectively saves video flicker inspection time and greatly improves video flicker inspection efficiency.
[0092] Example 3 Furthermore, this application provides an electronic device, including a memory and a processor, wherein the memory stores a computer program, and the computer program, when run on the processor, executes the inspection method for video containing dynamic metadata provided in Embodiment 1.
[0093] The electronic device provided in this embodiment can implement the video inspection method with dynamic metadata provided in Embodiment 1. To avoid repetition, it will not be described again here.
[0094] Example 4 This application also provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the video inspection method containing dynamic metadata provided in Embodiment 1.
[0095] In this embodiment, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, etc.
[0096] The computer-readable storage medium provided in this embodiment can implement the video inspection method containing dynamic metadata provided in Embodiment 1. To avoid repetition, it will not be described again here.
[0097] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal that includes that element.
[0098] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0099] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit of this application, and all of these forms are within the protection scope of this application.
Claims
1. An inspection method of a video containing dynamic metadata, characterized by, The method comprises: unpacking the video stream, extracting NAL units frame by frame from the unpacked data, judging whether the extracted NAL unit is a NAL type for storing metadata; if yes, obtaining metadata by parsing; if no, judging whether it is a NAL unit for calculating POC, if yes, parsing syntax elements for calculating POC, if no, skipping the NAL unit, obtaining all parameters for calculating POC, and calculating the video playing order according to the all parameters for calculating POC; adjusting the storage order of dynamic metadata according to the video playing order, and obtaining the metadata difference degree between the current frame data and each target frame data in a preset window according to the adjusted dynamic metadata; judging whether there is video flicker in the preset window according to the metadata difference degree and a preset flicker judgment parameter; if yes, displaying a flicker alarm.
2. The method of claim 1, wherein, The number of the preset window is 3, the metadata difference degree comprises a first metadata deviation degree and a second metadata deviation degree, and the preset flicker judgment parameter comprises a preset deviation degree threshold; The method comprises: taking the second frame data of the preset window as the current frame data, taking the first frame data and the third frame data of the preset window as the target frame data, calculating the first metadata deviation degree between the second frame data and the first frame data, and calculating the second metadata deviation degree between the second frame data and the third frame data; The method comprises: judging whether the first metadata deviation degree and the second metadata deviation degree are both greater than the preset deviation degree threshold; if yes, determining that there is video flicker in the preset window. The number of the preset window is 2N+1, N is greater than or equal to 2, the metadata difference degree comprises a first metadata deviation degree and a second metadata deviation degree, and the preset flicker judgment parameter comprises a preset deviation degree threshold and a preset flicker judgment threshold; 3. The method of claim 1, wherein, The method comprises: taking the N+1 frame data of the preset window as the current frame data, taking the previous N frame data and the following N frame data as the target frame data, respectively calculating the first metadata deviation degree between the N+1 frame data and the previous N frame data to obtain N first metadata deviation degrees, and respectively calculating the second metadata deviation degree between the N+1 frame data and the following N frame data to obtain N second metadata deviation degrees; The method comprises: judging whether there is a first target metadata deviation degree greater than the preset deviation degree threshold in the N first metadata deviation degrees, if yes, calculating the number of the first target metadata deviation degrees; determining whether there is a second target metadata deviation degree greater than the preset deviation degree threshold in the N second metadata deviation degrees, and if so, counting the number of the second target metadata deviation degrees; determining whether the number of the first target metadata deviation degrees and the number of the second target metadata deviation degrees are both greater than the preset flicker judgment parameter, and if so, determining that there is video flicker in the preset window.
4. The method of claim 1, wherein, The number of the preset window is 3, the metadata difference degree includes a first curve deviation degree and a second curve deviation degree, and the preset flicker judgment parameter includes a preset curve deviation degree threshold. The method for obtaining the metadata difference degree between the current frame data and the target frame data in the preset window comprises: taking the second frame data of the preset window as the current frame data, taking the first frame data and the third frame data of the preset window as the target frame data, calculating the first curve deviation degree between the second frame data and the first frame data, and calculating the second curve deviation degree between the second frame data and the third frame data; The method for determining whether there is video flicker in the preset window according to the metadata difference degree and the preset flicker judgment parameter comprises: determining whether the first curve deviation degree and the second curve deviation degree are both greater than the preset curve deviation degree threshold; if so, determining that there is video flicker in the preset window.
5. The method of claim 1, wherein, The number of the preset window is 2N+1, N is greater than or equal to 2, the metadata difference degree includes a first curve deviation degree and a second curve deviation degree, and the preset flicker judgment parameter includes a preset curve deviation degree threshold and a preset flicker judgment threshold. The method for obtaining the metadata difference degree between the current frame data and the target frame data in the preset window comprises: taking the N+1 frame data of the preset window as the current frame data, taking the previous N frame data and the following N frame data as the target frame data, respectively calculating the first curve deviation degree between the N+1 frame data and the previous N frame data to obtain N first curve deviation degrees, and respectively calculating the second curve deviation degree between the N+1 frame data and the following N frame data to obtain N second curve deviation degrees; The method for determining whether there is video flicker in the preset window according to the metadata difference degree and the preset flicker judgment parameter comprises: determining whether there is a first target curve deviation degree greater than the preset curve deviation degree threshold in the N first curve deviation degrees, and if so, counting the number of the first target curve deviation degrees; determining whether there is a second target curve deviation degree greater than the preset curve deviation degree threshold in the N second curve deviation degrees, and if so, counting the number of the second target curve deviation degrees; determining whether the number of the first target curve deviation degrees and the number of the second target curve deviation degrees are both greater than the preset flicker judgment parameter, and if so, determining that there is video flicker in the preset window.
6. The method of claim 1, wherein, The number of the preset window is 3, the metadata difference degree includes a first metadata similarity and a second metadata similarity, and the preset flicker judgment parameter includes a preset similarity threshold. The metadata difference degree between the current frame data and the target frame data in the preset window comprises: The second frame data in the preset window is taken as the current frame data, the first frame data and the third frame data in the preset window are taken as the target frame data, the first metadata similarity between the second frame data and the first frame data is calculated, and the second metadata similarity between the second frame data and the third frame data is calculated. The video flicker in the preset window is determined according to the metadata difference degree and a preset flicker determination parameter. The first metadata similarity and the second metadata similarity are determined to be smaller than the preset similarity threshold value. If yes, it is determined that the preset window has video flicker.
7. The method of claim 1, wherein, The metadata difference degree comprises the first metadata similarity and the second metadata similarity, the number of the preset window is 2N+1, N is greater than or equal to 2, and the preset flicker determination parameter comprises a preset similarity threshold value and a preset flicker determination threshold value. The metadata difference degree between the current frame data and the target frame data in the preset window comprises: The N+1 frame data in the preset window is taken as the current frame data, the first N frame data and the last N frame data are taken as the target frame data, the first metadata similarity between the N+1 frame data and the first N frame data is calculated, N first metadata similarities are obtained, the second metadata similarity between the N+1 frame data and the last N frame data is calculated, and N second metadata similarities are obtained. The video flicker in the preset window is determined according to the metadata difference degree and a preset flicker determination parameter. It is determined whether there is a first target metadata similarity smaller than the preset similarity threshold value in the N first metadata similarities, and if yes, the number of the first target metadata similarities is calculated. It is determined whether there is a second target metadata similarity smaller than the preset similarity threshold value in the N second metadata similarities, and if yes, the number of the second target metadata similarities is calculated. The number of the first target metadata similarities and the number of the second target metadata similarities are determined to be greater than the preset flicker determination parameter, and if yes, it is determined that the preset window has video flicker.
8. The method of claim 1, wherein, The number of the preset window is 2N+1, N is greater than or equal to 1, and the metadata difference degree comprises a first metadata deviation degree and a second metadata deviation degree. The metadata difference degree between the current frame data and each target frame data in the preset window is obtained according to the adjusted dynamic metadata, which comprises: The N+1 frame data in the preset window is taken as the current frame data, and the first N frame data and the last N frame data are taken as the target frame data. The first group of dynamic metadata corresponding to the N+1 frame data is obtained, the second group of dynamic metadata corresponding to the first N frame data is obtained, and the third group of dynamic metadata corresponding to the last N frame data is obtained. According to the first preset deviation degree calculation formula, the first group of dynamic metadata and each second group of dynamic metadata, the first metadata deviation degree is calculated; according to the first preset deviation degree calculation formula, the first group of dynamic metadata and each third group of dynamic metadata, the second metadata deviation degree is calculated; or, According to the second preset deviation degree calculation formula, the first group of dynamic metadata, each second group of dynamic metadata and a preset weight value, the first metadata deviation degree is calculated; according to the second preset deviation degree calculation formula, the first group of dynamic metadata, each third group of dynamic metadata and the preset weight value, the second metadata deviation degree is calculated.
9. The method of claim 1, wherein, The number of preset windows is 2N+1, N is greater than or equal to 1, and the metadata difference degree includes a first curve deviation degree and a second curve deviation degree; The metadata difference degree between the current frame data and each target frame data in the preset window is obtained according to the adjusted dynamic metadata, including: The N+1 frame data of the preset window is taken as the current frame data, and the previous N frame data and the next N frame data are taken as the target frame data; For the adjusted dynamic metadata, the first group of dynamic metadata corresponding to the N+1 frame data is obtained, and the second group of dynamic metadata corresponding to the previous N frame data and the third group of dynamic metadata corresponding to the next N frame data are obtained; A first mapping curve is obtained according to the first group of dynamic metadata, a second mapping curve is obtained according to each second group of dynamic metadata, and a third mapping curve is obtained according to each third group of dynamic metadata; The coordinate values of the first mapping curve, the coordinate values of each second mapping curve and the coordinate values of each third mapping curve are determined respectively; According to the preset curve deviation degree calculation formula, the coordinate values of the first mapping curve and the coordinate values of each second mapping curve, the first curve deviation degree is calculated; according to the preset curve deviation degree calculation formula, the coordinate values of the first mapping curve and the coordinate values of each third mapping curve, the second curve deviation degree is calculated.
10. The method of claim 1, wherein, The number of preset windows is 2N+1, N is greater than or equal to 1, and the metadata difference degree includes a first metadata similarity and a second metadata similarity; The metadata difference degree between the current frame data and each target frame data in the preset window is obtained according to the adjusted dynamic metadata, including: The N+1 frame data of the preset window is taken as the current frame data, and the previous N frame data and the next N frame data are taken as the target frame data; For the adjusted dynamic metadata, the first group of dynamic metadata corresponding to the N+1 frame data is obtained, and the second group of dynamic metadata corresponding to the previous N frame data and the third group of dynamic metadata corresponding to the next N frame data are obtained; According to the preset similarity calculation formula, the first group of dynamic metadata and each second group of dynamic metadata, the first metadata similarity is calculated; according to the preset similarity calculation formula, the first group of dynamic metadata and each third group of dynamic metadata, the second metadata similarity is calculated.
11. The method of claim 1, wherein, The method further comprises: display a video repair control, the video repair control being configured to receive a video repair operation input by a user; if the video repair operation is received, obtaining a repair parameter according to dynamic metadata of the current frame data and dynamic metadata of the target frame data; and optimizing the dynamic metadata of the current frame data and / or the dynamic metadata of the target frame data according to the repair parameter; re-encoding and encapsulating the video according to the optimized dynamic metadata.
12. The method of claim 11, wherein, The obtaining of the repair parameter according to the dynamic metadata of the current frame data and the dynamic metadata of the target frame data comprises any of the following steps: copying the dynamic metadata of the current frame data as the dynamic metadata of the target frame data; copying the dynamic metadata of the target frame data as the dynamic metadata of the current frame data; calculating a dynamic metadata average of the preset window, and taking the dynamic metadata average as the repair parameter.
13. An inspection system for video containing dynamic metadata, characterized by comprise: a first judging module configured to unpack a video stream, extract NAL units frame by frame from the unpacked data, and judge whether the extracted NAL units are NAL types storing metadata; an analyzing module configured to, if yes, analyze to obtain metadata; if no, judge whether the NAL units are NAL units that can be used to calculate POC, if yes, analyze syntax elements used to calculate POC, and if no, skip the NAL units; and after all parameters used to calculate POC are obtained, calculate a video playing order according to the all parameters used to calculate POC; an obtaining module configured to adjust a storage order of dynamic metadata according to the video playing order, and obtain a metadata difference degree between current frame data and each target frame data in a preset window according to the adjusted dynamic metadata; a second judging module configured to judge whether there is video flicker in the preset window according to the metadata difference degree and a preset flicker judging parameter; and if yes, display a flicker warning.
14. The system of claim 13, wherein, Further comprise: a displaying module configured to display a video repair control, the video repair control being configured to receive a video repair operation input by a user; an optimizing module configured to, if the video repair operation is received, obtain a repair parameter according to dynamic metadata of the current frame data and dynamic metadata of the target frame data; optimize the dynamic metadata of the current frame data and / or the dynamic metadata of the target frame data according to the repair parameter; an encoding and encapsulating module configured to re-encode and encapsulate the video according to the optimized dynamic metadata.
15. An electronic device, comprising: comprise a memory and a processor, the memory storing a computer program, the computer program being executed on the processor to perform the inspection method of the video with dynamic metadata according to any one of claims 1 to 12.
16. A computer-readable storage medium, characterized in that, The computer program is executed on the processor to perform the inspection method of the video with dynamic metadata according to any one of claims 1 to 12.