Log in

View Full Version : Zones - Need Help with Setting Zones so They Work


kandrey89
23rd June 2008, 03:21
Hello,
I'm using Xvid v1.1.3 Final on an mpeg2 stream, 2-pass scheme.
What I'm trying to do is divide the video into two sections, one with full quality and the second section of 30% quality.

I've been doing tests for the past few hours and I'm confused as to why my results are contradictory with the definitions of the commands I set.

http://i30.tinypic.com/22ywj9.jpg

From what I understand, lower quantizers means lower compression ratio. So high 31 quantizer ratio means very compressed and low bitrate. What happens is that the section within the 2nd Zone in the picture above is encoded with the parameters of zone 1. So if I change zone 1 quantizer ratio and leave zone 2 as it is, my final result within zone 2 will be different.

What is going on, is zones broken, am I doing something wrong?

When using Weight, nothing happens at all.

talen9
23rd June 2008, 11:42
Looking at the frame values you're using in the screenshot, I assume you are trying to encode the ending credits of a movie at a lower quality than the movie itself.

The way I'll do this is to put the first zone in weight mode = 1.0, and the second zone at a fixed quantizer (I suggest not to go over Q=9, the credits are usually barely distinguable at this level of compression).


All this said ... I find this trick not to be very useful, actually. The gain is in most cases minimal, even when the credits are over 10000 frames long, and you lose a lot in credits readbility .... if they doesn't interest you, simply cut them off ;)

kandrey89
23rd June 2008, 23:22
What's happening is when I do that, and I select a range of output from stream within zone 2 (credits) only, the credits come out at full weight 1.0, hence they don't follow zone 2 instructions set in the codec.

Which means I am having trouble with zone 2, zone 3, etc... working properly, which also means that the whole movie follows zone 1's instructions no matter how many other zones there are or what their settings are.

professor_desty_nova
24th June 2008, 09:05
Did you try without greyscale active in the second zone? (edit: Just tested and it doesn't interfere, and the files was bigger then not using greyscale)
You can also try uninstalling XVID and reinstall it again (try the last koepi version with VAQ).

Edit: Just tested and it's working as is should (used zone1 weight 1.00 and zone2 weight 0.30, same bitrate, 2 pass). What program are you using to encode with XVID?
Edit2: How do analyze the video?

talen9
24th June 2008, 11:13
@Kandrey: how are you starting the encoding? Via VDub/VDubmod, or via some frontend (GordianKnot, for instance)?

Frontends such as that tend to set their own settings; the XviD settings you're making the screenshots of, I suppose you are taking them by launching the XviD encoder configuration from the Start menu?

If it's so, then when you start the encoding via (insert external frontend), those settings may be overridden and the result actually different from what you're expecting .....


@professor_desty_nova: you can analyze the video with AVInaptic, search the AviSynth forum for that :)

kandrey89
24th June 2008, 20:22
I use VirtualDubMPEG-Mod, I use it's front-end to modify the window with zones above, not some start menu item.

I analyze the video by looking at the encoded section of zone 2 only which is supposed to be greatly reduced in bitrate due to either weight or quantizer ratio set appropriately, I look at it and see that the bitrate is exactly the same as the encoded zone 1.

Gray scale doesn't matter it's not the problem, I've tried with, without it, I've tried with keyframe and without.
I have the latest version of XviD v1.1.3, and now upgraded to some old v1.2.127 and still same result.

talen9
24th June 2008, 22:10
Just some random thoughts: are you setting the zones in the first pass too?

About the bitrate ... I think you should actually compare not the bitrate in the two zones, but the bitrate in the respective intervals of two different encodings: one obtained with the zones set and one without them.

Try analyzing the encoding with AVInaptic and its quantizer graphic analyzer: you can browse your encoded movie and inspect the quantizer values on a "frame-by-frame" basis, or on a bitrate basis.

The next screenshot is taken just in the whereabouts of the dividing frame between such two zones (the second one was set to Q=20):

http://img182.imageshack.us/img182/5976/imgbf8.png

Further explanation if needed (Italian language was set, sorry :P): top graph quantizer values, bottom graph bitrate utilization (bytes).

kandrey89
24th June 2008, 22:26
I set the zones and then do both passes.
I judge the video of zone 2 by its size. Because zone 1 setting seems to affect the whole video no matter what other zones are there, the resulting video when set to credits quality becomes very small compared to full quality of the movie. What that means is that credits settings produce smaller file size.

So when I use zone1="movie quality" and zone2="credits quality" and check the sizes, bitrates, quants, zone2=zone1

kandrey89
24th June 2008, 23:05
I set the zones, did 1st pass, then second pass. The black line is the I frame after which zone2 is supposed to kick in and lower the quantizers, it did not.
http://i27.tinypic.com/2ly3kic.jpg

Same options except now set zone2=quantizer instead of weight.
http://i29.tinypic.com/2mpz76b.jpg

professor_desty_nova
25th June 2008, 08:47
@Kandrey: It's strange for two diferent versions to give the same result. Can you try with a normal VDub version and some (small) file/section of an avi and see what happens?
If the same happens again, try first to the "load defaults" in the xvid windows, and the try the zones options again. If it fails, uninstall XVID, search for xvid*.* files left on your system and delete them, go to the registry and delete "HKEY_CURRENT_USER\Software\GNU\XviD" if it exists(I'm assuming Windows XP). Reinstall XVID.


@Talen9: I Know, I've used it for a long time, and before I used DRFAnalyser. I just now saw that I wrote it wrong, it was suposed to be like "How do you analyze the video, Kandrey?". Also, do you remember if there is anything to clean xvid instalation without going to the registry? I have a feeling that there is but can't remember right now...

talen9
25th June 2008, 16:24
@Kandrey: It's strange for @Talen9: I Know, I've used it for a long time, and before I used DRFAnalyser. I just now saw that I wrote it wrong, it was suposed to be like "How do you analyze the video, Kandrey?". Also, do you remember if there is anything to clean xvid instalation without going to the registry? I have a feeling that there is but can't remember right now...

I had the feeling that you meant that too ... but only after i posted :)

Regarding XviD installation cleaning ... the way you suggested (via "Load Defaults", mainly) is the one I'd go too; failing that, it should be followed by reinstalling.. it usually works, in my experience.
I still suspect it all comes down from some conflict by different encoding frontends; I don't doubt Kandrey's words, it's just a gut feeling :p

kandrey89
25th June 2008, 19:41
I just recently became aware of something and I need your help with clarification.
I'm using fccHandler's VirtualDubMPEG v1.6.19 which is the latest one, but it's of an old version of VirtualDub code base.
I remember reading somewhere that fccHandler was reluctant to port over, at least just yet. I don't know what happened since.

What I do know is that he now has a plugin for MPEG2 streams that works with VirtualDub v1.8+.
So what can you tell me, can I switch over to VDub v1.8+ plus MPEG2 plugin, is that better now, will I have any problems or major limitations between VDub v1.8+MPEG2 vs VDubMPEG v1.6.19.
Thank You

It might be that v1.6.19 even though an advanced version by fccHandler, still uses old code base of VDub and has either not working zones or some other messed up integration.

talen9
25th June 2008, 22:09
To tell the truth, I don't actually know this "VDub+MPEG2" mod you're using ... if I understand correctly, you're using it in place of standard VDub just for its ability to directly load MPEG2 files (VOBs ?) ?

If that's all you need it for ... how about indexing the same MPEGs with DGIndex, creating a simple AviSynth script (all the content you need to write into is approximatevely mpeg2source("yourmovie.d2v") ) and load this very avs file with standard VDub?

kandrey89
26th June 2008, 19:41
Yes, that's what I used VDubMPEG for, yes Neuron2 helped me with DGIndex and I know am dabling with Avisynth.

Didn't have time yet, to check the zones, if it works or not. Will do that in a couple of hours.

kandrey89
27th June 2008, 00:48
I still can't get zones to work even in the new VDub v1.8.1 frameserved by latest Avisynth.
I see through avinaptic that the quantizer number is the same as zone 1.

talen9
27th June 2008, 11:17
Ok, now I'll ask a very stupid question :)

I gave another look at the screenshots you posted earlier, the ones with the encoder configuration and AVInaptic graphs.

The graphs reports that your encoded file has 3015 frames; in the encoder, you're are telling XviD to encode differently only starting from frame 152666 ..... so I'm starting to be no more surprised that the different zone setting is not kicking in :rolleyes:

kandrey89
27th June 2008, 22:23
You don't understand, or don't I understand?!
What I believe the Zones to do is, Frame #0 = Frame #0 of the whole opened stream
If that is true then the frame #152666 is within the segment that I am cutting out and encoding.

If it's not true then zone1 begins from the first frame of the segment, thats kind of stupid.

But then again I say it's stupid because I didn't get it.

I'll try it right now and report. (gonna be very happy and extremely pissed off if zones start working) GRRRR

kandrey89
27th June 2008, 22:30
OMFG,
:mad::devil::devil::devil::devil::devil:

KANDREY89
:stupid: KANDREY89

It works, damn it! lol

Thank You talen9

talen9
28th June 2008, 09:34
You're welcome :p