Video testing method and device, storage medium and electronic equipment
By regularly detecting the video playback progress and similarity calculation during the video file playback process, and combining the detection of playback progress and picture similarity, the problem of insufficient verification of picture smoothness in the existing video player testing method is solved, and high-accuracy and reliable smoothness judgment is achieved, thereby improving the user experience.
Patent Information
- Application Number
- CN202510834317.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-20
- Publication Date
- 2025-10-28
AI Technical Summary
Existing media player testing methods lack effective means to verify the smoothness of video playback, making it difficult to meet users' demand for high-quality video playback and affecting user experience.
By regularly detecting the video playback progress of the video file and calculating the similarity between two frames, and combining the detection of the playback progress and the similarity of the frames, it is determined whether the video picture of the video file is smooth.
It improves the accuracy and reliability of judging the smoothness of video playback, avoids misjudgment or missed judgment, meets users' demand for high-quality video playback, and enhances user experience.
Smart Images

Figure CN120856933A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of multimedia testing technology, specifically to a video testing method, apparatus, storage medium, and electronic device. Background Technology
[0002] With the rapid development of digital media technology, media players have become core tools for processing and playing audio and video content. As technology advances and user needs become increasingly diverse, the complexity of their functions and the diversity of user demands continue to rise.
[0003] Current testing methods for media players primarily rely on simple automated scripts. While automated testing improves efficiency to some extent, existing automated test scripts still have significant limitations. Specifically, these scripts mainly test the basic functions of media players (such as play, pause, fast forward, etc.), lacking effective means to verify the smoothness of video playback, making it difficult to meet users' demands for high-quality video playback and impacting the user experience of media players. Summary of the Invention
[0004] In view of this, this disclosure provides a video testing method, apparatus, storage medium, and electronic device, the main purpose of which is to solve the problem that the existing technology lacks an effective means to verify the smoothness of video playback, making it difficult to meet users' demand for high-quality video playback and affecting the user experience of media players.
[0005] According to a first aspect of this disclosure, a video testing method is provided, the method comprising:
[0006] Identify the video file and play it.
[0007] During the playback of the video file, the video playback progress of the video file is periodically detected, and the smoothness of the video frame is determined based on the video playback progress; and / or, the similarity of two frames in the video file is calculated, and the smoothness of the video frame is determined based on the similarity calculation result.
[0008] According to a second aspect of this disclosure, a video testing apparatus is provided, the apparatus comprising:
[0009] The determination module is used to determine the video file and play the video file;
[0010] The processing module is configured to periodically detect the video playback progress of the video file during playback and determine whether the video frame of the video file is smooth based on the video playback progress; and / or to perform similarity calculation on two frames of the video file and determine whether the video frame of the video file is smooth based on the similarity calculation result.
[0011] According to a third aspect of this disclosure, a non-transitory computer-readable storage medium is provided storing computer instructions, wherein the computer instructions are used to cause a computer to perform the method of the first aspect described above.
[0012] According to a fourth aspect of this disclosure, an electronic device is provided, comprising: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the method of the first aspect described above.
[0013] Compared with existing technologies, the video testing method, apparatus, storage medium, and electronic device provided in this disclosure can first determine and play the video file; during the playback of the video file, the playback progress of the video file is periodically detected, and the smoothness of the video frame is determined based on the playback progress; and / or, the similarity of two frames in the video file is calculated, and the smoothness of the video frame is determined based on the similarity calculation result. Through the solution of this disclosure, the playback progress of the video file can be periodically detected during playback, and the playback status of the video can be monitored in real time. Abnormalities during playback, such as frame skipping and stuttering, can be detected in a timely manner, thereby determining whether the video playback is smooth. This disclosure can perform similarity calculation on two frames in the video file during playback. By setting an appropriate similarity threshold, it can distinguish between normal scene changes and frame repetition or skipping caused by playback problems, thereby more accurately determining the smoothness of the video frame. Furthermore, this disclosure can also combine playback progress detection and image similarity detection. Playback progress detection can quickly detect overall progress anomalies during video playback, while image similarity detection can delve into the image content level and capture subtle changes that may cause the image to be choppy. The two methods verify each other, which greatly improves the accuracy and reliability of judging the smoothness of video playback, avoids the misjudgment or omission that may occur with a single detection method, meets users' high-quality video playback needs, and enhances the user experience.
[0014] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description
[0015] 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.
[0016] 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.
[0017] Figure 1 This is a flowchart illustrating a video testing method provided in an embodiment of the present disclosure;
[0018] Figure 2 This is a schematic diagram of the structure of a video testing device provided in an embodiment of this disclosure. Detailed Implementation
[0019] The exemplary embodiments of this disclosure are described below with reference to the accompanying drawings, including various details of the embodiments to aid understanding. These should be considered merely exemplary. Therefore, those skilled in the art will recognize that various changes and modifications can be made to the embodiments described herein without departing from the scope and spirit of this disclosure. Similarly, for clarity and brevity, descriptions of well-known functions and structures are omitted in the following description. It should be noted that, unless otherwise specified, the embodiments of this disclosure and the features described therein can be combined with each other.
[0020] The video testing method, apparatus, storage medium, and electronic device of this disclosure are described below with reference to the accompanying drawings.
[0021] To effectively verify the smoothness of video playback, meet users' demands for high-quality video playback, and improve user experience, embodiments of this disclosure provide a video testing method, such as... Figure 1 As shown, the method includes:
[0022] Step 101: Identify the video file and play it.
[0023] In the embodiments of this disclosure, before the test begins, the test environment can be initialized first. This may include installing and configuring the required software and libraries, such as the test framework (Pytest), the automated browser operation tool (SeleniumWebDriver), image processing libraries, etc., to ensure that the test system can run normally.
[0024] An automated browser operation tool can be used to launch a specified browser (such as Chrome, Firefox, etc.) and automatically navigate to the media player test page. This test page can be a locally deployed test environment page or an online media player page. After opening the page, wait for it to fully load to ensure that subsequent testing operations can proceed smoothly.
[0025] In one possible implementation of this disclosure, a video file selection interface can be provided on the media player page. Users can browse local or online video files through this interface and select the video file they want to test. Users can also upload video files they want to test. After a user selects or uploads a video file, the system can obtain the URL address or local path information of that video file.
[0026] The URL or local path information of the video file is passed to the video loading interface of the media player page, enabling the player to load the specified video. During video loading, automated browser operation tools can simulate user actions, such as clicking the load button or waiting for the page to load automatically, ensuring that the video is correctly loaded into the player. After the video is loaded, automated browser operation tools can simulate the user clicking the play button to start video playback.
[0027] In order to comprehensively test the compatibility and stability of the video player and meet the diverse needs of users, as a possible approach, the video file directory path can be determined in the test script by means of configuration file or code. This directory can be located in the local file system or a network shared directory to ensure that the test script can access the required video file.
[0028] You can use file manipulation functions provided by programming languages (such as Python) to iterate through all video files in a specified video file directory. These video files can include different video formats (such as MP4, AVI, MKV, etc.) and resolutions (such as 480P, 720P, 1080P, 4K, etc.). During the iteration, all video files of different formats and resolutions can be added to a playlist. Simultaneously, you can record the complete path, filename, and file size of each video file for tracking and management during subsequent testing.
[0029] For each video file in the playlist, its URL or local path can be passed to the media player's video loading interface, enabling the player to load the specified video. During video loading, automated browser operation tools can simulate user actions, such as clicking the load button or waiting for the page to load automatically, ensuring the video is correctly loaded into the player. After loading, automated browser operation tools can simulate user actions like clicking the play button, sequentially starting video playback to ensure the video player can play videos correctly across various formats and resolutions.
[0030] Step 102: During the playback of the video file, periodically check the video playback progress and determine whether the video is smooth based on the playback progress; and / or, calculate the similarity between two frames in the video file and determine whether the video is smooth based on the similarity calculation result.
[0031] In this embodiment of the disclosure, the video playback progress can be periodically acquired during video file playback. Under normal circumstances, the video playback progress should increase continuously and steadily over time. If the video playback progress does not change significantly within a certain period or exhibits abrupt changes, it may indicate that stuttering has occurred during video file playback, thus confirming that the video playback is not smooth.
[0032] One possible approach is to obtain the current video playback progress (i.e., the first video playback progress) of the video file through the API interface provided by the media player or by analyzing elements (such as the playback progress bar) on the player page. For example, an automated browser operation tool can be used to simulate user operation on the media player page, find the playback progress bar element, and obtain its attribute values representing the progress (such as width, percentage, etc.).
[0033] The system can periodically detect the video playback progress at preset time intervals, record the video playback progress detected each time, and compare it with the video playback progress detected at the next time (i.e., the second video playback progress). If the first video playback progress is different from the second video playback progress, it is determined that the video file's video is smooth; if the first video playback progress is the same as the second video playback progress, it is determined that the video playback is stuttering and the video file's video is not smooth.
[0034] The preset time interval can be set according to the video playback speed and the required detection sensitivity. Generally, the preset time interval should not be set too long to avoid missing brief stuttering events, nor should it be set too short to avoid increasing unnecessary computational burden. For example, the preset time interval can be set to 1 second, that is, the video playback progress is checked once every 1 second.
[0035] The next moment can be the next detection point reached after the current video playback progress detection is completed, according to a pre-defined time interval. For example, if the preset time interval is 1 second, and the current moment is the 5th second after the video playback started, at which point the system has detected the video playback progress (i.e., the first video playback progress). Then the next moment would be the 6th second after the video playback started. At the 6th second, the system will detect the video playback progress again, and this progress will be the second video playback progress. Subsequently, the first video playback progress detected at the 5th second will be compared with the second video playback progress detected at the 6th second to determine whether the video is smooth.
[0036] As another possible approach, before video playback begins, the system can pre-calculate the expected playback progress of the video file at various points in time based on parameters such as the total duration and frame rate of the video file. For example, for a 10-minute video file with a frame rate of 30 frames per second, the system can calculate the number of frames or time points that should be played per second after playback begins, as the expected playback progress.
[0037] During video playback, the system can obtain the actual video playback progress in real time. The obtained actual playback progress is compared with the pre-calculated expected playback progress. If the actual playback progress is the same as the expected playback progress, it means the video playback speed meets expectations, the video is progressing normally, and the video file can be considered to be playing smoothly. For example, if at 5 seconds after playback begins, the expected playback progress should be 8.33% (5 / 60) of the total video duration, and the actual obtained playback progress is also 8.33% of the total video duration, then the video is judged to be playing smoothly.
[0038] If the actual video playback progress differs from the expected progress, it indicates an abnormal playback speed. The video is not progressing as expected, resulting in stuttering or excessively fast playback. In this case, it can be determined that the video file is not smooth. For example, if at the 5th second of playback, the expected playback progress is 8.33% of the total video duration, but the actual playback progress is only 5%, it indicates that the video playback speed is too slow and there is stuttering, thus determining that the video is not smooth.
[0039] In the embodiments of this disclosure, since the two frames in a video file (such as adjacent frames or frames spaced apart by a specific number of frames) may frequently change during video playback, this is likely a normal playback effect. Therefore, the two frames in a video file should not have a very high degree of similarity. However, since there may be some frames in a video file with high similarity, these frames do not necessarily indicate that the playback is not smooth. For example, there may be switching between the same scenes in the video, or some dynamic elements may not change much in a short period of time. In these cases, the similarity between the two frames may also be high.
[0040] To minimize false positives and ensure that the corresponding judgment mechanism is only triggered when there are obvious signs of stuttering or freezing in the video, the similarity between two frames is only considered to be a sign of video unplayability when they are very similar. This improves the accuracy of video smoothness judgment.
[0041] Therefore, the smoothness of a video can be determined by calculating the similarity between two frames.
[0042] Accordingly, determining whether the video footage of a video file is smooth based on the similarity calculation results can specifically include:
[0043] If the similarity value between two frames is equal to or lower than a preset similarity threshold, the video file is considered to have smooth playback; if the similarity value is higher than the preset similarity threshold, the video file is considered to have choppy playback. The preset similarity threshold can be set according to the actual application scenario and the characteristics of the video content, and is generally set between 0.7 and 0.8. For example, in a shopping mall monitoring system, if the preset similarity threshold is set to 0.75, when the similarity value between adjacent frames is equal to or lower than 0.75, the playback is considered smooth and can be monitored normally; when the similarity value is higher than 0.75, the system can issue a stuttering warning, prompting maintenance personnel to check the network or equipment status.
[0044] One possible approach is to capture keyframes during video playback at preset time intervals or according to the video playback progress. This can be achieved using video processing libraries (such as OpenCV) combined with the relevant functions of a media player. For example, the VideoCapture class from a video processing library can be used to open the video file, and keyframes can be obtained by setting the interval at which frames are read.
[0045] Appropriate similarity calculation algorithms can be selected to compare the similarity between two frames. Commonly used algorithms include Structural Similarity Index (SSIM) and Mean Squared Error (MSE). Among these, the SSIM algorithm is preferred in this invention because it comprehensively considers the brightness, contrast, and structural information of the images, and can more accurately measure the similarity between two images.
[0046] Specifically, tools can be used to extract two frames from a video file. These two frames can be adjacent frames or frames spaced a specific number of frames apart. For example, you can extract frame n and frame (n+1), or frame n and frame (n+10). The mean pixel value, standard deviation pixel value, and covariance of each frame in the two frames can be calculated. The mean pixel value can be the average of all pixel values in each frame; the standard deviation pixel value can be the standard deviation of all pixel values in each frame; and the covariance value can be the covariance between corresponding pixel values in the two frames.
[0047] The similarity value between two frames can be determined based on the pixel mean, pixel standard deviation, and / or covariance. One possible method is to determine the similarity value based on the pixel mean, which reflects the overall brightness level of the image. If the pixel mean values of two frames are similar, it indicates that they are relatively similar in overall brightness.
[0048] Let the mean pixel values of two frames be μ1 and μ2, respectively. Then, the similarity Sμ based on the mean pixel values can be defined as:
[0049]
[0050] The range of the formula can be (0,1]. When the average pixel values of two frames are equal, the Sμ value reaches its maximum value of 1, which indicates that they are completely similar in brightness. As the difference in the average pixel values increases, the Sμ value gradually decreases, and the similarity decreases.
[0051] One possible approach is to determine the similarity between two frames based on their pixel standard deviation. The pixel standard deviation measures the dispersion of pixel grayscale values within the image, reflecting its contrast. If the pixel standard deviations of two frames are similar, they are considered to be similar in contrast. Specifically, if the pixel standard deviations of the two frames are σ1 and σ2, the similarity Sσ based on the pixel standard deviation can be defined as:
[0052]
[0053] The range of the formula can be (0,1]. When the pixel standard deviations of two frames are equal, the Sσ value reaches its maximum value of 1, which can indicate that they are completely similar in contrast. As the difference in pixel standard deviations increases, the Sσ value gradually decreases, and the similarity decreases.
[0054] One possible approach is to determine the similarity between two frames based on their covariance, where covariance measures the degree of linear correlation between the grayscale values of pixels in the two frames. A large and positive covariance indicates that the grayscale values of the pixels in the two frames show a relatively consistent trend; a small or negative covariance indicates that the trends are inconsistent.
[0055] Specifically, let the covariance of two frames be cov, and the pixel standard deviations be σ1 and σ2, respectively. Then, the similarity Scov based on the covariance values can be defined as:
[0056]
[0057] The range of the formula can be (0,1]. When the pixel gray values of two frames are completely linearly correlated (i.e., cov=σ1×σ2 or cov=-σ1×σ2), Scov reaches a maximum value of 1, which can indicate that they are completely similar in the trend of pixel gray value change; when the covariance is 0, Scov=0, which can indicate that the pixel gray values of two frames are not linearly correlated.
[0058] As one possible approach, the similarity between two frames can be determined based on the pixel mean, pixel standard deviation, and covariance. Specifically, weights can be assigned according to the importance of different statistical features to calculate a weighted average similarity (i.e., the similarity between two frames).
[0059] Let the weights of Sμ, Sσ, and Scov be α, β, and γ, respectively, and α + β + γ = 1. Then the total similarity S is:
[0060] S=α×Sμ+β×Sσ+γ×Scov
[0061] In practical application scenarios, a single basic function testing method may not be able to comprehensively and accurately evaluate the smoothness of video playback, and may easily miss some potential problems with smoothness, resulting in a poor user experience.
[0062] Therefore, this disclosure combines playback progress-based detection with image similarity-based detection to form a complementary detection system. Playback progress-based detection can quickly identify overall progress anomalies during video playback, while image similarity-based detection can delve deeper into the image content, capturing subtle changes that may cause playback choppyness. For example, when playback progress-based detection determines that video playback is stuttering, image similarity calculation can further confirm whether an abnormal change has actually occurred; or when image similarity-based detection determines that the playback is choppy, combining the changes in playback progress can more accurately pinpoint the cause of the problem. The two methods mutually verify each other, greatly improving the accuracy and reliability of judging the smoothness of video playback and avoiding the misjudgments or omissions that may occur with a single detection method.
[0063] In this embodiment of the disclosure, if the video playback exhibits stuttering, freezing, or other unsmoothness, the test is deemed a failure, and the complete path of the video file is recorded in the failure list. The test results for all video files are summarized, and the number of videos with smooth playback and those with unsmooth playback is counted. A detailed test report can be generated based on the summarized test results, wherein the test report at least includes the path of the video file for which the test result indicates unsmooth playback.
[0064] In summary, based on the video testing method provided in this disclosure, compared with existing technologies, this disclosure can first determine the video file and play it; during the playback of the video file, the playback progress is periodically checked, and the smoothness of the video frame is determined based on the playback progress; and / or, the similarity between two frames in the video file is calculated, and the smoothness of the video frame is determined based on the similarity calculation result. Through the solution of this disclosure, the playback progress can be periodically checked during video file playback, and the playback status of the video can be monitored in real time. Abnormalities during playback, such as frame skipping and stuttering, can be detected in a timely manner, thereby determining whether the video playback is smooth. This disclosure can perform similarity calculations between two frames in the video file during playback. By setting an appropriate similarity threshold, it can distinguish between normal scene changes and frame repetition or skipping caused by playback issues, thereby more accurately determining the smoothness of the video frame. Furthermore, this disclosure can also combine playback progress detection and image similarity detection. Playback progress detection can quickly detect overall progress anomalies during video playback, while image similarity detection can delve into the image content level and capture subtle changes that may cause the image to be choppy. The two methods verify each other, which greatly improves the accuracy and reliability of judging the smoothness of video playback, avoids the misjudgment or omission that may occur with a single detection method, meets users' high-quality video playback needs, and enhances the user experience.
[0065] Based on the above Figure 1 To illustrate the specific implementation of the method shown, this embodiment provides a video testing device, such as... Figure 2 As shown, the device includes: a determining module 31 and a processing module 32;
[0066] The determining module 31 is used to determine the video file and play the video file;
[0067] The processing module 32 is used to periodically detect the video playback progress of the video file during the playback process of the video file, and determine whether the video frame of the video file is smooth based on the video playback progress; and / or to perform similarity calculation on two frames of the video file, and determine whether the video frame of the video file is smooth based on the similarity calculation result.
[0068] In specific application scenarios, the processing module 32 can be used to determine the playback progress of the first video at the current moment and the playback progress of the second video at the next moment.
[0069] If the playback progress of the first video is different from that of the second video, then the video file is determined to be playing smoothly.
[0070] If the playback progress of the first video is the same as that of the second video, then it is determined that the video file is not playing smoothly.
[0071] In specific application scenarios, the processing module 32 can be used to compare the video playback progress with the expected video playback progress;
[0072] If the video playback progress is the same as the expected video playback progress, then the video file is determined to be playing smoothly.
[0073] If the video playback progress differs from the expected video playback progress, then the video file is determined to be choppy.
[0074] In a specific application scenario, the processing module 32 can be used to capture two frames of the video file, wherein the two frames include at least adjacent frames or frames spaced apart by a specific number of frames.
[0075] Calculate the pixel mean and pixel standard deviation of each frame in the two frames, and calculate the covariance of the two frames.
[0076] The similarity value of the two frames is determined based on the pixel mean, the pixel standard deviation, and / or the covariance value.
[0077] In specific application scenarios, the processing module 32 can be used to determine that the video frame of the video file is smooth if the similarity value of the two frames is equal to or lower than a preset similarity threshold.
[0078] If the similarity value between the two frames is higher than a preset similarity threshold, then the video file is determined to be choppy.
[0079] In a specific application scenario, the processing module 32 can be used to traverse all video files in the video file directory, including video files with different video formats and resolutions;
[0080] Play each video file in turn from the aforementioned video files.
[0081] In specific application scenarios, such as Figure 2 As shown, the device also includes: a generation module 33;
[0082] The generation module 33 is used to summarize the test results and generate a test report. The test results include smooth video and non-smooth video. The test report includes at least the path of the video file in the test result that the video is non-smooth.
[0083] It should be noted that other corresponding descriptions of the functional units involved in the video testing device provided in this embodiment can be found in [reference needed]. Figure 1 The corresponding description in will not be repeated here.
[0084] Based on the above Figure 1 Accordingly, this embodiment also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-described method. Figure 1 The method shown.
[0085] Based on this understanding, the technical solution of this disclosure can be embodied in the form of a software product, which can be stored in a non-volatile storage medium (such as a CD-ROM, USB flash drive, or portable hard drive) and includes several instructions to cause a computer device (such as a personal computer, server, or network device) to execute the methods of various implementation scenarios of this disclosure.
[0086] Based on the above Figure 1 The method shown, and Figure 2 To achieve the above objectives, this disclosure also provides an electronic device, comprising a storage medium and a processor; the storage medium for storing a computer program; and the processor for executing the computer program to implement the above-described virtual device embodiments. Figure 1 The method shown.
[0087] Optionally, the aforementioned physical devices may also include a user interface, a network interface, a camera, radio frequency (RF) circuitry, sensors, audio circuitry, a Wi-Fi module, etc. The user interface may include a display screen, input units such as a keyboard, etc., and optional user interfaces may also include USB interfaces, card reader interfaces, etc. The network interface may optionally include standard wired interfaces, wireless interfaces (such as Wi-Fi interfaces), etc.
[0088] Those skilled in the art will understand that the physical device structure provided in this embodiment does not constitute a limitation on the physical device, and may include more or fewer components, or combine certain components, or have different component arrangements.
[0089] The storage medium may also include an operating system and a network communication module. The operating system is a program that manages the hardware and software resources of the aforementioned physical device, supporting the operation of information processing programs and other software and / or programs. The network communication module is used to enable communication between the various components within the storage medium, as well as communication with other hardware and software in the information processing physical device.
[0090] Through the above description of the embodiments, those skilled in the art can clearly understand that this disclosure can be implemented using software plus necessary general-purpose hardware platforms, or it can be implemented through hardware. This disclosure can first determine a video file and play it; during the playback of the video file, the video playback progress is periodically checked, and the smoothness of the video frame is determined based on the playback progress; and / or, similarity calculation is performed on two frames in the video file, and the smoothness of the video frame is determined based on the similarity calculation result. Through the solution of this disclosure, the video playback progress can be periodically checked during video file playback, and the playback status of the video can be monitored in real time. Abnormalities during playback, such as frame skipping or stuttering, can be detected in a timely manner, thereby determining whether the video playback is smooth. This disclosure can perform similarity calculation on two frames in the video file during playback. By setting an appropriate similarity threshold, it can distinguish between normal scene changes and frame repetition or skipping caused by playback problems, thereby more accurately determining the smoothness of the video frame. Furthermore, this disclosure can also combine playback progress detection and image similarity detection. Playback progress detection can quickly detect overall progress anomalies during video playback, while image similarity detection can delve into the image content level and capture subtle changes that may cause the image to be choppy. The two methods verify each other, which greatly improves the accuracy and reliability of judging the smoothness of video playback, avoids the misjudgment or omission that may occur with a single detection method, meets users' high-quality video playback needs, and enhances the user experience.
[0091] 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 term "comprising" or any other variations thereof is 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. Without further limitations, 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.
[0092] 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 claimed herein.
Claims
1. A video testing method, characterized in that, The method includes: Identify the video file and play it. During the playback of the video file, the video playback progress of the video file is periodically detected, and the smoothness of the video frame is determined based on the video playback progress; and / or, the similarity of two frames in the video file is calculated, and the smoothness of the video frame is determined based on the similarity calculation result.
2. The method according to claim 1, characterized in that, Determining whether the video file's video is smooth based on the video playback progress includes: Determine the current playback progress of the first video and the next playback progress of the second video; If the playback progress of the first video is different from that of the second video, then the video file is determined to be playing smoothly. If the playback progress of the first video is the same as that of the second video, then it is determined that the video file is not playing smoothly.
3. The method according to claim 1, characterized in that, Determining whether the video file's video is smooth based on the video playback progress includes: Compare the video playback progress with the expected video playback progress; If the video playback progress is the same as the expected video playback progress, then the video file is determined to be playing smoothly. If the video playback progress differs from the expected video playback progress, then the video file is determined to be choppy.
4. The method according to claim 1, characterized in that, The similarity calculation of two frames in the video file includes: Two frames are extracted from the video file, wherein the two frames include at least adjacent frames or frames spaced apart by a specific number of frames; Calculate the pixel mean and pixel standard deviation of each frame in the two frames, and calculate the covariance of the two frames. The similarity value of the two frames is determined based on the pixel mean, the pixel standard deviation, and / or the covariance value.
5. The method according to claim 1, characterized in that, The process of determining whether the video footage of the video file is smooth based on the similarity calculation results includes: If the similarity value between the two frames is equal to or lower than a preset similarity threshold, then the video file is determined to be smooth. If the similarity value between the two frames is higher than a preset similarity threshold, then the video file is determined to be choppy.
6. The method according to any one of claims 1-5, characterized in that, The process of determining and playing the video file includes: Iterate through all video files in the video file directory, including video files of different video formats and resolutions; Play each video file in turn from the aforementioned video files.
7. The method according to claim 6, characterized in that, The method further includes: Summarize the test results and generate a test report. The test results include smooth video and non-smooth video. The test report includes at least the path of the video file for which the test result indicates non-smooth video.
8. A video testing device, characterized in that, include: The determination module is used to determine the video file and play the video file; The processing module is configured to periodically detect the video playback progress of the video file during playback and determine whether the video frame of the video file is smooth based on the video playback progress; and / or to perform similarity calculation on two frames of the video file and determine whether the video frame of the video file is smooth based on the similarity calculation result.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the method of any one of claims 1 to 7.
10. An electronic device comprising a storage medium, a processor, and a computer program stored on the storage medium and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method of any one of claims 1 to 7.