Transcoding performance test method and device, electronic equipment and readable storage medium

CN115767073BActive Publication Date: 2026-08-11INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-10-27
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

[0005]本申请实施例的目的是提供一种转码性能测试方法、装置、电子设备及可读存储介质,能够解决现有技术中视频转码测试成本较高,且测试结果一致性较差的问题

Benefits of technology

[0034]This application provides a transcoding performance testing method, comprising: acquiring a test video in a first encoding format; generating a video transcoding task set containing a target number of video transcoding tasks; wherein the video transcoding tasks are used to transcode the test video to a second encoding format; allocating the video transcoding task set to a unit under test to obtain a target video set output by the unit under test after executing the video transcoding task set; wherein the target videos in the target video set have a one-to-one correspondence with the video transcoding tasks; and determining the transcoding performance of the unit under test based on the target video set. This application can generate a video transcoding task set based on the test video and determine the transcoding performance of the unit under test by analyzing the target video set output by the unit under test for the video transcoding task set. This enables automated testing of the transcoding performance of the unit under test, reduces the testing cost, improves testing efficiency, and provides good consistency in test results for different units under test, thus enhancing the practicality of the test results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115767073B_ABST
    Figure CN115767073B_ABST
Patent Text Reader

Abstract

This application discloses a transcoding performance testing method, apparatus, electronic device, and readable storage medium, belonging to the field of testing technology. It includes: acquiring a test video in a first encoding format; generating a video transcoding task set containing a target number of video transcoding tasks; allocating the video transcoding task set to the unit under test, obtaining a target video set output by the unit under test after executing the video transcoding task set; and determining the transcoding performance of the unit under test based on the target video set. It can generate a video transcoding task set based on the test video and determine the transcoding performance of the unit under test by analyzing the target video set output by the unit under test for the video transcoding task set. This enables automated testing of the transcoding performance of the unit under test, reducing testing costs, improving testing efficiency, and ensuring good consistency of test results for different units under test, thus enhancing the practicality of the test results.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of testing technology, specifically relating to a transcoding performance testing method, apparatus, electronic device, and readable storage medium. Background Technology

[0002] With the advent of the internet age and the development of multiple terminals, the demand for video services in various fields is showing an increasing trend. To adapt to the rapidly growing demand for higher video resolution and cross-device playback, the video transcoding business is also growing rapidly.

[0003] In related technologies, as video file sizes and bitrates continue to increase, the computational demands for transcoding are also constantly rising. The video transcoding capabilities previously provided by CPUs alone are no longer sufficient to meet current business needs. Therefore, various sectors within the industry have begun using devices with stronger floating-point computing power, such as GPUs and XPUs, as video transcoding units to meet business requirements. Some manufacturers even offer dedicated video cards for video transcoding, and these video cards, used to construct transcoding units, can fulfill the demands of video transcoding services.

[0004] Currently, in order to evaluate the video transcoding performance of these video transcoding units composed of different GPUs, XPUs, and video cards, tedious manual testing is required. The testing process consumes a lot of manpower, and it is difficult to ensure the consistency of the testing process between different video transcoding units. Furthermore, it is difficult to make horizontal comparisons of test results among multiple video transcoding units. Summary of the Invention

[0005] The purpose of this application is to provide a transcoding performance testing method, apparatus, electronic device, and readable storage medium, which can solve the problems of high video transcoding testing costs and poor consistency of test results in the prior art.

[0006] In a first aspect, embodiments of this application provide a transcoding performance testing method, the method comprising: Obtain the test video in the first encoding format; Generate a video transcoding task set containing a target number of video transcoding tasks; wherein, the video transcoding tasks are used to transcode the test video into a second encoding format, and the target number is a positive integer; The video transcoding task set is assigned to the unit under test to obtain the target video set output by the unit under test after executing the video transcoding task set; wherein, the target videos in the target video set have a one-to-one correspondence with the video transcoding tasks; The transcoding performance of the unit under test is determined based on the target video set.

[0007] Optionally, the transcoding performance includes transcoding rate, and determining the transcoding performance of the unit under test based on the target video set includes: Obtain the transcoding duration for each target video in the target video set; The transcoding rate of the unit under test is determined based on the transcoding duration.

[0008] Optionally, determining the transcoding rate of the unit under test based on the transcoding duration includes: Obtain the video size of the target video or the test video; The transcoding subrate corresponding to the target video is determined based on the video size and the transcoding duration; The transcoding rate of the unit under test is obtained by averaging the transcoding subrates of all target videos.

[0009] Optionally, the transcoding performance includes the transcoding error rate, and determining the transcoding performance of the unit under test based on the target video set includes: Obtain the transcoding verification data corresponding to the test video; wherein the transcoding verification data is determined based on the standard transcoded video corresponding to the test video, and the encoding format of the standard transcoded video is the second encoding format; The target videos in the target video set are compared with the transcoding verification data to obtain the error rate corresponding to each target video; The transcoding error rate of the unit under test is determined based on the error rate.

[0010] Optionally, the error rate includes an audio error rate and an image error rate, and determining the transcoding error rate of the unit under test based on the error rate includes: The target error rate is obtained by summing the audio error rate and image error rate for each target video in the target video set. The transcoding error rate of the unit under test is obtained by averaging the target error rates of all target videos in the target video set.

[0011] Optionally, the error rate includes an audio error rate, and the step of comparing the target videos in the target video set with the transcoding verification data to obtain the error rate corresponding to each target video includes: Based on the number of audio segments or the length of the audio segments corresponding to the test video, the audio information of each target video in the target video set is segmented to obtain a set of target audio segments corresponding to each target video in the target video set; Obtain the set of verification audio segments corresponding to the standard transcoded video from the transcoding verification data; The target audio segment set is compared with the corresponding audio segments in the verification audio segment set to obtain the number of audio segment errors. Based on the number of audio segment errors and the total number of audio segments in the verification audio segment set, the audio error rate corresponding to the target video is determined.

[0012] Optionally, the error rate includes an image error rate, and the step of comparing the target videos in the target video set with the transcoding verification data to obtain the error rate corresponding to each target video includes: Based on the preset timestamp corresponding to the test video, obtain the target keyframe corresponding to each target video in the target video set; Based on the pixel information of the target keyframe, a target pixel information sequence is generated; The target pixel information sequence is compared with the verification pixel information sequence in the transcoding verification data, and the image error rate corresponding to the target video is determined based on the comparison result.

[0013] Optionally, the target pixel information sequence includes a target binary sequence, and generating the target pixel information sequence based on the pixel information of the target keyframe includes: Based on the preset image block resolution corresponding to the test video, the target keyframe is segmented to obtain target image blocks; wherein, the resolution of the target image block is the preset image block resolution; The pixel information of the target image block is obtained, and a target binary sequence corresponding to the target image block is generated based on the pixel information; wherein each pixel in the target image block corresponds to at least one binary bit in the target binary sequence.

[0014] Optionally, the pixel information includes pixel value and pixel color information, the target binary sequence includes a first target binary sequence and a second target binary sequence, and the step of obtaining the pixel information of the target image block and generating the target binary sequence corresponding to the target image block based on the pixel information includes: Obtain the pixel value of each pixel in the target image block, and convert each pixel value into a first binary subsequence according to a preset pixel value conversion rule to obtain a target first binary sequence composed of the first binary subsequence; The pixel color information of each pixel in the target image block is obtained, and each pixel color information is converted into a second binary subsequence according to a preset second conversion rule to obtain a target second binary sequence composed of the second binary subsequence.

[0015] Optionally, the verification pixel information sequence includes a first verification binary sequence and a second verification binary sequence, the image error rate includes a pixel value error rate and a pixel color error rate, and the step of comparing the target pixel information sequence with the verification pixel information sequence in the transcoding verification data, and determining the image error rate corresponding to the target video based on the comparison result, includes: The target first binary sequence and the verification first binary sequence are compared. If the target first binary sequence and the verification first binary sequence are inconsistent, the target keyframe corresponding to the target first binary sequence is determined as a pixel value error frame. The pixel value error rate corresponding to the target video is determined according to the ratio between the number of pixel error frames and the number of keyframes in the standard transcoded video. The target second binary sequence and the verification second binary sequence are compared. If the target second binary sequence and the verification second binary sequence are inconsistent, the target keyframe corresponding to the target second binary sequence is determined as a pixel color error frame. The pixel color error rate corresponding to the target video is determined based on the ratio between the number of pixel color error frames and the number of keyframes in the standard transcoded video.

[0016] Optionally, the method further includes: Obtain the available memory capacity of the unit under test, and the first file size of the test video; The target quantity is determined based on the ratio between the available memory capacity and the size of the first file.

[0017] Optionally, determining the target quantity based on the ratio between the available memory capacity and the size of the first file includes: Obtain the second file size of the standard transcoded video corresponding to the test video; wherein the encoding format of the standard transcoded video is the second encoding format; Calculate the sum of the file sizes of the first file size and the second file size, and determine the target quantity based on the ratio between the available memory capacity and the sum of the file sizes.

[0018] Optionally, determining the target quantity based on the ratio between the available memory capacity and the size of the first file includes: Obtain the second file size of the standard transcoded video corresponding to the test video, and the space size of the target storage space used to store the target video set; wherein, the encoding format of the standard transcoded video is the second encoding format; Calculate the sum of the file sizes of the first file and the second file; If the ratio between the space size and the file size and value is greater than or equal to a preset multiple, the target quantity is determined based on the ratio between the available memory capacity and the first file size; If the ratio of the space size to the file size is less than a preset multiple, the target quantity is determined based on the ratio between the available memory capacity and the file size and value.

[0019] Secondly, embodiments of this application provide a transcoding performance testing apparatus, the apparatus comprising: The acquisition module is used to acquire test videos in the first encoding format; A generation module is used to generate a video transcoding task set containing a target number of video transcoding tasks; wherein, the video transcoding tasks are used to transcode the test video into a second encoding format, and the target number is a positive integer; The testing module is used to allocate the video transcoding task set to the unit under test, and obtain the target video set output by the unit under test after executing the video transcoding task set; wherein, the target videos in the target video set have a one-to-one correspondence with the video transcoding tasks; The performance module is used to determine the transcoding performance of the unit under test based on the target video set.

[0020] Optionally, the transcoding performance includes transcoding rate, and the performance module includes: The transcoding duration submodule is used to obtain the transcoding duration corresponding to each target video in the target video set; The transcoding rate submodule is used to determine the transcoding rate of the unit under test based on the transcoding duration.

[0021] Optionally, the transcoding rate submodule includes: The video size submodule is used to obtain the video size of the target video or the test video; The transcoding subrate submodule is used to determine the transcoding subrate corresponding to the target video based on the video size and the transcoding duration. The transcoding rate submodule is used to average the transcoding rates of all target videos to obtain the transcoding rate of the unit under test.

[0022] Optionally, the transcoding performance includes transcoding error rate, and the performance module includes: The verification data submodule is used to obtain transcoding verification data corresponding to the test video; wherein, the transcoding verification data is determined based on the standard transcoding video corresponding to the test video, and the encoding format of the standard transcoding video is the second encoding format; The error rate submodule is used to compare the target videos in the target video set with the transcoding verification data to obtain the error rate corresponding to each target video; The transcoding error rate submodule is used to determine the transcoding error rate of the unit under test based on the error rate.

[0023] Optionally, the error rate includes audio error rate and image error rate, and the transcoding error rate submodule includes: The target error rate submodule is used to sum the audio error rate and image error rate corresponding to each target video in the target video set to obtain the target error rate corresponding to the target video; The transcoding error rate determination submodule is used to average the target error rates corresponding to all target videos in the target video set to obtain the transcoding error rate of the unit under test.

[0024] Optionally, the error rate includes an audio error rate, and the error rate submodule includes: The target audio segment set submodule is used to segment the audio information of each target video in the target video set according to the number of audio segments or the length of the audio segments corresponding to the test video, so as to obtain the target audio segment set corresponding to each target video in the target video set; The audio segment set verification submodule is used to obtain the set of verification audio segments corresponding to the standard transcoded video from the transcoding verification data; The audio error rate submodule is used to compare the target audio segment set with the corresponding audio segments in the verification audio segment set to obtain the number of audio segment errors, and to determine the audio error rate corresponding to the target video based on the number of audio segment errors and the total number of audio segments in the verification audio segment set.

[0025] Optionally, the error rate includes an image error rate, and the error rate submodule includes: The target keyframe submodule is used to obtain the target keyframe corresponding to each target video in the target video set according to the preset timestamp corresponding to the test video. The target pixel information sequence submodule is used to generate a target pixel information sequence based on the pixel information of the target keyframe; The image error rate submodule is used to compare the target pixel information sequence with the verification pixel information sequence in the transcoding verification data, and determine the image error rate corresponding to the target video based on the comparison result.

[0026] Optionally, the target pixel information sequence includes a target binary sequence, and the target pixel information sequence submodule includes: The target image block submodule is used to segment the target keyframe according to the preset image block resolution corresponding to the test video to obtain target image blocks; wherein, the resolution of the target image block is the preset image block resolution; The target binary sequence submodule is used to acquire pixel information of the target image block and generate a target binary sequence corresponding to the target image block based on the pixel information; wherein each pixel in the target image block corresponds to at least one binary bit in the target binary sequence.

[0027] Optionally, the pixel information includes pixel values ​​and pixel color information, the target binary sequence includes a first target binary sequence and a second target binary sequence, and the target binary sequence submodule includes: The target first binary sequence submodule is used to obtain the pixel value of each pixel in the target image block, and convert each pixel value into a first binary subsequence according to a preset pixel value conversion rule to obtain the target first binary sequence composed of the first binary subsequence; The target second binary sequence submodule is used to obtain the pixel color information of each pixel in the target image block, and convert each pixel color information into a second binary subsequence according to a preset second conversion rule, so as to obtain the target second binary sequence composed of the second binary subsequence.

[0028] Optionally, the verification pixel information sequence includes a first verification binary sequence and a second verification binary sequence, the image error rate includes a pixel value error rate and a pixel color error rate, and the image error rate submodule includes: The pixel value error rate submodule is used to compare the target first binary sequence and the verification first binary sequence. If the target first binary sequence and the verification first binary sequence are inconsistent, the target keyframe corresponding to the target first binary sequence is determined as a pixel value error frame. The pixel value error rate corresponding to the target video is determined based on the ratio between the number of pixel error frames and the number of keyframes in the standard transcoded video. The pixel color error rate submodule is used to compare the target second binary sequence and the check second binary sequence. If the target second binary sequence and the check second binary sequence are inconsistent, the target keyframe corresponding to the target second binary sequence is determined as a pixel color error frame. The pixel color error rate corresponding to the target video is determined based on the ratio between the number of pixel color error frames and the number of keyframes in the standard transcoded video.

[0029] Optionally, the device further includes: The first file size module is used to obtain the available memory capacity of the unit under test and the first file size of the test video; The target quantity module is used to determine the target quantity based on the ratio between the available memory capacity and the size of the first file.

[0030] Optionally, the target quantity module includes: The second file size submodule is used to obtain the second file size of the standard transcoded video corresponding to the test video; wherein, the encoding format of the standard transcoded video is the second encoding format; The target quantity submodule is used to calculate the sum of the file sizes of the first file size and the second file size, and determine the target quantity based on the ratio between the available memory capacity and the sum of the file sizes.

[0031] Optionally, the target quantity module includes: The space size submodule is used to obtain the second file size of the standard transcoded video corresponding to the test video, and the space size of the target storage space for storing the target video set; wherein, the encoding format of the standard transcoded video is the second encoding format; The file size and value submodule is used to calculate the file size and value of the first file size and the second file size; The first target quantity submodule is used to determine the target quantity based on the ratio between the available memory capacity and the first file size when the ratio between the space size and the file size and value is greater than or equal to a preset multiple. The second target quantity submodule is used to determine the target quantity based on the ratio between the available memory capacity and the file size when the ratio of the space size to the file size is less than a preset multiple.

[0032] Thirdly, embodiments of this application provide an electronic device, which includes a processor and a memory. The memory stores programs or instructions that can run on the processor, and when the programs or instructions are executed by the processor, they implement the transcoding performance testing method described above.

[0033] Fourthly, embodiments of this application provide a readable storage medium on which a program or instruction is stored, and when the program or instruction is executed by a processor, it implements the above-described transcoding performance testing method.

[0034] This application provides a transcoding performance testing method, comprising: acquiring a test video in a first encoding format; generating a video transcoding task set containing a target number of video transcoding tasks; wherein the video transcoding tasks are used to transcode the test video to a second encoding format; allocating the video transcoding task set to a unit under test to obtain a target video set output by the unit under test after executing the video transcoding task set; wherein the target videos in the target video set have a one-to-one correspondence with the video transcoding tasks; and determining the transcoding performance of the unit under test based on the target video set. This application can generate a video transcoding task set based on the test video and determine the transcoding performance of the unit under test by analyzing the target video set output by the unit under test for the video transcoding task set. This enables automated testing of the transcoding performance of the unit under test, reduces the testing cost, improves testing efficiency, and provides good consistency in test results for different units under test, thus enhancing the practicality of the test results. Attached Figure Description

[0035] Figure 1 This is a flowchart of the steps of a transcoding performance testing method provided in an embodiment of this application; Figure 2 This is a flowchart of another transcoding performance testing method provided in an embodiment of this application; Figure 3 This is a flowchart of another transcoding performance testing method provided in the embodiments of this application; Figure 4 This is a schematic diagram of a target image block provided in an embodiment of this application; Figure 5 This is another schematic diagram of a target image block provided in an embodiment of this application; Figure 6 This is a schematic diagram of target keyframe comparison provided in an embodiment of this application; Figure 7 This is a block diagram of a transcoding performance testing device provided in an embodiment of this application; Figure 8 This is an electronic device provided in the embodiments of this application; Figure 9 This is a schematic diagram of the hardware structure of an electronic device provided in an embodiment of this application. Detailed Implementation

[0036] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.

[0037] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.

[0038] The transcoding performance testing method provided in this application will be described in detail below with reference to the accompanying drawings, through specific embodiments and application scenarios.

[0039] Reference Figure 1 , Figure 1 The following is a flowchart illustrating the steps of a transcoding performance testing method provided in an embodiment of this application: Figure 1 As shown, the specific steps include: Step 101: Obtain the test video in the first encoding format.

[0040] Video encoding formats are diverse. For example, video encoding formats can include the MPEG series, H.26X series, AVS, RMVB, etc. Among them, the H.26X series is led by the ITU (International Telecommunication Union), and specifically includes encoding formats such as H.261, H.263, H.264, and H.265.

[0041] Videos can be transcoded, changing from one encoding format to another. For example, a video encoded in H.264 can be converted to H.265 to obtain a video in H.265 format.

[0042] In this embodiment of the application, a test video for testing the unit to be tested can be preset. The encoding format of the test video is a first encoding format. The first encoding format can be a conventional video encoding format, such as H.265 or RMVB format in the above example, or it can be a video encoding format independently developed by technicians or users. This embodiment of the application does not specifically limit the first encoding format.

[0043] Step 102: Generate a video transcoding task set containing a target number of video transcoding tasks; wherein, the video transcoding tasks are used to transcode the test video into a second encoding format, and the target number is a positive integer.

[0044] A video transcoding task refers to the task of transcoding a test video into a second encoding format. Each video transcoding task can transcode a copy of the test video. The second encoding format is different from the first encoding format.

[0045] In this embodiment, the target number can be an integer greater than 0. A larger target number results in more video transcoding tasks being generated for testing, leading to higher accuracy of the test results obtained through these tasks. Conversely, a smaller target number results in fewer video transcoding tasks being generated, resulting in higher testing efficiency. Technical personnel can flexibly determine the target number based on actual needs.

[0046] For example, if the first encoding format of the test video is H.264 and the second encoding format is H.265, and the target number is 5, then a video transcoding task set containing 5 video transcoding tasks can be generated. Each video transcoding task in the video transcoding task set is used to convert one test video from H.264 to H.265 format.

[0047] Step 103: Assign the video transcoding task set to the unit under test to obtain the target video set output by the unit under test after executing the video transcoding task set; wherein, the target videos in the target video set have a one-to-one correspondence with the video transcoding tasks.

[0048] The unit under test can be a computing unit with computational capabilities, such as a central processing unit (CPU), a system-on-a-chip (SOC), an XPU, etc. Furthermore, due to the nature of video transcoding, its computation process involves a large number of floating-point operations. To improve the efficiency of video transcoding, most systems currently use devices with strong floating-point computing capabilities. Therefore, the aforementioned unit under test can also be a device with strong floating-point computing capabilities, such as a display card containing a graphics processing unit (GPU), a GPU hardware accelerator card, etc. Additionally, the unit under test can also be a video transcoding card specifically designed for video transcoding.

[0049] Furthermore, the unit to be tested can also be a computing array composed of multiple computing units, such as a computing array composed of 8 identical GPU hardware acceleration cards, and the computing array is used as the unit to be tested.

[0050] In this embodiment of the application, in order to test the video transcoding performance of the unit under test, after obtaining the video transcoding task set, the video transcoding task set can be assigned to the unit under test, so that the unit under test can process all the video transcoding tasks in the video transcoding task set, perform video transcoding operations from the first encoding format to the second encoding format on the test video, and output a target video obtained by transcoding the test video for each video transcoding task.

[0051] Specifically, when allocating a video transcoding task set to the unit under test, the entire video transcoding task set can be allocated to the unit under test at once, so that the unit under test can process all the video transcoding tasks in the video transcoding task set in parallel and obtain a target video set consisting of the target videos corresponding to all the video transcoding tasks output by the unit under test at once. Alternatively, one video transcoding task in the video transcoding task set can be allocated to the unit under test. After the unit under test completes the processing of the video transcoding task, the next video transcoding task in the video transcoding task set can be allocated to the unit under test, until all the video transcoding tasks in the video transcoding task set have been allocated, thereby gradually obtaining a complete target video set.

[0052] Step 104: Determine the transcoding performance of the unit to be tested based on the target video set.

[0053] In this embodiment, the transcoding performance of the unit under test may include at least one of transcoding rate, transcoding error rate, transcoding accuracy, and transcoding energy efficiency ratio, so that users can evaluate the transcoding performance of the unit under test from one or more dimensions. This facilitates comparison of transcoding performance differences between different units under test and guides users to select a transcoding operation unit that meets business requirements. Furthermore, the transcoding performance can also be a score, which can be determined by a combination of multiple factors including transcoding rate, transcoding error rate, transcoding accuracy, and transcoding energy efficiency ratio.

[0054] After obtaining the target video set, the transcoding performance of the unit under test can be evaluated based on the target video set and its related information. Regarding transcoding rate, the generation time of each target video in the target video set, as well as the allocation time of the corresponding video transcoding task (the time allocated to the unit under test) can be obtained. Then, based on the generation time and allocation time of each target video, the transcoding speed of each target video can be determined. Finally, the transcoding rate of the unit under test can be determined based on the transcoding speed of all target videos.

[0055] For example, at 12:12:10, a set of video transcoding tasks containing 8 video transcoding tasks is allocated to the unit under test. At 12:34:10, the unit under test outputs 8 target videos simultaneously. The transcoding speed for each target video is 22 minutes. It can be calculated that the video transcoding rate of the unit under test is 2 minutes and 45 seconds per test video. That is, it takes 2 minutes and 45 seconds to transcode each test video from the first encoding format to the second encoding format.

[0056] When multiple different test units are tested using the same test video, their respective transcoding rates can be obtained, and the transcoding rates of different test units can be compared horizontally. For example, if the transcoding rate of test unit A is 2 minutes and 45 seconds per test video, and the transcoding rate of another test unit B is 3 minutes per test video, then the transcoding performance of test unit A is stronger than that of test unit B.

[0057] To address transcoding error rate, in one implementation, video frames of the target video can be compared with those of the test video to determine the differences between the two video frames, and the transcoding error rate can be determined based on these differences. The comparison may include pixel information, feature information, etc., of the video frames. Since the encoded formats of the videos before and after transcoding are different, the image content information they carry is usually consistent. Therefore, by comparing the content of the target video with the content of the test video, the transcoding error rate of each target video can be determined, and the transcoding error rate of the unit under test can then be determined based on the transcoding error rate of each target video.

[0058] For example, the corresponding video frame pairs in the target video and the test video can be input into the image similarity detection model to obtain the similarity of all video frames in the target video. If there are 1000 target video frames, and 990 of them have a similarity of 100%, while the other 10 have a similarity of less than 100%, then the transcoding error rate of the target video is 1%. If the unit under test outputs a total of 8 target videos, and 4 of them have a transcoding error rate of 3%, while the other 4 have a transcoding error rate of 1%, then the transcoding error rate of the unit under test is (4*3+4*1) / 8*100%=2%.

[0059] In another implementation, the test video can be pre-transcoded to obtain a standard transcoded video corresponding to the test video. This standard transcoded video has a 100% transcoding accuracy, meaning no errors occurred during the conversion of the test video to the standard transcoded video. Therefore, this standard transcoded video can be used as a sample to replace the test video in comparison with the target video. Since both the standard transcoded video and the target video are in the second encoding format, the comparison between them can be more accurate and efficient.

[0060] In summary, the transcoding performance testing method provided in this application includes: acquiring a test video in a first encoding format; generating a video transcoding task set containing a target number of video transcoding tasks; wherein the video transcoding tasks are used to transcode the test video to a second encoding format; allocating the video transcoding task set to a unit under test to obtain a target video set output by the unit under test after executing the video transcoding task set; wherein the target videos in the target video set have a one-to-one correspondence with the video transcoding tasks; and determining the transcoding performance of the unit under test based on the target video set. This application can generate a video transcoding task set based on the test video and determine the transcoding performance of the unit under test by analyzing the target video set output by the unit under test for the video transcoding task set. This enables automated testing of the transcoding performance of the unit under test, reduces the testing cost, improves testing efficiency, and provides good consistency in test results for different units under test, thus enhancing the practicality of the test results.

[0061] Reference Figure 2 , Figure 2 The following is a flowchart illustrating the steps of another transcoding performance testing method provided in an embodiment of this application: Figure 2 As shown, the specific steps include: Step 201: Obtain the test video in the first encoding format.

[0062] This step can be found in step 101, and will not be repeated in this embodiment.

[0063] Step 202: Generate a video transcoding task set containing a target number of video transcoding tasks; wherein the video transcoding tasks are used to transcode the test video into a second encoding format, and the target number is a positive integer.

[0064] This step can be found in step 102, and will not be repeated in this embodiment.

[0065] Typically, when a unit under test executes a test task, it needs to retrieve the video data to be transcoded from its own memory (i.e., the unit under test's own Random Access Memory (RAM)) to ensure transcoding efficiency, and store the data generated during the transcoding process in memory. Therefore, in this embodiment, when allocating video transcoding tasks to the unit under test, the target video needs to be stored in the unit under test's memory, resulting in a certain limitation on the number of target video transcoding tasks that can be processed simultaneously. In this embodiment, the target number can be determined by the following sub-steps 2021 to 2022.

[0066] Optionally, step 202 may include: Sub-step 2021: Obtain the available memory capacity of the unit under test and the first file size of the test video.

[0067] The available memory capacity of the unit under test (UUT) refers to the amount of memory currently available to the UUT in the memory directly connected to its processor. For example, if the UUT is a display card with a total memory (VRAM) of 8GB, of which 2GB is currently in use, then the available memory capacity of the display card is 6GB.

[0068] In this embodiment of the application, in order to determine the target number of video transcoding tasks that the test unit can process simultaneously, it is also necessary to obtain the first file size of the test video. For example, the first file size of a certain test video can be 3GB.

[0069] Sub-step 2022: Determine the target quantity based on the ratio between the available memory capacity and the size of the first file.

[0070] After obtaining the available memory capacity of the unit under test and the size of the first file of the test video, the target quantity can be determined based on the ratio between the available memory capacity and the first file size. Specifically, the ratio of memory capacity to the first file size can be determined first, and then the integer part of the ratio can be determined as the target quantity. This target quantity represents the number of test videos that the memory of the unit under test can currently hold, which is equivalent to the number of video transcoding tasks for the test videos that the unit under test can currently start simultaneously.

[0071] For example, if the available memory capacity of a unit under test is 6GB and the size of the first file of the test video is 1.6GB, then the ratio of the two is 3.75, and the target quantity can be obtained by truncating the integer part.

[0072] It should be noted that if the available memory capacity is less than the size of the first file, the memory of the unit to be tested cannot currently hold the test video, and therefore no video test task can be created. In this case, a reminder can be sent to the user that there is insufficient memory and the test task cannot be created.

[0073] In addition, in some cases (such as when the unit under test has strong encoding capabilities or the transcoding task is relatively simple), the unit under test generates data at a fast speed during the encoding process, which exceeds the storage rate of the external memory. The data generated by the unit under test during the encoding process also needs to be stored in its memory. In this case, the target number can also be determined in the following sub-steps 20221 to 20222.

[0074] Optionally, sub-step 2022 may include: Sub-step 20221: Obtain the second file size of the standard transcoded video corresponding to the test video; wherein, the encoding format of the standard transcoded video is the second encoding format.

[0075] Before generating the video transcoding task, the test video can be transcoded in advance to obtain the standard transcoded video corresponding to the test video. The video format of the standard transcoded video is the second encoding format, and there are no errors in the standard transcoded video during the transcoding process.

[0076] When it is necessary to determine the target quantity, the size of the second file of the standard transcoded video corresponding to the test video can also be obtained. Since the test video and the standard transcoded video have different formats, the standard transcoded video may be larger or smaller than the test video, or it may be the same as the test video. Therefore, the size of the second file can be the same as or different from the size of the first file.

[0077] Sub-step 20222: Calculate the sum of the file sizes of the first file size and the second file size, and determine the target quantity based on the ratio between the available memory capacity and the sum of the file sizes.

[0078] After obtaining the first file size and the second file size, the two can be summed to obtain the file size sum value. Then, the ratio between the available memory capacity of the unit under test and the file size sum value can be calculated. Finally, the integer part of the ratio is used as the target quantity.

[0079] For example, if the first file size is 1.8GB, the second file size is 0.7GB, and the available memory capacity of the test unit is 8GB, then the calculated sum of file sizes is 2.5GB. The ratio of available memory capacity to the sum of file sizes is 3.2. After rounding the comparison value, the target quantity is 3.

[0080] In this embodiment, the target number of test videos that the test unit can transcode simultaneously can be determined based on the size of the test video and the size of the standard transcoded video of the second encoding format corresponding to the test video. This avoids the situation where too many transcoding tasks cause memory overflow of the test unit, thereby affecting the transcoding performance and improving the accuracy of the transcoding performance of the test unit determined in subsequent steps.

[0081] Step 203: Assign the video transcoding task set to the unit under test to obtain the target video set output by the unit under test after executing the video transcoding task set; wherein, the target videos in the target video set have a one-to-one correspondence with the video transcoding tasks.

[0082] This step can be found in step 103, and will not be repeated in this embodiment.

[0083] Step 204: Obtain the transcoding duration corresponding to each target video in the target video set.

[0084] In this embodiment, the transcoding performance of the unit under test may include the transcoding rate. When the unit under test performs a video transcoding task, the transcoding duration used by the unit under test to generate each target video can be recorded, and the transcoding rate of the unit under test can be determined in subsequent steps using this transcoding duration.

[0085] In addition, the generation time of each target video in the target video set and the allocation time of the video transcoding task corresponding to each target video in the target video set (the time allocated to the unit to be tested) can also be recorded. Then, based on the generation time and allocation time of each target video, the transcoding duration of each target video can be determined.

[0086] For example, if a set of video transcoding tasks containing 8 video transcoding tasks is allocated to the unit under test at 12:12:10, and the unit under test outputs 8 target videos at 12:34:10, then the transcoding time for each target video is 22 minutes.

[0087] Step 205: Determine the transcoding rate of the unit under test based on the transcoding duration.

[0088] After obtaining the transcoding duration for each target video, the transcoding rate of the unit under test can be determined based on this transcoding duration. Specifically, the transcoding rate of the unit under test can be obtained by averaging the transcoding durations for each target video.

[0089] Furthermore, the transcoding rate of the unit under test can also be represented by the ratio of computational complexity to time. Specifically, the transcoding rate of the unit under test can be determined by the steps in sub-steps 2051 to 2052 below.

[0090] Optionally, step 205 may include: Sub-step 2051: Obtain the video size of the target video or the test video.

[0091] Video size refers to the size of the video file. For example, the target video can be 5GB in size, and the test video can be 6GB in size.

[0092] Sub-step 2052: Determine the transcoding sub-rate corresponding to the target video based on the video size and the transcoding duration.

[0093] In the embodiments of this application, the transcoding sub-rate corresponding to the target video can represent the generation rate of the target video, or it can represent the processing rate of the test video when converting the test video into the target video.

[0094] Specifically, in one implementation, the transcoding sub-rate of the target video during the transcoding process can be determined by the video size and transcoding duration of the target video. This transcoding sub-rate represents the generation rate of the target video. Specifically, if the target video size is 6GB and the transcoding duration is 60 seconds, then the transcoding sub-rate of the target video can be 6GB / 60S = 0.1GB / S = 100MB / S.

[0095] In another real-time method, the transcoding sub-rate of the target video during transcoding can be determined by comparing the size of the test video and the transcoding duration of the target video. This transcoding sub-rate represents the processing speed of the test video. Specifically, if the test video is 9GB in size and the transcoding duration of the target video is 90 seconds, then the transcoding sub-rate of the target video could be 9GB / 60S = 0.15GB / S = 150MB / S.

[0096] It should be noted that technicians can select an appropriate video size to calculate the transcoding subrate of the target video according to actual needs, and this application embodiment does not impose specific limitations on this.

[0097] Sub-step 2053: Average the transcoding sub-rates of all target videos to obtain the transcoding rate of the unit under test.

[0098] After obtaining the transcoding subrate of each target video, the transcoding rate of the unit under test can be calculated based on this transcoding subrate. Specifically, the transcoding subrates of all target videos can be averaged to obtain the transcoding rate of the unit under test.

[0099] It should be noted that when the unit under test processes all video transcoding tasks in the video transcoding task set in parallel, the transcoding rate of the unit under test can be determined by the ratio of the sum of the above-mentioned transcoding sub-rates to the total number of target videos (i.e., the number of targets). For example, if all video transcoding tasks are processed in parallel, and the unit under test outputs 8 target videos, with each target video having a transcoding rate of 80MB / s, then the transcoding rate of the unit under test is 80*8 / 8=80MB / s.

[0100] In this embodiment of the application, the transcoding rate of the unit to be tested can be determined based on the video size of the target video or the video size of the test video, which improves the flexibility and accuracy of determining the transcoding rate.

[0101] In summary, the transcoding performance testing method provided in this application includes: acquiring a test video in a first encoding format; generating a video transcoding task set containing a target number of video transcoding tasks; wherein the video transcoding tasks are used to transcode the test video to a second encoding format; allocating the video transcoding task set to a unit under test to obtain a target video set output by the unit under test after executing the video transcoding task set; wherein the target videos in the target video set have a one-to-one correspondence with the video transcoding tasks; and determining the transcoding performance of the unit under test based on the target video set. This application can generate a video transcoding task set based on the test video and determine the transcoding performance of the unit under test by analyzing the target video set output by the unit under test for the video transcoding task set. This enables automated testing of the transcoding performance of the unit under test, reduces the testing cost, improves testing efficiency, and provides good consistency in test results for different units under test, thus enhancing the practicality of the test results.

[0102] Reference Figure 3 , Figure 3 The following is a flowchart illustrating the steps of another transcoding performance testing method provided in an embodiment of this application: Figure 3 As shown, the specific steps include: Step 301: Obtain the test video in the first encoding format.

[0103] This step can be found in step 101, and will not be repeated in this embodiment.

[0104] Step 302: Generate a video transcoding task set containing a target number of video transcoding tasks; wherein the video transcoding tasks are used to transcode the test video into a second encoding format, and the target number is a positive integer.

[0105] This step can be found in steps 102 and 202, and will not be repeated in the embodiments of this application.

[0106] Furthermore, since the target files generated by transcoding ultimately need to be exported to the target storage space for analysis in subsequent processes, in this embodiment of the application, the size of the target storage space used to store the target video set also needs to be considered when determining the number of targets. Specifically, the method for determining the number of targets can also refer to the following sub-steps 3021 to 3025.

[0107] Optionally, step 302 may include: Sub-step 3021: Obtain the available memory capacity of the unit under test and the first file size of the test video.

[0108] This step can be found in sub-step 2021, and will not be repeated in this application embodiment.

[0109] Sub-step 3022: Obtain the second file size of the standard transcoded video corresponding to the test video, and the space size of the target storage space used to store the target video set; wherein, the encoding format of the standard transcoded video is the second encoding format.

[0110] In this embodiment, in addition to obtaining the second file size of the standard transcoded video corresponding to the test video, the size of the target storage space used to store the target video set can also be obtained. For example, if the target video set needs to be stored in the storage space where the test video is located, the size of the target storage space is the remaining storage capacity of the storage space where the test video is located.

[0111] Sub-step 3023: Calculate the sum of the file sizes of the first file size and the second file size.

[0112] This step can be found in sub-step 20222, and will not be repeated in this application embodiment.

[0113] Sub-step 3024: If the ratio between the space size and the file size and value is greater than or equal to a preset multiple, determine the target quantity based on the ratio between the available memory capacity and the first file size.

[0114] The preset multiplier can be a large value, such as 10, 20, etc. The ratio between the target storage space size and the above file size and value can reflect the size relationship between the target storage space size and the file size and value. For example, if the above space size is 100GB and the file size and value is 10GB, then the ratio of space size to file size is 10, which means that the space size is 10 times the file size and value.

[0115] Therefore, if the ratio between the space size and the file size is greater than or equal to a preset multiplier, it indicates that the target storage space is sufficient. In this case, the target storage space can be used as the storage space for the unit under test, allowing the unit under test to store the transcoding data generated during the transcoding process in the target storage space. In this scenario, the memory of the test storage space only needs to store the test video; the target quantity can be determined based on the ratio of the available memory capacity of the unit under test to the size of the first file.

[0116] Specifically, the ratio of available memory capacity to the size of the first file can be rounded to obtain the target number.

[0117] Sub-step 3025: If the ratio of the space size to the file size is less than a preset multiple, determine the target quantity based on the ratio between the available memory capacity and the file size and value.

[0118] Accordingly, if the ratio between the space size and the file size and value is less than a preset multiple, it indicates that the target storage space is insufficient. In this case, it is necessary to consider whether the target storage space can hold the files that need to be stored later. The target quantity can be determined based on the ratio between the available memory capacity of the unit under test and the aforementioned file size and value. See sub-step 20222 for details; this embodiment will not be repeated here.

[0119] In this embodiment, the sufficiency of the target storage space can be determined based on its size. If the target storage space is sufficient, test videos can be stored only in the memory of the unit under test, thereby determining a larger target quantity. This allows for the use of more video transcoding tasks to test the unit under test, improving the accuracy of the test results. Furthermore, if the target storage space is insufficient, the impact of storing the target videos in the memory of the unit under test is considered when determining the target quantity, preventing test failure due to insufficient target storage space.

[0120] Step 303: Assign the video transcoding task set to the unit under test to obtain the target video set output by the unit under test after executing the video transcoding task set; wherein, the target videos in the target video set have a one-to-one correspondence with the video transcoding tasks.

[0121] This step can be found in step 103, and will not be repeated in this embodiment.

[0122] Step 304: Obtain transcoding verification data corresponding to the test video; wherein the transcoding verification data is determined based on the standard transcoded video corresponding to the test video, and the encoding format of the standard transcoded video is the second encoding format.

[0123] In this embodiment of the application, the transcoding verification data can be the standard transcoded video itself corresponding to the test video, or it can be the data obtained after processing the standard transcoded video. For example, based on a preset timestamp, key frames corresponding to a preset timestamp can be extracted from the standard transcoded video, and the data composed of the key frames can be used as transcoding verification data.

[0124] In subsequent processing, the transcoded verification data can be compared with the target video generated by the unit under test to determine the error rate of the target video.

[0125] Step 305: Compare the target videos in the target video set with the transcoding verification data to obtain the error rate corresponding to each target video.

[0126] When the transcoding verification data contains video frames from the standard transcoded video, since the standard transcoded video has no transcoding errors, the transcoding verification data can be used as a benchmark and compared with each target video in the target video set to determine the error rate of each target video. Specifically, each frame in the target video can be compared with the corresponding video frame in the transcoding verification data, and the error rate of the target video can be determined based on the ratio of the number of inconsistent video frames to the total number of video frames in the transcoding verification data.

[0127] For example, if the transcoding verification data contains 100 frames of standard transcoded video, and the result shows that 2 of these 100 frames are inconsistent with the corresponding frames in a target video, then the error rate of the target video can be 2%.

[0128] Furthermore, since the video contains not only images but also audio, transcoding will not only transcode the images but also the audio information simultaneously. Therefore, in this embodiment, the error rate of the target video can further include both image error rate and audio error rate. Specifically, the image error rate can be determined using the methods in sub-steps 3051 to 3053, and the audio error rate can be determined using the methods in sub-steps 3054 to 3055.

[0129] Optionally, step 305 may include: Sub-step 3051: Based on the preset timestamp corresponding to the test video, obtain the target keyframe corresponding to each target video in the target video set.

[0130] To determine the image error rate, it is necessary to compare the image frames of the target video with the image frames of the corresponding standard transcoded video of the test video. However, since a video often contains a large number of image frames, for example, a test video with a duration of 10 minutes and a frame rate of 30 frames per second contains 18,000 image frames, comparing all image frames would not only be inefficient but would also consume a huge amount of computing resources.

[0131] Therefore, in this embodiment, a preset timestamp corresponding to the test video can be pre-set. This preset timestamp is used to indicate a certain playback position in the test video. For example, if a preset timestamp of a test video is 1 minute and 30 seconds, then an image frame with a playback position of 1 minute and 30 seconds can be selected from the test video using this preset timestamp.

[0132] Since the target video and the test video have the same duration, the target keyframes corresponding to each preset timestamp can be determined from the target video using the preset timestamps corresponding to the test video. Therefore, in subsequent image comparison processes, only the target keyframes corresponding to the preset timestamps are compared, which can greatly reduce the number of image frames that need to be compared, improve comparison efficiency, and reduce resource consumption during the comparison process.

[0133] Sub-step 3052: Generate a target pixel information sequence based on the pixel information of the target keyframe.

[0134] In conventional image comparison schemes, the entire image data needs to be compared, which is typically complex, consumes significant computing resources, and has low efficiency. Therefore, to improve comparison efficiency, in this embodiment, a target pixel information sequence can be generated based on the pixel information of the target keyframe. This target pixel information sequence is then compared with the verification pixel information sequence of the corresponding keyframe in the standard transcoded video during subsequent comparisons. This transforms the comparison between images into a comparison between two sequences, thus improving efficiency.

[0135] Specifically, in this embodiment, a pixel information element can be determined based on the pixel information of a single pixel in the target keyframe, thereby obtaining the pixel information elements corresponding to all or multiple pixels in the target keyframe. Arranging these pixel information elements according to the order of the corresponding pixels in the target keyframe yields the target pixel information sequence, where each pixel information element corresponds to a pixel in the target keyframe. It should be noted that a corresponding target pixel information sequence can be generated for each target keyframe to facilitate subsequent comparison.

[0136] Correspondingly, a similar approach to generating the target pixel information sequence can be adopted, whereby the key frames in the standard transcoded video corresponding to the test video are preprocessed to obtain the verification pixel information sequence corresponding to the key frames in the standard transcoded video, and the verification pixel information sequence is stored in the transcoding verification data.

[0137] Furthermore, in this embodiment of the application, in order to further save the amount of computation required for the comparison process and reduce the difficulty of comparison, the target pixel information sequence can also be a target binary sequence composed of binary bits. Correspondingly, the verification pixel information sequence can also be a verification binary sequence composed of binary bits. Specifically, the target binary sequence can be determined by the method in the following sub-steps 30521 to 30522.

[0138] Optionally, sub-step 3052 may include: Sub-step 30521: Segment the target keyframe according to the preset image block resolution corresponding to the test video to obtain the target image block; wherein, the resolution of the target image block is the preset image block resolution.

[0139] In this embodiment, a preset image block resolution for segmenting the image frame can also be obtained. Using the preset image block resolution, the target keyframe can be segmented into multiple target image blocks, where the resolution of each target image block is the aforementioned preset image block resolution. For example, if the target keyframe resolution is 1000x1000 and the preset image block resolution is 100x100, then segmenting the target image blocks using the preset image block resolution will yield 100 target image blocks with a resolution of 100x100.

[0140] In addition to using a preset image block resolution to segment the target keyframe, a preset number of blocks corresponding to the test video can also be used to segment the target keyframe. For example, if the resolution of the target keyframe is 1000x1000 and the preset number of image blocks is 25, then after segmenting the target image blocks using the preset number of image blocks, 25 target image blocks with a resolution of 200x200 can be obtained.

[0141] It should be noted that the preset image block resolution or preset image block number can be stored in the transcoding verification data. Correspondingly, the keyframes of the standard transcoded video corresponding to the test video can also be pre-divided using the above-mentioned segmentation method to obtain image blocks of the keyframes of the standard transcoded video. Technicians can select an appropriate method to segment the target keyframes according to actual needs, or they can use other methods to segment the target image frames; this application embodiment does not impose specific limitations.

[0142] Sub-step 30522: Obtain the pixel information of the target image block, and generate a target binary sequence corresponding to the target image block based on the pixel information; wherein, each pixel in the target image block corresponds to at least one binary bit in the target binary sequence.

[0143] In the embodiments of this application, the target pixel information sequence of the target keyframe can be composed of the target binary sequence corresponding to each target image block in the target keyframe, thereby converting the comparison of the entire target pixel information encoding into the comparison of individual target binary sequences, thus improving the comparison efficiency.

[0144] Furthermore, in this embodiment, the pixel information may include pixel values ​​and pixel color information; correspondingly, the target binary sequence may include a first binary sequence and a color binary sequence. Specifically, the target binary sequence can be constructed using the methods in the following sub-steps A1 to A2.

[0145] Optionally, sub-step 30522 may include: Sub-step A1: Obtain the pixel value of each pixel in the target image block, and convert each pixel value into a first binary sub-sequence according to a preset pixel value conversion rule to obtain a target first binary sequence composed of the first binary sub-sequence.

[0146] The pixel value is often referred to as pixel brightness information or pixel grayscale information. Typically, each pixel has one pixel value. For example, when the pixel width is 8 bits, the pixel value range for each pixel is [0, 255].

[0147] The preset first transformation rule can be as follows: pixel values ​​greater than or equal to the median of the interval are identified as brighter pixels, and the first binary subsequence corresponding to a brighter pixel can be 1; pixel values ​​less than the median of the interval are identified as darker pixels, and the first binary subsequence corresponding to a darker pixel can be 0. Therefore, according to the above preset first transformation rule, the first binary subsequence corresponding to the pixel value of each pixel in the target image block can be determined. Combining these first binary subsequences according to the order of their corresponding pixels in the target image block yields the target first binary sequence corresponding to that target image block.

[0148] Reference Figure 4 , Figure 4 This illustration shows a target image block diagram provided in an embodiment of this application, such as... Figure 4 As shown, each small square in the target image patch represents a pixel, and the number in the small square represents the pixel value of that pixel. If pixel values ​​greater than or equal to 128 are converted to 1, and pixel values ​​less than 128 are converted to 0, then... Figure 4 The target first binary sequence corresponding to the target image block shown can be "1111111100000000".

[0149] It should be noted that a first binary subsequence can be 1 bit or multiple bits. The number of bits in the first binary subsequence can also be different depending on the preset first conversion rule. For example, if the preset first conversion rule distinguishes pixel values ​​into two brightness levels, then each first binary subsequence is 1 bit. If the preset first conversion rule distinguishes pixel values ​​into four brightness levels, then each first binary subsequence is 2 bits.

[0150] Sub-step A2: Obtain the pixel color information of each pixel in the target image block, and convert each pixel color information into a second binary sub-sequence according to a preset second conversion rule to obtain a target second binary sequence composed of the second binary sub-sequence.

[0151] Typically, pixels in an image contain pixels of three colors: red, green, and blue. The pixel color information of a pixel indicates which color it belongs to. In this embodiment, the pixel color information of each pixel in the target image block can be converted into a second binary subsequence according to a preset second conversion rule to obtain the target second binary sequence corresponding to the target image block. The preset second conversion rule can be: converting the pixel color information indicating a red pixel to obtain the second binary subsequence "01", converting the pixel color information indicating a green pixel to obtain the second binary subsequence "10", and converting the pixel color information indicating a blue pixel to obtain the second binary subsequence "11".

[0152] Reference Figure 5 , Figure 5 This illustration shows another target image block diagram provided in an embodiment of this application, such as... Figure 5 As shown, each small square in the target image block represents a pixel, and the letter in the small square represents the pixel's color information, where R represents red, G represents green, and B represents blue. If based on the above exemplary second transformation rule... Figure 5 By converting the pixel color information of the target image block, the second binary sequence of the target image block can be obtained as "010101101010111111".

[0153] It should be noted that a second binary subsequence can be 2 bits or more bits. The number of bits in the second binary subsequence can also be different depending on the number of colors contained in the pixel. For example, if the pixel contains three colors, each second binary subsequence can be 2 bits, and if the pixel contains five colors, each second binary subsequence can be 3 bits.

[0154] Sub-step 3053: Compare the target pixel information sequence with the verification pixel information sequence in the transcoding verification data, and determine the image error rate corresponding to the target video based on the comparison result.

[0155] After obtaining the target pixel information sequence corresponding to the target keyframe, the target pixel information sequence can be compared with the verification pixel information sequence in the transcoding verification data. If the target pixel information sequence of a certain target keyframe is inconsistent with the verification pixel information sequence of the corresponding keyframe in the standard transcoded video in the verification pixel information sequence, the target keyframe is determined as an error frame. The image error rate can be determined based on the ratio of the number of error frames to the total number of keyframes.

[0156] When the target pixel information sequence includes a target first binary sequence determined based on pixel values ​​and a target second binary sequence determined based on pixel colors, the image error rate may include pixel value error rate and pixel color error rate, which can be determined in the manner described in the following sub-steps 30531 to 30532.

[0157] Optionally, sub-step 3053 may include: Sub-step 30531: Compare the target first binary sequence and the verification first binary sequence. If the target first binary sequence and the verification first binary sequence are inconsistent, determine the target keyframe corresponding to the target first binary sequence as a pixel value error frame. Determine the pixel value error rate corresponding to the target video based on the ratio between the number of pixel error frames and the number of keyframes in the standard transcoded video.

[0158] In this embodiment, the verification pixel information sequence may further include a first binary sequence of verification generated from image blocks of keyframes in a standard transcoded video, and a second binary sequence of verification generated from image blocks of keyframes in a standard transcoded video.

[0159] To address the pixel value error rate, the target first binary sequence can be compared with the check first binary sequence in the transcoding check data. If the target first binary sequence of a certain target image block is inconsistent with the check first binary sequence of the corresponding image block in the key frame of the standard transcoded video, the comparison operation of the target first binary sequence of subsequent target image blocks in that target key frame can be stopped, and the target key frame can be directly identified as a pixel value error frame. The pixel value error rate can be determined based on the ratio of the number of pixel value error frames to the total number of key frames.

[0160] Reference Figure 6 , Figure 6 This illustration shows a target keyframe comparison diagram provided in an embodiment of this application, such as... Figure 6As shown, target keyframe 61 is divided into 9 target image blocks (target image blocks 611-619). Keyframe 62 in the standard transcoded video corresponding to target keyframe 61 is also divided into 9 image blocks (image blocks 621-629). When comparing target keyframe 61 and keyframe 62, the target first binary sequence corresponding to target image block 611 can be compared with the check first binary sequence corresponding to image block 621. If the comparison results are the same, the target first binary sequence corresponding to target image block 612 can be compared with the check first binary sequence corresponding to image block 622. If the comparison results are the same, the target first binary sequence corresponding to target image block 613 can be compared with the check first binary sequence corresponding to image block 623. If the comparison results are different, the comparison between subsequent image blocks is stopped, and target keyframe 61 is directly determined as a pixel value error frame.

[0161] Sub-step 30532: Compare the target second binary sequence and the verification second binary sequence. If the target second binary sequence and the verification second binary sequence are inconsistent, determine the target keyframe corresponding to the target second binary sequence as a pixel color error frame. Determine the pixel color error rate corresponding to the target video based on the ratio between the number of pixel color error frames and the number of keyframes in the standard transcoded video.

[0162] To determine the pixel color error rate, the target second binary sequence can be compared with the check second binary sequence in the transcoding check data. If the target second binary sequence of a certain target image block is inconsistent with the check second binary sequence of the corresponding image block in the keyframe of the standard transcoded video, the comparison operation of the target second binary sequence of subsequent target image blocks in the target keyframe can be stopped, and the target keyframe can be directly identified as a pixel color error frame. The pixel color error rate can be determined by the ratio of the number of pixel color error frames to the total number of keyframes in the standard transcoded video.

[0163] Sub-step 3054: Based on the number of audio segments or the length of audio segments corresponding to the test video, segment the audio information of each target video in the target video set to obtain a set of target audio segments corresponding to each target video in the target video set.

[0164] In this embodiment of the application, in order to determine the audio error rate of the test video, the audio information of the target video can be compared with the audio information of the standard transcoded video. In order to improve the comparison efficiency, the audio information of each target video in the target video set can be segmented according to the number of audio segments or the length of the audio segments corresponding to the test video, so as to obtain the target audio segment set corresponding to each target video in the target video set.

[0165] For example, if the number of audio segments is 100, then after segmenting the audio information of the target video according to the number of audio segments, 100 target audio segments of equal length can be obtained. These 100 target audio segments constitute the target audio segment set corresponding to the target video. If the length of each audio segment is 1 minute and the total duration of the target video is 10 minutes, then after segmenting the audio information of the target video according to the length of each audio segment, 10 target audio segments of 1 minute each can be obtained. These 10 target audio segments constitute the target audio segment set corresponding to the target video.

[0166] Sub-step 3055: Obtain the set of verification audio segments corresponding to the standard transcoded video from the transcoding verification data.

[0167] In this embodiment, the same segmentation method can also be used to pre-segment the standard transcoded video to obtain a set of verification audio segments corresponding to the standard transcoded video. This set of verification audio segments is then stored as part of the transcoding verification data. This allows the set of verification audio segments corresponding to the standard transcoded video to be retrieved from the transcoding verification data when audio segment comparison is required.

[0168] Sub-step 3056: Compare the target audio segment set with the corresponding audio segments in the verification audio segment set to obtain the number of audio segment errors, and determine the audio error rate corresponding to the target video based on the number of audio segment errors and the total number of audio segments in the verification audio segment set.

[0169] Since the target audio segment set and the verification audio segment set are obtained using the same segmentation method, the number of target audio segments in the target audio segment set is the same as the number of verification audio segments in the verification audio segment set, and there is a one-to-one correspondence between the target audio segments and the verification audio segments. Therefore, in this embodiment, each target audio segment can be compared with the corresponding verification audio segment to determine the number of audio segmentation errors of the target audio segment that differs from the corresponding verification audio segment. Then, based on the ratio of the number of audio segmentation errors to the total number of audio segments in the verification audio segment set, the audio error rate corresponding to the target video is determined.

[0170] For example, if both the target audio segment set and the verification audio segment set of a target video contain 100 audio segments, and 3 of the target audio segments are different from the corresponding verification audio segments, then the audio error rate of the target video is 3%.

[0171] In this application embodiment, not only the image error rate can be determined, but also the audio error rate of the target video output after transcoding by the unit under test can be determined, which improves the measurement dimension of the transcoding performance of the unit under test and makes the transcoding performance results of the unit under test more valuable for reference.

[0172] Step 306: Determine the transcoding error rate of the unit under test based on the error rate.

[0173] In this embodiment, since the transcoding performance of the unit under test also includes the transcoding error rate, after obtaining the error rate corresponding to each target video, the transcoding error rate of the unit under test can be calculated based on the error rate corresponding to each target video. Specifically, the error rates of each target video output by the unit under test can be summed, and then the summation result can be averaged using the number of target videos to obtain the transcoding error rate of the unit under test.

[0174] For example, if the unit under test outputs 5 target videos, with two target videos having a transcoding error rate of 2%, two target videos having a transcoding error rate of 3%, and the remaining target video having a transcoding error rate of 5%, then the transcoding error rate of the unit under test can be calculated to be 3%.

[0175] Furthermore, in the embodiments of this application, the transcoding error rate may include the image error rate and the audio error rate. Specifically, the transcoding error rate of the unit under test may be determined by the following sub-steps 3061 to 3062.

[0176] Optionally, step 306 may include: Sub-step 3061: Summing the audio error rate and image error rate corresponding to each target video in the target video set to obtain the target error rate corresponding to the target video.

[0177] Since transcoding error rate can include both audio and image error rates, after determining the audio and image error rates for each target video, the corresponding audio and image error rates can be added together to obtain the target error rate for that target video. This target error rate is then used to calculate the transcoding error rate of the unit under test in subsequent processes.

[0178] It should be noted that since audio error rate and image error rate may have different levels of importance, when calculating the target error rate of a target video, corresponding weight values ​​can be assigned to the audio error rate and image error rate respectively. The audio error rate and image error rate can then be weighted according to these weight values ​​to obtain the target error rate. For example, if the weight value for the audio error rate is 0.5 and the weight value for the video error rate is 1, and the audio error rate of a target video is 5% and the video error rate is 3%, then the target error rate for that target video is 5 / 0.5 + 3 / 1 = 5.5%.

[0179] Sub-step 3062: Average the target error rates of all target videos in the target video set to obtain the transcoding error rate of the unit under test.

[0180] In this embodiment of the application, the target error rates of each target video output by the unit under test can be summed, and then the summation results can be averaged using the number of target videos to obtain the transcoding error rate of the unit under test.

[0181] In summary, the transcoding performance testing method provided in this application includes: acquiring a test video in a first encoding format; generating a video transcoding task set containing a target number of video transcoding tasks; wherein the video transcoding tasks are used to transcode the test video to a second encoding format; allocating the video transcoding task set to a unit under test to obtain a target video set output by the unit under test after executing the video transcoding task set; wherein the target videos in the target video set have a one-to-one correspondence with the video transcoding tasks; and determining the transcoding performance of the unit under test based on the target video set. This application can generate a video transcoding task set based on the test video and determine the transcoding performance of the unit under test by analyzing the target video set output by the unit under test for the video transcoding task set. This enables automated testing of the transcoding performance of the unit under test, reduces the testing cost, improves testing efficiency, and provides good consistency in test results for different units under test, thus enhancing the practicality of the test results.

[0182] The transcoding performance testing method provided in this application can be executed by a transcoding performance testing device. This application uses the transcoding performance testing device executing the transcoding performance testing method as an example to illustrate the transcoding performance testing device provided in this application.

[0183] Reference Figure 7 , Figure 7 This is a block diagram of a transcoding performance testing device provided in an embodiment of this application, such as... Figure 7 As shown, the transcoding performance testing device includes: The acquisition module 701 is used to acquire the test video in the first encoding format; The generation module 702 is used to generate a video transcoding task set containing a target number of video transcoding tasks; wherein, the video transcoding tasks are used to transcode the test video into a second encoding format, and the target number is a positive integer; The test module 703 is used to allocate the video transcoding task set to the unit under test, and obtain the target video set output by the unit under test after executing the video transcoding task set; wherein, the target videos in the target video set have a one-to-one correspondence with the video transcoding tasks; Performance module 704 is used to determine the transcoding performance of the unit under test based on the target video set.

[0184] Optionally, the transcoding performance includes transcoding rate, and the performance module includes: The transcoding duration submodule is used to obtain the transcoding duration corresponding to each target video in the target video set; The transcoding rate submodule is used to determine the transcoding rate of the unit under test based on the transcoding duration.

[0185] Optionally, the transcoding rate submodule includes: The video size submodule is used to obtain the video size of the target video or the test video; The transcoding subrate submodule is used to determine the transcoding subrate corresponding to the target video based on the video size and the transcoding duration. The transcoding rate submodule is used to average the transcoding rates of all target videos to obtain the transcoding rate of the unit under test.

[0186] Optionally, the transcoding performance includes transcoding error rate, and the performance module includes: The verification data submodule is used to obtain transcoding verification data corresponding to the test video; wherein, the transcoding verification data is determined based on the standard transcoding video corresponding to the test video, and the encoding format of the standard transcoding video is the second encoding format; The error rate submodule is used to compare the target videos in the target video set with the transcoding verification data to obtain the error rate corresponding to each target video; The transcoding error rate submodule is used to determine the transcoding error rate of the unit under test based on the error rate.

[0187] Optionally, the error rate includes audio error rate and image error rate, and the transcoding error rate submodule includes: The target error rate submodule is used to sum the audio error rate and image error rate corresponding to each target video in the target video set to obtain the target error rate corresponding to the target video; The transcoding error rate determination submodule is used to average the target error rates corresponding to all target videos in the target video set to obtain the transcoding error rate of the unit under test.

[0188] Optionally, the error rate includes an audio error rate, and the error rate submodule includes: The target audio segment set submodule is used to segment the audio information of each target video in the target video set according to the number of audio segments or the length of the audio segments corresponding to the test video, so as to obtain the target audio segment set corresponding to each target video in the target video set; The audio segment set verification submodule is used to obtain the set of verification audio segments corresponding to the standard transcoded video from the transcoding verification data; The audio error rate submodule is used to compare the target audio segment set with the corresponding audio segments in the verification audio segment set to obtain the number of audio segment errors, and to determine the audio error rate corresponding to the target video based on the number of audio segment errors and the total number of audio segments in the verification audio segment set.

[0189] Optionally, the error rate includes an image error rate, and the error rate submodule includes: The target keyframe submodule is used to obtain the target keyframe corresponding to each target video in the target video set according to the preset timestamp corresponding to the test video. The target pixel information sequence submodule is used to generate a target pixel information sequence based on the pixel information of the target keyframe; The image error rate submodule is used to compare the target pixel information sequence with the verification pixel information sequence in the transcoding verification data, and determine the image error rate corresponding to the target video based on the comparison result.

[0190] Optionally, the target pixel information sequence includes a target binary sequence, and the target pixel information sequence submodule includes: The target image block submodule is used to segment the target keyframe according to the preset image block resolution corresponding to the test video to obtain target image blocks; wherein, the resolution of the target image block is the preset image block resolution; The target binary sequence submodule is used to acquire pixel information of the target image block and generate a target binary sequence corresponding to the target image block based on the pixel information; wherein each pixel in the target image block corresponds to at least one binary bit in the target binary sequence.

[0191] Optionally, the pixel information includes pixel values ​​and pixel color information, the target binary sequence includes a first target binary sequence and a second target binary sequence, and the target binary sequence submodule includes: The target first binary sequence submodule is used to obtain the pixel value of each pixel in the target image block, and convert each pixel value into a first binary subsequence according to a preset pixel value conversion rule to obtain the target first binary sequence composed of the first binary subsequence; The target second binary sequence submodule is used to obtain the pixel color information of each pixel in the target image block, and convert each pixel color information into a second binary subsequence according to a preset second conversion rule, so as to obtain the target second binary sequence composed of the second binary subsequence.

[0192] Optionally, the verification pixel information sequence includes a first verification binary sequence and a second verification binary sequence, the image error rate includes a pixel value error rate and a pixel color error rate, and the image error rate submodule includes: The pixel value error rate submodule is used to compare the target first binary sequence and the verification first binary sequence. If the target first binary sequence and the verification first binary sequence are inconsistent, the target keyframe corresponding to the target first binary sequence is determined as a pixel value error frame. The pixel value error rate corresponding to the target video is determined based on the ratio between the number of pixel error frames and the number of keyframes in the standard transcoded video. The pixel color error rate submodule is used to compare the target second binary sequence and the check second binary sequence. If the target second binary sequence and the check second binary sequence are inconsistent, the target keyframe corresponding to the target second binary sequence is determined as a pixel color error frame. The pixel color error rate corresponding to the target video is determined based on the ratio between the number of pixel color error frames and the number of keyframes in the standard transcoded video.

[0193] Optionally, the device further includes: The first file size module is used to obtain the available memory capacity of the unit under test and the first file size of the test video; The target quantity module is used to determine the target quantity based on the ratio between the available memory capacity and the size of the first file.

[0194] Optionally, the target quantity module includes: The second file size submodule is used to obtain the second file size of the standard transcoded video corresponding to the test video; wherein, the encoding format of the standard transcoded video is the second encoding format; The target quantity submodule is used to calculate the sum of the file sizes of the first file size and the second file size, and determine the target quantity based on the ratio between the available memory capacity and the sum of the file sizes.

[0195] Optionally, the target quantity module includes: The space size submodule is used to obtain the second file size of the standard transcoded video corresponding to the test video, and the space size of the target storage space for storing the target video set; wherein, the encoding format of the standard transcoded video is the second encoding format; The file size and value submodule is used to calculate the file size and value of the first file size and the second file size; The first target quantity submodule is used to determine the target quantity based on the ratio between the available memory capacity and the first file size when the ratio between the space size and the file size and value is greater than or equal to a preset multiple. The second target quantity submodule is used to determine the target quantity based on the ratio between the available memory capacity and the file size when the ratio of the space size to the file size is less than a preset multiple.

[0196] In summary, the transcoding performance testing apparatus provided in this application includes: an acquisition module for acquiring a test video in a first encoding format; a generation module for generating a video transcoding task set containing a target number of video transcoding tasks; wherein the video transcoding tasks are used to transcode the test video into a second encoding format; a testing module for allocating the video transcoding task set to a unit under test, obtaining a target video set output by the unit under test after executing the video transcoding task set; wherein the target videos in the target video set have a one-to-one correspondence with the video transcoding tasks; and a performance module for determining the transcoding performance of the unit under test based on the target video set. This application can generate a video transcoding task set based on the test video and determine the transcoding performance of the unit under test by analyzing the target video set output by the unit under test for the video transcoding task set. This enables automated testing of the transcoding performance of the unit under test, reduces the testing cost, improves testing efficiency, and provides good consistency in test results for different units under test, thus enhancing the practicality of the test results.

[0197] The transcoding performance testing device in this application embodiment can be an electronic device or a component within an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices besides a terminal. For example, the electronic device can be a GPU BOX, mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. It can also be a server, network attached storage (NAS), personal computer (PC), television (TV), ATM, or self-service machine, etc. This application embodiment does not specifically limit the device.

[0198] The transcoding performance testing device in this application embodiment can be a device with an operating system. This operating system can be Android, Linux, Windows, or other possible operating systems; this application embodiment does not specifically limit it.

[0199] The transcoding performance testing device provided in this application embodiment can achieve... Figures 1 to 3 The various processes implemented in the method implementation examples will not be described again here to avoid repetition.

[0200] Optionally, such as Figure 8 As shown, this application embodiment also provides an electronic device M00, including a processor M01 and a memory M02. The memory M02 stores a program or instructions that can run on the processor M01. When the program or instructions are executed by the processor M01, they implement the various steps of the above-described transcoding performance testing method embodiment and can achieve the same technical effect. To avoid repetition, they will not be described again here.

[0201] It should be noted that the electronic devices in the embodiments of this application include the mobile electronic devices and non-mobile electronic devices described above.

[0202] Figure 9 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of this application.

[0203] The electronic device 1000 includes, but is not limited to, the following components: radio frequency unit 1001, network module 1002, audio output unit 1003, input unit 1004, sensor 1005, display unit 1006, user input unit 1007, interface unit 1008, memory 1009, and processor 1010.

[0204] Those skilled in the art will understand that the electronic device 1000 may also include a power supply (such as a battery) for supplying power to various components. The power supply may be logically connected to the processor 1010 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system. Figure 9 The electronic device structure shown does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements, which will not be elaborated here.

[0205] The processor 1010 is used to acquire a test video in a first encoding format; generate a video transcoding task set containing a target number of video transcoding tasks; wherein the video transcoding tasks are used to transcode the test video into a second encoding format; allocate the video transcoding task set to the unit under test to obtain a target video set output by the unit under test after executing the video transcoding task set; wherein the target videos in the target video set have a one-to-one correspondence with the video transcoding tasks; and determine the transcoding performance of the unit under test based on the target video set.

[0206] In summary, this application can generate a video transcoding task set based on the test video, and determine the transcoding performance of the unit under test by analyzing the target video set output by the unit under test for the video transcoding task set. This enables automatic testing of the transcoding performance of the unit under test, reduces the testing cost of testing the transcoding performance of the unit under test, improves testing efficiency, and the test results generated for different units under test are consistent, thus improving the practicality of the test results.

[0207] It should be understood that, in this embodiment, the input unit 1004 may include a graphics processing unit (GPU) 10041 and a microphone 10042. The GPU 10041 processes image data of still images or videos obtained by an image capture device (such as a camera) in video capture mode or image capture mode. The display unit 1006 may include a display panel 10061, which may be configured in the form of a liquid crystal display, an organic light-emitting diode, etc. The user input unit 1007 includes at least one of a touch panel 10071 and other input devices 10072. The touch panel 10071 is also called a touch screen. The touch panel 10071 may include a touch detection device and a touch controller. Other input devices 10072 may include, but are not limited to, physical keyboards, function keys (such as volume control buttons, power buttons, etc.), trackballs, mice, joysticks, etc., which will not be described in detail here.

[0208] The memory 1009 can be used to store software programs and various data. The memory 1009 may primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store the operating system, application programs or instructions required for at least one function (such as sound playback, image playback, etc.). Furthermore, the memory 1009 may include volatile memory or non-volatile memory, or it may include both volatile and non-volatile memory. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DRRAM). The memory 1009 in this embodiment includes, but is not limited to, these and any other suitable types of memory.

[0209] The processor 1010 may include one or more processing units; optionally, the processor 1010 integrates an application processor and a modem processor, wherein the application processor mainly handles operations involving the operating system, user interface, and applications, and the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into the processor 1010.

[0210] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described transcoding performance testing method embodiments and achieve the same technical effect. To avoid repetition, they will not be described again here.

[0211] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.

[0212] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the above-described transcoding performance testing method embodiment and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0213] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.

[0214] This application provides a computer program product, which is stored in a storage medium and executed by at least one processor to implement the various processes of the transcoding performance testing method embodiment described above, and can achieve the same technical effect. To avoid repetition, it will not be described again here.

[0215] 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 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 that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.

[0216] 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 computer 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, or network device, etc.) to execute the methods described in the various embodiments of this application.

[0217] 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 and scope of the claims, and all of these forms are within the protection scope of this application.

Claims

1. A transcoding performance testing method, characterized in that, The method includes: Obtain the test video in the first encoding format; Generate a video transcoding task set containing a target number of video transcoding tasks; wherein, the video transcoding tasks are used to transcode the test video into a second encoding format, and the target number is a positive integer; the target number is determined based on the available memory capacity of the unit under test, the first file size of the test video, and the second file size of the standard transcoded video corresponding to the test video; The video transcoding task set is assigned to the unit under test to obtain the target video set output by the unit under test after executing the video transcoding task set; wherein, the target videos in the target video set have a one-to-one correspondence with the video transcoding tasks; The transcoding performance of the unit under test is determined based on the target video set; The transcoding performance includes the transcoding error rate, and determining the transcoding performance of the unit under test based on the target video set includes: Obtain transcoding verification data corresponding to the test video; wherein, the transcoding verification data is determined based on the standard transcoded video corresponding to the test video, the encoding format of the standard transcoded video is the second encoding format, and the standard transcoded video does not have any transcoding errors; The target videos in the target video set are compared with the transcoding verification data to obtain the error rate corresponding to each target video; The transcoding error rate of the unit under test is determined based on the error rate. The error rate includes the audio error rate. The step of comparing the target videos in the target video set with the transcoding verification data to obtain the error rate corresponding to each target video includes: Based on the number of audio segments or the length of the audio segments corresponding to the test video, the audio information of each target video in the target video set is segmented to obtain a set of target audio segments corresponding to each target video in the target video set; Obtain the set of verification audio segments corresponding to the standard transcoded video from the transcoding verification data; The target audio segment set is compared with the corresponding audio segments in the verification audio segment set to obtain the number of audio segment errors. Based on the number of audio segment errors and the total number of audio segments in the verification audio segment set, the audio error rate corresponding to the target video is determined. The error rate includes the image error rate. The step of comparing the target videos in the target video set with the transcoding verification data to obtain the error rate corresponding to each target video includes: Based on the preset timestamp corresponding to the test video, obtain the target keyframe corresponding to each target video in the target video set; Based on the pixel information of the target keyframe, a target pixel information sequence is generated; The target pixel information sequence is compared with the verification pixel information sequence in the transcoding verification data, and the image error rate corresponding to the target video is determined based on the comparison result.

2. The method according to claim 1, characterized in that, The transcoding performance includes the transcoding rate, and determining the transcoding performance of the unit under test based on the target video set includes: Obtain the transcoding duration for each target video in the target video set; The transcoding rate of the unit under test is determined based on the transcoding duration.

3. The method according to claim 2, characterized in that, Determining the transcoding rate of the unit under test based on the transcoding duration includes: Obtain the video size of the target video or the test video; The transcoding subrate corresponding to the target video is determined based on the video size and the transcoding duration; The transcoding rate of the unit under test is obtained by averaging the transcoding subrates of all target videos.

4. The method according to claim 1, characterized in that, The error rate includes audio error rate and image error rate. Determining the transcoding error rate of the unit under test based on the error rate includes: The target error rate is obtained by summing the audio error rate and image error rate for each target video in the target video set. The transcoding error rate of the unit under test is obtained by averaging the target error rates of all target videos in the target video set.

5. The method according to claim 1, characterized in that, The target pixel information sequence includes a target binary sequence. Generating the target pixel information sequence based on the pixel information of the target keyframe includes: Based on the preset image block resolution corresponding to the test video, the target keyframe is segmented to obtain target image blocks; wherein, the resolution of the target image block is the preset image block resolution; The pixel information of the target image block is obtained, and a target binary sequence corresponding to the target image block is generated based on the pixel information; wherein each pixel in the target image block corresponds to at least one binary bit in the target binary sequence.

6. The method according to claim 5, characterized in that, The pixel information includes pixel value and pixel color information, and the target binary sequence includes a first target binary sequence and a second target binary sequence. The step of obtaining the pixel information of the target image block and generating the target binary sequence corresponding to the target image block based on the pixel information includes: Obtain the pixel value of each pixel in the target image block, and convert each pixel value into a first binary subsequence according to a preset pixel value conversion rule to obtain a target first binary sequence composed of the first binary subsequence; The pixel color information of each pixel in the target image block is obtained, and each pixel color information is converted into a second binary subsequence according to a preset second conversion rule to obtain a target second binary sequence composed of the second binary subsequence.

7. The method according to claim 6, characterized in that, The verification pixel information sequence includes a first verification binary sequence and a second verification binary sequence. The image error rate includes a pixel value error rate and a pixel color error rate. The step of comparing the target pixel information sequence with the verification pixel information sequence in the transcoding verification data, and determining the image error rate corresponding to the target video based on the comparison result, includes: The target first binary sequence and the verification first binary sequence are compared. If the target first binary sequence and the verification first binary sequence are inconsistent, the target keyframe corresponding to the target first binary sequence is determined as a pixel value error frame. The pixel value error rate corresponding to the target video is determined according to the ratio between the number of pixel error frames and the number of keyframes in the standard transcoded video. The target second binary sequence and the verification second binary sequence are compared. If the target second binary sequence and the verification second binary sequence are inconsistent, the target keyframe corresponding to the target second binary sequence is determined as a pixel color error frame. The pixel color error rate corresponding to the target video is determined based on the ratio between the number of pixel color error frames and the number of keyframes in the standard transcoded video.

8. The method according to claim 1, characterized in that, Calculate the sum of the file sizes of the first file size and the second file size, and determine the target quantity based on the ratio between the available memory capacity and the sum of the file sizes.

9. The method according to claim 1, characterized in that, Obtain the size of the target storage space used to store the target video set; Calculate the sum of the file sizes of the first file and the second file; If the ratio between the space size and the file size and value is greater than or equal to a preset multiple, the target quantity is determined based on the ratio between the available memory capacity and the first file size; If the ratio between the space size and the file size and value is less than a preset multiple, the target quantity is determined based on the ratio between the available memory capacity and the file size and value.

10. A transcoding performance testing device, characterized in that, The device includes: The acquisition module is used to acquire test videos in the first encoding format; A generation module is used to generate a video transcoding task set containing a target number of video transcoding tasks; wherein, the video transcoding tasks are used to transcode the test video into a second encoding format, and the target number is a positive integer; the target number is determined based on the available memory capacity of the unit under test, the first file size of the test video, and the second file size of the standard transcoded video corresponding to the test video; The testing module is used to allocate the video transcoding task set to the unit under test, and obtain the target video set output by the unit under test after executing the video transcoding task set; wherein, the target videos in the target video set have a one-to-one correspondence with the video transcoding tasks; A performance module is used to determine the transcoding performance of the unit under test based on the target video set; The transcoding performance includes the transcoding error rate, and the performance module includes: The verification data submodule is used to obtain transcoding verification data corresponding to the test video; wherein, the transcoding verification data is determined based on the standard transcoding video corresponding to the test video, the encoding format of the standard transcoding video is the second encoding format, and the standard transcoding video does not have any transcoding errors; The error rate submodule is used to compare the target videos in the target video set with the transcoding verification data to obtain the error rate corresponding to each target video; The transcoding error rate submodule is used to determine the transcoding error rate of the unit under test based on the error rate. The error rate includes the audio error rate, and the error rate submodule includes: The target audio segment set submodule is used to segment the audio information of each target video in the target video set according to the number of audio segments or the length of the audio segments corresponding to the test video, so as to obtain the target audio segment set corresponding to each target video in the target video set; The audio segment set verification submodule is used to obtain the set of verification audio segments corresponding to the standard transcoded video from the transcoding verification data; The audio error rate submodule is used to compare the target audio segment set with the corresponding audio segments in the verified audio segment set to obtain the number of audio segment errors, and to determine the audio error rate corresponding to the target video based on the number of audio segment errors and the total number of audio segments in the verified audio segment set. The error rate includes the image error rate, and the error rate submodule includes: The target keyframe submodule is used to obtain the target keyframe corresponding to each target video in the target video set according to the preset timestamp corresponding to the test video. The target pixel information sequence submodule is used to generate a target pixel information sequence based on the pixel information of the target keyframe; The image error rate submodule is used to compare the target pixel information sequence with the verification pixel information sequence in the transcoding verification data, and determine the image error rate corresponding to the target video based on the comparison result.

11. An electronic device, characterized in that, The electronic device includes a processor and a memory, the memory storing programs or instructions that can run on the processor, the programs or instructions being executed by the processor to implement the transcoding performance testing method according to any one of claims 1 to 9.

12. A readable storage medium, characterized in that, The readable storage medium stores a program or instructions, which, when executed by a processor, implement the transcoding performance testing method according to any one of claims 1 to 9.

Citation Information

Patent Citations

  • System and method of automated test on concurrency performance of transcoding server

    CN108304286A

  • A test system and method for automatically verifying a long-time task of a streaming protocol

    CN109921937A

  • KR20200070519A