Log in

View Full Version : AVI two times to big after using Gknot


JeeWee
11th December 2003, 19:31
For my KiSS player I want to recode a DiVX3 movie into XviD. For this I try to use GKnot 0.28.7.

I follow the guide for XviD encoding on Gknot and used the settings in this guide. I use the AVI as input and set a target size of 700MB. Compressibility test runs fine.

If I then encode the movie I get an AVI file of around 1600MB. Two times the size i have set.

Does anyone have an idea.

Regards,
Jurgen

jggimi
11th December 2003, 20:13
Hello, JeeWee, welcome to Doom9's forum!

:logfile: It can help us determine if there was a procedural or setting error of some kind. You'll find it in your working directory under the name <move-name>_Gknot.log.

Thanks!

Soulhunter
11th December 2003, 20:14
Uhm... Where is your GK Log-file ??? ;)

PS: Did you compress the audio ??? :rolleyes:

[EDIT: Ohw... jggimi, you are fast !!!]

Bye

JeeWee
12th December 2003, 20:45
Originally posted by Soulhunter
Uhm... Where is your GK Log-file ??? ;)


The requested size is 577536. The actual size after encoding is 1610376kb????

The log file is here:

12-12-2003 17:48:58: Job " 1" started.

o Xvid - First Pass: D:\Stuff\Films\The Holy Grail\Monty Python - The Holy Grail - XviD.avs
o Xvid - Second Pass: D:\Stuff\Films\The Holy Grail\Monty Python - The Holy Grail - XviD.avs
x Mux Audio (disabled).
End of Job 1 ( 1).
_______________________________________________________________________________________________________________________

Gordian Knot -
Encoding Job Data:

Type: EncXvid_All
Number: 1
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: D:\Stuff\Films\The Holy Grail\Monty Python - The Holy Grail - XviD.avi
AviMovie: D:\Stuff\Films\The Holy Grail\Monty Python - The Holy Grail - XviD_Movie.avi
AviCredits: D:\Stuff\Films\The Holy Grail\Monty Python - The Holy Grail - XviD_Credits.avi
MovieFS: D:\Stuff\Films\The Holy Grail\Monty Python - The Holy Grail - XviD.avs
CreditsFS:
Log : D:\Stuff\Films\The Holy Grail\Monty Python - The Holy Grail - XviD.log
Stats: D:\Stuff\Films\The Holy Grail\Monty Python - The Holy Grail - XviD.stats
Ecf : D:\Stuff\Films\The Holy Grail\Monty Python - The Holy Grail - XviD.ecf

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

Calculator:
VideoSize: 577536 kbyte.
Audio1Size: 0 kbyte.
Audio2Size: 0 kbyte.
Overhead: 0 kbyte.
AviSize: 577536 kbyte (564 mbyte).
FilesSize: 0 kbyte.
TotalSize: 577536 kbyte (564 mbyte).
Interleaving:
Bitrate: 861 k(=1000)Bits/s
Frames: 131776
FPS: 24.000
Duration: 131:31
Quality: 0.243 bits/(pixel*frame).
CompCheck3: 0.000 bits/(pixel*frame).
CompCheck5: 0.406 bits/(pixel*frame).
Resolution: 512 x 288

Audio 1:
none.

Audio 2:
none.


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

// $job "Xvid - First Pass"
// $input "D:\Stuff\Films\The Holy Grail\Monty Python - The Holy Grail - XviD.avs"
// $output "D:\Stuff\Films\The Holy Grail\Monty Python - The Holy Grail - XviD.avi"
// $state 0
// $start_time 0 0
// $end_time 0 0
// $script

VirtualDub.Open("D:\\Stuff\\Films\\The Holy Grail\\Monty Python - The Holy Grail - XviD.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,"AwAAAKC7DQCQsggARDpcU3R1ZmZcRmlsbXNcVGhlIEhvbHkgR3JhaWxcTW9udHkgUHl0aG9uIC0gVGhlIEhvbHkgR3JhaWwgLSBYdmlELnN0YXRzAAB5AHQAaABvAG4AIAAtACAAVABoAGUAIABIAG8AbAB5ACAARwByA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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAABAnAAAQJwAAAAAAAAAAAAAAAAAAAAAAAAAAAAD3AAAAAAAAAAAAAAA=");
VirtualDub.video.filters.Clear();
VirtualDub.subset.Delete();
VirtualDub.SaveAVI("D:\\Stuff\\Films\\The Holy Grail\\Monty Python - The Holy Grail - XviD.avi");
VirtualDub.Close();

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

17:48:58: Started Xvid - First Pass: D:\Stuff\Films\The Holy Grail\Monty Python - The Holy Grail - XviD.avs
19:07:57: Finished Xvid - First Pass: Duration: 1 hour, 18 minutes, 59 seconds.
19:07:57: Trying to open Log-file.
19:07:57: Success: Log-file open.
19:07:57: Encoded: 131776 Frames.
19:07:57: Speed: 27.804 Frames per Second.
19:07:58: New target size = 577536 Kb

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

// $job "Xvid - Second Pass"
// $input "D:\Stuff\Films\The Holy Grail\Monty Python - The Holy Grail - XviD.avs"
// $output "D:\Stuff\Films\The Holy Grail\Monty Python - The Holy Grail - XviD.avi"
// $state 0
// $start_time 0 0
// $end_time 0 0
// $script

VirtualDub.Open("D:\\Stuff\\Films\\The Holy Grail\\Monty Python - The Holy Grail - XviD.avs",0,0);
VirtualDub.video.SetDepth(24,24);
VirtualDub.video.SetMode(1);
VirtualDub.video.SetFrameRate(0,1);
VirtualDub.video.SetIVTC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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAXHZpZGVvZ2suc3RhdHMAAC4AcwB0AGEAdABzAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAABAnAAAQJwAAAAAAAAAAAAAAAAAAAAAAAAAAAAD3AAAAAAAAAAAAAAA=");
VirtualDub.video.filters.Clear();
VirtualDub.subset.Delete();
VirtualDub.SaveAVI("D:\\Stuff\\Films\\The Holy Grail\\Monty Python - The Holy Grail - XviD.avi");
VirtualDub.Close();

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

19:07:58: Started Xvid - Second Pass: D:\Stuff\Films\The Holy Grail\Monty Python - The Holy Grail - XviD.avs
20:28:17: Finished Xvid - Second Pass: Duration: 1 hour, 20 minutes, 18 seconds.
20:28:17: Speed: 27.347 Frames per Second.

20:28:17: Done.
20:28:17: Movie = D:\Stuff\Films\The Holy Grail\Monty Python - The Holy Grail - XviD.avi
Total Encoding Time: 2 hours, 39 minutes, 18 seconds.
12-12-2003 20:28:17: Job " 1" finished.
_______________________________________________________________________________________________________________________

jggimi
12th December 2003, 23:30
What I see in the log shows that only that you have not selected any audio, nor do you have any AVI frame overhead.

It looks like you are using "Calculate Average Bitrate" mode, and selected selected 564MB as your file size. (Had you selected "Calculate AVI File Size" mode and 861kbps, you would have a slightly different file size.)

Unless someone who can read the API information passed to VirtualDub sees something there untoward, then this looks like this was not a Gknot error, but something in the XviD encoding. Unfortunately, I can't read the information passed to VdbuMod in the API.

If you open your XviD AVI with [url=http://www.doom9.org/Soft21/Editing/gspot221.exe]GSpot[/url,, what does it tell you about the codec, bitrate, and resolution of the resulting file?

And, just in case there's something of interest in the .avs script, could you also post it here for us to look at? You can eliminate all of the comment lines that begin with the "#" character to make it easier to read.

JeeWee
13th December 2003, 13:15
What I see in the log shows that only that you have not selected any audio, nor do you have any AVI frame overhead.Correct. I used a Divx3 encoded file with audio as input file.It looks like you are using "Calculate Average Bitrate" mode, and selected selected 564MB as your file size.That is correct
If you open your XviD AVI with [url=http://www.doom9.org/Soft21/Editing/gspot221.exe]GSpot[/url,, what does it tell you about the codec, bitrate, and resolution of the resulting file?Codec: 4CC=xvid, Name=XviD
bitrate=860kb/s, resolution=512x268
Audio Codec Name=PCM Audio
Audio Bitrate=1536kb/s
And, just in case there's something of interest in the .avs script, could you also post it here for us to look at? You can eliminate all of the comment lines that begin with the "#" character to make it easier to read.avs-file:
LoadPlugin("C:\PROGRA~1\GORDIA~1\mpeg2dec3.dll")
LoadPlugin("C:\PROGRA~1\GORDIA~1\undot.dll")
avisource("D:\Stuff\Films\The Holy Grail\Monty Python - The Holy Grail.avi")
crop(0,0,720,416)
LanczosResize(512,288)
Undot()

I hope you can tell from these files what I am doing wrong.

Tuning
13th December 2003, 15:01
Originally posted by JeeWee
bitrate=860kb/s, resolution=512x268
Audio Codec Name=PCM Audio
Audio Bitrate=1536kb

Here the problem lies. The problem is due to selecting fullprocessing mode in VirtualDubMode. That is, you might have selected in streams list -> audio streams -> full compression. This in default uses uncompressed wav as sound, increasing your final avi size.:)

Soulhunter
14th December 2003, 13:18
As I said before...
PS: Did you compress the audio ??? :rolleyes:
Bye

JeeWee
14th December 2003, 14:04
Originally posted by Tuning
Here the problem lies. The problem is due to selecting fullprocessing mode in VirtualDubMode. That is, you might have selected in streams list -> audio streams -> full compression. This in default uses uncompressed wav as sound, increasing your final avi size.:)

Well, I did not use VirtualDub. I used Gknot. I used an AVI file with audio as input file. How can I prevent that Gknot will include the PCM encoded audio. It should use MP3 encoded audio.

Tuning
14th December 2003, 14:42
Sorry JeeWee, exact solution is unknown to me bcoz, i never allow GK to mux audio automatically and i had never done avi -> avi encoding with GK.

One solution is to de-mux mp3 from original avi. Then mux the same file again to new avi using VirtualDubMod.

Hope that helps..

jggimi
14th December 2003, 15:11
It seems that the audio was included in the AviSynth frameserving process, and AviSynth produces uncompressed video (and audio). Run GSpot again, this time on your original DivX3 source, and let us know what it says about audio codecs.

You can stop the audio from being included in the .avs script by adding the lineKillAudio()to the script (press the Edit button before pressing Save&Encode in the Save AVS window).

If you demux the soundtrack from the source avi, you can then use that soundtrack file in Gknot to calculate proper overheads. Select the file in the Audio A box on the Bitrate tab, select the proper overheads, and then, in the Audio 1 tab when you Save&Encode, selet the file and "just mux."

JeeWee
14th December 2003, 16:14
Originally posted by jggimi
It seems that the audio was included in the AviSynth frameserving process, and AviSynth produces uncompressed video (and audio). Run GSpot again, this time on your original DivX3 source, and let us know what it says about audio codecs.
The audio in this file is 160kb/s CBR MP3.

jggimi
14th December 2003, 17:44
I found this at www.avisynth.org:...From v2.04 up there is built-in support for ACM (Audio Compression Manager) audio (e.g. mp3-AVIs).And since you are using AVI as your source, AviSynth is picking up the MP3 audio track and frameserving uncompressed audio to VdubMod. I recommend you either start with a video only .avi source or use KillAudio(), and follow my prior recommendation for encoding and muxing the audio when in Gknot.

JeeWee
14th December 2003, 19:04
Originally posted by jggimi
I recommend you either start with a video only .avi source or use KillAudio(), and follow my prior recommendation for encoding and muxing the audio when in Gknot.

I have demuxed the audio from the AVI file using VirtualDub. I then used Gknot and changed the AVS script to include KillAudio(). Encoding now works fine and I obtain the exact size i set on the bitrate page.

It seems my problem is solved. Many thanks for all the help.

jggimi
14th December 2003, 21:03
You're welcome! Thank you for letting us know the problem is solved.:goodpost: