Log in

View Full Version : my struggle with GK


tremendous
24th March 2005, 01:16
i'm on my way to getting decent xvid files from dvds. i chose GK because i want a good level of control over what i end up with. i followed a few tutorials and have so far ended up empty handed. something different seems to go wrong every time.

an error i get a lot is after the first pass finishes. it says the frame count doesn't match that which is in the settings. after some experimentation i found that the number of frames it has is often correct (sometimes it isn't, god knows what causes that), and the amount which it "should have been" is the number in the "frames" box on the bottom left of the GK screen. i'm not sure if this is where the number is found, but it seems to match. the thing is, i may have loaded in a different .d2v file since i sorted out the first job, so the box will show the number of frames of the last movie in the queue. so i think i have solved the problem i had when i left the thing going all night: it was encoding four episodes off one dvd, and they all screwed up (ended up much too short) except the fourth. (the fourth actually ended up way oversized, but i haven't experimented enough to ask questions about that.)

so what i'm asking here is what's with it finding the wrong number of frames - could it stupidly be basing the number it should have on whichever .d2v was loaded last? and how do i get around this if so?

secondly, i'm confused about the compressibility test. is it just for my information (i do the test and then adjust resolution etc if it turns out it's harder or easier to compress) or is it actually a useful part of encoding? and if so, and i say "now" and it finishes it, where does it save/how does it remember the results? what if i do the encoding later, or this is one of a queue of encoding jobs?
if it's a useful part of encoding is there no way to make it do the check as part of the "job" rather than doing it beforehand? i found that if i tick "use compressibility test" before saving the .avs file, i'll end up with a .avi file in fast forward. i understand what's happened but don't see what i'm meant to do. so what i did in everything i tried out after this is to run the check, then turn the check off and save the .avs and then encoding. seems like a waste of time as i know the resolution and size i'm aiming for regardless of the test (these episodes i'm told all compress roughly equally).

after enough had failed i gave up and got auto GK. i set one episode to encode and it all seemed to be going well and of course something went wrong just before it was going to finish. it stopped without an error, but at 90% or so. said it had finished. it was heading right for the target 350mb as well. the .avi file i got out doesn't play.

here's part of the log:
[16/03/05 19:08:10] Compressibility percentage is: 49.59
[16/03/05 19:08:10] Chosen resolution is: 640x368 ( AR: 1.74 )
[16/03/05 19:08:10] Predicted comptest value is: 49.59
[16/03/05 19:08:10] Running first pass.
[16/03/05 19:08:10] Writing the following script to E:\SMALLVILLE_DISC_1\VIDEO_TS\output\agk_tmp\101_movie.avs
===========================================================
LoadPlugin("C:\UTILIT~1\DVD\AutoGK\DGMPGDec\DGDecode.dll")

..... (if you need to see any more of this i'll post it) .....

LanczosResize(out_width,out_height)
===========================================================
[16/03/05 19:40:56] Duration was: 32 minutes 46 seconds
[16/03/05 19:40:56] Speed was: 36.20 fps.
[16/03/05 19:40:56] Expected quality of first pass size: 50.19
[16/03/05 19:40:56] Running second pass.
[16/03/05 20:18:04] Duration was: 37 minutes 7 seconds
[16/03/05 20:18:04] Speed was: 31.96 fps.
[16/03/05 20:18:04] Job finished.


so it thought it had finished, but it didn't get to the end and the .avi is no good.

i'd prefer to use the proper GK in the end, but i could settle for auto GK.

so after auto GK didn't deliver i spoke to a buddy who said he uses flask. i downloaded that and couldn't even crop the picture how i wanted so i thought sod that. haha


any insight?
thanks very much

edit:
*sigh*... just ripped a 5 minute .vob (the intro chapter to one episode) so i could do some experimenting. everything seemed to go well, but then the final .avi ended up at 65MB when it should have been 42. did the compressibility test and everything. could any of the log/settings files help find out what went wrong here?

then i loaded up the same .avs file, but manually edited the "frames" box on the bottom left of the interface. sure enough - after the first pass i get errors saying it's expecting 1234 frames but horror of horrors it has the correct number. but this time the second pass has gone past the 1234 mark without a problem. produced an .avi of identical (50% too large) size. i just don't understand this.

Axed
24th March 2005, 01:59
Originally posted by tremendous
an error i get a lot is after the first pass finishes. it says the frame count doesn't match that which is in the settings.

Make sure you press reset button (in the bottom righthand corner) before loading another d2v file to que it up. Post your log file, and your .AVS file, just make sure you select remove commented lines.

Originally posted by tremendous
i may have loaded in a different .d2v file since i sorted out the first job, so the box will show the number of frames of the last movie in the queue.

As above, try pressing reset before adding another d2v file.

Originally posted by tremendous
secondly, i'm confused about the compressibility test. is it just for my information (i do the test and then adjust resolution etc if it turns out it's harder or easier to compress) or is it actually a useful part of encoding?

The compressibility test is one of the most important parts of the encoding process, it tells you what to set your resolution and how to achieve the proper size. You have to do it for every single seperate episode, since they all have different factors that make their compressibility different.

Originally posted by tremendous
and i say "now" and it finishes it, where does it save/how does it remember the results? what if i do the encoding later, or this is one of a queue of encoding jobs?

After it finishes, look for a percentage down the bottom of GK. This is your compressibility percentage. You should modify the resolution until it reaches around 70 - 80%.

Originally posted by tremendous
edit:
*sigh*... just ripped a 5 minute .vob (the intro chapter to one episode) so i could do some experimenting. everything seemed to go well, but then the final .avi ended up at 65MB when it should have been 42. did the compressibility test and everything. could any of the log/settings files help find out what went wrong here?

Post your log file, and your .AVS file. Again, make sure you select remove commented lines (i cant remeber the exact wording, i have to reinstall GK) for the .AVS before you post it in here. We'll see what we can do from that.

tremendous
24th March 2005, 02:16
ah ok i've never been pressing that reset button. doens't that clear the profile though? i thought i wanted the same profile for the whole series...

thing about setting the resolution is that a friend showed me the .avi files he has of this series, and they're all 640 pixels across and they're all 350mb. and they look great. so i know it can be done.

for the 5 minute intro which was 50% oversize (the first time i ran it) here is the log:


24/03/05 00:21:54: Job "smallville - intro.avi" started.

o Transcode source -> MP3: E:\Smallville_S2_D1\VIDEO_TS\intro AC3 T01 2_0ch 192Kbps DELAY 0ms.ac3
o Xvid - First Pass: E:\Smallville_S2_D1\VIDEO_TS\intro.avs
o Xvid - Second Pass: E:\Smallville_S2_D1\VIDEO_TS\intro.avs
o Mux Audio.
End of Job 1 (smallville - intro.avi).
_______________________________________________________________________________________________________________________

Gordian Knot
Encoding Job Data:

Type: EncXvid_All
Container: Audio-Video Interleave (AVI)
Number: 1
Name: smallville - intro.avi
Platform: WinXP (5.1.2600).2

Files:
VirtualDubModExe: C:\UTILIT~1\GORDIA~1\VirtualDubMod\VirtualDubMod.exe
NandubExe: C:\UTILIT~1\GORDIA~1\nandub\Nandub.exe
AviFinal: E:\Smallville_S2_D1\VIDEO_TS\intro.avi
AviMovie: E:\Smallville_S2_D1\VIDEO_TS\intro_Movie.avi
AviCredits: E:\Smallville_S2_D1\VIDEO_TS\intro_Credits.avi
MovieFS: E:\Smallville_S2_D1\VIDEO_TS\intro.avs
CreditsFS:
Log : E:\Smallville_S2_D1\VIDEO_TS\intro.log
Stats: E:\Smallville_S2_D1\VIDEO_TS\intro.stats
Ecf : E:\Smallville_S2_D1\VIDEO_TS\intro.ecf

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

Calculator:
VideoSize: 36580 kbyte.
Audio1Size: 4906 kbyte.
Audio2Size: 0 kbyte.
Overhead: 496 kbyte.
AviSize: 41984 kbyte (41 mbyte).
FilesSize: 0 kbyte.
TotalSize: 41984 kbyte (41 mbyte).
Interleaving: vbrmp3
Bitrate: 955 k(=1000)Bits/s
Frames: 7843
FPS: 25.000
Duration: 05:14
Quality: 0.170 bits/(pixel*frame).
CompCheck3: 0.000 bits/(pixel*frame).
CompCheck5: 0.376 bits/(pixel*frame).
Resolution: 640 x 352

Audio 1:
Mode: ac3 -> mp3
SourceFile: E:\Smallville_S2_D1\VIDEO_TS\intro AC3 T01 2_0ch 192Kbps DELAY 0ms.ac3
WavFile: E:\Smallville_S2_D1\VIDEO_TS\intro AC3 T01 2_0ch 192Kbps DELAY 0ms.wav
Mp3File: E:\Smallville_S2_D1\VIDEO_TS\intro AC3 T01 2_0ch 192Kbps DELAY 0ms.mp3
OggFile: E:\Smallville_S2_D1\VIDEO_TS\intro AC3 T01 2_0ch 192Kbps DELAY 0ms.ogg
OggQuality: 0.200
OggLanguage: English
Azid: -c normal
Lame: -h --abr 128
Delay: 0
Interval: 1
Preload: 500
Mux: 1
Recalc: 1
DeleteWav: 1

Audio 2:
none.


00:21:54: Started Transcoding Audio.

00:21:54: Using "BeSweet" to transcode E:\Smallville_S2_D1\VIDEO_TS\intro AC3 T01 2_0ch 192Kbps DELAY 0ms.ac3
CommandLine: "C:\UTILIT~1\GORDIA~1\BeSweet\BeSweet.exe" -core( -input "E:\Smallville_S2_D1\VIDEO_TS\intro AC3 T01 2_0ch 192Kbps DELAY 0ms.ac3" -output "E:\Smallville_S2_D1\VIDEO_TS\intro AC3 T01 2_0ch 192Kbps DELAY 0ms.mp3" -logfile "E:\Smallville_S2_D1\VIDEO_TS\intro AC3 T01 2_0ch 192Kbps DELAY 0ms.log" ) -ota( -hybridgain ) -azid( -c normal ) -lame( -h --abr 128 )
00:22:25: Finished. Duration: 31 seconds.

00:22:25: Audio Done.
00:22:25: MP3-File-Size is 4550 kb.
00:22:25: Audio 1, determined: 4550 kb
00:22:25: Audio 1, calc: 4906 kb
00:22:25: New Bitrate for Movie = 965 k(=1000)Bits/s

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

// $job "XviD First Pass"
// $input "E:\Smallville_S2_D1\VIDEO_TS\intro.avs"
// $output "E:\Smallville_S2_D1\VIDEO_TS\intro_Movie.avi"
// $state 0
// $start_time 0 0
// $end_time 0 0
// $script

VirtualDub.Open("E:\\Smallville_S2_D1\\VIDEO_TS\\intro.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(3012,"[i doubt you need this crap]");
VirtualDub.video.filters.Clear();
VirtualDub.subset.Delete();
VirtualDub.SaveAVI("E:\\Smallville_S2_D1\\VIDEO_TS\\intro_Movie.avi");
VirtualDub.Close();

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

00:22:25: Started Xvid - First Pass: E:\Smallville_S2_D1\VIDEO_TS\intro.avs
00:26:16: Finished Xvid - First Pass: Duration: 3 minutes, 51 seconds.
00:26:16: Trying to open Log-file.
00:26:16: Success: Log-file open.
00:26:16: Encoded: 7843 Frames.
00:26:16: Speed: 33.950 Frames per Second.
00:26:16: New target size = 36937 Kb

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

// $job "XviD Second Pass"
// $input "E:\Smallville_S2_D1\VIDEO_TS\intro.avs"
// $output "E:\Smallville_S2_D1\VIDEO_TS\intro_Movie.avi"
// $state 0
// $start_time 0 0
// $end_time 0 0
// $script

VirtualDub.Open("E:\\Smallville_S2_D1\\VIDEO_TS\\intro.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(3012,"[more crap i doubt you need]");
VirtualDub.video.filters.Clear();
VirtualDub.subset.Delete();
VirtualDub.SaveAVI("E:\\Smallville_S2_D1\\VIDEO_TS\\intro_Movie.avi");
VirtualDub.Close();

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

00:26:16: Started Xvid - Second Pass: E:\Smallville_S2_D1\VIDEO_TS\intro.avs
00:33:32: Finished Xvid - Second Pass: Duration: 7 minutes, 16 seconds.
00:33:32: Speed: 17.985 Frames per Second.

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

// $job "DivX5 Append"
// $input "E:\Smallville_S2_D1\VIDEO_TS\intro_Movie.avi"
// $output "E:\Smallville_S2_D1\VIDEO_TS\intro.avi"
// $state 0
// $start_time 0 0
// $end_time 0 0
// $script

VirtualDub.Open("E:\\Smallville_S2_D1\\VIDEO_TS\\intro_Movie.avi",0,0);
VirtualDub.RemoveInputStreams();
VirtualDub.stream[0].SetSource("E:\\Smallville_S2_D1\\VIDEO_TS\\intro AC3 T01 2_0ch 192Kbps DELAY 0ms.mp3",0x00000202,1);
VirtualDub.stream[0].SetMode(0);
VirtualDub.stream[0].SetInterleave(1,500,1,0,0);
VirtualDub.stream[0].SetClipMode(1,1);
VirtualDub.stream[0].SetConversion(0,0,0,0,0);
VirtualDub.stream[0].SetVolume();
VirtualDub.stream[0].SetCompression();
VirtualDub.video.SetDepth(24,24);
VirtualDub.video.SetMode(0);
VirtualDub.video.SetFrameRate(0,1);
VirtualDub.video.SetIVTC(0,0,-1,0);
VirtualDub.video.SetRange(0,0);
VirtualDub.video.SetCompression();
VirtualDub.video.filters.Clear();
VirtualDub.subset.Delete();
VirtualDub.SaveAVI("E:\\Smallville_S2_D1\\VIDEO_TS\\intro.avi");
VirtualDub.Close();

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

00:33:32: Started Muxing Audio.: E:\Smallville_S2_D1\VIDEO_TS\intro_Movie.avi
00:33:38: Finished Muxing Audio.: Duration: 5 seconds.

00:33:38: Done.
00:33:38: Movie = E:\Smallville_S2_D1\VIDEO_TS\intro.avi
Total Encoding Time: 11 minutes, 44 seconds.
24/03/05 00:33:38: Job "smallville - intro.avi" finished.
_______________________________________________________________________________________________________________________


and here's the .avs file minus comments:

LoadPlugin("C:\UTILIT~1\GORDIA~1\DGMPGDec\DGDecode.dll")
LoadPlugin("C:\UTILIT~1\GORDIA~1\AviSynthPlugins\UnDot.dll")
mpeg2source("E:\Smallville_S2_D1\VIDEO_TS\intro.d2v")
crop(2,0,716,576)
LanczosResize(640,352)
Undot()


any ideas why it ended up so huge?

thanks

Axed
24th March 2005, 06:16
Originally posted by tremendous
ah ok i've never been pressing that reset button. doens't that clear the profile though? i thought i wanted the same profile for the whole series...

thing about setting the resolution is that a friend showed me the .avi files he has of this series, and they're all 640 pixels across and they're all 350mb. and they look great. so i know it can be done.

Remember, its not just resolution that gives you the compressibility, other factors are included such as noise, motion, filtering, audio format/size, options selected in xvid such as matrix and quaterpixel (qpel), avi overheads.

Originally posted by tremendous
for the 5 minute intro which was 50% oversize (the first time i ran it) here is the log:

24/03/05 00:21:54: Job "smallville - intro.avi" started.
<snip>
Did you do a compressibility test? Personally, im not that great at reading those log files but others here are. What was the compressibility percentage at the resolution you selected?

You know, i could be completely barking up the wrong tree here also. When you installed Xvid, did you remove any older versions you may have had installed first?

There was another post in the Xvid forums lately about someone else having problems with oversizing with Xvid and episodes, i recommend having a look at around 2 - 3 days worth of posts about episodes.

ukb008
25th March 2005, 04:40
I've had to go on laboring with GK for about eight months before I could be reasonably sure of ending up with a presentable result. There's still not 100% guarantee, for me, that everything will be okay.

Stay with this great program. You are right about the amazing degree of control you can enjoy with it. Especially what I like about it is the finer tweaks in the AR because I am a little fussy about the exactness of proportion of the picture. A round has to be exactly round for me, the transverse and the vertical diameters being equal. You can achieve very close results with GK. Another advantage is: you will learn a grat deal trying to figure out different things. If someone would rather have a say in the different attributes of the finished product, then GK is for him.

If, however, anyone is either content with not interfering or is unable to tinker meaningfully, then AGK is another great program just for her.

Regards.

tremendous
25th March 2005, 14:50
Originally posted by Axed
Remember, its not just resolution that gives you the compressibility, other factors are included such as noise, motion, filtering, audio format/size, options selected in xvid such as matrix and quaterpixel (qpel), avi overheads.
true! maybe i need to check i don't have too many of these fancy things on.

Did you do a compressibility test? Personally, im not that great at reading those log files but others here are. What was the compressibility percentage at the resolution you selected?
i did to the compressibility test but i've rather stupidly deleted that whole folder now so i don't know the percentage. i think it was around 45-50% though. you say i'm aiming for 70-80% but i'm sure i read in tutorials that i'm going for 40-60!

You know, i could be completely barking up the wrong tree here also. When you installed Xvid, did you remove any older versions you may have had installed first?
i'm definitely ok on this front.

There was another post in the Xvid forums lately about someone else having problems with oversizing with Xvid and episodes, i recommend having a look at around 2 - 3 days worth of posts about episodes.
thanks for the advice. i did look through a good number of threads in my 5 days before i could post, but i will continue.

and thanks ukbg008 for the encouragement - i definitely will stick at this.

in the meantime i tried autoGK again, and actually managed to produce results i was happy with. i'm determined to get the proper GK working for the control like you said, but this will do in the meantime. it may have failed last time because my computer got too hot - i'm in a different, cooler, room now. just a guess though.

thanks