Log in

View Full Version : XviD Converted Movie Lags During PB With GKnot?


StainlessSteel
20th June 2004, 17:16
Hello everyone.

I'm quite new in converting DVDs to XviD and have a major problem with lagging videos, although the computer is strong enough (AMD Athlon XP 1700+ TBird, 1024 RAM) for smooth playback. I think the problem occures during the conversion process with GKnot, although I followed the
tutorial's instructions (http://www.doom9.org/gknot-main5.htm).

First, this strange phenomenon happens to me no matter if I use PAL DVDs or NTSC DVDs. Therefore I presume that I must do something essentially wrong during the conversion process.

Here's a list of the software I use:

XviD 1.0.1 Koepi's Build 05062004
AC3 Filter 0.70b
GordianKnot Rip Pack 0.30 alpha
GordianKnot Codec Pack 1.6 (partial installation)


This is what I do (PAL 25fps interlaced content):

1. Ripping (DVD Decrypter 3.2.2.0, IFO mode, default settings)


Smooth ripping process. Seems like there's nothing I could do wrong.


2. Creating a D2V project file (DGIndex 1.0.12)


I add the VOB file(s) and run the test. DGIndex says the content is PAL@25fps and interlaced (although the content does not show the typical horizontal line breaks I expected from interlaced videos). So I use the following settings to save the D2V project:

iDCT algo: 64bit floating point
field ops: nothing
audio normalization: 100%


3. Setting general output options (GordianKnot 0.30 alpha):

Opening the D2V file.
"Bitrate" tab: setting average video bitrate to 1000kbps and codec to XviD, adding audio file
"Resolution" tab: setting PAL/AR16:9, doing a little cropping, output res: 640x288 (W-Modul: 32, H-Modul:16), bits/px*frame says: 0.222


4. Saving AVS file

Resize filter: Lanczos
Noise filter: none
Field ops: Field deinterlace
Compressibility test: none (does not seem to influence the output at all)


5. Adding encoding job to GKnot

Multi Pass mode
audio (AC3) just gets muxed
XviD settings are exactly the same as mentioned in the previously mentioned XviD tutorial


That's it. And heck, again: The movie stutters sometimes (especially in scenes with fast motions), like some frames got dropped. The weird thing is that i did no Force Film frame adjustment or anything like that. So all frames should be encoded. Can anyone tell me what to do better?

Thanks,

StainlessSteel

killingspree
20th June 2004, 17:32
ok here's a couple of points, don't know for sure if they're directly connected to your problem: (some of them for sure are not)

ad 2) "audio normalization 100%" you won't need that since you are not decoding the audio... so this setting does at least have no effect, maybe it slows down the process a bit

what resolution is shown in dgindex? since you say it is interlaced, it is most likely 4:3 ar and not 16:9 which you are then using in gknot?!

ad 3) "resolution" - see above... you sure it's 16:9, if it really is, are you sure it's interlaced? have you tried encoding it without deinterlacing?

ad 4) "comp test" - this does not directly influence the encoding results, but it let's you judge how much bitrate the movie is gonna need to encode in a good quality!

StainlessSteel
20th June 2004, 18:11
Originally posted by killingspree
... what resolution is shown in dgindex? since you say it is interlaced, it is most likely 4:3 ar and not 16:9 which you are then using in gknot?!

ad 3) "resolution" - see above... you sure it's 16:9, if it really is, are you sure it's interlaced? have you tried encoding it without deinterlacing?
...


DGIndex says it's PAL with an AR of 16:9 at 25.000fps. The frame type is interlaced according to the tool. When I open up the VOB file in BSPlayer, the real aspect ratio seems to be letter box, which means it's 16:9 adjusted in a 4:3 resolution. But I crop the black parts before encoding, so this does not seem to influence the encoding procedure in a negative way.

A quick question about interlacing: Isn't interlacing simply a technique of frame refreshing by weaving frames into one? In which way is this related to the aspect ratio?

Thanks,

StainlessSteel

StainlessSteel
21st June 2004, 04:27
I gave it another try and encoded the movie twice: 1st one is without any cropping and with field deinterlacing. The 2nd one is without any cropping neither and without any deinterlacing. Both movies seem to lag sometimes. Any further hints would help. Thanks.

jggimi
21st June 2004, 05:53
What player are you using?

What is running in the background along with the player?

StainlessSteel
21st June 2004, 06:36
BSPlayer 1.00 build 808 RC1. In the back some CPU cycles get consumed by a virus scanner and a firewall. The funny thing is that other XviD movies run perfectly.

jggimi
21st June 2004, 07:19
I'm going to guess that your trouble is .ac3 muxing related. The VdubMod defaults (interleave of 1 frame and preload of 500ms) doesn't always work for everyone with .ac3.

One common recommendation is to remux manually with VdubMod and set the preload and interleave both to 96ms. Here are the steps: Start Vdubmod {Start ... (All) Programs ... Gordian Knot ... Apps ... VirtualDubMod}

Open your .avi file {File ... Open}

Set video to Direct Stream Copy {Video ... Direct stream copy}

Open audio streams list {Streams ... Streams list}

Right click on the audio track and select Interleaving

Set preload and interleave to 96ms

Save a new .avi file {File ... Save As}

manono
21st June 2004, 11:04
Hi-

Jggimi's advice should solve the problem. Do you have any .avis with MP3 audio? If so, I'll bet you don't see the problem there.

And if you don't see any interlacing lines when playing the.d2v in GKnot, or stepping through it frame-by-frame during motion scenes, then don't put on the deinterlacer. It can only degrade the video. There's a difference between encoding as Interlaced (which is what DVD2AVI reports), and it actually being Interlaced. There are very few Interlaced PAL movies.

StainlessSteel
21st June 2004, 18:58
Thanks a lot. I really appreciate your help. I'll give it another try with remuxed audio as 128kbps VBR MP3.
The hint about DVD content which isn't truly interlaced but stated as being interlaced clears the situation a bit. But what about RC1 DVDs?

I've got these very sweet official RC1 Animes. DGIndex says about one of my Animes that it's NTSC with an AR of 4:3 @ 29.970fps and flickers between Progressive and Interlaced while the video type is always like FILM 11% and NTSC something. I use Reverse Telesync on it, but the output video lags, too; even with MP3 audio content. What can I do?

I always use a video output around 1300kbps with a resolution of 640xsomething.

StainlessSteel
21st June 2004, 19:52
First pass results:
...
20:29:00: Started Xvid - First Pass: C:\XYZ\xyz.avs
20:46:17: Finished Xvid - First Pass: Duration: 17 minutes, 17 seconds.
20:46:17: Trying to open Log-file.
20:46:17: Success: Log-file open.
20:46:17: Encoded: 21874 Frames.
20:46:17: Speed: 21.091 Frames per Second.
20:46:17: New target size = 144839 Kb
...

21.091 fps? Does this mean that the frame refresh rate has been downcut? By the way, the encoded movie file xyz_Movie.avi (without sound remuxed) lags as well. It kinda looks like the same phenomenon of shooter games that lag because of weak comps...

killingspree
21st June 2004, 19:56
Originally posted by StainlessSteel
[b]
21.091 fps? Does this mean that the frame refresh rate has been downcut?

noooo... this is the encoding speed! nothing to do with the actual fps of your movie... !!

StainlessSteel
21st June 2004, 20:37
Haha. Ok, sorry, I mixed it up. But the problem still exists, even with MP3 audio. The no-sound xyz_Movie.avi file shows that it is a video encoding problem. But what do I do wrong?

jimmy basushi
23rd June 2004, 08:06
sheer curiousity, which filters is your player using when you open an xvid file? check both one that works well, and one that doesnt and tell us the difference, or if they are exactly the same..

olavitur
23rd June 2004, 08:56
Maybe the problem is caused by Field deinterlace. Have you tried any other deinterlacer-filters (eg. TomsMoComp)? If the lagging you experience is happening during fast sideway pannings then I'd suspect deinterlacer-filter.

StainlessSteel
23rd June 2004, 17:24
@olivatur: i experience the lag mostly when the movie switches from fast motion scenes to very slow ones. it also happens to PAL movies that i encoded without deinterlacing.

@jimmy basushi: i use bsplayer. could you explain to me how to find out what codecs it uses when playing a movie. i didn't manage to find a way.

manono
23rd June 2004, 18:22
Hi-

But the problem still exists, even with MP3 audio. The no-sound xyz_Movie.avi file shows that it is a video encoding problem.

You're saying that you get stuttering playback even with no audio present? The most CPU intensive scenes are pans and heavy motion, but it's easiest to notice the stuttering during a panning sequence (camera movement from left to right or right to left). So you're right, it's not an audio problem. Sounds as if it's a playback problem.

However, just to make sure-you're getting the audio from DVD2AVI and not from DVD Decrypter, aren't you? And you're accounting for the audio delay when muxing, aren't you?

So, BS Player shows the framerate. The PAL videos are all 25fps and the NTSC ones are 23.976fps, right? Let's try a different decoder. To see what you're using, right-click the video and go to Properties. It may say XviD MPEG-4 Video Decoder. If so, then try ffdshow. You can find it here:

http://athos.leffe.dnsalias.com/

And another thing you might try is disabling Packed Bitstream (if you are using it). It's been known to be responsible for choppy playback on some systems. You can disable it by opening VDubMod, and then going Video->Compression->XviD MPEG-4 Codec->Configure->Profile@Level->More, and uncheck the Packed Bitstream box.

That should keep you busy for awhile. :) Good Luck, and report back.

StainlessSteel
23rd June 2004, 23:28
Originally posted by manono
So, BS Player shows the framerate. The PAL videos are all 25fps and the NTSC ones are 23.976fps, right? Let's try a different decoder. To see what you're using, right-click the video and go to Properties. It may say XviD MPEG-4 Video Decoder.
...
Couldn't figure that out in BSPlayer, but in MS Windows Media Player it said Morgan Stream Switcher for audio and ffdshow for video. As ffdshow is supposed to enable special CPU instruction set usage it should even boost the decoding a little. So I guess, ffdshow is not a bottleneck in this case.
Originally posted by manono
And another thing you might try is disabling Packed Bitstream (if you are using it). It's been known to be responsible for choppy playback on some systems. You can disable it by opening VDubMod, and then going Video->Compression->XviD MPEG-4 Codec->Configure->Profile@Level->More, and uncheck the Packed Bitstream box.
...

I'm about to test it and report the results soon. To make sure: Do XviD settings for 1st Pass and 2nd Pass do have to be equal, so I have to deselect Packed Bitstream in both parts, 1st and 2nd Pass? (Sorry for the stupid question, but I guess there's a good reason, why same options for different Pass steps can be set differently.)

StainlessSteel
24th June 2004, 00:19
OMG, it's working. Disabling "Packed Bitstream" was the solution. Thanks, manono. It seems to be an advanced feature though. Is there a container format which doesn't cause troubles with PB?

manono
24th June 2004, 10:15
Hi-

Whew! That did it? Good. Packed Bitstream is a default setting that shouldn't be default, in my opinion. I would even go so far as to say that it shouldn't be there at all, as it causes problems with some standalones, as well as on some computers. I don't know the reasons for this, but I've never used it, and you certainly don't need it. And I'm not the one to ask about other containers. I don't know anything about them, and don't use them, as my standalone doesn't support them.

You did very well at the beginning by outlining in detail the steps you used for making your .avi. The default audio muxing settings of VDubMod can also produce symptoms similar to the Packed Bitstream ones. So that's why I (and maybe jggimi) was focused on the AC3 being the problem. But when you said it happened with all the videos you were encoding, that's when I started looking for another cause.

If I remember correctly, older versions of ffdshow were responsible for stuttering/jerky playback when using Packed Bitstream, but newer versions don't have the problem. So you might go to that link I provided and make sure your ffdshow is up to date. If you got it from the Doom9 Downloads page, then his is a very old version.

If you still have the problem with the Packed Bitstream encodes you've made, you might try and disable ffdshow decoding for XviD and let the XviD Decoder take over to see if the problem goes away.