Log in

View Full Version : another xvid vs wmv9 comp


billou2k
31st July 2003, 14:05
I wanted to make my own opinion of how current codecs perform, so I started my own codec comparison with Asterix and cleopatra on 1cd.
It's got a very varied content:
colourful content,
both very low and very high detailed scenes,
a few very high motion scenes,
some dark scenes,
a dark/bright flashing scene with smoke,
so I thought it was a good movie to test codecs)

For now I've encoded it with divx3 sbc, xvid, wmv9 vcm (divx 505 is next on the list)

here are the specs
----------
Audio: ac3 2ch -> ogg 96kbps = 68 MBps
Video: PAL 25fps, 1h43m34s
720*576 anamorphic cropped to 710*428
resized to 640*272,
expected size 626 MB = average 845kbps, 0.194 bits/pix/frame
0.194 is at the limit of what i usually encode on 1 cd but well what's the point of comparing codecs performance on high bitrate video?
----------

I must say that this test gave me surprising results.

-Divx3 : 629 MB not far (3MB diffence)
after a weird oversized 1st try I now have the correct filesize.
and actually results are better as well so something defenitely went wrong the 1st time. I used Gknot on the 1st try but I probably made a mistake in the settings. Anyway I quickly setup nandub directly this time. I consider spending hours tweaking Nandub is past for me ;-) ( I surely get old and lazy;-) ).

Still Sbc was not so good on this encode with typical divx3.11 artefacts:
quite visible non refreshed areas, mosquito noise
visible blockiness especially in flat areas with gradient
the flashing scene was not really nice to watch with lots of blocks and bleeding colours
the high motions sequences are apart from the extreme cases were blocks appear but medium motions sequences show good amount of blocks as well.


-Xvid : size=626 MB perfect match!
It was surprinsigly blocky and blurry at the same time...
Although I was in the impression it was the sharpest codec around
Unlike 3.11, no particular problem with the flat background (gradient)
there... some scrolling sequences got "sliding " textures that looked bad.
The flashing bright/dark scenes is quite blocky as well

-WMV9 : size=638 MB ... 12 MB oversized...
It was the biggest surprise: without a doubt the best result of my serie. No noticeable blocks, and still sharper than xvid!
the flashing scene is not showing visible blocks during playback and was the more pleasant to watch.
some fade-in /out scenes gave me more the impression of moving colours rather than actual fading but I cant say if it was better than for xvid.
Portraits are actually sharper even on playback
still its 12 MB over the size but it worths it... (still it's not a valid excuse;-) )

-After a frame per frame analysis results, xvid clearly show a big amount of blocks in motions sequences and at the same time blurrier than wmv9 in still sequences... of course the 12MB oversize might have some impact on the overall quality but I dont think it explains the big differences perceived...
Portraits in Wmv9 are more crisp than xvid and still no block visible.
quite a good performance...

Of course I also might have made some errors with my xvid settings but I have to precise for my defense that I genuinely read the most recent koepi's guide and spent lots of time in the forum trying to find out the best settings for the movie.
------------------------------------
Xvid settings:
-1st pass specific
GLOBAL:
motion search precision 6 ultra high
quantization type h263
Fourcc used xvid
VHQ mode 4 wide search

Max I-frame interval 250 (10 seconds of video at 25fps)
Min I-frame interval 1

Lumi masking OFF
Greyscale OFF
Interlacing OFF
Chroma Motion ON
Quaterpel OFF
GMC OFF

B frame control 2
B fr quantiser ratio 150
B fr quantiser offset 100

packed bitstream OFF
DX50 B-VOP comp ON
print debug OFF

-2nd pass specific
Two pass tuning:
I-frame boost 0
below i fame distance 13
I frame bitrate reduction 25%

Curve compression:
High bitrate scenes 0%
Low bitrate scenes 0%
Bitrate playback delay 250
playback proportionally

-----------------------------------------
divx 3.11 settings
825 kilo bps (=845 000 kbps) (with divx3.11 1kbps=1024 bps)
keyframe interval 10 s
minimum allowed bitrate 460
internal scd 100
space kfs 50
error protection none
motion based curve modulation 20%
curve compression 25%
luminance correctino off
credits encoding off
filter high pass 270
filter low pass 6000
bitrate redistribution bias
span 8 frames
sensitivity 10 blocks
gauge:
payback delay 30 sec
min 30%
start 35%
max 70%
compression levels 2-16
keyframe quality 4-31
crosspoint 460

------------------------------------
WMV9 settings:
2 passes
Bitrate 845 kbps
decoder complexity: complex
performance better quality
keyframe interval 8000 ms
no pre processing
------------------------------------
I could post some screenshots if some people are interested.
Are there settings that don't look adapted to the movie?
What could be changed to make the result a bit better for the xvid encode?

Teegedeck
31st July 2003, 14:21
Thanks for your work, tests are always worthwhile.

Originally posted by billou2k
but well what's the point of comparing codecs performance on high bitrate video?

Well there is a point, actually: We now do have some codecs (RV9, WMV9) which are optimized for low target-bitrates. There's not much to gain for our traditional MPEG-4 codecs in that arena. The MPEG-specs have been augmented with H.264 because of that. RV9 and WMV reach the peak of their efficiency beneath, say, 1000 kbps; XviD and DivX reach that peak above 1000 kbps. There would be some sense in a high-bitrate comparison for as long as a high-bitrate encode still looks far better than a low-bitrate encode.

Edit: 1000 kbps were of course an arbitrary value. It would be interesting to find out at what bitrate XviD starts to look worse than the other codecs mentioned.

With rate distortion and VHQ I would have guessed somewhere between 700 and 800 kbps, though your tests indicate otherwise.

Edit(2): For your XviD-settings, I would strongly recommend activating chroma ME; I-frame boost 100, I-frame bitrate reduction 50 and trellis r-d quantization. I'd activate quarterpel,too, but many would disagree with me on that one.

billou2k
31st July 2003, 14:40
;-) when I wrote that sentence I thought I was going to cause some disagreements;-)
Actually you are right... bitrate depends on the level of quality you want to sacrifice. If a 1cd rip is not watchable for a normal person I usually do it again to fit 2cds.
To be honest I didnt know how to say this but to be simple,
in this particular case, I just want to do a 1 cd test with a movie shorter than 2 hours (lets stay a bit realistic:D ) but still with a good resolution... and see how well codecs behave. That's all...
For the higher bitrates I'll trust latest Doom9 comparison unless I feel like I want to do one on a particular movie of my choice:D

But still, considering I've seen others 1cd xvid encode, I'm a bit surprised by the not so good result I have with it in that case.
Of course I know everything depends on the content...
Still if there is something misconfigured in my settings let me know!

Anyway thanks for sharing your views Teegedeck!
Still I was not really considering 845 kbps as a low bitrate... For me 400 - 500 is low but then it's more used for streaming than storage but then it's already quite high considering it ll take most of a 512 kbps broadband connection... everything is relative;-)

bond
31st July 2003, 15:58
nice codec comparison!

Originally posted by billou2k
Still I was not really considering 845 kbps as a low bitrate... For me 400 - 500 is lowthat's my opinion too
altogether i wouldnt say that it is so clear that wmv9 and rv9 are better than xvid for "small bitrates" (meaning 1cd rips ~700kbps)

and anime is also a totally different story...

K_R
31st July 2003, 17:42
I'm assuming that you used 2-pass for WMV9. I'm wondering, what were the compression ratios between the first pass and second pass for both encodes?

Also, doesn't WMV9 automatically post-process the video? I can't quite remember either way, but I think there was some mention about it before...

easyfab
31st July 2003, 17:44
-Xvid : size=626 MB perfect match!
It was surprinsigly blocky and blurry at the same time...
Although I was in the impression it was the sharpest codec around there... some scrolling sequences got "sliding " textures that particularly looked bad

-WMV9 : size=638 MB ... 12 MB oversized...
It was the biggest surprise: without a doubt the best result of my serie. No noticeable blocks, and still sharper than xvid!
still its 12 MB over the size but it worths it... (still it's not a valid excuse;-) ) no particular


Yes, wmv9 is not bad i never got very bad result with this codec.

Xvid is much more complicated to configure, one thing that's can explain your result is your setting b-frames 2.
I never got good result with b-frames > 1 and i try to not use b-frames at all for the moment.
I was curious to see the result of your encoding without b-frames (if you have time ;) ).

CruNcher
31st July 2003, 17:51
@Teegedeck
from my expierence now with Devapi4's new encoder loop ,trellis, wide search,qpel,h263,gmc and cme (cme has only a speed effect in devapi4 for the moment, it makes encoding faster but doesnt change anything else, wich is weird) i can say that it's possible to reach good quality even @ 520 kbps with low resolutions for 16:9 DVDs im talking of arround 3 hour movies with endcredits.

But to reach this Quality for 700 MB you have to take major steps in reduceing the Audio quality my test so far was AAC+ with Pearl Harbor coming out @ 38 kbps and still sounds better then any Vorbis @ 64 kbps no metalic distortions are noticeable and even the endcredits music is nice :). Also most Hollywod Productions are not 3 hours long most are like 2 hours and you could save even more bits for the Video part then :) im eagerly awaiting the release of Nero Digital for that reason to create such movies @ the moment is not easy and some problems with the playback of SBR have still to be solved but its the future as long as Vorbis doesnt improve their encoder for lower bitrates.

MoritzT
31st July 2003, 19:16
-Divx3 : 629 MB perfect match (less than 1MB diffence)

-Xvid : size=626 MB perfect match!

How does this work out? :confused:

Sirber
31st July 2003, 19:45
What about RV9?

Teegedeck
31st July 2003, 22:25
Originally posted by CruNcher
@Teegedeck
from my expierence now with Devapi4's new encoder loop ,trellis, wide search,qpel,h263,gmc and cme (cme has only a speed effect in devapi4 for the moment, it makes encoding faster but doesnt change anything else, wich is weird) i can say that it's possible to reach good quality even @ 520 kbps with low resolutions for 16:9 DVDs im talking of arround 3 hour movies with endcredits.


Now that's nice to hear. I always liked your meticulous tests here, so I take those results for granted. I haven't tested such low bitrates with high quality sources, yet. Always had trouble in dark scenes.

And also nice to hear that someone else except for me wants to encode in 16:9 and with HE AAC.:)

Soulhunter
1st August 2003, 00:00
Just my opinion...

- Low bitrate >1000kbps = WMV9

- Medium bitrate 1500-2500kbps = DivX5

- High bitrate <2500kbps = XviD

Sagittaire
1st August 2003, 00:13
The WMV9 is a codec which was created especially for high the resolution and the high bitrate. It's better than the others codecs in this sector. RV9 EHQ is unbeatable for the sources slightly compressible.

- Low compressibility < 40% => RV9 EHQ & WMV9

- Medium compressibility = 50% => DivX5 & XviD & RV9 EHQ & WMV9

- High compressibility > 60% => DivX3 & DivX5 & XviD & RV9 EHQ & WMV9

billou2k
1st August 2003, 12:17
Thanks for all your comments!
K_R:
-About the post processing in wmv9, I've read that the post processing could be deactivated in the registry.
( \HKEY_CURRENT_USER\Software\Microsoft\Scrunch\Force Post Process Mode )
I m playing back all videos without postprocessing (as far as I know)
If you know more about other processing that would be automatically applied to the pictures, let me know. Anyway I'm doing the frame per frame analysis in vdub it should be free of post processing (i guess?)
-About the ratio between 1st pass and 2nd pass I have no idea as the 1st pass avi is just a few MB. Is there another way to check that? I quickly had a look in the stat file but I didnt find much readable data.

MoritzT: Well spotted.. sorry I must have been tired when I wrote that 626-629=1 ;-) It's actually 3 MB away from the required size but as I always try to have a few MB free in case the video is slightly oversized the result fits a cd anyway...

EasyFab: Yes it's my 1st wmv9 encode and it's quite easy to set up so I am really surprised by the quality... Now it's just the result of one encode, I'll have more tries later but it's an intersting codec;)
But I've heard that the codec might give more bits at the begining of the movie than at the end to make a better first impression i guess... It has to bec hecked .. i didnt noticed it for now..
I also gave a try to your idea: runnging xvid with no b frames... I'll post my result a bit later but after a quick look it doesnt seem better...

Teegedeck: I think I activated the chroma motion estimation ("Chroma Motion ON"). Thanks for the tip: I'll try to find the time to run another encode with the settings you propose... I know qpel is causing lots of discussion about his effiency... If I have even more time I'll run one more test ;-)

temporance
1st August 2003, 12:31
Originally posted by Sagittaire
The WMV9 is a codec which was created especially for high the resolution and the high bitrate. It's better than the others codecs in this sector. RV9 EHQ is unbeatable for the sources slightly compressible.I disagree somewhat. In my tests, WMV9 definitely performs worse than the MPEG-4 codecs (DivX, xvid) at high bitrates (typically when MPEG-4 quantizer < 5). This may also be true of RV9 as it seems to share many of WMV9's performance characteristics.

RV9 and WMV9 beat the other codecs at very low bitrates, but at these are bitrates that all codecs will make some artifacts and perhaps you should think about reducing the video resolution. Infact, that's my next experiment - to see if resizing can improve PSNR and HVS metrics.

My version

- Low compressibility < 40% => RV9 EHQ & WMV9 (better to reduce resolution?)

- Medium compressibility = 50% => DivX5 & XviD & RV9 EHQ & WMV9

- High compressibility > 60% => DivX3 & DivX5 & XviD

ominte
1st August 2003, 14:33
What could be changed to make the result a bit better for the xvid encode?

Well under the Curve Compression tab you could set High bitrate scenes to 60% and Low bitrate scenes to 10%. This slightly increases PSNR in some of my tests, however the diffence is less than 1 point.

Sagittaire
1st August 2003, 15:09
no altcc in XviD devapi4 but the PSNR is very better than XviD Koepi with altcc ...

V-tec
1st August 2003, 15:29
that is not true everything, in some condition (high bitrates encodes) the Koepi's XviD 24.06.03 version get a better PSNR in the same video.

ominte
1st August 2003, 16:17
no altcc in XviD devapi4 but the PSNR is very better than XviD Koepi with altcc ...
Sorry my statements weren't that clear. These options are in fact in the "Two Pass" tab, under the heading of "Curve Compression". So they should still be present in dev-api4, although I can't say I've personally tried it (still waiting for public compile to be released) :)

K_R
1st August 2003, 20:16
Originally posted by billou2k
Thanks for all your comments!
K_R:
-About the post processing in wmv9, I've read that the post processing could be deactivated in the registry.
( \HKEY_CURRENT_USER\Software\Microsoft\Scrunch\Force Post Process Mode )
I m playing back all videos without postprocessing (as far as I know)
If you know more about other processing that would be automatically applied to the pictures, let me know. Anyway I'm doing the frame per frame analysis in vdub it should be free of post processing (i guess?)
-About the ratio between 1st pass and 2nd pass I have no idea as the 1st pass avi is just a few MB. Is there another way to check that? I quickly had a look in the stat file but I didnt find much readable data.

Honestly, I have no idea about the wmv9 postproc. So if you think you're doing the right thing with disabling it in reg, then you probably are.

Regarding the ratio, I can only say for xvid since I don't encode with wmv9. If you're using koepi's build there should be a program in the program group called "StatsReader(2pass ext)" use that to open the firstpass stats file. The firstpass size should be there.

If your second pass size is 60% or less of your first pass, that's probably the reason for the blockiness you found... Although, you can encode a secondpass at 50% without suffering from blockiness by capping the quants.

fyo
1st August 2003, 20:22
What program do you guys use to measure the PSN-ratio?

-fyo

billou2k
4th August 2003, 17:30
I didn't have time last week end to look at that
I just had a quick look at the xvid stats.
The first pass was 1261 MB. As i'm asking for 626 MB,
I've got a ratio of 49%
According to what I read in that thread, some would think it's too low, some would think it's ok...

Teegedeck: I also run a test with the parameters you proposed :
(I-frame boost 100, I-frame bitrate reduction 50 and trellis r-d quantization) but without qpel for now. I'll run the same with qpel later. I also need to encode with divx5.05 (I gave up with the special beta versions manihi and kauehi as I cant start the second pass : "the source format is unacceptable".. I tried a few things I found in the forum to fix it but it didnt help)

I'm also trying it with rv9 with audio at 96kbps to get the same diskspace allocated to the video. Thanks Sirber for the tips.

I'll post about the results later when the encodings are over:D
(could take a while ;-) )

Don't hesitate telling me if you think I'm doing some things the wrong way.

fyo: I never used recent tools for psnr calculation. I just heard there was a avisynth function to calculate it.
But I also read there were two ways of calculating it:
- one where you compute a psnr for each frame and average the sum over the number of frames
- the other one to consider the whole video as 1 frame and process the psnr on it.
From what I read the second method is giving more reliable results but that's just what i read;-)
I think the first method is available for avisynth but I don't know about the second one.

edit: I've got a strange behaviour with wmv9 about the bitrate and final file size:
my second encoding (exact same parameters than the 1st one) gives me
642 MB for a bitrate of 845000 bps when it should be 626 MB
the first encoding gave me 638 MB.
After some investigations;-)I found out that the bitrate needed to achieve 640 MB should be 845 kbps and not 845000 b
so my guess is that the codec internally works with 1k=1024 and allocates the bandwith form a kbps value computed from the bps value entered in the dialog box (but converted with a ratio 1k=1000)
so entering 845000 bps in the dialog box
would make 845 kbps * 6214 s = 5376849920 b = 640.970459 MB
I'll have another try with 825000 bps
that would make 825 kbps * 6214 s = 5249587200 b = 625.7995605 MB: which is the size I want... strange...

or the other simple explanation is : the codec can't match the requested size;-)
I'll try to find a wmv9 forum and ask about it as here we are more xvid related.

billou2k
7th August 2003, 17:43
I finally have the right size for the wmv9 encode (bitrate=825000)

Teegedeck:I ran two more xvid encodings with the settings you proposed (set3: both with r d trellis, I-frame boost 100, I-frame bitrate reduction 50, without qpel
set4: same than set3 + qpel)
(set 1 was the one details at the beginning of the thread
and set2 : same than set 1 without b frames)

I also run a divx5.05 encoding
keyframe max int. 300 frames
perf/quality slowest
bidirectional encoding
no quarter pixel

I'll run another one later with qpel.
I know it's not the good place but If you know better than me how to setup divx5.05 better let me know.

I didnt check the results extensively yet.
But my fist impression on these sequences are that
my divx5.05 encoding is the worst of all: blurry, colour slightly changed, and it looks like on some scenes the content tends not to be where it should (portraits show part of the body are a few pixels away from their original place in the avs) the effect might be due to excessive blurring but it's not as strong on the other codecs.
I particularly noticed it on dark scenes.

the wmv9 encode still looks the best of all for me even if the size has been reduced to the requested 626 MB when it was more than 10 MB bigger before.
It remains the sharpest encode without visible blocks.
I said I heard before of wmv9 encoding having worse quality at the end of the encoding and having a quick look at the end of the movie: the I frames really don't look as good as the one at the beggining... I'll spend more time on that later.

About Xvid! I didnt notice much difference between my original set and the set 3 or maybe a bit sharper on some scenes.
set 2 (no b frame) was sometimes more sharp but most of the time more blocky.
now the set with the qpel looked much sharper most of the time with a bit more ringing .. though the ringing was not noticeable on playback but on some actions scenes (lights effects crossing the screen) the amount of block was incredibly high and made that part looked the worst of the encoding I did until now...

well I started extracting frames from the files.
Once I've finished I might post them on my site.

BTW I'm comparing the same frames from different encoded videos with several vdub opened at the same time.
But xvid encoded videos with b frames look to be delayed by one frame so that I have to go to next frame to be able to compare with the same one from another codec (or the avs)
Is there a particular reason?

ChronoReverse
7th August 2003, 19:09
That's cuz the VFW decoder for xvid isn't perfect in that regard.

superdump
7th August 2003, 21:16
Originally posted by ominte
Sorry my statements weren't that clear. These options are in fact in the "Two Pass" tab, under the heading of "Curve Compression". So they should still be present in dev-api4, although I can't say I've personally tried it (still waiting for public compile to be released) :)


Standard curve compression is present in dev-api-4, but Sagittaire is correct, there is no alt. curve compression anymore.

billou2k
8th August 2003, 00:39
good:D so it's not me messing up with the encoding settings:D

i may sound stupid but what is the dev-api4? a gui for the xvid codec settings?

Sastraxi
8th August 2003, 02:30
Correct me if I'm wrong but isn't it part of the CVS tree?

superdump
8th August 2003, 11:17
dev-api-4 is the part of the CVS that is under development and it will become XviD 1.0 when finished.

Koepi's builds are currently based on dev-api-3.

mikemak
9th August 2003, 19:11
I really appreciate your work here, billou2k! However, I do have a few suggestions for you.
1. Try another movie. Sometimes different codec performs differently with different movie. From my experience, xvid can be pretty bad with dark scenes/smoke scenes(depends on movie). I tried to encode "Mummy Return" once (latest Koepi codec), and the result(smoke scene/dark scene) is horrible. It has nothing to do with bitrates since I have make it a 3 cd encode, and I have tried all the advice from this forum(w/wo b frames...etc). The movie itself is clean as I have watch it on my dvd player all the time, and the picture is perfect. On the other hand, "Star Wars episode II" is perfect with xvid codec and xvid has no problem with its dark scene/smoke scene (just a few though). By the way, Mummy Returns is even worse if encoded in divx3 or divx5. Since codec comparison is somehow subjective, I will judge it by at least several movies to get a more objective result. And I will not be surprise if certain codec perform better on several parts of the movie but give a worse result overall. It will only be fair if you compare it scene by scene like dark scene to darks scene, high action scene to high action scene...etc.
2. Wmv9 encodes better than xvid in low bitrates in my experience and it produce the least blocks. However, I also find the picture to be too much "post processing" and thus give me a block-free but VHS quality. If you can see a lot of blocks in xvid encoded movie, it simply means that you need to encode it to a larger file or resize it to a smaller resolution, and that is not xvid's fault or anything wrong with xvid. That is why when you search for codec comparison in the internet, they usually encode the movie to highest quality (high bitrates) for comparison, and not low bitrate. For most mpeg4 codec has their limit, and they will all produce blocks if the file size is too small. And it is therefore not wise to compare their picture quality by low bitrate since their codec is not make for that purpose/size. However, comparison between high bitrates will give you a better idea which codec can produce a better image(bitrate is not a issue anymore). Of course you can remove the blocks in your movie by post-processing with certain filters or decoders, and that is what I think Wmv9 codec have done, but it is not true codec comparison. Though post-processing will remove blocks, it also alter the image a little bit, and look different from the original film. I think you should encodes your movie in a reasonable bitrates and start comparison there. Too much blocks only means bitrates is too low and has nothing to do with the performance of your codec. Try encode with a higher bitrate and see if wmv9 still give a sharper image than xvid.

Note: I do use wmv9 for my 1 cd encode, but I usually use xvid for 2 cd encode. So I can't wait to hear from your result.

Sastraxi
10th August 2003, 03:53
I use wmv9 a lot for low bitrate encodes, allows me to get about 3 megs for every minute of video (~400 total bitrate, audio and video). However for mid- and high- quality I think an MPEG-4 codec is best suited.

billou2k
11th August 2003, 15:54
Hi Mikemak,
Thanks for the feedback! I appreciate it a lot.
I want to precise here that I started this comparison because I have been interested in video coding for years... Many things happened recently and I wanted to make my own opinion on todays codecs performances.
I did my first tests in digital video encoding from a vhs plugged to a pctv card recording in real time with indeo codec.Then I had a try with the pinnacle dc10 recording in mjpeg then transcoding in mpeg. When divx came out it was a revolution. Then sbc came out and it was another revolution. Then project mayo started, divx took off, xvid released their first beta...Many people/companies tried and still try making a name in the domain..
I've been following the video coding scene quite regularly and I am really amazed by the fantastic work of all the people in here. I've also studied video coding but I've been too busy/lazy to take part to codec development.

Now what I want with this test is just having an idea on how codecs perform today.. it will probably be very different in 1,2 or 6 months, especially when we think about xvid 1.0, ogg theora, divx 6, h26l, ogg tarkin (actually this one may much more than 6 months;-) )

I'm particularly interested in finding out if the available codecs can perform "relatively" high quality in medium bitrate (1cd) / medium resolution (576<x<640 non anamorphic) with the widest range of content. It's sort of testing their limits. I dont mean here that 2cds rips or high bitrates rips are useless. If you want to be sure to get a crisp backup go for 2cds (and actually that's what I tend to do).

About your different points:
I agree I can't make my opinion on a single movie and I'll probably test a few more movies later. I just started with a movie that provides a wide range of contents and thus could show me how codecs handle these different situations in a single 1h40 movie. I am not an expert in settings up all parameters that's why I asked about more experienced people in xvid settings in this thread. I got some good advices and I've been testing xvid with 4 different settings until now. I also ran divx 5.05 both with and without qpel activated. It's very interesting to compare several xvid encoding with different settings.There's no better way to find out what qpel or b frames do to the video quality for example.
The only problem is having many differents set of parameters takes a long time to have them all encoded and it takes even more time to assess their quality. I now have 4 xvid settings, 2 divx, 1 sbc,1 wma and 1 real9. So once I think I got the most of all codecs and i've done the comparisons I'll go for another movie...it can take a while;-)

I totally agree on comparing sequence per sequence. However there is a problem in doing that as well: Every codec has its own bitrate allocation and it makes things really complicated. I'm thinking that maybe a better way to test pure CODEC performance is to encode a movie at constant bitrate. Of course that's not the way to "backup" movies but to evaluate codec performance it might be a better option.

About your second point: "wmv9 encodes better than xvid in low bitrates" ... Well I can just speak about my experience but using the vcm codec in the conditions I described earlier still gives me sharper results with wmv9 than xvid and with no visible blocks.
I also agree that for comparing codecs raw performances I'd tend to think that no pp shoud be applied and that's the way I'm comparing the videos right now. And as far as I know no pp is applied on the wmv9 frames I'm comparing. (I deactivated the pp settings in the reg and the video really doesnt have the look of a pp video). I definetely have to put my screenshots online so you could see.
Wmv9 really is close to the avs quality on most of the scenes I checked. (The last part of the movie tends to show a weird behaviour of wmv9)
Xvid with qpel and b frames gets very close to the sharpness of the avs in most scenes but it looks like it brings more blockiness on a few others. Of course that's what I can tell after a frame per frame analysis. I didn't do a "playback opinion only" but I'll probably try to find the time to do it.

Now about "the high quality encoding" the problem is that it usually means high bitrate: And I dont see the high bitrate as a really challenging area because mpeg2 is already the king. You say that bitrate is not an issue anymore so there should be no point in finding a better thing than mpeg2? Actually I think the bitrate is not an issue for commercial storage media (dvd) but it is more of an issue for digital tv as they always put more and more programs on a transmission channel thus making the overall quality worse and worse. Bitrate is also an issue for internet streaming. Adsl is spreading quickly but most people dont have more than 512kbps download (at least in Europe). And that's quite a low bitrate to perform "DVD quality" streaming.

About encoding to a higher bitrate... well as I said my point is to test codecs's limits in producing a good quality at medium bitrates. I've seen many 1 cd rips in the last years and constant improvement being done on available codecs (vbr,qpel,b-frames etc...) I think 1 cd rips are more than ever able to produce good quality (sacrifying a bit of the original resolution. But good 640*xxx rips are really better than they were before. (as long as you dont encode more than about 2 hours on a cd). Xvid (with qpel and bframes)and Wmv9 really tend to confirm this.

And well I might have a look to higher resolution/bitrate encoding later but that's not my interest right now;-)

billou2k
11th August 2003, 19:01
I did some more "frame per frame" analyses and it appeared that though wmv9 was the sharpest in some scenes xvid qpel+bframe was better in many cases as well.
As said in the previous post (very long post :D sorry)
I did a divx505 encoding with qpel activated (set2)and the difference with divx505 without qpel(set1) is HUGE!
The divx5.05 set1 was the worse codec set I had but now with qpel on, it rivals with xvid qpel+bframe and wmv9. It is also most of the time sharper than wma9. though it tends to show more blocks. In most cases the blocks tends to be not noticeable during playback but on some others it really is too much and noticeable during playback.
As expected rv9 doesnt show blocking artefacts but in the scenes that show blocks with other codecs rv9 blurs everything so that faces look unnatural and some sort of "warpsharp filter" effect makes the look rather unusual... in the other side fading look much more natural with rv9 where no strange moving texture effect appears during the fading. Wmv9 gives the best fading effect after rv9 then divx3.11 5.05 and xvid give similar results.

Sastraxi
12th August 2003, 03:26
I did some sleuthing myself, and found that wmv9 looks a mite better in most cases -- did tests with 3200 kBits VBR, 1600, 800, 400, and 100. However, wmv9 started pulling tricks at the 100 mark, dropping frames to get better looking ones (it ended being about 2 fps, ick).

Didée
12th August 2003, 09:05
billou2k,

fair comparisons are always highly appreciated. Thank you, 'n carry on.

One suggestion for XviD, though:
It seems, up to now you have used H263 quantization exclusively for XviD encoding. You should also give MPEG quantization a try. The result is different. ...But so are the tastes, of course!
Many people use H263 everytime, the good old rule says "H263 for 1CD, MPEG for 2CDs", and some users prefer MPEG everytime. So do I. For me, H263 means less/softer detail, more blocking (!) in flat areas, with an homogeneous overall look. MPEG brings more fine detail, less flat-blocking, but more blocking on motion, more ringing dot-noise, tad more vivid colors, with the overall impression maybe a little less homogeneous than H263.

Trying out doesn't hurt ;)

- Didée

billou2k
12th August 2003, 13:35
@Didee: thanks for your feedback, yes I'll carry one dont worry, I've spend too much time already to stop now:D
And yes you are right I'm using h263 quantisation because of the "good old rule" as you say! But that's right I should give it a try:D Luckily they sell big harddisks now;-)

@Sastraxi: If you want to keep wmv9 (vcm) smooth at really low bitrates you can change the quality level parameter (called "smoother motion-sharper image" in cbr mode) from 100 to something around 20. That way you sacrify picture quality against smoothness. I guess it works the same way as it does (or did;-) ) for divx 3.11 with the crispness slider.

BTW Does someone know what the chroma optimiser do and if it's useful?
I use the chroma motion estimation but I dont know abou this "optimiser"... it's in 24 june Koepi's build...
I wouldnt mind testing it as well but I already have 6 xvid sets so I'd like some information on it first. thanks.

Didée
12th August 2003, 15:02
"Chroma optimiser" deals with the problem of the YV12 color blocking (at detail edges with high color saturation, especially red, they appear colorful-steepy beacause of the 4-2-2 color space and no special post-filtering performed on playback). That option reduces that effect by smoothing the color on edges in very dark or very bright areas. For more details, ask some devels ... ;)

It is important to note that "chroma optimiser" should increase the perceived quality, and indeed does it for the most of us. However, abstract quality measurements like PSNR are decreased by this feature. This is important to keep in mind when doing PSNR based comparisons. (It got even worse since, not a long time ago, a certain part of the video community here got the ability to play with the PSNR toy - now they're sitting pretty deep within the PSNR sand-pit, and PSNR seems to be the holy sand cake, erh, grail ... ) :D

- Didée

billou2k
12th August 2003, 15:14
Ah ok i see!
I dont want to start a big debate around that chroma optimiser but about the fact that it changes the psnr : if it only changes the color components isn't it possible to process a luminance PSNR value and another colour PSNR value ? that way the luminance psnr value shouldnt change wether the chroma optimiser is activated or not? (Well that's just a quick idea as I don't know much about this option)

By the way what quick and easy :D tool do you use to compute PSNR?
(it's been asked already in this thread but i didnt see any answer)

Sagittaire
12th August 2003, 15:34
The WMV9 is better in all the fields than XviD (Devapi3 or Devapi4). To be able to benefit from the level of details of WMV9 it's necessary to put the "Force Post Process Mode" on 0 or 1 ...

http://jfl1974.free.fr/images/Regedit.jpg

With this reglage XviD isn't better even for the details...

http://jfl1974.free.fr/images/PSNR2.gif
http://jfl1974.free.fr/images/SSIM2.gif
http://jfl1974.free.fr/images/VQM2.gif

In weak resolutions/bitrates there is only the RV9 EHQ which is a superior. In high resolutions/bitrate the WMV9 is the best ...

http://jfl1974.free.fr/Video/XviD-715.rar
http://jfl1974.free.fr/Video/RV9-715.rar
http://jfl1974.free.fr/Video/WMV9-715.rar
http://jfl1974.free.fr/Video/Kaukura-715.rar

billou2k
12th August 2003, 16:34
Thanks for sharing your findings sagittaire but it would be better if you could specify the codecs settings you used as it has a big influence of the results, especially with xvid which is extremely customisable.
What are the tools you used to compute the psnr, ssim, and vqm?

Sagittaire
12th August 2003, 17:11
http://forum.doom9.org/showthread.php?s=&threadid=57687

billou2k
12th August 2003, 17:17
thanks I'll have a look!

mikemak
14th August 2003, 14:17
For the past few days, I have tried many different settings to encode a perfect 1 cd rip for xvid (without blocks... etc). The size of the output is 640x274 and the movie is "THE ROCK". Right now, I have managed to get a 90 mins movie to be quite perfect (without blocks >90%) and the image is very sharp. Though I don't have time to do a wmv9 encode for comparison, for I am still playing around with different xvid setting, I can say the overall image quality is better than wmv9 for my past experience with that codec (I still believe xvid has better image quality than wmv9, the only problem is that it has much more blocks than wmv9 in low/medium bitrate encoding and thus make some scene horrible. So, my main concern is to remove the blocks by more compression with the help of b-frames and other setting. Though it will degrade the image quality somehow, but overall the image is still sharper than wmv9, and most importantly, the color is much better and look closer to the original film) . However, I still don't have any luck for 120 mins movie right now as it still has much more blocks compare to normal wmv9 encoding. I was surprised for the quality for the final quality that I got from a 1cd encode and I must thanks billou2k for pointing me out that. I will post my settings after I have done with wmv9 encoding. I must say I am not a expert in wmv9 encoding, and if anyone knows what settings is best for wmv9 for a fair comparison, I will be greatly appreciated.

Note: Billou2k, in my first post when I said wmv9 movie looks too much pp, I didn't mean that you have apply pp in your encoding. I am sorry that I have confused you. I was actually talking about the image quality of wmv9 looks pp to me in general. If you compare the image quality of divx3 with xvid, you will noticed that even though they both have sharp image, the color of divx3 is much worse than xvid and many colors has lost compare to the original film. Wmv9 has the least blocks, however, the output is also look quite different from the original( color, detail...etc). Of course, you need to have the original film to notice that. I always want a codec that not only able to produce a good image quality, but also its image is close to the original film (I can apply the filters by myself latter if I want to), and I think xvid did a pretty good job there.

Sagittaire
14th August 2003, 19:18
The WMV9 is in fact more precis that XviD but the Post-Process of the WMV9 is activated to the maximum by defaut.

To desactivate it's necessary to go in the base of register and create the following key \HKEY_CURRENT_USER\Software\Microsoft\Scrunch\Force Post Process Mode

To have best possible quality it is necessary to put Force Post Process Mode = 0 or 1. Post Process of the WMV9 isn't a deblocking/dering but a smoother which degrade the level of detail ... !!?

Didée
15th August 2003, 08:39
Originally posted by mikemak
The size of the output is 640x274
I really do hope that was a typo, mikemak.

274 is not MOD16, not MOD8, not even MOD4 ... Moreover, for quite some time it was risky to use XviD with resolutions of below-MOD8. I'm not sure about the situation with the current builds regarding that topic, however. Previously, you would have gotten a distorted image most times.

But, much more important: Remember you are using an MPEG codec!
Now, even if an MPEG codec allows any arbitrary resolution, the motion estimation still works on 16x16 macroblocks and 8x8 blocks (the latter not for DivX ;) ). So, as soon as you start to use resolutions not dividable by 16, the codec starts to loose efficiency. This is because the codec has to work with additional macroblocks, where only a part of them actually contain image data, and the rest is simply sort of overhead.

Assuming the codec works with 100% efficiency on a MOD32 resolution, my rule of thumb goes like that:

MOD16: 99% efficiency
MOD8: 96%
MOD4: 93%
MOD2: 91% (??) (<-I never tested this case)

So, your results would definetely improve if you encode that movie at 640*272, not 640*274.

Regards

- Didée

sysKin
15th August 2003, 12:04
Originally posted by Didée
MOD16: 99% efficiency
Actually, I don't see any reason why mod32 would be better than mod16 as far as mpeg4 is concerned. It's the same.

Of course there is a different story with some weird video cards and their overlays ;)
But compression is as efficient for mod16 as for mod32.

Radek

mikemak
15th August 2003, 13:27
It was indeed a typo, sorry. I was trying to match the same output size as billou2k for he was using the same resolution mentioned in his first post. Also, I am encoding my movie to be 626MB just like billou2k for comparison. Unfortunately, I still have no luck with 2 hrs movie here. It seems to me that if you have to encode a long movie like 2 hrs+ with 640x*** resolution, you better go with wmv9.

Sagittaire: Big thanks to you for your important tips. I surely will try your suggestions.

Also thanks Didee for point me out my mistake, and sysKin for your feedback.

billou2k
18th August 2003, 16:43
I try to see differences between in wmv9 with pp set to 0 and 1. and capture screenshots from mpc.
the first set I took clearly show the blurring when set to 1. and as I dont have visible blockiness with the wmv9 encdoding I dont need the pp at all as it just removes details. But setting it back to 0 in the reg doesnt have the effect I would have expected... it looks like it is still locked on pp1.
I might try to restart sometimes soon and see if it is back to normal..... strange.

Sagittaire
18th August 2003, 18:18
PP=0: PP is desactived and the level of detail is maximum but there are some small visible artifacts. CPU 500 Mhz.
PP=2: High level of visible detail and no artifact.
PP=4: Low level of detail. Not to take this seeting. CPU 1000 Mhz.
My personal setting for PP is PP=2

To be able setting PP it's necessary to create a key "Force Post Process Mode" if not the key "Post Process Mode" will always take again adjustment PP=4

temporance
18th August 2003, 19:01
anyone have a .reg file for making the key?

easyfab
18th August 2003, 19:38
Originally posted by temporance
anyone have a .reg file for making the key?

Copy this in notepad and save as *.reg


Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\Scrunch]
"Force Post Process Mode"=dword:00000000

for PP 2 set dword:00000002 ...

billou2k
28th August 2003, 14:58
I still looking on how to capture frames from all codecs...
I don't want to compare post process frames so I just capture from vdubmod to png and it works perfectly.
However for some codecs (well actually one) like rv9 I have to make a capture from Mpc which is a bit more of a pain because I have to use another software to capture directx surfaces.. well...
the problem is that I get bigger frames at 100% in any media player than what it should be.
I encoded at 640*272, VDub of course gives me the proper sized frame however capturing the same frame from the same video with Mpc gives me something like 642*274. and looking at both frames: the one from mpc at 100% is really a bit larger so that the vdub shot.
And another thing is that a frame captured from mpc is clearly blurrier than the same frame from the same video captured with vdub...
Is there a reason ?
In the case it's normal I was wondering why codecs try to keep as much details as they can (well at least some try;-) ) when they are going to be blurred anyway during the playback...
Well I guess details are in a way more visible when you play the vidoe full screen but I find strange to see that at "100%" there is noticeable differences between what the frame should be (vdub) and what is displayed by a media player...(of course I turned all known post processing off)