Log in

View Full Version : how can i test h264 videos quality ?


mcgoxel
14th September 2009, 02:12
hi, i got 2 video coded with h264.
I want to know which one is better quality.

theese are mediainfo's output.
1.

Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L3.1
Format settings, CABAC : Yes
Format settings, ReFrames : 5 frames
Muxing mode : Container profile=Unknown@3.1
Codec ID : V_MPEG4/ISO/AVC
Duration : 1h 35mn
Nominal bit rate : 638 Kbps
Width : 704 pixels
Height : 304 pixels
Display aspect ratio : 2.35:1
Frame rate : 23.976 fps
Resolution : 24 bits
Colorimetry : 4:2:0
Scan type : Progressive
Bits/(Pixel*Frame) : 0.124
Writing library : x264 core 72 r1222 d0ee6f8
Encoding settings : cabac=1 / ref=5 / deblock=1:0:0 / analyse=0x3:0x113 / me=umh / subme=9 / psy=1 /
psy_rd=1.0:0.0 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=2 / 8x8dct=1 / cqm=0 / deadzone=21,11 /
chroma_qp_offset=-2 / threads=3 / nr=0 / decimate=1 / mbaff=0 / bframes=3 / b_pyramid=0 / b_adapt=2 / b_bias=0 / direct=1 /
wpredb=1 / keyint=250 / keyint_min=25 / scenecut=40 /
rc_lookahead=40 / rc=2pass / mbtree=1 / bitrate=638 / ratetol=1.0 /
qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 /
cplxblur=20.0 / qblur=0.5 / ip_ratio=1.40 / aq=1:1.00



2.

Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L3.1
Format settings, CABAC : Yes
Format settings, ReFrames : 5 frames
Muxing mode : Container profile=Unknown@3.1
Codec ID : V_MPEG4/ISO/AVC
Duration : 1h 35mn
Nominal bit rate : 638 Kbps
Width : 704 pixels
Height : 304 pixels
Display aspect ratio : 2.35:1
Frame rate : 23.976 fps
Resolution : 24 bits
Colorimetry : 4:2:0
Scan type : Progressive
Bits/(Pixel*Frame) : 0.124
Writing library : x264 core 72 r1222 d0ee6f8
Encoding settings : cabac=1 / ref=5 / deblock=1:0:0 / analyse=0x3:0x133 / me=umh / subme=9 / psy=1 /
psy_rd=1.0:0.0 / mixed_ref=1 / me_range=16 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 /
chroma_qp_offset=-2 / threads=3 / nr=0 / decimate=1 / mbaff=0
/ bframes=3 / b_pyramid=0 / b_adapt=2 / b_bias=0 / direct=1 / wpredb=0 / keyint=250 / keyint_min=25 / scenecut=40 /
rc_lookahead=40 / rc=2pass / mbtree=1 / bitrate=638 /
ratetol=1.0 / qcomp=0.60 / qpmin=10 / qpmax=51 / qpstep=4 / cplxblur=20.0 / qblur=0.5 / ip_ratio=1.40 / aq=1:1.00



also r there any pro for testing ? tnx

microchip8
14th September 2009, 02:47
Test with your own eyes? Both files are encoded with identical settings

thewebchat
14th September 2009, 02:47
Procedure:

1) Open video A in favourite media player
2) Open video B in favourite media player
3) Watch video A
4) Watch video B
5) Repeat from #3
6) ???
7) Prophet

linyx
14th September 2009, 02:55
AviSynth
a = AVCSource("clip1.dga").Subtitle("Source")
b = AVCSource("clip2.dga").Subtitle("Encoded")
Interleave(a,b)

or you could use metrics like SSIM or PSNR (http://compression.ru/video/quality_measure/video_measurement_tool_en.html).
However, the later probably wouldn't be a wise idea since you have psy-rd and aq enabled...

mcgoxel
14th September 2009, 03:21
Test with your own eyes? Both files are encoded with identical settings
1. encoded 3 hours, 2. is encoded with 2.5 hours.


if they both came close to thinking I would prefer the second one.
What is your advice

microchip8
14th September 2009, 03:24
did you do the encoding on the same machine/cpu? Like others and me have said, there's no magical test program that can tell you which file encoded with the same settings has better quality than the other one also encoded with the same settings. Also, are those both identical movies or are they different ones?

Sagekilla
14th September 2009, 03:27
If the two are bit-identical (which I suspect they are) this whole business of trying to "test quality" is pointless. The only reason for one encode to take 2.5 hours and the other 3 hours would be the 3 hour encode had some other processor intensive task going on during the encoding.

microchip8
14th September 2009, 03:44
yep, that's also a possibility for the 2.5/3 hours thing.

mcgoxel
14th September 2009, 03:48
did you do the encoding on the same machine/cpu? Like others and me have said, there's no magical test program that can tell you which file encoded with the same settings has better quality than the other one also encoded with the same settings. Also, are those both identical movies or are they different ones?

the same computer and two video created under the same configuration. I used the program staxrip with latest version (1.1.1.4).


If the two are bit-identical (which I suspect they are) this whole business of trying to "test quality" is pointless. The only reason for one encode to take 2.5 hours and the other 3 hours would be the 3 hour encode had some other processor intensive task going on during the encoding.

I am newbie in video encoding process and trying to understand the logic. Waiting for your help and advice, thank you

linyx
14th September 2009, 04:34
I am newbie in video encoding process and trying to understand the logic. Waiting for your help and advice, thank you
He is saying that the reason one took longer to encode than the other is because you were running another CPU intensive program while encoding.
Encoding video (especially with x264) uses almost all of your processor power. If you were doing something else at this time, x264 would lower its usage to allow the other program to run smoothly, and thereby slow the encoding process down.

ajp_anton
14th September 2009, 04:37
They won't be bit-identical since they used 3 threads, even if they used identical settings, which they don't.

analyse=0x3:0x113 / trellis=2 / wpredb=1
analyse=0x3:0x133 / trellis=1 / wpredb=0

Sagekilla
14th September 2009, 05:23
They won't be bit-identical since they used 3 threads, even if they used identical settings, which they don't.

analyse=0x3:0x113 / trellis=2 / wpredb=1
analyse=0x3:0x133 / trellis=1 / wpredb=0

That certainly changes things. The video with trellis 2 should be (on a theoretical basis) higher quality than the video with trellis 1.

The difference may or may not be apparent. But at 638 kbps, I'd think the clip with trellis 2 would be better looking.

K0zi
14th September 2009, 09:57
You can compare them visually using this program (http://forum.doom9.org/showthread.php?t=138430).

iko417
15th September 2009, 17:53
The only answer is in your eyes. In this case the better quality clip it should be the first clip.