A method, device, equipment and readable medium for testing pp plug-in and spliter plug-in
By deploying FFmpeg and other components in the operating system and writing test scripts, the problem of inconvenient video file testing in the existing technology is solved, and the efficiency of rapid analysis of video formats and encoding methods is improved.
Patent Information
- Application Number
- CN202210703555.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-21
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2042-06-21
AI Technical Summary
In the existing technology, a test script needs to be adapted separately for each video file, which is inconvenient to operate, and the analysis of the video format and encoding method takes a long time, which affects the efficiency of video quality verification.
By deploying FFmpeg, transcoding card driver and insvid dynamic library in the operating system, write test scripts for pp plug-in and spliter plug-in, run the test script to check whether the encoding task, resolution and format conversion of the video file are correct, and generate test logs to Output results.
It greatly reduces the time for testing different encoding methods of multiple video formats, intuitively analyzes the functional applicability of the pp plug-in and spliter plug-in, and improves the efficiency of analyzing video formats and application encoding methods.
Smart Images

Figure CN115114150B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computers, and more specifically to a method, device, equipment and readable medium for testing a pp plug-in and a spliter plug-in. Background Art
[0002] With the rapid development of audio and video technology, various video services and products are increasing, and users are paying more and more attention to video quality and performance verification. In the process of software development, there is an increasing demand for video concurrent testing. The transmission of video data in video streaming takes up most of the bandwidth. How to improve encoding efficiency, use less bandwidth, and provide better picture quality is the focus of audio and video developers. The introduction of the HEVC (High Efficiency Video Coding, also known as H.265) encoding format has brought a breakthrough in this direction, but due to its high algorithm complexity, it has not been widely used in the early stage. With the improvement of the computing power of mobile devices and more and more devices starting to support HEVC hardware encoding / decoding, live broadcast platforms have also begun to gradually introduce HEVC video formats. In the existing technology, each video file needs to be adapted to the test script separately, which is very inconvenient to operate for multiple file types. Summary of the invention
[0003] In view of this, the purpose of the embodiments of the present invention is to propose a method, device, equipment and readable medium for testing pp plug-ins and spliter plug-ins. By using the technical solution of the present invention, the time for testing different encoding methods of multiple video formats can be greatly reduced, the applicability of the functions of pp plug-ins and spliter plug-ins can be intuitively analyzed, the analysis time for video formats and application encoding methods is reduced, and the efficiency of screening files is greatly improved.
[0004] FFmpeg is an open source computer program that can be used to record, convert digital audio and video, and convert them into streams. It uses LGPL or GPL licenses. It provides a complete solution for recording, converting and streaming audio and video. It contains a very advanced audio / video codec library libavcodec. In order to ensure high portability and codec quality, many codes in libavcodec are developed from scratch.
[0005] The PP (Post Processing) plug-in has three functions: 1. It can upload source video data files of different formats (yuv420p yuv422pnv12 nv21 yuv420p10le yuv420p10be yuv422p10le yuv422p10be p010le p010beyuv444p rgb24 bgr24 argb rgba abgr bgra) to the encoder for encoding. 2. It can change the resolution size of the video source data. 3. It can automatically transcode the video source data in non-yuv420p format into yuv420p video data after uploading.
[0006] The Spliter plugin can convert one video source input into four video outputs.
[0007] Based on the above purpose, an aspect of an embodiment of the present invention provides a method for testing a pp plug-in and a spliter plug-in, comprising the following steps:
[0008] Deploy the software runtime environment in the operating system and install FFmpeg, transcoding card driver, insvid dynamic library and plug-ins, and ensure that FFmpeg can run normally;
[0009] Write test scripts for the pp plugin and spliter plugin based on the functions of the plugins to be tested;
[0010] Run the test script to test the input video and check whether the test result meets the requirements after the test script is completed;
[0011] Generate a test log based on the test results and output the test log.
[0012] According to one embodiment of the present invention, running a test script to test an input video, and checking whether a test result meets a requirement after the test script is completed includes:
[0013] Check whether the h264 encoding tasks of uploaded videos of different data types are completed correctly;
[0014] Check whether one video can be converted into four video files;
[0015] Check whether the SSIM similarity between the generated video file and the source stream meets the requirements;
[0016] Check whether the generated video file can be played normally;
[0017] Check whether the input 8-bit non-yuv420p yuv video bitstream can be automatically converted into a yuv420p video file;
[0018] Check whether the input 10-bit non-yuv420p10le yuv video bitstream can be automatically converted into a yuv420p10le video file;
[0019] In response to all of the above conditions being met, it is determined that the test result meets the requirements.
[0020] According to one embodiment of the present invention, it also includes:
[0021] Check whether the resolutions of the four converted video files are 4096x2160, 1920x1080, 1280x720, and 640x360.
[0022] According to one embodiment of the present invention, writing a test script for the pp plug-in and the spliter plug-in based on the function of the plug-in to be tested includes:
[0023] Traverse h264 hevc ivf encoding formats, and traverse test files in yuv420p, yuv422p, nv12, nv21, yuv420p10le, yuv420p10be, yuv422p10le, yuv422p10be, p010le, p010be, yuv444p, rgb24, bgr24, argb, rgba, abgr, bgra formats;
[0024] Use the command FFmpeg-y-vsync 0-i${file name}-pix_fmt${transcoding card encoding}-s${resolution}${transcoding card encoding}_${resolution}_out.yuv to generate 4 yuv format files with different resolutions for each test file;
[0025] Encode the decoded yuv format file and convert it into 4 video files with different resolutions. It also automatically converts the 8-bit non-yuv420p format yuv video stream into a yuv420p format video file, and automatically converts the 10-bit non-yuv420p10le format yuv video stream into a yuv420p10le format video file.
[0026] Compare the SSIM similarity between the encoded video file and the source stream file at the same resolution.
[0027] Another aspect of the embodiments of the present invention further provides a device for testing a pp plug-in and a spliter plug-in, the device comprising:
[0028] A deployment module is configured to deploy the software operating environment in the operating system and install FFmpeg, a transcoding card driver, an insvid dynamic library and plug-ins, and ensure that FFmpeg can run normally;
[0029] Import the module, and configure the import module to write test scripts for the pp plug-in and spliter plug-in based on the functions of the plug-in to be tested;
[0030] A test module, the test module is configured to run a test script to test the input video, and check whether the test result meets the requirements after the test script is completed;
[0031] The output module is configured to generate a test log from the test result and output the test log.
[0032] According to one embodiment of the present invention, the test module is further configured to:
[0033] Check whether the h264 encoding tasks of uploaded videos of different data types are completed correctly;
[0034] Check whether one video can be converted into four video files;
[0035] Check whether the SSIM similarity between the generated video file and the source stream meets the requirements;
[0036] Check whether the generated video file can be played normally;
[0037] Check whether the input 8-bit non-yuv420p yuv video bitstream can be automatically converted into a yuv420p video file;
[0038] Check whether the input 10-bit non-yuv420p10le yuv video bitstream can be automatically converted into a yuv420p10le video file;
[0039] In response to all of the above conditions being met, it is determined that the test result meets the requirements.
[0040] According to one embodiment of the present invention, the test module is further configured to:
[0041] Check whether the resolutions of the four converted video files are 4096x2160, 1920x1080, 1280x720, and 640x360.
[0042] According to one embodiment of the present invention, the import module is further configured as:
[0043] Traverse h264 hevc ivf encoding formats, and traverse test files in yuv420p, yuv422p, nv12, nv21, yuv420p10le, yuv420p10be, yuv422p10le, yuv422p10be, p010le, p010be, yuv444p, rgb24, bgr24, argb, rgba, abgr, bgra formats;
[0044] Use the command FFmpeg-y-vsync 0-i${file name}-pix_fmt${transcoding card encoding}-s${resolution}${transcoding card encoding}_${resolution}_out.yuv to generate 4 yuv format files with different resolutions for each test file;
[0045] Encode the decoded yuv format file and convert it into 4 video files with different resolutions. It also automatically converts the 8-bit non-yuv420p format yuv video stream into a yuv420p format video file, and automatically converts the 10-bit non-yuv420p10le format yuv video stream into a yuv420p10le format video file.
[0046] Compare the SSIM similarity between the encoded video file and the source stream file at the same resolution.
[0047] Another aspect of the embodiments of the present invention further provides a computer device, the computer device comprising:
[0048] at least one processor; and
[0049] The memory stores computer instructions executable on the processor, and the instructions implement the steps of any one of the above methods when executed by the processor.
[0050] According to another aspect of the embodiments of the present invention, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of any one of the above methods are implemented.
[0051] The present invention has the following beneficial technical effects: the method for testing the pp plug-in and spliter plug-in provided by the embodiment of the present invention, by deploying a software operating environment in an operating system and installing FFmpeg, a transcoding card driver, an insvid dynamic library and a plug-in, and ensuring that FFmpeg can run normally; writing a test script for the pp plug-in and the spliter plug-in based on the function of the plug-in to be tested; running the test script to test the input video, and checking whether the test result meets the requirements after the test script is completed; generating a test log from the test result, and outputting the test log. The technical solution can greatly reduce the time for testing different encoding methods of multiple video formats, can intuitively analyze the applicability of the functions of the pp plug-in and the spliter plug-in, reduce the analysis time for video formats and application encoding methods, and greatly improve the efficiency of screening files. BRIEF DESCRIPTION OF THE DRAWINGS
[0052] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other embodiments can be obtained based on these drawings without paying creative work.
[0053] Figure 1 A schematic flowchart of a method for testing a pp plug-in and a spliter plug-in according to an embodiment of the present invention;
[0054] Figure 2 A schematic diagram of a device for testing a pp plug-in and a spliter plug-in according to an embodiment of the present invention;
[0055] Figure 3 is a schematic diagram of a computer device according to an embodiment of the present invention;
[0056] Figure 4 FIG. 1 is a schematic diagram of a computer-readable storage medium according to an embodiment of the present invention. DETAILED DESCRIPTION
[0057] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the embodiments of the present invention are further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.
[0058] Based on the above purpose, a first aspect of an embodiment of the present invention provides an embodiment of a method for testing a pp plug-in and a spliter plug-in. Figure 1 Shown is a schematic flow chart of the method.
[0059] like Figure 1As shown in , the method may include the following steps:
[0060] S1 deploys the software operating environment in the operating system and installs FFmpeg, transcoding card driver, insvid dynamic library and plug-in, and ensures that FFmpeg can run normally. Install the FFmpeg software package to the operating system of the test machine, debug and install the software package, install the transcoding card driver, install the insvid dynamic library, install FFmpeg and tools, and build the software environment under the operating system. (1) Mount the system image under BMC and map it to / mnt. Use yum to install the necessary basic software (yum install gcc git patch Xorg). (2) Unzip the installation package *.tgz (the installation package varies depending on the system). After unzipping, enter the path and execute . / install.sh install. (3) After the installation is complete, check whether the driver is installed successfully using lsmod|grep–I transcoder. (4) Run FFmpeg to check whether it can be executed normally.
[0061] S2 writes test scripts for pp and spliter plugins based on the functions of the plugins to be tested. The script writing logic is to traverse the h264 hevc ivf encoding format, and traverse the test files in yuv420p, yuv422p, nv12 nv21, yuv420p10le, yuv420p10be, yuv422p10le, yuv422p10be, p010le, p010be, yuv444p, rgb24, bgr24, argb, rgba, abgr, and bgra formats, using the command FFmpeg -y -vsync 0-i${file name}-pix_fmt${transcoding card encoding}-s${resolution}${transcoding card encoding}_${resolution}_out.yuv generates 4 YUV format files with different resolutions for each test file, encodes the decoded YUV format files again, and downscales them into 4 different video files (resolutions are 4096x2160, 1920x1080, 1280x720, 640x360), automatically converts the encoded video files of the 8-bit non-YUV420p format YUV video stream into YUV420p files, and automatically converts the encoded video files of the 10-bit non-YUV420p10LE format YUV video stream into YUV420p10LE files. Finally, compare the SSIM similarity between the encoded video files and the source stream files at the same resolution.
[0062] S3 runs the test script to test the input video and checks whether the test result meets the requirements after the test script is completed.
[0063] Check whether the h264 encoding tasks of uploaded videos of different data types are completed correctly, check whether one video can be converted into four video files, check whether the SSIM similarity between the generated video file and the source bitstream meets the requirements, check whether the generated video file can be played normally, check whether the input bitstream is 8-bit non-yuv420p format YUV video bitstream can be automatically converted into a video file in YUV420p format, check whether the input bitstream is 10-bit non-yuv420p10le format YUV video bitstream can be automatically converted into a video file in YUV420p10le format. If all the above conditions are met, it is determined that the test results meet the requirements.
[0064] S4 generates a test log based on the test result and outputs the test log.
[0065] Through the technical solution of the present invention, the time for testing different encoding methods of various video formats can be greatly reduced, the applicability of the pp plug-in and spliter plug-in functions can be intuitively analyzed, the analysis time for video formats and application encoding methods is reduced, and the efficiency of screening files is greatly improved.
[0066] In a preferred embodiment of the present invention, running a test script to test an input video, and checking whether the test result meets the requirements after the test script is completed includes:
[0067] Check whether the h264 encoding tasks of uploaded videos of different data types are completed correctly;
[0068] Check whether one video can be converted into four video files;
[0069] Check whether the SSIM (structural similarity) of the generated video file and the source stream meets the requirements;
[0070] Check whether the generated video file can be played normally;
[0071] Check whether the input 8-bit non-yuv420p yuv video bitstream can be automatically converted into a yuv420p video file;
[0072] Check whether the input 10-bit non-yuv420p10le yuv video bitstream can be automatically converted into a yuv420p10le video file;
[0073] In response to all of the above conditions being met, it is determined that the test result meets the requirements.
[0074] In a preferred embodiment of the present invention, it also includes:
[0075] Check whether the resolutions of the four converted video files are 4096x2160, 1920x1080, 1280x720, and 640x360.
[0076] In a preferred embodiment of the present invention, writing a test script for the pp plug-in and the spliter plug-in based on the function of the plug-in to be tested includes:
[0077] Traverse h264 hevc ivf encoding formats, and traverse test files in yuv420p, yuv422p, nv12, nv21, yuv420p10le, yuv420p10be, yuv422p10le, yuv422p10be, p010le, p010be, yuv444p, rgb24, bgr24, argb, rgba, abgr, bgra formats;
[0078] Use the command FFmpeg-y-vsync 0-i${file name}-pix_fmt${transcoding card encoding}-s${resolution}${transcoding card encoding}_${resolution}_out.yuv to generate 4 yuv format files with different resolutions for each test file;
[0079] Encode the decoded yuv format file and convert it into 4 video files with different resolutions. It also automatically converts the 8-bit non-yuv420p format yuv video stream into a yuv420p format video file, and automatically converts the 10-bit non-yuv420p10le format yuv video stream into a yuv420p10le format video file.
[0080] Compare the SSIM similarity between the encoded video file and the source stream file at the same resolution.
[0081] Through the technical solution of the present invention, the time for testing different encoding methods of various video formats can be greatly reduced, the applicability of the pp plug-in and spliter plug-in functions can be intuitively analyzed, the analysis time for video formats and application encoding methods is reduced, and the efficiency of screening files is greatly improved.
[0082] It should be noted that a person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be implemented by instructing the relevant hardware through a computer program, and the above-mentioned program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above-mentioned methods. The storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc. The above-mentioned computer program embodiment can achieve the same or similar effect as any of the above-mentioned method embodiments corresponding thereto.
[0083] In addition, the method disclosed in the embodiment of the present invention can also be implemented as a computer program executed by a CPU, and the computer program can be stored in a computer-readable storage medium. When the computer program is executed by the CPU, the above functions defined in the method disclosed in the embodiment of the present invention are performed.
[0084] Based on the above purpose, a second aspect of the embodiment of the present invention provides a device for testing a pp plug-in and a spliter plug-in, such as Figure 2 As shown, the device 200 includes:
[0085] A deployment module is configured to deploy the software operating environment in the operating system and install FFmpeg, a transcoding card driver, an insvid dynamic library and plug-ins, and ensure that FFmpeg can run normally;
[0086] Import the module, and configure the import module to write test scripts for the pp plug-in and spliter plug-in based on the functions of the plug-in to be tested;
[0087] A test module, the test module is configured to run a test script to test the input video, and check whether the test result meets the requirements after the test script is completed;
[0088] The output module is configured to generate a test log from the test result and output the test log.
[0089] In a preferred embodiment of the present invention, the test module is further configured as:
[0090] Check whether the h264 encoding tasks of uploaded videos of different data types are completed correctly;
[0091] Check whether one video can be converted into four video files;
[0092] Check whether the SSIM similarity between the generated video file and the source stream meets the requirements;
[0093] Check whether the generated video file can be played normally;
[0094] Check whether the input 8-bit non-yuv420p yuv video bitstream can be automatically converted into a yuv420p video file;
[0095] Check whether the input 10-bit non-yuv420p10le yuv video bitstream can be automatically converted into a yuv420p10le video file;
[0096] In response to all of the above conditions being met, it is determined that the test result meets the requirements.
[0097] In a preferred embodiment of the present invention, the test module is further configured as:
[0098] Check whether the resolutions of the four converted video files are 4096x2160, 1920x1080, 1280x720, and 640x360.
[0099] In a preferred embodiment of the present invention, the import module is further configured as:
[0100] Traverse h264 hevc ivf encoding formats, and traverse test files in yuv420p, yuv422p, nv12, nv21, yuv420p10le, yuv420p10be, yuv422p10le, yuv422p10be, p010le, p010be, yuv444p, rgb24, bgr24, argb, rgba, abgr, bgra formats;
[0101] Use the command FFmpeg-y-vsync 0-i${file name}-pix_fmt${transcoding card encoding}-s${resolution}${transcoding card encoding}_${resolution}_out.yuv to generate 4 yuv format files with different resolutions for each test file;
[0102] Encode the decoded yuv format file and convert it into 4 video files with different resolutions. It also automatically converts the 8-bit non-yuv420p format yuv video stream into a yuv420p format video file, and automatically converts the 10-bit non-yuv420p10le format yuv video stream into a yuv420p10le format video file.
[0103] Compare the SSIM similarity between the encoded video file and the source stream file at the same resolution.
[0104] Based on the above purpose, a third aspect of an embodiment of the present invention provides a computer device. Figure 3FIG. 2 is a schematic diagram of an embodiment of a computer device provided by the present invention. Figure 3 As shown, the embodiment of the present invention includes the following apparatus: at least one processor 21; and a memory 22, the memory 22 stores computer instructions 23 that can be run on the processor, and when the instructions are executed by the processor, the following method is implemented:
[0105] Deploy the software runtime environment in the operating system and install FFmpeg, transcoding card driver, insvid dynamic library and plug-ins, and ensure that FFmpeg can run normally;
[0106] Write test scripts for the pp plugin and spliter plugin based on the functions of the plugins to be tested;
[0107] Run the test script to test the input video and check whether the test result meets the requirements after the test script is completed;
[0108] Generate a test log based on the test results and output the test log.
[0109] In a preferred embodiment of the present invention, running a test script to test an input video, and checking whether the test result meets the requirements after the test script is completed includes:
[0110] Check whether the h264 encoding tasks of uploaded videos of different data types are completed correctly;
[0111] Check whether one video can be converted into four video files;
[0112] Check whether the SSIM similarity between the generated video file and the source stream meets the requirements;
[0113] Check whether the generated video file can be played normally;
[0114] Check whether the input 8-bit non-yuv420p yuv video bitstream can be automatically converted into a yuv420p video file;
[0115] Check whether the input 10-bit non-yuv420p10le yuv video bitstream can be automatically converted into a yuv420p10le video file;
[0116] In response to all of the above conditions being met, it is determined that the test result meets the requirements.
[0117] In a preferred embodiment of the present invention, it also includes:
[0118] Check whether the resolutions of the four converted video files are 4096x2160, 1920x1080, 1280x720, and 640x360.
[0119] In a preferred embodiment of the present invention, writing a test script for the pp plug-in and the spliter plug-in based on the function of the plug-in to be tested includes:
[0120] Traverse h264 hevc ivf encoding formats, and traverse test files in yuv420p, yuv422p, nv12, nv21, yuv420p10le, yuv420p10be, yuv422p10le, yuv422p10be, p010le, p010be, yuv444p, rgb24, bgr24, argb, rgba, abgr, bgra formats;
[0121] Use the command FFmpeg-y-vsync 0-i${file name}-pix_fmt${transcoding card encoding}-s${resolution}${transcoding card encoding}_${resolution}_out.yuv to generate 4 yuv format files with different resolutions for each test file;
[0122] Encode the decoded yuv format file and convert it into 4 video files with different resolutions. It also automatically converts the 8-bit non-yuv420p format yuv video stream into a yuv420p format video file, and automatically converts the 10-bit non-yuv420p10le format yuv video stream into a yuv420p10le format video file.
[0123] Compare the SSIM similarity between the encoded video file and the source stream file at the same resolution.
[0124] Based on the above purpose, a fourth aspect of an embodiment of the present invention provides a computer-readable storage medium. Figure 4 FIG. 2 is a schematic diagram of an embodiment of a computer-readable storage medium provided by the present invention. Figure 4 As shown, the computer readable storage medium 31 stores a computer program 32 which performs the above method when executed by a processor.
[0125] In addition, the method disclosed in the embodiment of the present invention can also be implemented as a computer program executed by a processor, and the computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the above functions defined in the method disclosed in the embodiment of the present invention are performed.
[0126] In addition, the above method steps and system units may also be implemented using a controller and a computer-readable storage medium for storing a computer program that enables the controller to implement the above steps or unit functions.
[0127] It will also be appreciated by those skilled in the art that various exemplary logic blocks, modules, circuits and algorithm steps described in conjunction with the disclosure herein can be implemented as electronic hardware, computer software or a combination of the two. In order to clearly illustrate this interchangeability of hardware and software, a general description has been given to the functions of various schematic components, blocks, modules, circuits and steps. Whether this function is implemented as software or hardware depends on specific applications and the design constraints imposed on the entire system. Those skilled in the art can implement the function in various ways for each specific application, but this implementation decision should not be interpreted as causing a departure from the disclosed scope of the embodiments of the present invention.
[0128] In one or more exemplary designs, the function can be implemented in hardware, software, firmware or any combination thereof. If implemented in software, the function can be stored on a computer-readable medium or transmitted by a computer-readable medium as one or more instructions or codes. Computer-readable media include computer storage media and communication media, and the communication media include any media that helps to transfer a computer program from one location to another. The storage medium can be any available medium that can be accessed by a general or special computer. As an example and not limiting, the computer-readable medium may include RAM, ROM, EEPROM, CD-ROM or other optical disk storage devices, disk storage devices or other magnetic storage devices, or any other medium that can be used to carry or store the required program code in the form of an instruction or data structure and can be accessed by a general or special computer or a general or special processor. In addition, any connection can be appropriately referred to as a computer-readable medium. For example, if a coaxial cable, optical fiber cable, twisted pair, digital subscriber line (DSL) or wireless technologies such as infrared, radio and microwaves are used to send software from a website, server or other remote source, the above-mentioned coaxial cable, optical fiber cable, twisted pair, DSL or wireless technologies such as infrared, radio and microwaves are all included in the definition of the medium. As used herein, disk and disc include compact disc (CD), laser disc, optical disc, digital versatile disc (DVD), floppy disk, Blu-ray disc, wherein disks usually reproduce data magnetically, while optical discs reproduce data optically with lasers. Combinations of the above should also be included within the scope of computer-readable media.
[0129] The above are exemplary embodiments disclosed in the present invention, but it should be noted that various changes and modifications may be made without departing from the scope disclosed in the embodiments of the present invention as defined in the claims. The functions, steps and / or actions of the method claims according to the disclosed embodiments described herein do not need to be performed in any particular order. In addition, although the elements disclosed in the embodiments of the present invention may be described or required in individual form, they may also be understood as multiple unless explicitly limited to the singular.
[0130] It should be understood that, as used herein, the singular forms "a", "an" are intended to include the plural forms as well, unless the context clearly supports an exception. It should also be understood that, as used herein, "and / or" refers to any and all possible combinations including one or more of the associated listed items.
[0131] The serial numbers of the embodiments disclosed in the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0132] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0133] A person skilled in the art should understand that the discussion of any of the above embodiments is only exemplary and is not intended to imply that the scope of the disclosure of the embodiments of the present invention (including the claims) is limited to these examples; under the concept of the embodiments of the present invention, the technical features in the above embodiments or different embodiments can also be combined, and there are many other changes in different aspects of the embodiments of the present invention as above, which are not provided in detail for the sake of simplicity. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present invention should be included in the protection scope of the embodiments of the present invention.
Claims
1. A method for testing pp plug-ins and spliter plug-ins, characterized in that: The following steps are involved: Deploy the software runtime environment in the operating system and install FFmpeg, transcoding card driver, insvid dynamic library and plug-ins, and ensure that FFmpeg can run normally; Write test scripts for the pp plugin and spliter plugin based on the functions of the plugins to be tested; Run the test script to test the input video, and check whether the test result meets the requirements after the test script is completed; Generate a test log with the test results and output the test log; Running the test script to test the input video, and checking whether the test result meets the requirements after the test script is completed include: Check whether the h264 encoding tasks of uploaded videos of different data types are completed correctly; Check whether one video can be converted into four video files; Check whether the SSIM similarity between the generated video file and the source stream meets the requirements; Check whether the generated video file can be played normally; Check whether the input 8-bit non-yuv420p yuv video bitstream can be automatically converted into a yuv420p video file; Check whether the input 10-bit non-yuv420p10le yuv video bitstream can be automatically converted into a yuv420p10le video file; In response to all of the above conditions being met, determining that the test result meets the requirements; Writing test scripts for pp and spliter plugins based on the functions of the plugins to be tested includes: Traverse h264 hevc ivf encoding formats, and traverse test files in yuv420p, yuv422p, nv12, nv21, yuv420p10le, yuv420p10be, yuv422p10le, yuv422p10be, p010le, p010be, yuv444p, rgb24, bgr24, argb, rgba, abgr, bgra formats; Use the command FFmpeg -y -vsync 0 -i ${file name} -pix_fmt ${transcoding card encoding} -s ${resolution} ${transcoding card encoding}_${resolution}_out.yuv to generate 4 yuv format files with different resolutions for each test file; Encode the decoded yuv format file and convert it into 4 video files with different resolutions. It also automatically converts the 8-bit non-yuv420p format yuv video stream into a yuv420p format video file, and automatically converts the 10-bit non-yuv420p10le format yuv video stream into a yuv420p10le format video file. Compare the SSIM similarity between the encoded video file and the source stream file at the same resolution.
2. The method according to claim 1, characterized in that Also includes: Check whether the resolutions of the four converted video files are 4096x2160, 1920x1080, 1280x720, and 640x360.
3. A device for testing pp plug-ins and spliter plug-ins, characterized in that: The device comprises: A deployment module, wherein the deployment module is configured to deploy a software operating environment in an operating system and install FFmpeg, a transcoding card driver, an insvid dynamic library and plug-ins, and ensure that FFmpeg can run normally; An import module, wherein the import module is configured to write test scripts for the pp plug-in and the spliter plug-in based on the functions of the plug-in to be tested; A test module, wherein the test module is configured to run the test script to test the input video, and check whether the test result meets the requirements after the test script is completed; An output module, wherein the output module is configured to generate a test log from the test result and output the test log; The test module is also configured to: Check whether the h264 encoding tasks of uploaded videos of different data types are completed correctly; Check whether one video can be converted into four video files; Check whether the SSIM similarity between the generated video file and the source stream meets the requirements; Check whether the generated video file can be played normally; Check whether the input 8-bit non-yuv420p yuv video bitstream can be automatically converted into a yuv420p video file; Check whether the input 10-bit non-yuv420p10le yuv video bitstream can be automatically converted into a yuv420p10le video file; In response to all of the above conditions being met, determining that the test result meets the requirements; The import module is also configured as: Traverse h264 hevc ivf encoding formats, and traverse test files in yuv420p, yuv422p, nv12, nv21, yuv420p10le, yuv420p10be, yuv422p10le, yuv422p10be, p010le, p010be, yuv444p, rgb24, bgr24, argb, rgba, abgr, bgra formats; Use the command FFmpeg -y -vsync 0 -i ${file name} -pix_fmt ${transcoding card encoding} -s ${resolution} ${transcoding card encoding}_${resolution}_out.yuv to generate 4 yuv format files with different resolutions for each test file; Encode the decoded yuv format file and convert it into 4 video files with different resolutions. It also automatically converts the 8-bit non-yuv420p format yuv video stream into a yuv420p format video file, and automatically converts the 10-bit non-yuv420p10le format yuv video stream into a yuv420p10le format video file. Compare the SSIM similarity between the encoded video file and the source stream file at the same resolution.
4. The device according to claim 3, characterized in that The test module is also configured to: Check whether the resolutions of the four converted video files are 4096x2160, 1920x1080, 1280x720, and 640x360.
5. A computer device, characterized in that: include: at least one processor; as well as A memory, wherein the memory stores computer instructions executable on the processor, wherein the instructions, when executed by the processor, implement the steps of the method according to any one of claims 1 to 2.
6. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 2 are implemented.
