Skip to content

quortex/x265-pVMAF

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12,685 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pVMAF - Real-time In-loop Perceptual Video Quality Metric for x265

Contents:

What is pVMAF?

Predictive VMAF or pVMAF is an in-loop Video Quality Metric (VQM) that is capable of approximating VMAF score of a picture frame in real-time. Initially developed for x264, we have been able to follow a similar framework to extend support for pVMAF to x265 as well. As with x264, pVMAF integration into x265 is non-intrusive and doesn't affect the execution flow of x265.

⚠️ Note: This prototype version of pVMAF currently supports Full-HD (1920x1080) progressive content with YUV420p pixel format encoded on --medium preset.

Link to the research paper

Check out our blog series on Video Quality Measurements:

Steps to configure and build x265 with pVMAF

Linux & Mac

Clone this repository and then from the root folder of x265-pVMAF, do the following:

mkdir build_pvmaf ; cd build_pvmaf
cmake ../source -DENABLE_SHARED=OFF -DENABLE_CLI=ON -DENABLE_ASSEMBLY=OFF -DCMAKE_BUILD_TYPE=Release
make -j"$(nproc)"

This builds x265 binary with pVMAF in the project build folder.

Usage

Command line options

Preparing the source file

If your source is of a resolution larger than FHD, we recommend resizing it to FHD resolution. An example command line is given below,

ffmpeg -f rawvideo -pixel_format yuv420p -video_size 3840x2160 -i 4Kinput.yuv -s 1920x1080 -pix_fmt yuv420p FHDinput.yuv

Looking for a quick compatible source to try it out? Here you go,

wget https://media.xiph.org/video/av2/y4m/WorldCupFarSky_1920x1080_30p.y4m -O FHDinput.y4m

Enable pVMAF with --pvmaf

This argument is used to enable pVMAF inference during the encoding process.

./x265 --output output.mp4 --y4m --input FHDinput.y4m --crf 20 --preset medium  --pvmaf

Generate csv log file frame-level statistics along with pVMAF using --csv file.csv

Use this option to CSV file containing frame-level encoder statistics along with pVMAF scores.

./x265 --output output.mp4 --y4m --input FHDinput.y4m --crf 20 --preset medium --log-level 4 --csv-log-level 2 --csv stats.csv --psnr --ssim --pvmaf

About

Performance

Model performance - medium preset - Frame level predictions

Metric SROCC ↑ PLCC ↑ RMSE ↓ MAE ↓
PSNR-Y 0.835 0.837 17.61 13.26
PSNR-HVS-Y 0.887 0.894 14.43 10.20
SSIM 0.850 0.849 17.08 12.20
MS-SSIM 0.919 0.919 12.86 8.39
pVMAF 0.991 0.992 3.94 2.76

Model performance - medium preset - Video level predictions obtained by accumulating frame level predictions

Metric SROCC ↑ PLCC ↑ RMSE ↓ MAE ↓
PSNR-Y 0.860 0.891 13.72 10.62
PSNR-HVS-Y 0.892 0.924 11.56 8.41
SSIM 0.881 0.898 13.20 9.36
MS-SSIM 0.941 0.956 9.25 6.18
pVMAF 0.997 0.997 2.34 1.72

Caption: Correlation Coefficients and Error Measures Between VMAF and Other FR Metrics

Scatter plot - VMAF vs pVMAF

image

Computational overhead analysis - Single-threaded execution with SIMD enabled - Medium preset

Preset Metric Time per frame (ms) Overhead cycles (%)
Medium PSNR 0.244 0.20
SSIM 0.539 0.43
pVMAF 2.078 1.67

Inference Time of Various VQM Metrics

Metric Time (ms) per frame Speedup vs. VMAF
VMAF 77.40 1.00
PSNR-HVS 60.34 1.28
MS-SSIM 514.32 0.15
pVMAF 2.08 37.21

⚠️Note: VMAF, PSNR-Y, and MS-SSIM scores were computed using the implementations available in the VMAF binary, while PSNR-Y, SSIM, and pVMAF were computed using the native implementations available in x265.

Extension and Future Work

Support for this prototype version of pVMAF is limited to measuring Video Quality loss due to compression in progressively coded content of Full HD resolution (1920x1080) with YUV420 pixel format encoded using medium preset of x265. Extension of this work could explore the following avenues for improvement,

  • Exploring options to account for VQ loss due to scaling as well
  • Support for other presets and encoder settings
  • Support for 4K resolution
  • Support for other pixel formats and higher bit-depths

Developers

  • Axel De Decker - Senior Software Engineer, Research & Development, Synamedia
  • Sangar Sivashanmugam - Senior Video Algorithm Engineer, Research & Development, Synamedia

Contributors

  • Jan Codenie - Senior Lead Software Engineer, Research & Development, Synamedia
  • Dr. Jan De Cock - Director of Codec Development, Research & Development, Synamedia
  • Prof. Dr. Glenn Van Wallendael - Assistant Professor, Dept. of Electronics and Information Systems, Ghent University - imec
  • Dr. Hannes Mareen - Postdoctoral Researcher, Dept. of Electronics and Information Systems, Ghent University - imec
  • Prof. Dr. Peter Lambert - Associate Professor, Dept. of Electronics and Information Systems, Ghent University - imec

Acknowledgements

Additionally, We also acknowledge the contributions of the following individuals to the pVMAF project, listed in no particular order: Hsiang-Yeh Wang, Yongjian Li, Chris Warrington, Steve Warrington, John Lan, Chris Coene, Karl Stoll (Synamedia), Marc Baillavoine, Longji Wang, Marcus Rosen, Lin Zheng, and Cheng-Yu Pai (formerly with Synamedia). We would like to thank the creators and contributors of x265 repository. We would also like to acknowledge and give due credit to the creators of the sample clip, which is linked here for public use in testing and experimentation.

License

Click here for License information.

Citation

If you use this work in any of your research, please cite the following paper

@INPROCEEDINGS{11084726,
  author={De Decker, Axel and Sivashanmugam, Sangar and De Cock, Jan and Mareen, Hannes and Lambert, Peter and Van Wallendael, Glenn},
  booktitle={2025 IEEE International Conference on Image Processing (ICIP)}, 
  title={X265-PVMAF: A Real-Time Perceptual Video Quality Metric for HEVC Video Encoding}, 
  year={2025},
  volume={},
  number={},
  pages={2330-2335},
  keywords={Measurement;Image coding;Accuracy;Correlation;Machine learning;Streaming media;Feature extraction;Real-time systems;Quality assessment;Video recording;Video quality assessment;full-reference;machine learning;real-time video encoding;x265},
  doi={10.1109/ICIP55913.2025.11084726}}

About

pVMAF support for x265

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors