Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: XviD settings test (Read 6779 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

XviD settings test

I really wish that there was an ABChr, or even a PCABX, for video files because this test was extremely difficult and I'm not sure whether or not I could have done it in double blind circumstances.

I selected a five minute selection of a DVD  in VirtualDubMod (after creating and loading an avisynth file from Gordian Knot so the video was cropped and deinterlaced properly, I used lancozs and kernal, were those good choices?  They seem to work fine) and encoded it four times with the following settings:

2 Pass
Default B-Frames (2 offset=1, ratio=1.5)
Qpel
Trellis
Motion Search Precision = 6 Ultra high
Chroma motion
VHQ=1
Calculator (for the second pass) set to 1433600 * 5/(length of movie in minutes 108) and audio file size set to (size of full Vorbis file for the movie 88859KB) * 5/(length of movie in minutes 108).  Thus giving me a reasonable approximation of the way this section would be encoded if I encoded the entire movie on two CDs.

The movie was "The Borne Supremacy" and the 5min section was 0:13:13 to 0:18:13.  The first chase scene of the movie, starting when the Russian assassin spots Borne and ending at the end of the water scene.

Each time I used a different matrix and I redid the first pass every time, was that necessary?  The matrices I tested were H.263, MPEG, sixofnineHVS and HVS Best.  I also encoded the selection once more with VHQ=4 and GMC enabled, with the MPEG matrix.  From a distance of just under 2 m I am sure that I could not tell any of these from the original VOB.  Sitting up close, however, revealed many small artifacts in all of the different test files, at that distance I am sure that I could have easily ABXed any of them from the original VOB, no surprise there.  I loaded all the files in different windows of Media Player Classic and compared, as best I could, in several different parts of the video. 

I first tried observing the beginning of the video 0 - 10 seconds.  I spotted a couple of artifact producing areas quickly and focused on them, mainly the second.  The first was at 4 - 6 seconds when the jeep that Borne is driving takes up most of the screen the test files all become somewhat blocky HVS Best and MPEG seemed to be the worst here sixofnine and H.263 were a little better but MPEG + VHQ4 and GMC seemed to have a slight advantage.  The next was a shot of the Russian assassin turning around on the beach at 8 - 9 seconds, there is some fairly clear artifacting on most of the test files here in the form of a halo around his head.  In the worst cases, again HVS Best and MPEG (if anything HVS Best was worse) there seems to even be some discolouration in the halo and the face was a little muddled, with sixofnine the artifacts were still there, but they didn't seem to be as large and I don't think they were discoloured here, with H.263 the halo artifacts were less noticeable and with VHQ4+GMC they were nearly gone.  My results were similar in the other areas I tested, its 6am here, i think I'll get some sleep before going into more detail.  I am the most sure of MPEG + VHQ4 + GMC being the best, but even there it was really hard to tell.  I'm going to encode H.263 VHQ4 + GMC and sixofnine VHQ4 + GMC tonight and tomorrow to see how they compare.
gentoo ~amd64 + layman | ncmpcpp/mpd | wavpack + vorbis + lame

XviD settings test

Reply #1
there is a tool called Visual Quality Studio from everwicked that lets you do something similar as an ABX test. Perhaps you could use that.
"We cannot win against obsession. They care, we don't. They win."

XviD settings test

Reply #2
Quote
after creating and loading an avisynth file from Gordian Knot so the video was cropped and deinterlaced properly, I used lancozs and kernal, were those good choices?
you dont need to deinterlace film material in 99% of the cases, what you are looking for is called ivtc (inverse telecine) - but i dont do that since iam in pal land, so no idea..., resizing should be picked based on final resolution/bitrate somehow, there is no clear methodology i would know about thought - only trial&error (basically this should be performed by next generation codecs internali imho).
PANIC: CPU 1: Cache Error (unrecoverable - dcache data) Eframe = 0x90000000208cf3b8
NOTICE - cpu 0 didn't dump TLB, may be hung

XviD settings test

Reply #3
Quote
Quote
after creating and loading an avisynth file from Gordian Knot so the video was cropped and deinterlaced properly, I used lancozs and kernal, were those good choices?
you dont need to deinterlace film material in 99% of the cases, what you are looking for is called ivtc (inverse telecine) - but i dont do that since iam in pal land, so no idea..., resizing should be picked based on final resolution/bitrate somehow, there is no clear methodology i would know about thought - only trial&error (basically this should be performed by next generation codecs internali imho).
[a href="index.php?act=findpost&pid=259841"][{POST_SNAPBACK}][/a]

It was playing back with horizontal lines and kernal deinterlace solved the problem.  I think there was an inverse telecine option in GK perhaps I'll try that.  Ok, so trial and error for resizing.  It looks really good as is, does that mean no more trys are necessary?

edit:
Quote
there is a tool called Visual Quality Studio from everwicked that lets you do something similar as an ABX test. Perhaps you could use that.

Ahhh yes, I remember a thread about that from a while back, I'll check it out.  Thanks for reminding me.
gentoo ~amd64 + layman | ncmpcpp/mpd | wavpack + vorbis + lame

XviD settings test

Reply #4
about ivtc :
check if the resulting video file has a frame rate of 23.976fps (in that case everything is probably ok)

full guide about ivtc and deinterlacing:
http://www.doom9.org/ivtc-tut.htm
PANIC: CPU 1: Cache Error (unrecoverable - dcache data) Eframe = 0x90000000208cf3b8
NOTICE - cpu 0 didn't dump TLB, may be hung

XviD settings test

Reply #5
h263 is a matrix that blurs more than mpeg, but also rings less on lower bitrates.
for 2cd target, mpeg should be ok most of the time.

downsizing (especially on vertical axis) is destroying image quality.
it is used because mpeg4 codecs are not as good as we like to think they are.
if you can get away with it(on 2cdr), just crop off the black borders on top/bottom and leave 720 pixels.
or just use 3cdr.
that way you're sure to have best dvd-rip you ever saw.
<wink>

XviD settings test

Reply #6
I did crop the black bars and encode at 720x, it does look very good.  I don't have any illusions about how good MPEG4 codecs are, video encoding has come a very long way in recent years but it is still, I believe, in its infancy.

As far as this movie goes, it is only 1h 48min long, so I really hope 3CDs will not be necessary, and, indeed I do not believe that they are.  I didn't notice any blurring due to the H.263 and I did notice artifacts produced by it and all the others; although, I think, slightly less so from H.263.
gentoo ~amd64 + layman | ncmpcpp/mpd | wavpack + vorbis + lame

XviD settings test

Reply #7
For a 1 hr 25 min, I've tried to fit it in 1 800MB CD
the quality looks nice, no block either with "MPEG Quantizer"

This is what I always do,
first pass xvid, with "discard" checked

Record down the first pass' final average bitrate

then if the 2nd pass targeted filesize can have an average bitrate close to half of the 1st pass average bitrate, MPEG will not have blocky actifacts at all in high action parts.

I hope u understand what i said, sorry for my bad english

edit:

i never use anything like qpel, trellis etc etc, i only use the default settings, the only thing i change is H.263 to MPEG.....

XviD settings test

Reply #8
I suppose for arguments sake I could try a couple of test encodes without qpel or trellis.  However, I doubt that I will have a difficult time seeing artifacts with these settings, just as I don't with my current ones.  I have a 19-inch LG F900P TrueFlat CRT monitor and I am looking at the videos stretched to 1280 X * resolution @ 100Hz refresh rate.  This is, I believe, a fairly unusual setup; not unheard of I am sure, but it may allow me to see some problems with the video that you cannot on your setup . . . or perhaps your setup is equal to or better then mine but your 1h 25min movie is much easier to encode then "The Borne Supremacy."
gentoo ~amd64 + layman | ncmpcpp/mpd | wavpack + vorbis + lame

XviD settings test

Reply #9
whether it is easy or hard

remember i said this

if the targeted filesize can have a bitrate ~half or more than half the 1st pass average bitrate, the max quantizer used for I, P frames will not exit Q4
and the B-frames will not exit Q7

You can stretch video using ffdshow?
hehe, my processor is too slow for that!

I have a 17-inch Phillips, cannot go up to 1280X with 100Hz!!!!
can go up to max 1280x1024@60Hz

yeah yours are unusual, hardly seen any ppl use 19-inch unless it's in cybercafe

XviD settings test

Reply #10
5 Minutes are fairly little for a 2-pass encoding, as I had to find out... 'Low bitrate matrices' like MPEG, and especially H.263 cope better with the resulting scaling inaccuracies, it seems to me. My advice would be to choose a movie for your test that opens with a good test-sequence. Let the first passes run like you were to encode the whole movie and prepare 2nd passes in the same way; but abort second pass after that opening sequence.

When testing 'high bitrate' matrices like SixOfNine, perform your first pass at a zone with fixed quantizer=3 (rule of thumb: 2CDs, duration no longer than about 100 minutes) or quantizer=4 (2CDs, movie duration longer than 100 minutes). As a fixed-quantizer first pass will be as slow as a normal 1-pass,  you can speed it up by lowering ME accuracy to 3, switching off VHQ, Trellis, GMC and activating 'turbo' -- but don't forget to reset these switches for 2nd pass. In fact, you always gain a more steady quantizer-distribution in second pass when you do your first pass at the quantizer that is the likely main-quantizer of 2nd pass.

Apart from that, your settings are quite fine, music_man_mpc. You'll want to stick with VHQ=4 as it really does make a positive difference, and you should try Adaptive Quantization for 1st and 2nd pass - it is one of the features that has the most benefits and is sadly neglected by most people. GMC is the feature you can do without if your 2nd pass gets too slow.

And no, video-encoding is not in its infancy anymore...

XviD settings test

Reply #11
Quote
5 Minutes are fairly little for a 2-pass encoding, as I had to find out... 'Low bitrate matrices' like MPEG, and especially H.263 cope better with the resulting scaling inaccuracies, it seems to me. My advice would be to choose a movie for your test that opens with a good test-sequence. Let the first passes run like you were to encode the whole movie and prepare 2nd passes in the same way; but abort second pass after that opening sequence.[a href="index.php?act=findpost&pid=260639"][{POST_SNAPBACK}][/a]
Of course!  Thanks so much.  I did think of this problem, but I could not think of a simple enough solution, this sounds perfect, although still a little more complicated and labourious then my orignal method.
Quote
When testing 'high bitrate' matrices like SixOfNine, perform your first pass at a zone with fixed quantizer=3 (rule of thumb: 2CDs, duration no longer than about 100 minutes) or quantizer=4 (2CDs, movie duration longer than 100 minutes). As a fixed-quantizer first pass will be as slow as a normal 1-pass,  you can speed it up by lowering ME accuracy to 3, switching off VHQ, Trellis, GMC and activating 'turbo' -- but don't forget to reset these switches for 2nd pass. In fact, you always gain a more steady quantizer-distribution in second pass when you do your first pass at the quantizer that is the likely main-quantizer of 2nd pass.[a href="index.php?act=findpost&pid=260639"][{POST_SNAPBACK}][/a]
So using exactly the same settings for the first pass and the second pass is not necessary?  Thats good to hear as I want to test several different settings for each matrix and this will allow me only to do one first pass for each matrix I wish to tes, right?
Quote
Apart from that, your settings are quite fine, music_man_mpc. You'll want to stick with VHQ=4 as it really does make a positive difference, and you should try Adaptive Quantization for 1st and 2nd pass - it is one of the features that has the most benefits and is sadly neglected by most people. GMC is the feature you can do without if your 2nd pass gets too slow.[a href="index.php?act=findpost&pid=260639"][{POST_SNAPBACK}][/a]
So AQ needs to be used for both the first pass and the second pass?  I am confused.  How do I know which settings can be neglected in the first pass but used in the second?
Quote
And no, video-encoding is not in its infancy anymore... [a href="index.php?act=findpost&pid=260639"][{POST_SNAPBACK}][/a]
That depends upon your definition of infancy.  Personally I think audio encoding has a long way to go yet (maybe in its teenage phase) and video encoding certanly is much less refined.
gentoo ~amd64 + layman | ncmpcpp/mpd | wavpack + vorbis + lame

 

XviD settings test

Reply #12
Quote
]So using exactly the same settings for the first pass and the second pass is not necessary?  Thats good to hear as I want to test several different settings for each matrix and this will allow me only to do one first pass for each matrix I wish to tes, right?
[a href="index.php?act=findpost&pid=260715"][{POST_SNAPBACK}][/a]

Yes; first pass automatically switches off the features I've mentioned above, so there is no need to switch them on or off manually (that is, unless you use a zone with fixed quantizer for the whole movie, like when you want to do the first pass at quant=3 or 4 instead of quantizer=2 which is normally used).
Quote
So AQ needs to be used for both the first pass and the second pass?  I am confused.  How do I know which settings can be neglected in the first pass but used in the second?
[a href="index.php?act=findpost&pid=260715"][{POST_SNAPBACK}][/a]

I've mentioned the settings that XviD switches off in first pass. AQ is not among them.

Remember, all this isn't an exact science; XviD merely tries to make a good guess based on the first pass' filesize. As long as switching features off makes first pass quicker and XviD still manages to reach a good quant-distribution in 2nd pass it is alright. Some sideeffects of a fast first pass have been compensated in the 2-pass behavior. Have a look at your quantizer distribution as shown in the XviD-window in 2nd pass - if you mainly get fluctuations of about one or two quantizers, you can be satisfied. If quantizer distributions spreads across more quants, for example from 2-6: As said, doing first pass at a quantizer that you're likely to get as mean quantizer in 2nd pass helps.

 
SimplePortal 1.0.0 RC1 © 2008-2021