Method for determining quality of video stream file
By performing multi-level verification of the format information, decoding timestamp, playback timestamp, and video frame parameter information of the video stream file, the shortcomings of quality detection for transcoded video stream files are solved, and the detection accuracy and processing efficiency are improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- BEIJING KINGSOFT CLOUD NETWORK TECH CO LTD
- Filing Date
- 2024-12-04
- Publication Date
- 2026-06-05
AI Technical Summary
The lack of a complete detection method in the current technology to detect the quality of transcoded video stream files may lead to screen tearing or quality problems during the transcoding process.
The first verification is performed by obtaining the format information of the video stream file, the second verification is performed by extracting the decoding timestamp and playback timestamp of the video frame, and the third verification is performed by examining the parameter information of each video frame to determine the quality detection result of the video stream file.
It enables complete quality detection of transcoded video stream files, improves the accuracy of quality detection, and enhances video processing efficiency and the accuracy of quality assessment.
Smart Images

Figure CN122160533A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of video stream file processing technology, and in particular to a method for determining the quality detection result of a video stream file. Background Technology
[0002] Currently, video stream files often need to be transcoded in live streaming scenarios. However, during the transcoding process, video streams may experience screen tearing or quality issues. There is currently no complete detection method that can fully detect the quality of transcoded video streams.
[0003] Therefore, there is an urgent need for a method to determine the quality detection results of video stream files, which can comprehensively detect the quality of transcoded video stream files and improve the accuracy of quality detection of transcoded video stream files. Summary of the Invention
[0004] To address the aforementioned technical problems, or at least partially address them, this disclosure provides a method for determining the quality detection results of video stream files.
[0005] A first aspect of this disclosure provides a method for determining the quality detection result of a video stream file, the method comprising:
[0006] Obtain a video stream file and its format information, perform a first verification on the format information of the video stream file, and obtain a first verification result;
[0007] If the first verification result indicates that the format information of the video stream file is correct, then the decoding timestamp and playback timestamp of each video frame in the video stream file are extracted, and the decoding timestamp and playback timestamp are verified again to obtain the second verification result.
[0008] If the second verification result is passed, the parameter information of each video frame is obtained, and the parameter information of each video frame is verified in the third way to obtain the third verification result.
[0009] If the third verification result is passed, then the quality detection result of the video stream file is determined to be passed.
[0010] In one example, the first verification of the format information of the video stream file to obtain a first verification result includes:
[0011] Obtain the format information of the video stream file and parse the format information of the video stream file; wherein, the format information of the video stream file is an audio / video format or a video format;
[0012] If the format information of the video stream file is audio and video format, then determine whether the video stream file contains keyframes and audio frames to obtain the first verification result;
[0013] If the format information of the video stream file is video format, then determine whether the video stream file contains keyframes to obtain the first verification result.
[0014] In one example, determining whether the video stream file contains keyframes and audio frames to obtain a first verification result includes:
[0015] Determine whether the first frame or a preset number of frames in the video stream file contains keyframes and audio frames to obtain a first verification result.
[0016] In one example, the second verification of the decoding timestamp and the playback timestamp to obtain a second verification result includes:
[0017] Determine whether the decoding timestamp is earlier than or equal to the playback timestamp;
[0018] If so, obtain the frame rate of the video stream file and determine the reciprocal of the frame rate based on the frame rate;
[0019] The second verification result is obtained by determining the relationship between the first increment of the decoding timestamp and the reciprocal of the frame rate, and by determining the relationship between the second increment of the playback timestamp and the reciprocal of the frame rate.
[0020] In one example, the third verification of the parameter information of each video frame to obtain the third verification result includes:
[0021] The third verification result is obtained by determining whether the parameter information of each video frame is within a preset range.
[0022] In one example, after obtaining the third verification result, the method further includes:
[0023] The third verification result is displayed in a preset format to obtain the display result.
[0024] A second aspect of this disclosure provides an apparatus for determining the quality detection result of a video stream file, the apparatus comprising:
[0025] The first verification module is used to obtain a video stream file and the format information of the video stream file, perform a first verification on the format information of the video stream file, and obtain a first verification result.
[0026] The second verification module is used to extract the decoding timestamp and playback timestamp of each video frame in the video stream file if the first verification result indicates that the format information of the video stream file is correct, and to perform a second verification on the decoding timestamp and the playback timestamp to obtain a second verification result.
[0027] The third verification module is used to obtain the parameter information of each video frame if the second verification result is passed, and to perform a third verification on the parameter information of each video frame to obtain a third verification result.
[0028] The determination module is used to determine that the quality detection result of the video stream file is passed if the third verification result is passed.
[0029] In one example, the first verification module includes:
[0030] The acquisition submodule is used to acquire the format information of the video stream file and parse the format information of the video stream file; wherein, the format information of the video stream file is an audio / video format or a video format;
[0031] The first judgment submodule is used to determine whether the video stream file contains keyframes and audio frames if the format information of the video stream file is an audio and video format, and to obtain a first verification result.
[0032] The second judgment submodule is used to determine whether the video stream file contains keyframes if the format information of the video stream file is a video format, and to obtain the first verification result.
[0033] In one example, the second judgment submodule is specifically used for:
[0034] Determine whether the first frame or a preset number of frames in the video stream file contains keyframes and audio frames to obtain a first verification result.
[0035] In one example, the second verification module includes:
[0036] The third judgment submodule is used to determine whether the decoding timestamp is earlier than or equal to the playback timestamp;
[0037] The determination submodule is used to obtain the frame rate of the video stream file if the condition is met, and determine the reciprocal of the frame rate based on the frame rate.
[0038] The fourth judgment submodule is used to determine the relationship between the first increment of the decoding timestamp and the reciprocal of the frame rate, and to determine the relationship between the second increment of the playback timestamp and the reciprocal of the frame rate, so as to obtain the second verification result.
[0039] In one example, the third verification module includes:
[0040] The fifth judgment submodule is used to determine whether the parameter information of each video frame is within a preset range, and to obtain the third verification result.
[0041] In one example, after obtaining the third verification result, the device further includes:
[0042] The display submodule is used to display the third verification result in a preset format to obtain the display result.
[0043] A third aspect of this disclosure provides an electronic device comprising: a processor and a memory, wherein the memory stores a computer program, and when the computer program is executed by the processor, the processor performs the method described in the first aspect.
[0044] A fourth aspect of this disclosure provides a computer-readable storage medium storing a computer program that, when executed by a processor, can implement the method of the first aspect described above.
[0045] This disclosure provides a method for determining the quality detection result of a video stream file. The method includes: acquiring a video stream file and its format information; performing a first verification on the format information of the video stream file to obtain a first verification result; if the first verification result indicates that the format information of the video stream file is correct, extracting the decoding timestamp and playback timestamp of each video frame in the video stream file, and performing a second verification on the decoding timestamp and playback timestamp to obtain a second verification result; if the second verification result is passed, acquiring the parameter information of each video frame, performing a third verification on the parameter information of each video frame to obtain a third verification result; if the third verification result is passed, determining that the quality detection result of the video stream file is passed. Using this technical solution, the quality of transcoded video stream files can be completely detected, improving the accuracy of quality detection for transcoded video stream files. Attached Figure Description
[0046] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.
[0047] To more clearly illustrate the technical solutions in the embodiments of this disclosure or the prior art, the accompanying drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0048] Figure 1This is a flowchart illustrating a method for determining the quality detection result of a video stream file according to an embodiment of this disclosure;
[0049] Figure 2 This is a schematic diagram illustrating a result provided in an embodiment of this disclosure;
[0050] Figure 3a This is a flowchart illustrating a method for determining the quality detection result of a video stream file according to an embodiment of this disclosure;
[0051] Figure 3b This is a schematic diagram of a timestamp decoding embodiment provided in this disclosure;
[0052] Figure 4 This is a schematic diagram of a device for determining the quality detection result of a video stream file according to an embodiment of this disclosure;
[0053] Figure 5 This is a schematic diagram of the structure of an electronic device according to an embodiment of this disclosure. Detailed Implementation
[0054] To better understand the above-mentioned objectives, features, and advantages of this disclosure, the solutions disclosed herein will be further described below. It should be noted that, unless otherwise specified, the embodiments and features described herein can be combined with each other.
[0055] Numerous specific details are set forth in the following description in order to provide a full understanding of this disclosure, but this disclosure may also be implemented in other ways different from those described herein; obviously, the embodiments in the specification are only some, and not all, of the embodiments of this disclosure.
[0056] Figure 1 This is a flowchart illustrating a method for determining the quality detection result of a video stream file according to an embodiment of this disclosure. This method can be executed by an electronic device. The electronic device can be exemplarily understood as a device such as a mobile phone, tablet computer, laptop computer, desktop computer, or smart TV. Figure 1 As shown, the method provided in this embodiment includes the following steps:
[0057] S101. Obtain the video stream file and the format information of the video stream file, perform a first verification on the format information of the video stream file, and obtain a first verification result.
[0058] In one example, the video stream file can be a real-time video stream file during a live broadcast, or a historical video stream file during a live broadcast. Specifically, the video stream file can be input into a preset program code file to determine the quality detection result of the video stream file.
[0059] In this embodiment, the format information of the video stream file can be either an audio / video format or a video format. Specifically, the audio / video format can be both audio and video. The video format is video. If the format information of the video stream file is an audio / video format, a first verification is performed on the audio / video format to obtain a first verification result. If the format information of the video stream file is a video format, a first verification is performed on the video format to obtain a first verification result.
[0060] S102. If the first verification result indicates that the format information of the video stream file is correct, then extract the decoding timestamp and playback timestamp of each video frame in the video stream file, and perform a second verification on the decoding timestamp and playback timestamp to obtain the second verification result.
[0061] In one example, the Decode Time Stamp (DTS) of each video frame represents the decoding time of that video frame. The Presentation Time Stamp (PTS) of each video frame represents the playback time of that video frame. In this embodiment, a second verification is performed on the Decode Time Stamp and Presentation Time Stamp of each video frame to obtain a second verification result.
[0062] S103. If the second verification result is passed, the parameter information of each video frame is obtained, and the parameter information of each video frame is verified in the third way to obtain the third verification result.
[0063] In one example, the parameter information for each video frame can be the quantization parameters, visual information fidelity, detail loss metric, temporal motion metric, and peak signal-to-noise ratio. A third verification is performed on the above parameter information to obtain the third verification result.
[0064] In one example, the parameter information of each video frame undergoes a third verification to obtain the third verification result, including:
[0065] The third verification result is obtained by determining whether the parameter information of each video frame is within the preset range.
[0066] In one example, the preset range of the quantization parameters of the video frame can be 0-51, the preset range of visual information fidelity, detail loss index, and temporal motion index is 75 points or higher, and the preset range of peak signal-to-noise ratio is 35 points or higher.
[0067] In one example, after obtaining the third verification result, the method also includes:
[0068] The third verification result is displayed in a preset format to obtain the display result.
[0069] In one example, the default format could be a chart. For details, please refer to [link / reference]. Figure 2 This is a schematic diagram illustrating the results.
[0070] S104. If the third verification result is passed, then the quality detection result of the video stream file is determined to be passed.
[0071] In one example, if the third verification passes after the three verifications mentioned above, then the quality detection result of the video stream file is determined to be passed.
[0072] This disclosure provides a method for determining the quality detection result of a video stream file. The method includes: acquiring a video stream file and its format information; performing a first verification on the format information of the video stream file to obtain a first verification result; if the first verification result indicates that the format information of the video stream file is correct, extracting the decoding timestamp and playback timestamp of each video frame in the video stream file, and performing a second verification on the decoding timestamp and playback timestamp to obtain a second verification result; if the second verification result is successful, acquiring the parameter information of each video frame, performing a third verification on the parameter information of each video frame to obtain a third verification result; if the third verification result is successful, determining that the quality detection result of the video stream file is successful. Using this technical solution, the quality of transcoded video stream files can be completely detected, improving the accuracy of quality detection for transcoded video stream files.
[0073] Figure 3a This illustration shows a flowchart of a method for determining the quality detection result of a video stream file according to an embodiment of this disclosure. This embodiment is an optimization based on the above embodiments, and can be combined with various optional solutions from one or more of the above embodiments.
[0074] like Figure 3a As shown, the method for determining the quality detection result of this video stream file may include the following steps:
[0075] S301. Obtain the video stream file and its format information. Obtain the format information of the video stream file and parse the format information of the video stream file; wherein, the format information of the video stream file is an audio / video format or a video format.
[0076] In one example, this step can be found in step S101.
[0077] S302. If the format information of the video stream file is audio and video format, determine whether the video stream file contains keyframes and audio frames to obtain the first verification result.
[0078] In one example, the keyframe is the first I-frame, which indicates whether the video stream file can play video correctly. The audio frame indicates whether the video stream file can play audio correctly.
[0079] In one example, the process determines whether a video stream file contains keyframes and audio frames, yielding the first verification result, including:
[0080] Determine whether the first frame or a preset number of frames in the video stream file contains keyframes and audio frames to obtain the first verification result.
[0081] In one example, the preset frame rate could be 200 frames. Specifically, it checks if the first frame of the video stream file contains a keyframe. If not, it checks if the preset frame rate contains a keyframe. If so, it determines that the video in the video stream file can be played normally.
[0082] In one example, it is determined whether the first frame of the video stream file contains an audio frame. If not, it is determined whether a preset number of frames contains an audio frame. If so, it is determined that the audio information in the video stream file can be played normally. In this embodiment, determining whether the first frame or the preset number of frames in the video stream file contains a keyframe and determining whether the first frame or the preset number of frames in the video stream file contains an audio frame are not sequential and can be performed simultaneously.
[0083] S303. If the format information of the video stream file is video format, determine whether the video stream file contains keyframes to obtain the first verification result.
[0084] In one example, the system determines whether the first frame or a preset number of frames in the video stream file contains a keyframe, thus obtaining the first verification result.
[0085] S304. If the first verification result indicates that the format information of the video stream file is correct, then extract the decoding timestamp and playback timestamp of each video frame in the video stream file, and determine whether the decoding timestamp is earlier than or equal to the playback timestamp.
[0086] In one example, if the decoding timestamp is earlier than or equal to the playback timestamp, it means that the time difference between the decoding timestamp and the playback timestamp is within a reasonable range, which can support timely decoding and smooth playback.
[0087] S305. If so, obtain the frame rate of the video stream file and determine the reciprocal of the frame rate based on the frame rate.
[0088] In one example, the frame rate of the video stream file can be 30, and the reciprocal of the frame rate is...
[0089] S306. Determine the relationship between the first increment of the decoding timestamp and the reciprocal of the frame rate, and determine the relationship between the second increment of the playback timestamp and the reciprocal of the frame rate to obtain the second verification result.
[0090] In one example, the decoding timestamp of the Nth video frame is DTSn, and the decoding timestamp of the (N-1)th video frame is DTSn-1. Therefore, the first increment of the decoding timestamp is DTSn - DTSn-1. The playback timestamp of the Nth video frame is PTSn, and the playback timestamp of the (N-1)th video frame is PTSn-1.
[0091] If the first increment of the decoding timestamp equals the reciprocal of the frame rate, and the second increment of the playback timestamp equals the reciprocal of the frame rate, then the second verification result is passed. For details, please refer to... Figure 3b The diagram shows a method for decoding timestamps.
[0092] In one example, the size of each video frame is also obtained. By reasonably controlling the size of each video frame, storage and transmission efficiency can be optimized while maintaining video quality, thereby improving the adaptability of the video stream and reducing bandwidth consumption.
[0093] S307. If the second verification result is passed, the parameter information of each video frame is obtained, and the parameter information of each video frame is verified in the third way to obtain the third verification result.
[0094] In one example, this step can be found in step S103.
[0095] S308. If the third verification result is passed, then the quality detection result of the video stream file is determined to be passed.
[0096] In one example, this step can be found in step S104.
[0097] This disclosure provides a method for determining the quality detection result of a video stream file. The method includes: if the format information of the video stream file is audio / video format, determining whether the video stream file contains keyframes and audio frames to obtain a first verification result. If the format information of the video stream file is video format, determining whether the video stream file contains keyframes to obtain a first verification result. If the first verification result indicates that the format information of the video stream file is correct, extracting the decoding timestamp and playback timestamp of each video frame in the video stream file, and determining whether the decoding timestamp is earlier than or equal to the playback timestamp. If so, obtaining the frame rate of the video stream file and determining the reciprocal of the frame rate based on the frame rate. Determining the relationship between the first increment of the decoding timestamp and the reciprocal of the frame rate, and determining the relationship between the second increment of the playback timestamp and the reciprocal of the frame rate to obtain a second verification result. If the second verification result is passed, obtaining the parameter information of each video frame, performing a third verification on the parameter information of each video frame to obtain a third verification result. If the third verification result is passed, determining that the quality detection result of the video stream file is passed. Using this technical solution can significantly improve video processing efficiency and quality assessment accuracy, providing users with a better user experience.
[0098] Figure 4 This is a schematic diagram of a device for determining the quality detection result of a video stream file according to an embodiment of this disclosure. This device can be understood as the aforementioned electronic device or a functional module within the aforementioned electronic device. Figure 4 As shown, the device 40 for determining the quality detection result of the video stream file includes:
[0099] The first verification module 401 is used to obtain the video stream file and the format information of the video stream file, perform a first verification on the format information of the video stream file, and obtain a first verification result.
[0100] The second verification module 402 is used to extract the decoding timestamp and playback timestamp of each video frame in the video stream file if the first verification result indicates that the format information of the video stream file is correct, and to perform a second verification on the decoding timestamp and playback timestamp to obtain a second verification result.
[0101] The third verification module 403 is used to obtain the parameter information of each video frame if the second verification result is passed, perform a third verification on the parameter information of each video frame, and obtain a third verification result.
[0102] The determination module 404 is used to determine that the quality detection result of the video stream file is passed if the third verification result is passed.
[0103] In one example, the first verification module 401 includes:
[0104] The acquisition submodule is used to acquire and parse the format information of the video stream file; the format information of the video stream file is either an audio / video format or a video format.
[0105] The first judgment submodule is used to determine whether the video stream file contains keyframes and audio frames if the format information of the video stream file is audio and video format, and to obtain the first verification result.
[0106] The second judgment submodule is used to determine whether the video stream file contains keyframes if the format information of the video stream file is video format, and to obtain the first verification result.
[0107] In one example, the second judgment submodule is specifically used for:
[0108] Determine whether the first frame or a preset number of frames in the video stream file contains keyframes and audio frames to obtain the first verification result.
[0109] In one example, the second verification module 402 includes:
[0110] The third judgment submodule is used to determine whether the decoding timestamp is earlier than or equal to the playback timestamp;
[0111] The determination submodule is used to obtain the frame rate of the video stream file if the condition is met, and to determine the reciprocal of the frame rate based on the frame rate.
[0112] The fourth judgment submodule is used to determine the relationship between the first increment of the decoding timestamp and the reciprocal of the frame rate, and to determine the relationship between the second increment of the playback timestamp and the reciprocal of the frame rate, so as to obtain the second verification result.
[0113] In one example, the third verification module 403 includes:
[0114] The fifth judgment submodule is used to determine whether the parameter information of each video frame is within the preset range, and obtain the third verification result.
[0115] In one example, after obtaining the third verification result, device 40 further includes:
[0116] The display submodule is used to display the third verification result in a preset format to obtain the display result.
[0117] The apparatus provided in this embodiment can execute the methods of any of the above embodiments, and its execution method and beneficial effects are similar, so they will not be described again here.
[0118] This disclosure also provides an electronic device, which includes: a memory storing a computer program; and a processor for executing the computer program, wherein when the computer program is executed by the processor, it can implement the methods of any of the above embodiments.
[0119] Example, Figure 5 This is a schematic diagram of the structure of an electronic device according to an embodiment of this disclosure. See below for details. Figure 5 The diagram illustrates a structural schematic suitable for implementing the electronic device 1000 in the embodiments of this disclosure. The electronic device 1000 in the embodiments of this disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 5 The electronic device shown is merely an example and should not be construed as limiting the functionality and scope of the embodiments disclosed herein.
[0120] like Figure 5 As shown, the electronic device 1000 may include a processing unit (e.g., a central processing unit, a graphics processor, etc.) 1001, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1008 into a random access memory (RAM) 1003. The RAM 1003 also stores various programs and data required for the operation of the electronic device 1000. The processing unit 1001, ROM 1002, and RAM 1003 are interconnected via a bus 1004. An input / output (I / O) interface 1005 is also connected to the bus 1004.
[0121] Typically, the following devices can be connected to the I / O interface 1005: input devices 1006 including, for example, a touchscreen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 1007 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1008 including, for example, magnetic tape, hard disk, etc.; and communication devices 1009. Communication device 1009 allows electronic device 1000 to communicate wirelessly or wiredly with other devices to exchange data. Although Figure 5 An electronic device 1000 with various devices is shown; however, it should be understood that it is not required to implement or possess all of the devices shown. More or fewer devices may be implemented or possessed alternatively.
[0122] In particular, according to embodiments of this disclosure, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments of this disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via communication device 1009, or installed from storage device 1008, or installed from ROM 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of embodiments of this disclosure.
[0123] It should be noted that the computer-readable medium described in this disclosure can be a computer-readable signal medium or a computer-readable storage medium, or any combination thereof. A computer-readable storage medium can be, for example,—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of a computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this disclosure, a computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in connection with an instruction execution system, apparatus, or device. In this disclosure, a computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals can take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium can be any computer-readable medium other than a computer-readable storage medium, which can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including but not limited to: wires, optical fibers, RF (radio frequency), etc., or any suitable combination thereof.
[0124] In some implementations, clients and servers can communicate using any currently known or future-developed network protocol such as HTTP (Hypertext Transfer Protocol) and can interconnect with digital data communication (e.g., communication networks) of any form or medium. Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), the Internet (e.g., the Internet of Things), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future-developed networks.
[0125] The aforementioned computer-readable medium may be included in the aforementioned electronic device; or it may exist independently and not assembled into the electronic device.
[0126] The aforementioned computer-readable medium carries one or more programs. When the electronic device executes the aforementioned one or more programs, the electronic device causes the following to occur: acquire a video stream file and its format information; perform a first verification on the format information of the video stream file to obtain a first verification result; if the first verification result indicates that the format information of the video stream file is correct, extract the decoding timestamp and playback timestamp of each video frame in the video stream file, and perform a second verification on the decoding timestamp and playback timestamp to obtain a second verification result; if the second verification result is passed, acquire the parameter information of each video frame, perform a third verification on the parameter information of each video frame to obtain a third verification result; if the third verification result is passed, determine that the quality detection result of the video stream file is passed.
[0127] Computer program code for performing the operations of this disclosure can be written in one or more programming languages or a combination thereof, including but not limited to object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0128] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.
[0129] The units described in the embodiments of this disclosure can be implemented in software or hardware. The names of the units are not, in some cases, intended to limit the specific unit.
[0130] The functions described above in this document can be performed, at least in part, by one or more hardware logic components. For example, exemplary types of hardware logic components that can be used, without limitation, include: Field Programmable Gate Arrays (FPGAs), Application-Specific Integrated Circuits (ASICs), Application Standard Products (ASSPs), System-on-Chip (SoCs), Complex Programmable Logic Devices (CPLDs), and so on.
[0131] In the context of this disclosure, a machine-readable medium can be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device. A machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.
[0132] This disclosure also provides a computer-readable storage medium storing a computer program. When the computer program is executed by a processor, it can implement the methods of any of the above embodiments. The execution method and beneficial effects are similar, and will not be described again here.
[0133] It should be noted that, in this document, relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus 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 apparatus. 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 apparatus that includes the element.
[0134] The above are merely specific embodiments of this disclosure, enabling those skilled in the art to understand or implement this disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this disclosure. Therefore, this disclosure is not to be limited to these embodiments, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for determining the quality detection result of a video stream file, characterized in that, The method includes: Obtain a video stream file and its format information, perform a first verification on the format information of the video stream file, and obtain a first verification result; If the first verification result indicates that the format information of the video stream file is correct, then the decoding timestamp and playback timestamp of each video frame in the video stream file are extracted, and the decoding timestamp and playback timestamp are verified again to obtain the second verification result. If the second verification result is passed, the parameter information of each video frame is obtained, and the parameter information of each video frame is verified in the third way to obtain the third verification result. If the third verification result is passed, then the quality detection result of the video stream file is determined to be passed.
2. The method according to claim 1, characterized in that, The first verification of the format information of the video stream file to obtain a first verification result includes: Obtain the format information of the video stream file and parse the format information of the video stream file; wherein, the format information of the video stream file is an audio / video format or a video format; If the format information of the video stream file is audio and video format, then determine whether the video stream file contains keyframes and audio frames to obtain the first verification result; If the format information of the video stream file is video format, then determine whether the video stream file contains keyframes to obtain the first verification result.
3. The method according to claim 2, characterized in that, The step of determining whether the video stream file contains keyframes and audio frames to obtain a first verification result includes: Determine whether the first frame or a preset number of frames in the video stream file contains keyframes and audio frames to obtain a first verification result.
4. The method according to claim 1, characterized in that, The second verification of the decoding timestamp and the playback timestamp to obtain a second verification result includes: Determine whether the decoding timestamp is earlier than or equal to the playback timestamp; If so, obtain the frame rate of the video stream file and determine the reciprocal of the frame rate based on the frame rate; The second verification result is obtained by determining the relationship between the first increment of the decoding timestamp and the reciprocal of the frame rate, and by determining the relationship between the second increment of the playback timestamp and the reciprocal of the frame rate.
5. The method according to claim 1, characterized in that, The third verification of the parameter information of each video frame to obtain the third verification result includes: The third verification result is obtained by determining whether the parameter information of each video frame is within a preset range.
6. The method according to claim 5, characterized in that, After obtaining the third verification result, the method further includes: The third verification result is displayed in a preset format to obtain the display result.
7. A device for determining the quality detection result of a video stream file, characterized in that, The device includes: The first verification module is used to obtain a video stream file and the format information of the video stream file, perform a first verification on the format information of the video stream file, and obtain a first verification result. The second verification module is used to extract the decoding timestamp and playback timestamp of each video frame in the video stream file if the first verification result indicates that the format information of the video stream file is correct, and to perform a second verification on the decoding timestamp and the playback timestamp to obtain a second verification result. The third verification module is used to obtain the parameter information of each video frame if the second verification result is passed, and to perform a third verification on the parameter information of each video frame to obtain a third verification result. The determination module is used to determine that the quality detection result of the video stream file is passed if the third verification result is passed.
8. The apparatus according to claim 7, characterized in that, The first verification module includes: The acquisition submodule is used to acquire the format information of the video stream file and parse the format information of the video stream file; wherein, the format information of the video stream file is an audio / video format or a video format; The first judgment submodule is used to determine whether the video stream file contains keyframes and audio frames if the format information of the video stream file is an audio and video format, and to obtain a first verification result. The second judgment submodule is used to determine whether the video stream file contains keyframes if the format information of the video stream file is a video format, and to obtain the first verification result.
9. An electronic device, characterized in that, include: A processor and a memory, wherein the memory stores a computer program that, when executed by the processor, performs the method of any one of claims 1-6.
10. A computer-readable storage medium, characterized in that, The storage medium stores a computer program that, when executed by a processor, implements the method as described in any one of claims 1-6.