View Full Version : Quality Problems
weaver4
3rd June 2006, 20:23
I have tried to encode two movies this last week using AutoGK. I set the movie to single pass 60% quality. Encoder is DIVX. But when the movies are encoded they are huge and AVIcodec says the quality is 79% not 60%. Any guesses as to what is broken?
Here is the AVS script
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("E:\Movies\agk_tmp\Casablanca.agk.divx.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 = 0.888888888888889
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",opt=0,hints=false)
weaver4
3rd June 2006, 20:25
Could someone move this to the AutoGK forum, messed up.
Trey
jggimi
3rd June 2006, 21:22
Moved.
Your AutoGK log may also be helpful.
weaver4
4th June 2006, 23:54
OK, here is the log file.
=========================================
[6/4/2006 1:51:29 PM] AutoGK 2.27
[6/4/2006 1:51:29 PM] OS: WinXP (5.1.2600).2
[6/4/2006 1:51:29 PM] Job started.
[6/4/2006 1:51:29 PM] Input file: E:\Movies\Ripped1\Movie2\VTS_01_0.IFO
[6/4/2006 1:51:29 PM] Output file: E:\Movies\Casablanca.agk60.divx..avi
[6/4/2006 1:51:29 PM] Output codec: DivX
[6/4/2006 1:51:29 PM] Audio 1: English AC3 2ch
[6/4/2006 1:51:29 PM] Subtitles: none
[6/4/2006 1:51:29 PM] Format: .AVI
[6/4/2006 1:51:29 PM] Target quality: 60%
[6/4/2006 1:51:29 PM] Custom resolution settings: fixed width of 640 pixels
[6/4/2006 1:51:29 PM] Custom audio settings: CBR MP3 with bitrate: 160Kbps
[6/4/2006 1:51:29 PM] Standalone support enabled: MTK/Sigma
[6/4/2006 1:51:29 PM] Started encoding.
[6/4/2006 1:51:29 PM] Demuxing and indexing.
[6/4/2006 1:53:23 PM] Processing file: E:\Movies\Ripped1\Movie2\VTS_01_1.VOB
[6/4/2006 1:53:23 PM] Processing file: E:\Movies\Ripped1\Movie2\VTS_01_2.VOB
[6/4/2006 1:53:23 PM] Processing file: E:\Movies\Ripped1\Movie2\VTS_01_3.VOB
[6/4/2006 1:53:23 PM] Processing file: E:\Movies\Ripped1\Movie2\VTS_01_4.VOB
[6/4/2006 1:53:23 PM] Source resolution: 720x480
[6/4/2006 1:53:23 PM] Found NTSC source.
[6/4/2006 1:53:23 PM] Source aspect ratio: 4:3
[6/4/2006 1:53:23 PM] Source seems to be pure FILM.
[6/4/2006 1:53:24 PM] Color correction enabled.
[6/4/2006 1:53:24 PM] Output will contain 147689 frames
[6/4/2006 1:53:24 PM] Decoding audio.
[6/4/2006 1:55:46 PM] Normalizing audio.
[6/4/2006 1:57:17 PM] Encoding audio.
[6/4/2006 2:23:40 PM] Running single pass encoding.
[6/4/2006 2:23:40 PM] Writing the following script to E:\Movies\agk_tmp\Casablanca.agk60.divx._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("E:\Movies\agk_tmp\Casablanca.agk60.divx..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 = 0.888888888888889
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 = 640
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",opt=0,hints=false)
===========================================================
[6/4/2006 5:59:46 PM] Duration was: 3 hours 36 minutes 5 seconds
[6/4/2006 5:59:46 PM] Speed was: 11.39 fps.
[6/4/2006 5:59:46 PM] Job finished. Total time: 4 hours 8 minutes 17 seconds
manono
5th June 2006, 07:09
Hi-
But when the movies are encoded they are huge and AVIcodec says the quality is 79% not 60%. Any guesses as to what is broken?
Why does anything have to be broken? Because 2 apps figure the percentage differently? Make it 50% then, or whatever percentage is the lowest and still looks good to your eyes. Because the file size was larger than you expected? You already know that you lose file size control when using 1-pass. Casablanca is an older and grainy film, and won't compress nearly as well as will a modern and clean film.
weaver4
5th June 2006, 14:02
Here is the concern:
StaxRip quantizer 3.3 = filesize of 1.4G
AviNet .24 = filesize of 1.3G
Dr. Divx 2 Beta 10 = filesize of 1.4G
AutoGK quality 60% = filesize of 2.3G
I had heard that AutoGK quality of 60% was really setting the quantizer to 3.3 so it should be the same file size as StaxRip.
Plus, the avicodec program shows that quality was 60% on other movies that were encoded with AutoGK at 60%.
manono
5th June 2006, 14:40
I don't get it. What are you proving, or trying to prove? Were all 4 encodes done with the same settings, resolution and audio bitrate. If you want a 1.3-1.4 GB result using AutoGK, then run 2-passes for that size.
Run them through DRFAnalyzer and then tell me the results are the same:
http://www.geocities.com/analyzerdrf/
weaver4
5th June 2006, 17:50
Yes, they are done at the same resoution and same audio bitrate.
I like AGK and have been using the default rate of 60%, but now I am trying to figure out why the filesizes got so big.
Why when I tell it to encode at 60% it encodes at 79%.
I tried to download the untility but it says the download site has been closed due to inactivity. And it is not on Doom9
BigDid
5th June 2006, 18:58
... I tried to download the untility but it says the download site has been closed due to inactivity. And it is not on Doom9
Hi,
Weird, cause I just tested and downloaded without probl: http://www.geocities.com/filesDRF/DivXDRFAnalyzerV0951.zip :confused:
All is not lost, a few links after googling:
http://www.free-codecs.com/download/DivX_DRF_Analyzer.htm
http://www.divx-digest.com/software/drfanalyzer.html
http://www.worlddivx.it/software.php?section=14
Did
weaver4
5th June 2006, 20:12
Yeah, I found it on divx-digest. I downloaded it and will try it tonight.
weaver4
5th June 2006, 23:07
I ran DRFAnalyzer and here is the report. What does it tell you?
=====================================
DivX DRF Analyzer v0.9.3 Report!
File Name: E:\Movies\Casablanca.agk60.divx..avi
FourCC: DX50
Codec: DivX503b1920p
Resolution: [ Width: 640 Height: 480 ]
Frame Rate: 23.976 frames per second
The Video has 147692 frames [ 01:42:39 ]
Average Frame quality is LOW [Average DRF/quantizer is 13145.79]
Standard Deviation: Quality is LOW [Std. Deviation is -1.#J]
Image Resolution is HIGH
There are NO frame drops ( NO drops is better )
This video may have some frames with VERY POOR Quality
Recomended Resolution: [0x0] (Target DRF/quantizer=~2.80)
The filesize should be larger!
Performance Caracteristics:
Macroblocks per frame: 1200 ( Poor Playback in Slow Computers, PIII450 or better required )
The Width is multiple of 32
Kilobits per Second: 2088.58
Kilobits per Frame: 87.09
Kilobits per Macroblock: 0.073
Bits per Pixel: 0.29
Frame Type Statistics :
I Frames: 0.83%
P Frames: 99.17%
B Frames: 0.00%
S Frames: 0.00%
N Frames: 0.00%
(More Advanced Codecs use B and S frames)
http://www.geocities.com/analyzerDRF/
weaver4
5th June 2006, 23:30
I ran it again on a much smaller file made with StaxRip and the rsults show the Average Rate Quality is High. Here is it's Report.
=======================================
DivX DRF Analyzer v0.9.3 Report!
File Name: E:\Movies\Casablanca.sx2p.divx.avi
FourCC: DX50
Codec: DivX503b1920p
Resolution: [ Width: 640 Height: 464 ]
Frame Rate: 23.976 frames per second
The Video has 147692 frames [ 01:42:39 ]
Average Frame quality is HIGH [Average DRF/quantizer is -2604.01]
Standard Deviation: Quality is LOW [Std. Deviation is -1.#J]
Image Resolution is HIGH
There are NO frame drops ( NO drops is better )
This video may have some frames with VERY POOR Quality
Recomended Resolution: [0x0] (Target DRF/quantizer=~2.80)
The filesize should be larger!
Performance Caracteristics:
Macroblocks per frame: 1160 ( Poor Playback in Slow Computers, PIII450 or better required )
The Width is multiple of 32
Kilobits per Second: 1708.09
Kilobits per Frame: 71.23
Kilobits per Macroblock: 0.061
Bits per Pixel: 0.25
Frame Type Statistics :
I Frames: 0.79%
P Frames: 99.21%
B Frames: 0.00%
S Frames: 0.00%
N Frames: 0.00%
(More Advanced Codecs use B and S frames)
http://www.geocities.com/analyzerDRF/
Sharktooth
6th June 2006, 00:58
AutoGK uses custom matrices.
Since it uses EQM V2 and it is a high bitrate matrix it will result in a larger file for the same quantizer compared to h.263 quantization.
I cant still understand why you dont use 2 passes and specify your desired filesize...
manono
6th June 2006, 06:32
These are DivX files he's making, Sharktooth. And it looks like DRFAnalyzer choked on both of them. Turns out that wasn't such a good idea after all. I guess you're using DivX 6.2 (or are you really using DivX 5?), and DRFAnalyzer hasn't been updated in some time.
Sharktooth
6th June 2006, 13:34
sorry i missed the "Encoder is DIVX" in the fist post...
weaver4
6th June 2006, 14:32
I cant still understand why you dont use 2 passes and specify your desired filesize...
I could, but I am trying to understand what issue is. I normally code single-pass with a quantizer of 3.3 or 60% in AutoGK. But I have never seen a 1hr 40 minute movie give me such an enormous filesize so I was trying to understand why.
Sharktooth
6th June 2006, 16:27
are you using the same filters in all apps?
BigDid
6th June 2006, 21:27
These are DivX files he's making, Sharktooth. And it looks like DRFAnalyzer choked on both of them. Turns out that wasn't such a good idea after all. I guess you're using DivX 6.2 (or are you really using DivX 5?), and DRFAnalyzer hasn't been updated in some time.
Hi,
The fourcc is DX50, Codec listed DivX503b1920p
The results seems weird for the DRF/Q: 13145.79 or -2604.01
It is not the last version (0.951) but has the same infos, here is a log for a 1.4Gb anim with a DRF/Q of 3.85 which is quite of usual for xvid/AGK :goes from 3.xx (very good) to 5.xx (acceptable):
"
DivX DRF Analyzer v0.9.5 Report!
File Name: C:\DVDVolume\Une foisl'homme 2_6 1,4ac3.avi
FourCC: XVID
Codec: XviD0043
Resolution: [ Width: 512 Height: 384 ]
Frame Rate: 25.000 frames per second
The Video has 149118 frames [ 01:39:24 ]
Average Frame quality is MEDIUM [Average DRF/quantizer is 3.85]
Standard Deviation: Quality is MEDIUM [Std. Deviation is 1.05]
Image Resolution is MEDIUM
There are NO frame drops ( NO drops is better )
This video may have some frames with VERY POOR Quality!
Recomended Resolution: [432x320] (Target DRF/quantizer=2.8)
The filesize should be larger!
Performance Caracteristics:
Macroblocks per frame: 768
The Width is multiple of 32
Kilobits per Second: 1839.29
Kilobits per Frame: 73.56
Kilobits per Macroblock: 0.096
Bits per Pixel: 0.38
Frame Type Statistics :
I Frames: 0.90%
P Frames: 50.24%
B Frames: 48.85%
S Frames: 0.00%
N Frames: 0.00%
(More Advanced Codecs use B and S frames)
Frame Quality Statistics :
DRF=1&2: 8277 5.6%
DRF=3: 64674 43.8%
DRF=4: 18388 12.4%
DRF=5: 52803 35.7%
DRF=6: 2705 1.8%
DRF=7: 632 0.4%
DRF=8: 54 0.0%
DRF=9: 14 0.0%
DRF>9: 223 0.2%
KeyF/DeltaF: 0.91%
KeyDRF<4: 1220
KeyDRF=4: 125
KeyDRF>4: 3
AverageKeyDRF: 3.09
MAXDRF: 13
AverageDRF: 3.85
Deviation: 1.05
"
I remember having tested some divx encodes (divx4 or 5) with quite same DRF/Q amount usually from 4.xx to 6.xx or 7.xx (7= usually bad frames and/or lots of macroblocks :) )
Did
len0x
12th June 2006, 19:47
I had heard that AutoGK quality of 60% was really setting the quantizer to 3.3 so it should be the same file size as StaxRip.
answer is simple. that's only true for xvid and divx5. DivX6 uses different quant system and therefore 75%/divx5 ~ 60%divx6.
manono
13th June 2006, 00:29
Yeah, I asked him about that, len0x, farther up, but didn't get an answer, so I lost interest. Had he said he was using DivX 6.2, then I would have mentioned about the percentage differences. If there's something in the log that says which version of DivX he's using, I didn't notice it.
And nice to see you here.
BigDid
13th June 2006, 02:05
...If there's something in the log that says which version of DivX he's using he's using, I didn't notice it.
I did answer to your query:"The fourcc is DX50, Codec listed DivX503b1920p" in my above post ;)
And nice to see you here.
@ len0x- Yes really, and thanks for your PM prompt answer.
Did
manono
13th June 2006, 06:05
Yes, but the FourCC doesn't necessarily mean it was encoded with that, does it? And if he really used DivX 5.03, then len0x's answer doesn't apply, does it, as it still doesn't explain the 79%, does it? And it doesn't explain DRFAnalyzer giving gibberish, does it?
I don't know. I don't understand. I don't use DivX anyway.
BigDid
13th June 2006, 22:33
Yes, but the FourCC doesn't necessarily mean it was encoded with that, does it? Right
"And if he really used DivX 5.03, then len0x's answer doesn't apply, does it, " Right
"as it still doesn't explain the 79%, does it? " Right
"And it doesn't explain DRFAnalyzer giving gibberish, does it?" Absolutely right
"I don't know. I don't understand. I don't use DivX anyway." Neither do I, but
- nobody answers (even the author of the thread :D )
- DRFanalyser works for xvid and for divx (5.xx at least)
I'm like you, I don't understand. So without update the thread will just fade and die...
Cheers
Did
len0x
15th June 2006, 00:26
And nice to see you here.
:) I'm not really around that much, but its nice to remember good old times :D
weaver4
17th June 2006, 14:34
I am using 6.2.2 for the codec.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.