View Full Version : Encoding 900 MB AVIs causing last 200 MBs to be low bitrate


Rooster6975
15th December 2003, 13:55
Hello,

I have been encoding for a long time. I just recently bought a DVD burner and decided to make my AVIs 860 MBs instead of 700 as I had done for years. That way I can fit 5 movies perfectly to a DVD-R without wasting any space, and I can get a better bitrate since I will have an additional 160 MBs for video (audio won't change).

I first changed the CD size to make it 860, and then changed the Total File Size to make it 860 as well. I ripped out the audio and it came to 166 MBs so I had a good 700 left for video. I used the d2v file I had created with DVD2AVI, and started to encode. My average bitrate was calculated by GKnot at 740 KB/sec and the Bits/Pixel*Frame was a healthy .222. I selected XVID as my codec, left all options blank for a 2-pass encode, and let 'er rip.

The movie is 1:58. It's black and white 4/3. The first 1h37mins look exactly like they do on the DVD. The last 20 minutes look terrible, the audio is still perfectly synched but the video is incredibly low bitrate. There are huge squares of pixels. It looks like what movies used to look like when I downloaded a few back in 1998. The funny thing is, this is the second of my DVDs I have tried to encode to this extra length. The first one, a recent movie with an AC3 soundtrack, suffered exactly the same problem. And these are the settings I have used to create many 705 MBs AVIs and they all worked perfectly. My best guess is that once GKnot gets over a standard CD size, it loses track or something.

I could probably end up with a good rip if I selected 2 CD, made the size 650 and then joined them, but the whole object is to fit 5 movies on one 4.3 GB DVD-R.

Anyone know what I am doing wrong?

GKnot 28.5
Xvid codec
XP SP1
512 MB RAM
1.4 Athlon

Thanks,
R.

RexManning
15th December 2003, 14:08
Originally posted by Rooster6975
My best guess is that once GKnot gets over a standard CD size, it loses track or something.
Don't think so. I use GKnot to make XviDs that are 2 GB or even larger without any problems whatsoever.

regards,
-rex

Rooster6975
15th December 2003, 18:04
I tried it again. I ripped the DVD with DVD2AVI to remake the AVS and D2V files. Redid the whole process and changed the total size to be 800 MBs. This time I set the CD size to be 800 from the drop-down list, and then clicked the one-CD button.

The Bits/Pixel*Frame was .221. After 3h17mins, it finished and once again, I was left with a perfect 3/4 of a movie, followed by a terrible last 20 minutes.

Any ideas?

Koepi
15th December 2003, 18:12
Seems to me that this is just another GKnot issue.

Setup xvid manually and check for the credits beginning - maybe it's the wrong frame... or did you simply forget you once enabled credits handling in GKnot and missed to turn it off again or to adopt it?

Regards
Koepi

Rooster6975
15th December 2003, 18:59
But I didn't think that was an option for XVID. When I look at the GKnot options page, it shows 1st Pass, 2nd Pass, and Credits for DivX, but only 1st pass and 2nd pass for xvid.

How can I check for Credits beginning, or for that matter, for Credits processing in GKnot? In my output log, I don't see any credits processing :

15/12/2003 9:18:01 AM: Job "Arsenic" started.

o Xvid - First Pass: G:\OUT1\Arsenic.avs
o Xvid - Second Pass: G:\OUT1\Arsenic.avs
o Mux Audio.
End of Job 2 (Arsenic).
_______________________________________________________________________________________________________________________

Gordian Knot -
Encoding Job Data:

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

Files:
VirtualDubModExe: g:\GordianKnot\VirtualDubMod\VirtualDubMod.exe
NandubExe: g:\GordianKnot\nandub\Nandub.exe
AviFinal: G:\OUT1\Arsenic_1.avi
AviMovie: G:\OUT1\Arsenic_1_Movie.avi
AviCredits: G:\OUT1\Arsenic_1_Credits.avi
MovieFS: G:\OUT1\Arsenic.avs
CreditsFS:
Log : G:\OUT1\Arsenic_1.log
Stats: G:\OUT1\Arsenic_1.stats
Ecf : G:\OUT1\Arsenic_1.ecf

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

Calculator:
VideoSize: 738003 kbyte.
Audio1Size: 166372 kbyte.
Audio2Size: 0 kbyte.
Overhead: 8058 kbyte.
AviSize: 912433 kbyte (891 mbyte).
FilesSize: 0 kbyte.
TotalSize: 912433 kbyte (891 mbyte).
Interleaving: 1stream
Bitrate: 848 k(=1000)Bits/s
Frames: 170960
FPS: 23.976
Duration: 158:50
Quality: 0.209 bits/(pixel*frame).
CompCheck3: 0.000 bits/(pixel*frame).
CompCheck5: 0.000 bits/(pixel*frame).
Resolution: 480 x 352

Audio 1:
Mode: Just Mux Source File.
SourceFile: G:\OUT1\Arsenic AC3 T01 1_0ch 192Kbps DELAY -83ms.ac3
WavFile: G:\OUT1\Arsenic AC3 T01 1_0ch 192Kbps DELAY -83ms.wav
Mp3File: G:\OUT1\Arsenic AC3 T01 1_0ch 192Kbps DELAY -83ms.mp3
Azid:
Lame:
Delay: -83
Interval: 1
Preload: 500
Mux: 1
Recalc: 1
DeleteWav: 1

Audio 2:
none.

9:18:01 AM: Audio 1, determined: 166372 kb
9:18:01 AM: Audio 1, calc: 166372 kb
9:18:01 AM: New Bitrate for Movie = 848 k(=1000)Bits/s

Adding this script to g:\GordianKnot\VirtualDubMod\LastJob.vcf :

// $job "Xvid - First Pass"
// $input "G:\OUT1\Arsenic.avs"
// $output "G:\OUT1\Arsenic_1_Movie.avi"
// $state 0
// $start_time 0 0
// $end_time 0 0
// $script

VirtualDub.Open("G:\\OUT1\\Arsenic.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.filters.Clear();
VirtualDub.subset.Delete();
VirtualDub.SaveAVI("G:\\OUT1\\Arsenic_1_Movie.avi");
VirtualDub.Close();

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

9:18:02 AM: Started Xvid - First Pass: G:\OUT1\Arsenic.avs
10:59:33 AM: Finished Xvid - First Pass: Duration: 1 hour, 41 minutes, 30 seconds.
10:59:33 AM: Trying to open Log-file.
10:59:33 AM: Success: Log-file open.
10:59:33 AM: Encoded: 170960 Frames.
10:59:33 AM: Speed: 28.068 Frames per Second.
10:59:34 AM: New target size = 738003 Kb

Adding this script to g:\GordianKnot\VirtualDubMod\LastJob.vcf :

// $job "Xvid - Second Pass"
// $input "G:\OUT1\Arsenic.avs"
// $output "G:\OUT1\Arsenic_1_Movie.avi"
// $state 0
// $start_time 0 0
// $end_time 0 0
// $script

VirtualDub.Open("G:\\OUT1\\Arsenic.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.filters.Clear();
VirtualDub.subset.Delete();
VirtualDub.SaveAVI("G:\\OUT1\\Arsenic_1_Movie.avi");
VirtualDub.Close();

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

10:59:34 AM: Started Xvid - Second Pass: G:\OUT1\Arsenic.avs
12:44:13 PM: Finished Xvid - Second Pass: Duration: 1 hour, 44 minutes, 38 seconds.
12:44:13 PM: Speed: 27.230 Frames per Second.

Adding this script to g:\GordianKnot\VirtualDubMod\LastJob.vcf :

// $job "DivX5 Append"
// $input "G:\OUT1\Arsenic_1_Movie.avi"
// $output "G:\OUT1\Arsenic_1.avi"
// $state 0
// $start_time 0 0
// $end_time 0 0
// $script

VirtualDub.Open("G:\\OUT1\\Arsenic_1_Movie.avi",0,0);
VirtualDub.RemoveInputStreams();
VirtualDub.stream[0].SetSource("G:\\OUT1\\Arsenic AC3 T01 1_0ch 192Kbps DELAY -83ms.ac3",0x00000203,0);
VirtualDub.stream[0].SetMode(0);
VirtualDub.stream[0].SetInterleave(1,500,1,0,-83);
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("G:\\OUT1\\Arsenic_1.avi");
VirtualDub.Close();

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

12:44:13 PM: Started Muxing Audio.: G:\OUT1\Arsenic_1_Movie.avi
12:48:00 PM: Finished Muxing Audio.: Duration: 3 minutes, 46 seconds.

12:48:00 PM: Done.
12:48:00 PM: Movie = G:\OUT1\Arsenic_1.avi
Total Encoding Time: 3 hours, 29 minutes, 59 seconds.
15/12/2003 12:48:00 PM: Job "Arsenic" finished.
_______________________________________________________________________________________________________________________

Koepi
15th December 2003, 19:09
Options:
Quality/DRF: 0
CreditsStart: 139895

^there you are. Your movie has something about 170000 frames, your credits start around 140000. 30000 frames are ~20 minutes....

Regards
Koepi

Rooster6975
15th December 2003, 21:18
I had a look at the XVID advanced options. In the credits section, nothing is selected. How do I deselect the endpoint for credits?

Thanks,
R.

Koepi
15th December 2003, 21:21
It seems that GKnot does the setup for you. Enter the correct credits start frame in gknot and you should be done.

Koepi

The People's Elbow
15th December 2003, 22:36
by the way: if you really want to make full use of dvd+/-r then you should increase the filesize to about 896MB, since both media have capacity for at least 4480MB.

Rooster6975
15th December 2003, 22:48
In this case, I will just set the start_credit encoding at the end of the film (very last frame), but it seems to make more sense to just turn it off altogether. Can I do that? One thing I have noticed, if I use XVID then I do not get the third button that I get with DivX. For DivX, I can see 1st Pass, 2nd Pass, and Credits. For XVID, I don't have the third button. And once I get to the Trim options (after clicking on Save and Encode), with DIVX, I get No Trim, Movie Only, Credits Only, Movie and Credits. With XVID, I only see No Trim or Movie Only. That's it, the other options are not presented. Are credit encoding at a different bitrate supported by XVID encoding?

So the question is, how do I turn off credit processing? I just want it to encode the entire movie (including the credits) using the same settings. That will avoid this problem in the future.

Also, to The People's Elbow (interesting handle), I can burn up to 4.3 GB (4400 MBs), so I try to make my encodings 850 MBs each. Then I can fit 5 AVIs onto a single DVD-R (4250 MBs), which leaves 150 MBs for movies that go slightly over, and for the menu program that I use (which includes buttons to install codecs and player software). I find the extra 150 MBs per movie (over the usual 700 MBs) really helps remove the last of the pixelation (or at least I did before I ran into this credits problem). :-)

R.

AgeOfPanic
15th December 2003, 23:20
My advice would be to reset Gknot and enter your settings from scratch. Don't select "Set credits start" or enter the correct frame. The fact that in Gknot there isn't an extra button for credits with Xvid is because it is build in to the codec, whereas with Divx you have to do the credits in a seperate proces and then appending them to the movie afterwards. No problem there.
Just reset Gknot and enter your settings from scratch.

Rooster6975
15th December 2003, 23:33
Thanks, should have thought of that. I just clicked on the reset button and loaded the default values for my encode. Theoretically, that should remove the "stuck" frame at which to encode the credits (even though I don't want to encode credits).

Let you know tomorrow............Thanks,
R.

Rooster6975
16th December 2003, 14:32
Hmmmm, this normally takes 3h 25mins on my 1.4 Athlon. I did find Koepi's guide in the meantime (the PDF file) and enabled some advanced features I wouldn't have ordinarily. For instance, since my movie was b&w, I enabled greyscale. I also turned VHQ mode to 4. the first pass alone took 5h 52min. Is this normal? I just want to know if the VHQ setting is what has quadrupled the normal encode time.

Thanks,
R.

Tommy Carrot
16th December 2003, 17:11
Originally posted by Rooster6975
I just want to know if the VHQ setting is what has quadrupled the normal encode time.


Yes.

Rooster6975
16th December 2003, 20:59
Quality is pretty good, but very difficult to see if the use of VHQ set to 4 was worth the extra 10 hours of processing. There still seems to be very faint fuzziness around each character. It isn't enough to be annoying, I am just a little surprised as I had hoped the extra 10 hours would remove that. It also could be because it's in 4/3 therefore there are a lot more pixels already per frame than had it been 16/9......

It's good enough to keep, but I think I will set VHQ down to 1 for the next one and see how long it takes. If I can take it down to less than 8 hours, it will finish by the time I get up in the morning. Without any really noticable gain, I don't really see the point.

The movied is 1h 58min 50 secs, B&W, 4/3. Bitrate is reported by Gspot as 850 KB/sec, 23.97 FPS, Qf .188 bits/pixel, dimensions are 512*368. AC3 1 channel 192 MHz sound, size of the movie is 891 MBs (912,622 KB).

Opinions on the use of VHQ set to 4 ?

Thanks,
R.

Koepi
16th December 2003, 21:30
So your crdits issues are solved now?

regards
Koepi

Rooster6975
16th December 2003, 23:12
I had to hit reset, which reset everything. Then go through Koepi's guide (yours!) to set everything up the way I wanted again. Seems like a bit much just to not have GKnot process credits. On a previous encode, I had set the credits, and it kept the frame in a config file. Then when I ran a totally new D2V project, even though I did not specifically request credit processing, it used that same frame number which happened to be 3/4 of the way through the movie. Quality went to pot. There was no button to remove credit processing. I could either reset it at the actual credits, or click reset and have every setting back to default. Too bad, because what I wanted was simply the whole film done with the same settings, including the credits. Once I get it all set up exactly the way I like it, I don't want to have to redo it every time just to remove the frame stored at which it thinks the credits start.

R.

powerslave
19th December 2003, 22:46
When you open the d2v in gnot, move the frame thingy all the way to the end then hit start credit encoding and thats it. Its the same as resetting except you dont reset all of gknot. ALL your doing is telling gordian knot and xvid to start credit encoding on the last frame which is essentially the same as turning it off. That way you dont have to reset and redo all your gknot values. You have to remember to do this though because gknot remembers your previous values for each project unless your starting with a new project in which case it uses default values.