Log in

View Full Version : Script to compare video (PSNR value and WZSDM)


David caid
30th April 2003, 10:23
Hello,

I wrote a script to compare videos,


##########
# Result is a video of 4 images
# ---------------------------------
# | Video1 | Video2 |
# ---------------------------------
# | Source-Video1 | source-Video2 |
# ---------------------------------
loadingPlugin

Source = mpeg2source( .d2v)
Video1 = AviSource (Video1.avi)
Video2 = AviSource (Video2.avi)
A = source.crop(x,x,x,x).BicubicResize(640,380,0.333,0.333).ConvertToYUY2
B = Video1
C = video2
D = Compare(B,A)
E = Compare(C,A)
StackVertical(StackHorizontal(B,C),stackHorizontal(D,E))

or
##########
# Result is a video of 4 images
# ---------------------------------
# | Source | Video1 |
# ---------------------------------
# | Compare | Substract |
# ---------------------------------
loadingPlugin

Source = mpeg2source( .d2v)
Video1 = AviSource (Video1.avi)
Video2 = AviSource (Video2.avi)
A = source.crop(x,x,x,x).BicubicResize(640,380,0.333,0.333).ConvertToYUY2
B = Video1
C = Compare(B,A)
D = Substract(A,B)
StackVertical(StackHorizontal(A,B),stackHorizontal(C,D))


followed by full compression mode in 1-pass CBR (2000-4000 kbps).
_________________

That's nice because you have source and video in 1 window.
I added the compare fonction that give the PSNR. I know that the important point is the eyes subjectivity, but the tools exist, so let's use it.
My problem is that what so are the scale of the PSNR. I didn't find any information about the calculation nor the range of this value.
Of course, I don't want to judge the quality of an encode juste by a "good" value of PSNR, I change want to use it to have a fast comparaison when you make a lot of different tests.

MarcFD told once he had a project of wzsdm (http://forum.doom9.org/showthread.php?s=&threadid=34253) filter project ( http://forum.doom9.org/showthread.php?s=&threadid=34253 ) that should give a closer value to the eyes sensibility compare to PSNR, is this project still valid ?

Thanks
David