View Full Version : stupid undersized files **Take 1**


Xndo
15th December 2003, 02:29
Okay this is a little annoying, I've been gettting this for at least 2 weeks straight, I have completly reinstalled gk 0.28.6.2 deleted regkey's and all, still no dice. I just installed the new 28.7 and I'm still getting the problems, deleted regkeys still haveing the problem. I set a target size for 200mb's for a 30min ep. I'm getting anywhere from 30 to 100 negative difference in what I set the file size. I set it around 100mb's more still getting the problem. Has anyone else gotten this error before? I know it use to use up every now and then before from 28.5 i think. It would happend like a couple of times, and go back to normal, but now its been a consistant thing. I tried to search, didn't find anything useful so i tought I would make a post, and no this is not using the 1.0b2 Xvid either. This is the older version I haven't found good enough feedback that would talk me into upgrading and using that. So if you can help please. if you can't thanks for looking and trying anyways.



Xndo

Manao
15th December 2003, 07:10
In two pass mode, the codec can't output a second pass larger than the first pass. If you check the first pass size ( with statsreader for example, it's bundled with Koepi's codec, you just have to open the stats file with it ), you will see that it is under 200 Mb, hence your 'issue'. And then, you understand why it is useless to try to raise the aimed size.

In order to solve your problem, here as some solutions :

- Instead of aiming at 200 Mb, aim at 100 Mb. You should not see any differences in quality.
- Use MPEG matrix instead of H263.
- Disable b-frames ( if they were enabled ), or use them with a softer settings.

Finally, read this (http://forum.doom9.org/showthread.php?s=&threadid=60646&highlight=undersizing), it should help you understand the basics behind a two pass algorithm.

Tuning
15th December 2003, 09:58
If you :logfile: (GKnot), then we could analyse more systematically and hopefully find a solution. Please also put your film type etc.

Koepi
15th December 2003, 10:25
So we're talking about gknot errors in the _xvid_ forum. Want me to move the thread?

Koepi

manono
15th December 2003, 10:44
Nah, you can have it. :) I think Manao has already pointed out the problem and the solution. Xndo might also try raising the resolution.

Xndo
15th December 2003, 13:45
I'm not completely sure that GK is the source of the problem, so i thought it was right to post it here. I failed to mention, in my frist post ( guess i was too tired to think at the time ) that all of a suddon ( around the sametime the undersize files started ) i can not view the avi file or anything, I have to put it into a ogm container inorder to view the test file or even the finial version of it. Which to me is pretty odd. I've loaded the stats file and for this one test I am doing it told me 179mb's on the 2ndpass i have "discard first past" and B-frames was like this:
B-Frame Contol:
Max B-frames: 2
B-frame quantizer ratio (%): 150
B-frame quantizer offset: 100
B-frame threshold : 10

I've used these settings for months, with the same res as before and it always hit my target size, then all of a suddon it just started to be a pain in my ass.

frodoontop
15th December 2003, 14:54
If the result of the 1st pass it is 179 MB, than the 2nd pass can only become the same or smaller in size (with the same settings). If you want to increase the size, use different settings:

1) a larger resolution
2) a sharper resize method
3) less filtering
4) a more bitconsuming matrix
5) no bframes

That should help you out :D

btw, you should redo your first pass of course

Xndo
15th December 2003, 22:00
okay I'm getting better results as far as file sizes now 2 times in a row i've set the target size at 209mb's so far its been comming out at 209mb's, so far so good, though still quality issues but that can be fixed with filtering differently, though I'm still getting jerky screen panning. I've set the b-frame to 0 just to see if that's causeing any differences, i'm about to set it back to 2 to see if that's the cause. The film I'm doing is a Anime of SMJ NTSC format. I think I might have to up the res to see if that helps, i have it at 512x384, useing LanczosResizer, here is what the gk log looks like

-------------------------------

12/15/2003 10:33:26 AM: Job " 1" started.

o Xvid - First Pass: C:\DVD\Rips\SMJ DVD 1\Episode 1\test2.avs
o Xvid - Second Pass: C:\DVD\Rips\SMJ DVD 1\Episode 1\test2.avs
x Mux Audio (disabled).
End of Job 6 ( 1).
_______________________________________________________________________________________________________________________

Gordian Knot -
Encoding Job Data:

Type: EncXvid_All
Number: 6
Name: 1
Platform: WinXP (5.1.2600).2

Files:
VirtualDubModExe: C:\PROGRA~1\GORDIA~1\VirtualDubMod\VirtualDubMod.exe
NandubExe: C:\PROGRA~1\GORDIA~1\nandub\Nandub.exe
AviFinal: C:\DVD\Rips\SMJ DVD 1\Episode 1\test2_4.avi
AviMovie: C:\DVD\Rips\SMJ DVD 1\Episode 1\test2_4_Movie.avi
AviCredits: C:\DVD\Rips\SMJ DVD 1\Episode 1\test2_4_Credits.avi
MovieFS: C:\DVD\Rips\SMJ DVD 1\Episode 1\test2.avs
CreditsFS:
Log : C:\DVD\Rips\SMJ DVD 1\Episode 1\test2_4.log
Stats: C:\DVD\Rips\SMJ DVD 1\Episode 1\test2_4.stats
Ecf : C:\DVD\Rips\SMJ DVD 1\Episode 1\test2_4.ecf

Options:
Quality/DRF: 0
CreditsStart: 0
UseEcf: 1
CreditsIVTC: 1
CreditsAppend: 0
DeleteInterm.: 0
EnforceBitrate: 0
AntiShit: 0

Calculator:
VideoSize: 209710 kbyte.
Audio1Size: 0 kbyte.
Audio2Size: 0 kbyte.
Overhead: 0 kbyte.
AviSize: 209710 kbyte (204 mbyte).
FilesSize: 0 kbyte.
TotalSize: 209710 kbyte (204 mbyte).
Interleaving:
Bitrate: 19090 k(=1000)Bits/s
Frames: 2697
FPS: 29.970
Duration: 01:30
Quality: 3.240 bits/(pixel*frame).
CompCheck3: 0.000 bits/(pixel*frame).
CompCheck5: 0.000 bits/(pixel*frame).
Resolution: 512 x 384

Audio 1:
none.

Audio 2:
none.

10:33:26 AM: Re-Calculating Frame Count.
10:33:26 AM: FrameRate was 29.970 fps
10:33:26 AM: FrameRate now is 23.976 fps
10:33:26 AM: IVTC: 2158 Frames.

Adding this script to C:\PROGRA~1\GORDIA~1\VirtualDubMod\LastJob.vcf :

// $job "Xvid - First Pass"
// $input "C:\DVD\Rips\SMJ DVD 1\Episode 1\test2.avs"
// $output "C:\DVD\Rips\SMJ DVD 1\Episode 1\test2_4.avi"
// $state 0
// $start_time 0 0
// $end_time 0 0
// $script

VirtualDub.Open("C:\\DVD\\Rips\\SMJ DVD 1\\Episode 1\\test2.avs",0,0);
VirtualDub.video.SetDepth(24,24);
VirtualDub.video.SetMode(1);
VirtualDub.video.SetFrameRate(0,1);
VirtualDub.video.SetIVTC(0,0,-1,0);
VirtualDub.video.SetRange(0,0);
VirtualDub.video.SetCompression(0x64697678,0,10000,0);
VirtualDub.video.SetCompData(1208,"AwAAAKC7DQAuMwMAQzpcRFZEXFJpcHNcU01KIERWRCAxXEVwaXNvZGUgMVx0ZXN0Ml80LnN0YXRzAHAAaQBzAG8AZABlACAAMQBcAHQAZQB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2suc3RhdHMAAC4AcwB0AGEAdABzAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAABAnAAAQJwAAAQAAAAEAAAAAAAAAAAAAAAAAAAD3AAAAAAAAAAAAAAA=");
VirtualDub.video.filters.Clear();
VirtualDub.subset.Delete();
VirtualDub.SaveAVI("C:\\DVD\\Rips\\SMJ DVD 1\\Episode 1\\test2_4.avi");
VirtualDub.Close();

// $endjob
//
//--------------------------------------------------
// $done

10:33:26 AM: Started Xvid - First Pass: C:\DVD\Rips\SMJ DVD 1\Episode 1\test2.avs
12:54:35 PM: Finished Xvid - First Pass: Duration: 2 hours, 21 minutes, 8 seconds.
12:54:35 PM: Trying to open Log-file.
12:54:36 PM: Success: Log-file open.
12:54:36 PM: Encoded: 27472 Frames.
12:54:36 PM: Speed: 3.244 Frames per Second.
12:54:36 PM: WARNING: Number of counted frames differs from settings!
12:54:36 PM: WARNING: Settings: 2158
12:54:36 PM: WARNING: Counted: 27472
12:54:36 PM: WARNING: Difference: 25314
12:54:36 PM: Correcting Bitrate...
12:54:36 PM: Original Bitrate = 19087 k(=1000)Bits/s
12:54:36 PM: Now encoding at 1499 k(=1000)Bits/s
12:54:36 PM: New target size = 209710 Kb

Adding this script to C:\PROGRA~1\GORDIA~1\VirtualDubMod\LastJob.vcf :

// $job "Xvid - Second Pass"
// $input "C:\DVD\Rips\SMJ DVD 1\Episode 1\test2.avs"
// $output "C:\DVD\Rips\SMJ DVD 1\Episode 1\test2_4.avi"
// $state 0
// $start_time 0 0
// $end_time 0 0
// $script

VirtualDub.Open("C:\\DVD\\Rips\\SMJ DVD 1\\Episode 1\\test2.avs",0,0);
VirtualDub.video.SetDepth(24,24);
VirtualDub.video.SetMode(1);
VirtualDub.video.SetFrameRate(0,1);
VirtualDub.video.SetIVTC(0,0,-1,0);
VirtualDub.video.SetRange(0,0);
VirtualDub.video.SetCompression(0x64697678,0,10000,0);
VirtualDub.video.SetCompData(1208,"BQAAAKC7DQAuMwMAQzpcRFZEXFJpcHNcU01KIERWRCAxXEVwaXNvZGUgMVx0ZXN0Ml80LnN0YXRzAHAAaQBzAG8AZABlACAAMQBcAHQAZQBzAHQAMgBfADQALgBzAHQAYQB0AHMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABVAAAABQAAABAAAABkAAAAZAAAAAYAAAABAAAAAAAAAAEAAAAsAQAAAQAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAACWAAAAZAAAAAoAAAAAAAAAAQAAAAAAAAAAAAAAAgAAAB8AAAACAAAAHwAAAAgREhMVFxkbERITFRcZGxwUFRYXGBocHhUWFxgaHB4gFhcYGhweICMXGBocHiAjJhkaHB4gIyYpGxweICMmKS0QERITFBUWFxESExQVFhcYEhMUFRYXGBkTFBUWFxgaGxQVFhcZGhscFRYXGBobHB4WFxgaGxweHxcYGRscHh8hAAAAAAoAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAHgAAAAEAAAAyAAAAAQAAAPQBAABaAAAAMgAAAIDeC1Q8AAAAPAAAAPoAAAABAAAAAAAAAFxoaW50ZmlsZS5tdmgAbABlAC4AbQB2AGgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAXHZpZGVvZ2suc3RhdHMAAC4AcwB0AGEAdABzAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAABAnAAAQJwAAAQAAAAEAAAAAAAAAAAAAAAAAAAD3AAAAAAAAAAAAAAA=");
VirtualDub.video.filters.Clear();
VirtualDub.subset.Delete();
VirtualDub.SaveAVI("C:\\DVD\\Rips\\SMJ DVD 1\\Episode 1\\test2_4.avi");
VirtualDub.Close();

// $endjob
//
//--------------------------------------------------
// $done

12:54:36 PM: Started Xvid - Second Pass: C:\DVD\Rips\SMJ DVD 1\Episode 1\test2.avs
2:16:49 PM: Finished Xvid - Second Pass: Duration: 1 hour, 22 minutes, 12 seconds.
2:16:49 PM: Speed: 5.570 Frames per Second.

2:16:49 PM: Done.
2:16:49 PM: Movie = C:\DVD\Rips\SMJ DVD 1\Episode 1\test2_4.avi
Total Encoding Time: 3 hours, 43 minutes, 23 seconds.
12/15/2003 2:16:49 PM: Job " 1" finished.
_______________________________________________________________________________________________________________________


I'm going to try to install the codecs to see if I can get the stupid error from "unsupoorted, or no filters installed" error from trying to view the avi file

Tuning
16th December 2003, 07:10
>>12:54:36 PM: Original Bitrate = 19087 k(=1000)Bits/s
>>12:54:36 PM: Now encoding at 1499 k(=1000)Bits/s

Here you can see your target bitrate is 19087k, implies 18Mb per second. Which I think is very high for any codec. So as Manao already mentioned your target size need to be decreased and then you will get applied final size.

There is even better method for this called compressibility test.
Here you have
>>Quality: 3.240 bits/(pixel*frame).

which as already mentioned is higher than required. So alltoegther what you did is overkilling the encode by setting high bitrate.
At this bitrate I would backup the original video itself.;)


To perfectly calculate what bitrate is necessary do a compressibility tets:http://www.doom9.org/gknot-xvid.htm ("And last but not least the compressibility check.")

The guide provides how to calculate efficiently the bitrate and hence the target size.

Good Luck!

<EDIT> : Corrected link

Xndo
17th December 2003, 02:29
although he is right about that, the funny thing is, the last 3 times I've been getting the file size that i need, but ya i guess I haven't noticed on these last ones that some of the settings are a little too high, but one thing still remains, why is the avi file comming up as invaild format, i think its a header problem, but still not sure yet.

o ya forgot to mention, that link didn't work

Asmodian
17th December 2003, 03:13
I just wanted to mention that it is not at all odd to have different episodes of the same anime encoded at the same settings have a 4x difference or more in first pass file size (just by my experience). I was backing up my Cowboy Bebop and most of the episodes had a ~300MB first pass but some were >500MB and one was just under 900MB. I traced it down to the "hyper space" scenes that used way more bit-rate then the normal anime. The same thing can happen in reverse (a few episodes come out much smaller then the rest due to a larger number of very compressible scenes).

Asmodian