koala
Active Member
MSE is a term from statistics. For the layman, it is a score for the difference of two values, one original and one estimated. It is the squared difference between both values. The higher it is, the more different the estimated value is from the original. The lower it is, the more similar the estimated value is to the original. So you try to get an MSE as low as possible.
For images (or one frame of a video), the MSE of the image is the average of all the MSE of the pixels if you compare an original image with its encoded counterpart.
For videos, it is the average of the MSE of all the frames if you compare the original raw footage with its encoded version.
Actually, ffmpeg doesn't simply average, it puts more weight into bigger MSE values by computing a PSNR, which regards the peak values better, so single bad encoded frames weight severe and are not drowned by a huge number of good encoded frames.
The lower the PSNR, the better the quality of the encoded video. It can be directly used as sorting criteria if you compare a series of videos that were encoded with differing parameters. The best setting is the video with the lowest PSNR.
If you compare visually, you're doing too much work, and with questionable result, because your eyes can be deceived. Math, on the other hand, and PSNR is math, cannot be deceived. The best video is simply the encoded video with the lowest PSNR, so the best settings are the settings that were used for producing the video with the lowest PSNR. And you can do this automatically. You can write scripts to vary a bunch of parameters and create 1000 videos with it, compute the PSNR, write a list, sort by PSNR, and grab the settings from the video on top.
For images (or one frame of a video), the MSE of the image is the average of all the MSE of the pixels if you compare an original image with its encoded counterpart.
For videos, it is the average of the MSE of all the frames if you compare the original raw footage with its encoded version.
Actually, ffmpeg doesn't simply average, it puts more weight into bigger MSE values by computing a PSNR, which regards the peak values better, so single bad encoded frames weight severe and are not drowned by a huge number of good encoded frames.
The lower the PSNR, the better the quality of the encoded video. It can be directly used as sorting criteria if you compare a series of videos that were encoded with differing parameters. The best setting is the video with the lowest PSNR.
If you compare visually, you're doing too much work, and with questionable result, because your eyes can be deceived. Math, on the other hand, and PSNR is math, cannot be deceived. The best video is simply the encoded video with the lowest PSNR, so the best settings are the settings that were used for producing the video with the lowest PSNR. And you can do this automatically. You can write scripts to vary a bunch of parameters and create 1000 videos with it, compute the PSNR, write a list, sort by PSNR, and grab the settings from the video on top.