PDA

View Full Version : Redo First Pass...Why?


ron spencer
5th April 2006, 17:51
You know I am trying to do my King Kong with AutoGK to XviD. For some reason I decided to use 3200 as the file size, just to be different and for fun. Now I do not have the log here but before I left for work it had completed the first pass and then said it was going to RE-DO the first pass...I have never seen the first-pass redone before. Any idea why it is doing this?

buzzqw
5th April 2006, 19:16
some "impossible" value compression test ?


BHH

BigDid
5th April 2006, 19:36
some "impossible" value compression test ?


BHH
+1

impossible=way over 100%
Logfile is your friend.

Did

ron spencer
5th April 2006, 20:19
yes...will have to post the log but I am not at home where it is running....what would a value over 100% mean in theory? Would it be because I choose 3200 and 3200 too much for size?

BigDid
5th April 2006, 21:25
....what would a value over 100% mean in theory? Would it be because I choose 3200 and 3200 too much for size?
Hi,

I made the calculation using the excelllent new bitrate calculator from weaver4: http://forum.doom9.org/showthread.php?t=109307

Movie is 2:35, ac3 is 448kb/ps, resolution will be 720/306, length 187mn, Ntsc/23.976
For quality= excellent (.27 b/pixel) it gives 2516Mb /1389Kb/ps
Even 1500kbp/s will only give 2717Mb !
You have maxxed out the AGK sharp matrix (EQMV2 from Sharktooth)
Now the easy way is to lower your file size to one of the above.

The hard way can be:
1/ to re-use the AGK movie.avs in VDMod or AR-calculator and change the matrix;
2/ use AGK tweaker: http://forum.doom9.org/showthread.php?t=100517
or AGKPal: http://forum.doom9.org/showthread.php?p=716282#post716282
and change the matrix

What matrix(es)? plenty of choices see Teegedeck thread (advertising :) ): http://forum.doom9.org/showthread.php?p=796900#post796900
or the Shartooth matrixes thread: http://forum.doom9.org/showthread.php?t=83125
and some size differences guesses:
Eqmv2 (AGK sharp) 100% size
Eqm v3HR +10%
Didée 6of9 + 35%
Eqm v3UHR +70%
1 test only, only -guesses-

As you stated you wanted to test for fun, thanks to report your results :)

Did

Edit:
1/the calculations were not accurate because of wrong input estimation, see new calculation below.
2/ As the ESS option was used it was not the AGK sharp matrix that was maxxed out but the standard xvid matrix (probably MPEG)

ron spencer
5th April 2006, 23:47
Ok....it is all done (back at home). On my slow PIII, which usually does things over night it took 20 hrs!!!! King kong is over 3 hours and I changed audio to mp3 128...again it ws just for fun. Here is the log....any comments RE: re-doing first pass?

[04/04/2006 9:00:09 PM] AutoGK 2.26
[04/04/2006 9:00:09 PM] OS: WinXP (5.1.2600).2
[04/04/2006 9:00:09 PM] Job started.
[04/04/2006 9:00:09 PM] Input file: C:\Made DVDs\VIDEO_TS\VTS_01_0.IFO
[04/04/2006 9:00:09 PM] Output file: D:\XviD Final\King Kong.avi
[04/04/2006 9:00:09 PM] Output codec: XviD
[04/04/2006 9:00:09 PM] Audio 1: English AC3 6ch
[04/04/2006 9:00:09 PM] Subtitles: none
[04/04/2006 9:00:09 PM] Format: .AVI
[04/04/2006 9:00:09 PM] Target size: 3200Mb
[04/04/2006 9:00:09 PM] Custom audio settings: CBR MP3 with bitrate: 128Kbps
[04/04/2006 9:00:09 PM] Standalone support enabled: ESS
[04/04/2006 9:00:09 PM] Started encoding.
[04/04/2006 9:00:09 PM] Demuxing and indexing.
[04/04/2006 9:05:45 PM] Processing file: C:\Made DVDs\VIDEO_TS\VTS_01_1.VOB
[04/04/2006 9:05:45 PM] Processing file: C:\Made DVDs\VIDEO_TS\VTS_01_2.VOB
[04/04/2006 9:05:45 PM] Processing file: C:\Made DVDs\VIDEO_TS\VTS_01_3.VOB
[04/04/2006 9:05:45 PM] Processing file: C:\Made DVDs\VIDEO_TS\VTS_01_4.VOB
[04/04/2006 9:05:45 PM] Processing file: C:\Made DVDs\VIDEO_TS\VTS_01_5.VOB
[04/04/2006 9:05:45 PM] Processing file: C:\Made DVDs\VIDEO_TS\VTS_01_6.VOB
[04/04/2006 9:05:45 PM] Processing file: C:\Made DVDs\VIDEO_TS\VTS_01_7.VOB
[04/04/2006 9:05:45 PM] Processing file: C:\Made DVDs\VIDEO_TS\VTS_01_8.VOB
[04/04/2006 9:05:45 PM] Source resolution: 720x480
[04/04/2006 9:05:45 PM] Found NTSC source.
[04/04/2006 9:05:45 PM] Source aspect ratio: 16:9
[04/04/2006 9:05:45 PM] Source seems to be pure FILM.
[04/04/2006 9:05:46 PM] Color correction enabled.
[04/04/2006 9:05:46 PM] Output will contain 269568 frames
[04/04/2006 9:05:46 PM] Decoding audio.
[04/04/2006 9:20:00 PM] Normalizing audio.
[04/04/2006 9:23:42 PM] Encoding audio.
[04/04/2006 10:20:49 PM] Audio1 size: 179,890,176 bytes (171.56 Mb)
[04/04/2006 10:20:49 PM] Overhead: 3,201,152 bytes (3.05 Mb)
[04/04/2006 10:20:49 PM] Video size: 3,172,351,872 bytes (3025.39 Mb)
[04/04/2006 10:20:49 PM] Running compressibility test.
[04/04/2006 10:20:49 PM] Writing the following script to D:\XviD Final\agk_tmp\King Kong_comptest.avs
===========================================================
LoadPlugin("C:\PROGRA~1\AutoGK\DGMPGDec\DGDecode.dll")
LoadPlugin("C:\PROGRA~1\AutoGK\filters\autocrop.dll")
LoadPlugin("C:\PROGRA~1\AutoGK\filters\ColorMatrix.dll")
LoadPlugin("C:\PROGRA~1\AutoGK\filters\RemoveGrain.dll")

movie = mpeg2source("D:\XviD Final\agk_tmp\King Kong.d2v")
cropclip = autocrop(movie,mode=0,wmultof=4,hmultof=4,samples=10,aspect=0,threshold=34,samplestartframe=0,leftadd=0,rightadd=0,topadd=0,bottomadd=0)
fixed_aspect = 1.18518518518519
c_width = width(cropclip)
c_height = round(height(cropclip) / fixed_aspect)
input_par = float(c_width)/float(c_height)
input_par = (input_par > 1.4) || (input_par < 1.25) ? input_par : (4.0/3.0)
out_width = 704
out_height = round(float(out_width) / input_par)
hmod = out_height - (floor(out_height / 16 ) * 16)
out_height = (hmod > 4) ? (out_height + (16 - hmod)) : (out_height - hmod)
new_aspect = (float(out_width) / float(out_height)) / fixed_aspect
autocrop(movie,mode=0,wmultof=4,hmultof=4,samples=10,aspect=new_aspect,threshold=34,samplestartframe=0,leftadd=0,rightadd=0,topadd=0,bottomadd=0)
LanczosResize(out_width,out_height)
RemoveGrain(mode=2)
ColorMatrix("Rec.709->Rec.601",mmx=true,hints=false)
SelectRangeEvery(300,15)
===========================================================
[04/04/2006 10:49:39 PM] Duration was: 28 minutes 49 seconds
[04/04/2006 10:49:39 PM] Speed was: 7.79 fps.
[04/04/2006 10:49:39 PM] Compressibility percentage is: 99.68
[04/04/2006 10:49:39 PM] Chosen resolution is: 720x320 ( AR: 2.25 )
[04/04/2006 10:49:39 PM] Predicted comptest value is: 92.59%
[04/04/2006 10:49:39 PM] Running first pass.
[04/04/2006 10:49:39 PM] Writing the following script to D:\XviD Final\agk_tmp\King Kong_movie.avs
===========================================================
LoadPlugin("C:\PROGRA~1\AutoGK\DGMPGDec\DGDecode.dll")
LoadPlugin("C:\PROGRA~1\AutoGK\filters\autocrop.dll")
LoadPlugin("C:\PROGRA~1\AutoGK\filters\ColorMatrix.dll")
LoadPlugin("C:\PROGRA~1\AutoGK\filters\RemoveGrain.dll")

movie = mpeg2source("D:\XviD Final\agk_tmp\King Kong.d2v")
cropclip = autocrop(movie,mode=0,wmultof=4,hmultof=4,samples=10,aspect=0,threshold=34,samplestartframe=0,leftadd=0,rightadd=0,topadd=0,bottomadd=0)
fixed_aspect = 1.18518518518519
c_width = width(cropclip)
c_height = round(height(cropclip) / fixed_aspect)
input_par = float(c_width)/float(c_height)
input_par = (input_par > 1.4) || (input_par < 1.25) ? input_par : (4.0/3.0)
out_width = 720
out_height = round(float(out_width) / input_par)
hmod = out_height - (floor(out_height / 16 ) * 16)
out_height = (hmod > 4) ? (out_height + (16 - hmod)) : (out_height - hmod)
new_aspect = (float(out_width) / float(out_height)) / fixed_aspect
autocrop(movie,mode=0,wmultof=4,hmultof=4,samples=10,aspect=new_aspect,threshold=34,samplestartframe=0,leftadd=0,rightadd=0,topadd=0,bottomadd=0)
LanczosResize(out_width,out_height)
RemoveGrain(mode=2)
ColorMatrix("Rec.709->Rec.601",mmx=true,hints=false)
===========================================================
[05/04/2006 4:17:03 AM] Duration was: 5 hours 27 minutes 22 seconds
[05/04/2006 4:17:03 AM] Speed was: 13.72 fps.
[05/04/2006 4:17:04 AM] Expected quality of first pass size: 102.31%
[05/04/2006 4:17:04 AM] Trying to adjust settings.
[05/04/2006 4:17:04 AM] Switching b-frames off
[05/04/2006 4:17:04 AM] Chosen resolution is: 720x320 ( AR: 2.25 )
[05/04/2006 4:17:04 AM] Predicted comptest value is: 76.63
[05/04/2006 4:17:04 AM] Re-running first pass.
[05/04/2006 4:17:04 AM] Writing the following script to D:\XviD Final\agk_tmp\King Kong_movie.avs
===========================================================
LoadPlugin("C:\PROGRA~1\AutoGK\DGMPGDec\DGDecode.dll")
LoadPlugin("C:\PROGRA~1\AutoGK\filters\autocrop.dll")
LoadPlugin("C:\PROGRA~1\AutoGK\filters\ColorMatrix.dll")
LoadPlugin("C:\PROGRA~1\AutoGK\filters\RemoveGrain.dll")

movie = mpeg2source("D:\XviD Final\agk_tmp\King Kong.d2v")
cropclip = autocrop(movie,mode=0,wmultof=4,hmultof=4,samples=10,aspect=0,threshold=34,samplestartframe=0,leftadd=0,rightadd=0,topadd=0,bottomadd=0)
fixed_aspect = 1.18518518518519
c_width = width(cropclip)
c_height = round(height(cropclip) / fixed_aspect)
input_par = float(c_width)/float(c_height)
input_par = (input_par > 1.4) || (input_par < 1.25) ? input_par : (4.0/3.0)
out_width = 720
out_height = round(float(out_width) / input_par)
hmod = out_height - (floor(out_height / 16 ) * 16)
out_height = (hmod > 4) ? (out_height + (16 - hmod)) : (out_height - hmod)
new_aspect = (float(out_width) / float(out_height)) / fixed_aspect
autocrop(movie,mode=0,wmultof=4,hmultof=4,samples=10,aspect=new_aspect,threshold=34,samplestartframe=0,leftadd=0,rightadd=0,topadd=0,bottomadd=0)
LanczosResize(out_width,out_height)
RemoveGrain(mode=2)
ColorMatrix("Rec.709->Rec.601",mmx=true,hints=false)
===========================================================
[05/04/2006 9:32:42 AM] Duration was: 5 hours 15 minutes 37 seconds
[05/04/2006 9:32:42 AM] Speed was: 14.23 fps.
[05/04/2006 9:32:43 AM] Expected quality of first pass size: 76.81%
[05/04/2006 9:32:43 AM] Running second pass.
[05/04/2006 5:35:59 PM] Duration was: 8 hours 3 minutes 16 seconds
[05/04/2006 5:35:59 PM] Speed was: 9.30 fps.
[05/04/2006 5:35:59 PM] Job finished. Total time: 20 hours 35 minutes 50 seconds



Never had one take this long before!!!!!

BigDid
6th April 2006, 00:50
Thanks for coming back,

The bitrate calc was false, re-doing it:
NTSC/23.976, AR/2.25 720*320, Audio=128, length=187mn (believe correct?), Quality .27b/pixel gives:
a bitrate of 1453kb/ps and a size of 2165MB

Except if the movie length is false, the calc should be accurate; if so there is a 1035Mb difference with or without B-frames :confused:

Another way to estimate would be if 3200Mb=102% with B-frames, 76% with B-frames= 2384MB (3200*76/102)

Comments:
- AGK is doing it's job to avoid UNDERSIZING by switching B-frames off (some discussions in the main AGK thread)
- Is there a significative quality difference at 720*320 with or without B-frames? I Dunno
- As you are using ESS option(regular xvid matrixes), IMO it is better to have or get near 720 width to keep maximum details.
- I already had some 1 pass re-doing (and some abort in older AGK rev) this is why I usually try to check the results of the comptest and if weird, change settings and redo 1 or x comptests; will always be quicker than 1 more complete 1st pass :)

Comments on comments? :D

Did

PS: 1 more I would keep the 6ch AC3 for that big filesize

ron spencer
6th April 2006, 02:16
thanks...the quality is awesome!!! You need a large file size for a movie of that length. I get rid of AC-3 as I put these movies on my mvix device for the cottage...no surround there.

This brings up an issue, if I KNOW I will use mp3 128kbps for audio, and I know the movie length, how can I choose a file size to maximize quality without just using DVDShrink and making a DVD

BigDid
6th April 2006, 02:55
thanks...the quality is awesome!!! You need a large file size for a movie of that length. I get rid of AC-3 as I put these movies on my mvix device for the cottage...no surround there.
At least 192 instead of 128, will increase only from 172Mb to 258Mb?

This brings up an issue, if I KNOW I will use mp3 128kbps for audio, and I know the movie length, how can I choose a file size to maximize quality without just using DVDShrink and making a DVD
Once again reverse bitrate calculator from weaver4 here: http://forum.doom9.org/showthread.php?t=109307
.Net framework 1.1 or 2 is needed

Did

ron spencer
6th April 2006, 13:46
awesome....thanks...nice calculator from weaver. again I cannot beleive just how awesome king kong turned out!!!

BigDid
6th April 2006, 21:27
awesome....thanks...nice calculator from weaver. again I cannot beleive just how awesome king kong turned out!!!
You are welcome.

For the record: not yet sure if result with B-frames on and a sharp matrix would be equivalent with significative less size in regard of these elements: http://forum.doom9.org/showthread.php?t=107897&highlight=quality

But it cannot applies for the ESS option, only for full options or for SAP that allows more bitrate and custom matrixes.

Happy encoding :)

Did

manono
9th April 2006, 11:17
I think you should have kept the DD 5.1 audio. It'll be downmixed for stereo output, and when you play it with a system that has a surround sound, it'll sound real good. King Kong compresses very well. Other movies won't compress nearly so well.

The first pass had to be rerun when AutoGK decided it couldn't make the size you wanted, and decided to drop the B-Frames. You can't run a second pass without B-Frames off of a first pass that has B-Frames.

ron spencer
12th April 2006, 21:30
yah but I do not have surround at the cottage....DD was 650 meg on KKong I think...mp3 was 128. The difference is a kids show for me.

thanks for the explanation.....there may be an issue with the king king encode though....will post later....having to do with timestamp.

therealjoeblow
13th April 2006, 20:41
If you want the 'best quality you can get without using shrink to make a new dvd', why don't you just dispense with the hit-and-miss filesize calculations and just set quality to 100%? That runs a sigle pass encode with fixed quantizers (ie no vbr) so that every frame has consistent high quality. It's much quicker and technically better quality than 2 pass (although 99% won't be able to notice the quality differences anyways).

ron spencer
14th April 2006, 18:35
true, but I have had instances when it won't play on my phillips. I think autogk warns you of this...esp when you set ESS option