Log in

View Full Version : Encoding error in GKnot


Maze
14th February 2002, 17:41
This is what happens when I'm trying to encode this 160 minute movie:
After the first pass I get a "Dub Error" with an access violation, see log file from Nandub below. The Gordian Knot log posted further down. I have successfully encoded a single chapter from the movie, but it won't work when I'm trying to do the whole movie. I'm using the latest version of Gordian Knot + update/fix. Can somebody please help me?

--------------
NANDUB LOG

VirtualDub crash report -- build 1852
--------------------------------------

Disassembly:
77fcb7c0: add [ebx+0a8458903h],cl
77fcb7c6: cmp ebx,eax
77fcb7c8: jz 77fcb7dd
77fcb7ca: lea ecx,[eax-8]
77fcb7cd: mov [ebp-80],ecx
77fcb7d0: mov dx,[ebp-48]
77fcb7d4: cmp dx,[ecx]
77fcb7d7: jbe 77fcb7dd
77fcb7d9: mov eax,[eax]
77fcb7db: jmp 77fcb7c3
77fcb7dd: mov [ebp-96],eax
77fcb7e0: mov edx,[eax+4]
77fcb7e3: mov [ebp-92],edx
77fcb7e6: lea ecx,[esi+8]
77fcb7e9: mov [ecx],eax
77fcb7eb: mov [esi+12],edx
77fcb7ee: mov [edx],ecx
77fcb7f0: mov [eax+4],ecx
77fcb7f3: push esi
77fcb7f4: mov esi,[ebp-52]
77fcb7f7: push esi
77fcb7f8: call 77f82643
77fcb7fd: mov eax,[ebp-48]
77fcb800: add [esi+40],eax
77fcb803: jmp 77fcb778
77fcb808: cmp byte ptr [ebp-44],00
77fcb80c: jz 77fcb81c
77fcb80e: mov eax,[ebp-52]
77fcb811: push dword ptr[eax+0578h]
77fcb817: call 77f82207
77fcb81c: ret
77fcb81d: push ebp
77fcb81e: mov ebp,esp
77fcb820: push ebx
77fcb821: push esi
77fcb822: mov esi,[ebp+12]
77fcb825: mov ebx,[ebp+8]
77fcb828: push edi
77fcb829: mov edi,esi
77fcb82b: movzx eax,[esi+2]
77fcb82f: shl eax,03
77fcb832: sub edi,eax
77fcb834: cmp edi,esi
77fcb836: jz 77fcb842
77fcb838: test byte ptr [edi+5],01
77fcb83c: jz 77fcb982
77fcb842: test byte ptr [esi+5],10
77fcb846: jnz 77fcb857
77fcb848: mov eax,[ebp+16]
77fcb84b: mov eax,[eax]
77fcb84d: test byte ptr [esi+eax*8+5],01 <-- FAULT
77fcb852: lea edi,[esi+eax*8]
77fcb855: jz 77fcb860
77fcb857: mov eax,esi
77fcb859: pop edi
77fcb85a: pop esi
77fcb85b: pop ebx
77fcb85c: pop ebp
77fcb85d: ret 0010
77fcb860: movzx ecx,[edi]
77fcb863: add ecx,eax
77fcb865: cmp ecx,0000fe00
77fcb86b: ja 77fcb857
77fcb86d: cmp byte ptr [ebp+20],00
77fcb871: jnz 77fceb5b
77fcb877: mov al,[edi+5]
77fcb87a: and al,10
77fcb87c: test al,10
77fcb87e: mov [esi+5],al
77fcb881: jnz 77fcb8ca
77fcb883: push edi
77fcb884: push ebx
77fcb885: call 77f8260d
77fcb88a: mov ecx,[edi+12]
77fcb88d: mov eax,[edi+8]
77fcb890: cmp eax,ecx
77fcb892: mov [ecx],eax
77fcb894: mov [eax+4],ecx
77fcb897: jz 77fcb907
77fcb899: mov al,[edi+5]
77fcb89c: test al,04
77fcb89e: jnz 77fcec13
77fcb8a4: movzx ecx,[edi]
77fcb8a7: mov eax,[ebp+16]
77fcb8aa: add [eax],ecx
77fcb8ac: movzx ecx,[edi]
77fcb8af: sub [ebx+40],ecx
77fcb8b2: mov cx,[eax]
77fcb8b5: test byte ptr [esi+5],10
77fcb8b9: mov [esi],cx
77fcb8bc: jnz 77fcb857
77fcb8be: mov ecx,[eax]

Windows 5.0 (Win2000 build 2195) [Service Pack 2]

EAX = 0000ffff
EBX = 010c0000
ECX = 7ffde000
EDX = 010c0608
EBP = 0012f0f8
DS:ESI = 0023:01886650
ES:EDI = 0023:01886588
SS:ESP = 0023:0012f0ec
CS:EIP = 001b:77fcb84d
FS = 003b
GS = 0000
EFLAGS = 00210246

MM0 = 0000000000000000
MM1 = 0000001000000010
MM2 = 001be300001be300
MM3 = 8010801080108010
MM4 = 0002000200020002
MM5 = 00ff000000ff0000
MM6 = 00000000ea600000
MM7 = 00000000a83eb800
Crash reason: Access Violation

Thread 00000378 (Main thread)
D:\dvdrip\Archiv\NanoDub\Sources\nandub\Init.cpp(121)
D:\dvdrip\Archiv\NanoDub\Sources\nandub\Init.cpp(140)
D:\dvdrip\Archiv\NanoDub\Sources\nandub\Init.cpp(158)
D:\dvdrip\Archiv\NanoDub\Sources\nandub\FilterSystem.cpp(408)
D:\dvdrip\Archiv\NanoDub\Sources\nandub\FilterSystem.cpp(504)


Wrong NANDUB.DBG file (build 1853)

-- End of report


---------------------------
GORDIAN KNOT LOG
2002-02-14 07:31:24: Job "I.A.M.M.M.M.W." started.

o DivX3-First Pass: E:\ripped\IAMMMMW.avs
o DivX3-Second Pass: E:\ripped\IAMMMMW.avs
x Mux Audio (disabled).
End of Job 2 (I.A.M.M.M.M.W.).
_______________________________________________________________________________________________________________________

Gordian Knot 0.23.0.17
Encoding Job Data:

Type: EncD3_Both
Number: 2
Name: I.A.M.M.M.M.W.
Platform: Win2000 (5.0.2195).2

Files:
VirtualDubExe: C:\PROGRA~1\GORDIA~1\virtualdub\Virtualdub.exe
NandubExe: C:\Program Files\GordianKnot\Nandub\Nandub.exe
AviFinal: E:\ripped\IAMMMMW_1.avi
AviMovie: E:\ripped\IAMMMMW_1_Movie.avi
AviCredits: E:\ripped\IAMMMMW_1_Credits.avi
MovieFS: E:\ripped\IAMMMMW.avs
CreditsFS:
Log : E:\ripped\IAMMMMW_1.log
Stats: E:\ripped\IAMMMMW_1.stats
Ecf : E:\ripped\IAMMMMW_1.ecf

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

Calculator:
VideoSize: 1263094 kbyte.
Audio1Size: 154759 kbyte.
Audio2Size: 0 kbyte.
Overhead: 5505 kbyte.
AviSize: 1423360 kbyte (1390 mbyte).
FilesSize: 0 kbyte.
TotalSize: 1423360 kbyte (1390 mbyte).
Interleaving: disabled
Bitrate: 1053 k(=1024)Bits/s
Frames: 229994
FPS: 23.976
Duration: 2:39:53
Quality: 0.274 bits/(pixel*frame).
CompCheck3: 0.000 bits/(pixel*frame).
CompCheck4: 0.000 bits/(pixel*frame).
Resolution: 640 x 256

Audio 1:
none.

Audio 2:
none.

07:31:24: Audio 1, calc: 154759 kb
07:31:24: Audio 1, disabled, no recalc. - you probably want to add this track later.

Adding this script to C:\Program Files\GordianKnot\Nandub\VirtualDub.jobs:

// $job "DivX3 First Pass"
// $input "E:\ripped\IAMMMMW.avs"
// $output "E:\ripped\IAMMMMW_1.avi"
// $state 0
// $start_time 0 0
// $end_time 0 0
// $script

VirtualDub.Open("E:\\ripped\\IAMMMMW.avs",0,0);
VirtualDub.audio.SetSource(0);
VirtualDub.audio.SetMode(0);
VirtualDub.audio.SetInterleave(1,0,0,0,0);
VirtualDub.audio.SetClipMode(1,1);
VirtualDub.audio.SetConversion(0,0,0,0,0);
VirtualDub.audio.SetVolume();
VirtualDub.audio.SetCompression();
VirtualDub.audio2.SetSource(0);
VirtualDub.audio2.SetMode(0);
VirtualDub.audio2.SetInterleave(1,0,0,0,0);
VirtualDub.audio2.SetClipMode(1,1);
VirtualDub.audio2.SetConversion(0,0,0,0,0);
VirtualDub.audio2.SetVolume();
VirtualDub.audio2.SetCompression();
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.SetDivX(6000,9999);
VirtualDub.video.SetQualityControl(0,0,0,0);
VirtualDub.video.SetMotionDetection(8,10,300,300);
VirtualDub.video.SetCrispness(0,0);
VirtualDub.video.SpaceKF(24);
VirtualDub.video.InternalSCD(100);
VirtualDub.video.SetMinKBPS(270);
VirtualDub.video.SetCurveFile("");
VirtualDub.video.SetCurveMcFactor(0);
VirtualDub.video.SetCurveCompression(0,0);
VirtualDub.video.SetCurveFilter(0,9999);
VirtualDub.video.SetCurveCredits(0,350);
VirtualDub.video.SetLumaCorrectionAmp(0,10,30);
VirtualDub.video.SetCurveRedist(0);
VirtualDub.video.SetCompLevelsMain(2,2);
VirtualDub.video.SetCompLevelsA(300,2,16);
VirtualDub.video.SetCompLevelsB(300,2,16);
VirtualDub.video.SetCompLevelsC(300,2,16);
VirtualDub.video.SetCompLevelsD(300,2,16);
VirtualDub.video.SetCompLevelsE(300,2,16);
VirtualDub.video.SetCompLevelK(2,4);
VirtualDub.video.SetBitsReservoir(0,100,0,100,45,100);
VirtualDub.video.SetLowBrCorrection(0,0);
VirtualDub.video.NoAVIOutput(1);
VirtualDub.video.GenStats("E:\\ripped\\IAMMMMW_1.stats",1);
VirtualDub.video.SetEncodingControl("");
VirtualDub.video.filters.Clear();
VirtualDub.subset.Delete();
VirtualDub.SaveAVI("E:\\ripped\\IAMMMMW_1.avi");
VirtualDub.Close();

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

07:31:24: Started DivX3-First Pass: E:\ripped\IAMMMMW.avs
17:30:41: Finished DivX3-First Pass. Duration: 9 hours, 59 minutes, 16 seconds.
17:30:42: Speed: 2.113 Frames per Second.
17:30:42: ERROR: Calculation impossible! Desired Video Size is bigger than First Pass (= maximum divx-size for this filter-combination). To solve this you can: 1) lower your Total Size. 2) lower your Video Size (e.g. add bigger audio). 3) do another first pass at a higher resolution or with other filters.
17:30:42: ERROR: Please read the included How-To to understand better what happened!
17:30:42: WARNING: Encoding continued anyway.
17:30:42: WARNING: Filesize will be approximately 265293 kb lower than desired (but best possible quality for this filter combination).
17:30:42: WARNING: Thats an average bitrate of 832 k(=1024)bit/sec (=the highest possible bitrate)
17:30:42: WARNING: instead of 1053 k(=1024)Bits/s (=your desired bitrate).
17:30:43: Created new stats-file: E:\ripped\IAMMMMW_1_832_kbps.stats
17:30:43: Created ecf: E:\ripped\IAMMMMW_1.ecf
17:30:43: WARNING: Number of counted frames differs from settings!
17:30:43: WARNING: Settings: 229994
17:30:43: WARNING: Counted: 75959
17:30:43: WARNING: Difference: 154035
17:30:43: Correcting Bitrate...
17:30:43: Original Bitrate = 1053 k(=1024)Bits/s
17:30:43: Now encoding at 3199 k(=1024)Bits/s

HotSpur
17th February 2002, 02:37
17:30:42: ERROR: Calculation impossible! Desired Video Size is bigger than First Pass (= maximum divx-size for this filter-combination). To solve this you can: 1) lower your Total Size. 2) lower your Video Size (e.g. add bigger audio). 3) do another first pass at a higher resolution or with other filters.

I would try the above recommendations first, it seems to be the direct cause of your problems.

17:30:43: WARNING: Number of counted frames differs from settings!
17:30:43: WARNING: Settings: 229994
17:30:43: WARNING: Counted: 75959
17:30:43: WARNING: Difference: 154035
17:30:43: Correcting Bitrate...
17:30:43: Original Bitrate = 1053 k(=1024)Bits/s
17:30:43: Now encoding at 3199 k(=1024)Bits/s

Seems here that you set a wrong frame rate in gknot, I would guess you set to 29fps but should be 23fps. Are you deinterlacing this movie?

Maze
17th February 2002, 10:53
Thank you for your reply!

I did set the frame rate to 23 fps. As I mentioned in my post I managed to encode a single chapter from the movie, using the same settings, without any problems. I'm not deinterlacing it since it's NTSC and "film" was above 95 percent in DVD2AVI.

Maze
19th February 2002, 18:16
I think I have narrowed the source of the problem down to a certain frame, at which the encoding always crashes. When checking that frame, from DVD2AVI, in the Gordian Knot preview window it seems to be a bit corrupt. I have tried to rip the DVD with both Smartripper and VStrip but it didn't make any difference. What can I do about this?

Maze
21st February 2002, 17:34
I solved it myself by changing the DVD from DMA to PIO. Might be somthing somebody would like to post in a FAQ or Q&A?

dragoman
22nd February 2002, 07:29
I'm not deinterlacing it since it's NTSC and "film" was above 95 percent in DVD2AVI.

Not to disagree with our illustrious guide-writers, but when using Gordianknot to encode from a DVD, even if dvd2avi tells me it's NTSC and over 95% film, I use "Forcefilm" anyway.

This makes sure that the movie is 23.97 fps and I have no interlacing problems.

Just my opinion, but it works....

dragoman

Maze
22nd February 2002, 09:41
I did use Force Film, bacause from what I understand it is when it's NTSC and over 95% FILM that you should use Force Film? Or have I completely misunderstood the guides?

manono
22nd February 2002, 15:04
Yes-you were correct to use Force Film, but you didn't say that originally. It's easy to see how dragoman got confused.

dragoman
22nd February 2002, 17:59
Whoops!!

I guess that

I did set the frame rate to 23 fps.

and

I'm not deinterlacing it since it's NTSC and "film" was above 95 percent in DVD2AVI.

means "I set it to ForceFilm in dvd2avi".

BTW, doing this means you are deinterlacing....by definition, a movie is interlaced if the framerate is increased from the original framerate (in this case, 23.97 fps (what they use in movie theatres, hence the term Film). They do it so that movies look right on North American TVs (NTSC format). To raise the format they add frames "laced" "between" (inter-laced) the existing frames to bring the framerate up.

So all you are doing by using "ForceFilm" is removing these extra frames...

Have I got it right, fellas??

dragoman

jggimi
22nd February 2002, 19:47
Have I got it right, fellas?? I don't think so. What you've got, instead, are extra frames.

"Interlace" is 1/2 the image in a frame, followed by the other 1/2 of the image in the next.

Crude ascii drawing of the 2 frames together. The "---" are the scan lines. "First" and "Second" would be the order in a simple interlacing:

First---------
--------- Second
First---------
--------- Second
First---------
--------- Second
First---------
--------- Second
First---------
--------- Second
First---------
--------- Second

dragoman
22nd February 2002, 23:44
What did I say?

To raise the format they add frames "laced" "between" (inter-laced) the existing frames to bring the framerate up.

Didn't I say what you did, albeit less technical and without a nifty diagram?

dragoman

jggimi
23rd February 2002, 09:57
I don't think so. I may be wrong, but an interlaced frame has only half the scan lines. Full frames are added. These are progressive images. My "nifty" diagram was of a single visual frame made frome 2 consecutive half-frames.

Perhaps we're just saying the same things, differently.

dragoman
23rd February 2002, 19:33
Basic idea we both have I think.....:)

Leave it at that...

dragoman