Log in

View Full Version : Massive undersize


lexor
20th February 2007, 13:16
I was debating whether to post it in MeGUI forum or here, but I don't think this is MeGUI issue, since command lines look OK to me.

To see what the problem is just scroll down to the bold line.
I'm using XP SP2, xvid_encraw 1.2.0, avisynth 2.5 as input

Target size should have been 4109mb without audio (for 1 DVD5) and I got 1099mb with audio. The file itself is perfectly fine in terms of playback.

Here is the megui log:

Looking for job processor for job...
Processor found!
Starting job job1-1 at 11:11:28 PM
Starting preprocessing of job...
Preprocessing finished!
encoder commandline:
-i "E:\THOMAS_CROWN_AFFAIR_16X9\VIDEO_TS\crown.avs" -pass1 "E:\THOMAS_CROWN_AFFAIR_16X9\VIDEO_TS\crown.stats" -bitrate 5077 -kboost 100 -ostrength 0 -chigh 10 -clow 3 -overhead 0 -nopacked -vhqmode 4 -qpel -qmatrix "D:\Program Files\megui\extra\Didees SixOfNine.cqm" -closed_gop -imin 3 -imax 4 -pmin 3 -pmax 5 -max_bframes 2 -bvhq -bquant_ratio 162 -bquant_offset 0 -bmin 3 -bmax 5 -threads 1 -zw 0 1 -zq 154969 7
successfully started encoding
Processing ended at 12:51:57 AM
----------------------------------------------------------------------------------------------------------

Log for job job1-1

xvid_encraw - raw mpeg4 bitstream encoder written by Christoph Lampert 2002-2003


Tot: enctime(ms) =1925828.00, length(bytes) = 2068484075
Avg: enctime(ms) = 11.82, fps = 84.61, length(bytes) = 12694
I frames: 1482 frames, size = 46428/68806584, quants = 2 / 2.09 / 7
P frames: 59677 frames, size = 21604/1289298077, quants = 2 / 2.22 / 7
B frames: 101786 frames, size = 6979/710379414, quants = 3 / 3.42 / 11
Trying to retrieve width and height from input header
Input colorspace is YV12
xvidcore build version: xvid-1.2.0-dev
Bitstream version: 1.2.-127
Detected CPU flags: ASM MMX MMXEXT SSE SSE2 3DNOW 3DNOWEXT TSC
Detected 1 cpus, using 1 threads.

----------------------------------------------------------------------------------------------------------
Starting postprocessing of job...
Job completed successfully and deletion of intermediate files is activated
Postprocessing finished!
Looking for job processor for job...
Processor found!
Starting job job1-2 at 12:51:58 AM
Starting preprocessing of job...
Preprocessing finished!
encoder commandline:
-i "E:\THOMAS_CROWN_AFFAIR_16X9\VIDEO_TS\crown.avs" -pass2 "E:\THOMAS_CROWN_AFFAIR_16X9\VIDEO_TS\crown.stats" -bitrate 5077 -kboost 100 -ostrength 0 -chigh 10 -clow 3 -overhead 0 -nopacked -vhqmode 4 -qpel -qmatrix "D:\Program Files\megui\extra\Didees SixOfNine.cqm" -closed_gop -imin 3 -imax 4 -pmin 3 -pmax 5 -max_bframes 2 -bvhq -bquant_ratio 162 -bquant_offset 0 -bmin 3 -bmax 5 -threads 1 -zw 0 1 -zq 154969 7 -avi "E:\THOMAS_CROWN_AFFAIR_16X9\VIDEO_TS\crown.avi"
successfully started encoding
Processing ended at 5:33:31 AM
----------------------------------------------------------------------------------------------------------

Log for job job1-2

xvid_encraw - raw mpeg4 bitstream encoder written by Christoph Lampert 2002-2003


Trying to retrieve width and height from input header
Input colorspace is YV12
xvidcore build version: xvid-1.2.0-dev
Bitstream version: 1.2.-127
Detected CPU flags: ASM MMX MMXEXT SSE SSE2 3DNOW 3DNOWEXT TSC
Detected 1 cpus, using 1 threads.
Tot: enctime(ms) =12768472.00, length(bytes) = 1121664306
Avg: enctime(ms) = 78.36, fps = 12.76, length(bytes) = 6883
I frames: 1482 frames, size = 27652/40980583, quants = 3 / 3.07 / 7
P frames: 59677 frames, size = 11544/688917728, quants = 3 / 3.18 / 7
B frames: 101786 frames, size = 3848/391765995, quants = 4 / 4.36 / 11
desired video bitrate of this job: 5077 kbit/s - obtained video bitrate (approximate): 1325 kbit/s
----------------------------------------------------------------------------------------------------------
Starting postprocessing of job...
Job completed successfully and deletion of intermediate files is activated
Found intermediate output file 'E:\THOMAS_CROWN_AFFAIR_16X9\VIDEO_TS\crown.stats', deleting...
Deletion succeeded.Postprocessing finished!

CWR03
20th February 2007, 13:26
Try uninstalling Xvid, delete the xvid.ax and xvid.dll files, then reinstall Xvid. If you installed a newer version over an older one, it'll cause such a problem.

buzzqw
20th February 2007, 13:29
look here -imin 3 -imax 4 -pmin 3 -pmax 5

set imin to 1 imax to 3, pmin to 1 and pmax to 3

no need to uninstall xvid

with bitrate so high you are more then sure to undersize.. but changing this settings... will help!

BHH

lexor
20th February 2007, 13:37
this is a fresh install of xvid & co after I reformatted, so it's not a conflict with old install.

I've updated settings with buzzqw's suggestions and now doing the re-encode.

buzzqw
20th February 2007, 13:42
also ... even -bquant_ratio 162 could be lower to 100 and bmin set to 2

if will be so undersized again try a more greedy matrix like sharktooth UHR

BHH

lexor
20th February 2007, 14:39
excellent, I've hit target on a sample of 5000 frames (settings including both your posts), gonna re-encode the whole thing now... back tomorrowish :)

foxyshadis
20th February 2007, 19:58
I'd say that hacking apart the preset when it massively undersizes to force it breaks the entire spirit of the presets. The idea is that when a preset undersizes you move up to the next one, which guarantees better results than simply raising the quant floor.

With such a high bitrate you could easily use the 90% preset, and even that might undersize, for which I would question the logic of requiring a bitrate that may well be higher than the original mpeg2.

HeadBangeR77
20th February 2007, 20:37
I will second that.
Apart from messing round with presets (what I usually do, but within limited range, and for my own purposes ;)), setting the minimum quantizer to 1 is a bad idea imo. This will just bump up the bitrate enormously, without proportional gain to quality.

The only thing I would personally recommend, if one would like to stick to just one preset or/and perhaps favourite matrix, is to lower the minimum to 2 for all frames (1st pass at Q2 accordingly), and use B-frames settings like: 1/1/1, 2/1/0 or even 1/1/0 (very constant quality, yet still more compressable than without b-frames).

I would also try Heini's SixOfNine (which shouldn't be actually named like that, but since Heini did name it, I don't care ;)) before V3 UHR.

cheers,
HDBR77

lexor
21st February 2007, 02:23
Actually the only reason I'm making it so high is because I want to see if my DVD player will choke on it. Didn't quite expect to have problems before I stuck it into DVD :)

Anyhow, just finished that encode, it hit target alright this time. Now I'm off to burn and test it. I do however agree that mangling profiles is ugly and you were right foxy target bit rate is on par with source (original release of Thomas Crown Affair... ah the good old single layer pressed DVDs :) ).

/edit: I think I am going insane, that last encode ended up with: gobbled up end credits (over opening music)->movie->end credits (this time properly shown)

squid_80
21st February 2007, 08:18
2 things spring to mind:
- Old versions of xvid_encraw had problems writing files larger than 2gb.
- If it's not an old version of encraw it's probably an error in the muxing stage. (Does MeGUI still use Divxmux? It's buggy as hell....)

HeadBangeR77
21st February 2007, 12:24
/edit: I think I am going insane, that last encode ended up with: gobbled up end credits (over opening music)->movie->end credits (this time properly shown)
Encode each part separately, and mux manually then.
If you want to rule out a MeGUI's bug, then try with VDub 1.7.1 and VfW version of XviD of your choice.

lexor
21st February 2007, 14:51
ah screw this, source is an old single layer DVD, I'll just make 1-1 copy. The only reason for my encode was to test my player and remove some of the horrid noise that movie has, I don't think I care enough for either to bother with long re-encodes.