Video Compression

VideoNerd

Number Cores of AWS machine g4dn.4xlarge for Real-Time Transcoding with x264

The purpose of this note is to estimate the number of cores AWS machine (g4dn.4xlarge) required to transcode in real-time an encoded 1920x1080p@60fps video with the SW codec x264 to lower bitrate and/or to lower framerate and/or to lower resolution.  Actually our transcoding is both trans-rating and trans-scaling.   Testing methodology AWS machine:  g4dn.4xlarge Each […]

Differential Pulse Code Modulation (DPCM) Method to Exploit Spatial Redundancy

The Spatial Redundancy in video data means a strong correlation of neighboring pixels, which is observed within frames. Therefore, a predictive coding is beneficial if the correlation is strong enough among the spatially adjacent pixels. The basis of the spatial predictive coding is to predict a pixel value from previous pixels which were already coded […]

Why PSNR is Poor-Related to Human Vision System

PSNR does not reflect the structure between test signals and the pristine (original) signal. The structure of errors is important in Human Vision System.  The following figure demonstrates how totally different discrepancies  between test signals and the original one give same PSNR, it’s obvious that the test signal 1 seems much better approximation to the […]

Compute PSNR, SSIM, VIF with ffmpeg

If you have original yuv-sequence and encoded h264 file (or h265), you can compute total PSNR,SSIM and VIF statistics with ‘-filter-complex‘ of ffmpeg tool.   the following command computes total PSNR statistics: Example: Check psnr of the first 200 frames: ffmpeg.exe -i crowd.h264 -s 1920×1080 -i  crowd_1920x1080_50fps.yuv  -filter_complex “psnr” -frames 200 -f null – …. […]

VIFP Video Quality Metric – Python Script

VIFP (Visual Information Fidelity in Pixel Domain) is a video quality metric, in the following papers you can find details on VIFP: “A New Method for Color Image Quality Assessment“, by Niveditta Thakur et al., 2011 “Image Information and Visual Quality“,  Hamid Rahim Sheikh, Member, IEEE, Alan C. Bovik, Fellow, IEEE In the python script […]

Turing HEVC Codec

Turing codec is open-source codec to encode hevc. Download and Build git clone https://github.com/bbc/turingcodec.git cd turingcodec mkdir build cd build cmake ../ -G “Visual Studio 16 2019” -A x64 Open turing.sln in the build-folder (‘cmake’ creates turing.sln), choose Release/x64 and build the solution, the binary turing.exe is created at ‘turingcodec\build\turing\Release\’   Run Case A:  Low […]

Grain Noise Detection Algorithm

Introduction Film grain is a particular random noise on photographic film due to the presence of small particles of a metallic silver, or dye clouds:   Digital photography in virtue does not exhibit film grain. However a film grain overlay is sometimes added as a special effect onto digital content. There exist a number of […]

VQMT – Video Quality Metric Tool

There is a free VQMT tool, slightly “ancient” from 2013, you can find the link to windows binaries  at http://mmspg.epfl.ch/vqmt or take my binaries . VQMT computes such video quality metrics as PSNR, SSIM, MSSSIM (Multi-Scale SSIM), VIFP (Visual Information Fidelity), PSNRHVS (Peak Signal-to-Noise Ratio taking into account Contrast Sensitivity Function).  Notice that  PSNR is […]

Non Reference Video Quality Assessment

Appendix:  blurriness as non-reference Video Quality Metric   Three necessary conditions for each Video Quality Metric (VQM) to meet: 1) symmetry: VQM(x, y) = VQM(y, x); 2) boundedness:  0 ≤ VQM(x, y) ≤ 1 (or 100) 3) unique maximum: VQM(x, y) = 1 if and only if x = y.   Non-Reference Image Quality Assessment […]

SSIM and MS-SSIM Codes

C++ version of SSIM is available at https://github.com/utlive/ConsoleSSIM.git . Notice that to build this code by Visual Studio you need to install MFC. The code was developed by Laboratory for Image and Video Engineering at the University of Texas at Austin (a trustful source) The exe-file (conSSIM.exe) accepts only jpg-files are input (an annoying restriction). […]