Your own video encoder evaluation system: VideoCodecRank,

Source: Internet
Author: User

Your own video encoder evaluation system: VideoCodecRank,

The video encoder field has always had a complicated problem: mpeg2, divx, xvid, mpeg4, vp8, vp9, x264, openh264, x265, etc. Which of the following encoder is better? For the same video encoder, there are various parameter configurations. What is the impact of these configurations on the video encoder? To study this problem, I developed a software system dedicated to evaluating the performance of the Video Encoder in my spare time.

This article records your own video encoder Performance Evaluation System VideoCodecRank. The system can evaluate and compare the performance of the Video Encoder by adjusting the video content, resolution, preset encoder, and bit rate. For each encoder, the system can traverse the preceding parameters for encoding and record the quality and speed of the video image. Through this system, we can comprehensively compare the performance of video encoders under various conditions. We would also like to thank the two younger siblings for their participation. At present, with the cooperation of everyone, the basic functions of the system have just been developed. The next step is to continue testing and improvement.


Test System address: http://www.velab.com.cn: 8080/vcr/


Current Status

Currently, the system calculates the following encoders:

X264-faster

X264-medium

X264-ultrafast

X264-superfast

X264-veryfast

X264-fast

X264-slow

X264-slower

X264-veryslow

X265-faster

X265-medium

X265-ultrafast

X265-superfast

X265-veryfast

X265-fast

X265-slow

X265-slower

X265-veryslow

F265-quality10

F265-quality20

DivX265-aqo2

DivX265-aqo3

DivX265-aqo4

VP8-good-0

VP8-good-1

VP8-good-2

VP8-good-3

VP8-good-4

VP8-good-5

VP8-realtime

DivX265-aqo1

Openh264-rc0

Openh264-rc1

Mpeg4

Mpeg1

Mpeg2

Xvid

H263p

Theora

VC1-adv0

VC1-adv1

VC1-adv2

VC1-adv3

VC1-adv4

VC1-adv5

VP9-good-0

VP9-good-1

VP9-good-2

VP9-good-3

VP9-good-4

VP9-good-5

VP9-realtime

Intel-h264-speed

Intel-h264-quality

Intel-h264-balanced

Intel-mpeg2-speed

Intel-mpeg2-quality

Intel-mpeg2-balanced

Test videos with the following content:

Src01

Src02

Src04

Src05

Src06

Src08

Src11

Src12

Src14

Ducks

Park

Ped

Riverbed

Station2

Sunflower

Tractor

The test video for each type of content is scaled to the following resolution:

640x360

848x480

1280x720

1920x1080 (raw)

The following BPP is set for each test video (which can be converted to a bit rate ):

0.025

0.05

0.075

0.1

0.15

0.2

The following video image quality indicators are collected:

SNR

SSIM


This chapter describes the parameters involved in the Performance Evaluation System of the video encoder. These parameters can be divided into input parameters and evaluation parameters. The input parameters are used to simulate different encoding environments. The evaluation parameter is used to calculate the encoding performance after the encoding is complete.

Input parameters This section describes the input parameters of the system. Changes in these parameters usually significantly affect the performance of the video encoder. These parameters include video content, resolution, encoder preset, and bit rate.

When the video content is of the same video quality, the video content is complex, the motion is intense, and the bit rate is high. The video content is simple and the scenery is static, and the bit rate is low. In this system, we choose the time complexity (TI) and space complexity (SI) proposed in ITU-BT.1788 to measure the video complexity respectively.

Time Information (TI)

TI reflects the degree to which a sequence of images changes over time. The sequence of intense motion of the image content usually has a high TI value. The calculation method is to calculate the frame difference between each frame of the sequence and the image of the previous frame, and then calculate the standard deviation of the frame difference image. Select the maximum value of these standard deviations as TI. The formula is as follows:



Spatial Information (SI)

SI reflects the spatial complexity of a sequence image. The sequence with more details usually has a higher SI Value. The algorithm is to perform Sobel filtering on each video frame and calculate the standard deviation of the filtered image. Select the maximum value of these standard deviations as SI. The formula is as follows:

Resolution resolution refers to the video size. For example, common resolutions include 3840x2160 (4 K), 1920x1080 (HD), 1280x720 (720 P), and 640x360 (360 P.
The encoding effects of encoder and Encoder presets vary greatly. In addition, the preset of the same encoder has a great impact on the output image quality. The system regards different presets of the same encoder as different encoder ". Preset refers to a preset set of encoder parameters. Encoder presets generally seek a balance between speed and Image Quality: a fast preset generally sacrifices the video quality; preset video quality is generally slow in encoding. For example, the x264 encoder contains 10 presets Based on the encoding speed from fast to slow: ultrafast, superfast, veryfast, faster, fast, medium, slow, slower, veryslow, and placebo.
Bit rate is one of the most important parameters that affect video quality. When other conditions are the same, the higher the bit rate, the better the video quality. For example, the quality of a x360 1 Mbps video is definitely better than that of a kbps video. However, the bit rate varies greatly between different resolutions. For example, it is difficult to determine whether the quality of a 1280x720 1 Mbps video is higher than kbps of a 640x360 video. To remove the influence factor of resolution, we introduced a new variable BPP (bit per pixel) in the system in this article ). The BPP formula is as follows:
BPP = bitrate/(framerate * reso_w * reso_h)Here, bitrate is the video bit rate, framerate is the video frame rate, and reso_w and reso_h represent the video width and height respectively.

BPP indicates the data volume of a pixel in a video. For example, assume that the frame rate is 25fps. In the above text, The BPP value of a video of 1280x720 is 0.043, and The BPP value of a video of 0.087 kbps of 640x360 is. The following table lists the mappings between BPP, bit rate, and common resolutions.

Relationship between BPP and Bit Rate

 

Corresponding bit rate (kbps)

Bit per pixel

(Bits/pixel)

640x360

848x480

1280x720

1920x1080

0.025

144

254

576

1296

0.05

288

508

1152

2592

0.075

432

763

1728

3888

0.1

576

1017

2304

5184

0.15

864

1526

3456

7776

0.2

1152

2035

4608

10368


The evaluation parameter is used to calculate the encoding quality after encoding is completed. There are two types of evaluation parameters: quality evaluation parameters and speed evaluation parameters.

Quality Evaluation Parameter encoding quality evaluation is mainly achieved by referring to video quality evaluation algorithms. For details, refer to the video quality evaluation algorithm to obtain the video quality evaluation results by comparing the original video before encoding and the damaged video after encoding/decoding. The most common all-reference video quality evaluation models are SNR and SSIM.
SNR
SNR (peak signal-to-noise ratio) is the most widely used video quality evaluation method. The formula is as follows:
Here, L is the range of gray-scale values of the image. For an 8-bit deep image, L = 2 ^ 8-1 = 255. the MSE (mean square error) formula of M * N image blocks is as follows:
The value of SNR is usually between 20-40. A larger value indicates a better image quality. Although the SNR calculation is simple, because human visual perception is not taken into account, the evaluation results and subjective feelings are often quite different.
SSIM
SSIM (structure similarity) is a common video quality evaluation method proposed by zhou wang and others. This method takes into account the human visual perception characteristics and the effects of brightness, contrast and structure. The formula is as follows.
Here, l (x, y) is the brightness comparison function, c (x, y) is the contrast comparison function, and s (x, y) is the structure comparison function. For more information about the calculation methods of these three functions, see references.

The value of SSIM is between 0 and 1. A larger value indicates a better image quality. Compared with the SNR, SSIM is more consistent with the subjective feelings of the human eye. Therefore, it is also a widely used method for video quality evaluation.


Speed rating parameters

The encoding speed evaluation is mainly implemented by calculating the coding and decoding time (in milliseconds.


System running principle the system will traverse several input parameter values based on the input configuration information and combine them into different commands for coding and evaluation. After the system starts running, the following steps are executed in sequence:
(1) scale the size of each input video test sequence to generate a series of video sequences with different resolutions.
(2) For the original video sequence of each resolution, select different encoder to prepare encoding.
(3) For each encoder, set different bit rates for encoding to generate bitrate files. The generated bitstream file is decoded to obtain the damaged video sequence.
(4) For each damaged video sequence, different video quality evaluation methods are used for quality evaluation to obtain the quality score.

The above logic is shown. We can see that the order of the system traversal parameters is as follows:

Video content> resolution> encoder> bit rate> Objective Quality Evaluation Method

After the system completes an objective quality evaluation calculation, it generates a record that stores the parameters of the current experiment and stores the record in the database.

Shows the structure of the VideoCodecRank website. In addition to the home page, the entire website includes "result set", "encoder", "video sequence", "System Configuration", and "about" pages. Shows the relationship between these pages.
 
The homepage contains a comprehensive comparison chart of the encoder. The blue horizontal bars represent the encoding image quality, while the yellow horizontal bars represent the encoding time. You can drag the slider above the chart to adjust the following parameters and select different data to sort the performance of the encoder.
Speed and quality weight: currently, only the time and quality weights can be set to 1 or 0. If the weight is 1, the video quality is sorted by the output quality of the encoder. If the weight is 1, the video quality is sorted by the duration consumed by the encoder.
Resolution: select the size of the input video.
Bit Rate: You can select the bit rate of the input video. Note that the Bit rate is measured in BPP (Bit Per Pixel, Bit number Per Pixel.
Content complexity: You can choose to input the test video sequence. Note that the input video content is sorted by time complexity TI or space complexity SI (both indicators are taken from the ITU BT.1788 standard) for convenient selection.
The content of the home page is as follows.
 
The result set page contains the results of all objective video quality evaluations in the system. Each lab record contains the following information:
Encoder
Video Sequence
Resolution
Bit per pixel
Encoding time
Decoding time
Video quality evaluation algorithm
Objective Quality
Subjective Quality

Shows the content of the result set page. You can adjust the encoder, video sequence, resolution, and bit per pixel in the drop-down box ", the objective quality evaluation algorithm is used to filter results that meet specific conditions.


Encoder page encoder page contains all encoder involved in evaluation in the system (NOTE: For encoder that contains multiple presets, each preset is counted as an encoder ). Each record contains the following information:
Encoder name
Standards
Vendor
Version
Shows the content of the encoder page. Click the name of the encoder to go To the encoder details page.

Encoder details page encoder details page consists of three parts: encoder introduction, encoder detailed quality and Encoder time-quality trade-off diagram.
The description of the encoder is as follows. The list lists the basic information about the encoder.
Shows the detailed quality part of the encoder. You can select parameters (encoder, video sequence, resolution, and Bit Rate) to list the image quality information (such as objective algorithm SNR and SSIM) of each frame of the test video sequence under specific conditions ). The abscissa in the chart is the sequence number of the video sequence, and the ordinate is the value of the objective quality evaluation algorithm of the video.
The content of the encoder time-quality weigh chart is shown in. Each point in the time/quality weigh chart represents an encoder. The horizontal coordinate of the chart is the encoding time, and the vertical coordinate is the encoding image quality. It can be seen that the encoder located on the left of the chart is faster, while the encoder located on the top of the chart has better image quality. The encoder "Fast and good" is located at the top left of the chart. You can select parameters (video sequence, bit rate, resolution, and objective evaluation) to list the time consumption information and image quality information of the Video Encoder under specific conditions.
 
On the video sequence page, the list of all original video sequence information in the system that participates in the test is displayed. Each record contains the following information:
Video Sequence name
Original resolution
Pixel sampling format
Frame Rate
Frames
Shows the content of the video sequence page. Click the video sequence name to go to the video sequence details page.
 
Video Sequence details page the video sequence details page contains three items: Video Sequence preview, video sequence details, and comparison of video sequence time/space complexity.
The video sequence preview part is as follows. You can use this function to preview the content of the test video.
Shows the detailed features of a video sequence. You can use this function to view the TI (Temporal perceptual Information) Information and SI (Spatial perceptual Information) Information of each frame of the video. Ti and si indicators are taken from the ITU BT.1788 standard. The larger the TI, the more intense the video motion (the larger the time); The larger the SI, the more complex the video content (the space texture is large ). In the chart, the abscissa is the sequence number of the video sequence, and the ordinate is the video feature value.
 

The following figure compares the time and space complexity of a video sequence. Each vertex in the figure represents a video sequence. The horizontal and vertical coordinates of the chart are si and ti. It can be seen that the video sequence motion above the chart is intense, while the video sequence content texture on the right of the chart is complicated. The simplest video sequence is in the upper-right corner of the chart, and the simplest video sequence is in the lower-left corner of the chart.



Shows the system configuration page. This page lists the system configuration parameters. For example, it shows the input video resolution that will be stretched, the encoding type of BPP, and the objective quality evaluation algorithm.




Lei Xiaohua
Leixiaohua1020@126.com
Http://blog.csdn.net/leixiaohua1020



Copyright Disclaimer: This article is an original article by the blogger and cannot be reproduced without the permission of the blogger.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.