Log in

View Full Version : Can't solve Bframe Lag Problem


Big2hd
29th February 2004, 08:18
Hi all, first of i know that this issue has been brought more than ounce(load xvid movie source into vdubmod and gives error message nothing to output bframe decoder lag) but all the answers seem not to work I tried:

-changing fourcc used in encoder options from xvid to divx or div50
-enabling bov-p and packed bitstream
-get rid of 2 first frames(actually got that somewhere else but figure I mention it before some1 else did) and save as avi.

Did i miss any cause i'm clueless at this point :( I was thinking maybe installing ffdshow?

Oh yeah I'm using tha newest version (xvid rc3) of xvid

Thx in advance

gircobain
29th February 2004, 08:33
I don't think the bframe decoder lag is an issue per se
You only see that when loading the file into virtualdub
Forward a few frames and it is gone
There is no problem if you just ignore it

Big2hd
29th February 2004, 09:15
lol i love more than anything to ignore it but I'm trying to convert movie source using a program(DIKO) from avi-->skvcd and I beleive when problem is solved I be able to encode.

gircobain
29th February 2004, 09:55
The easiest way to get rid of it is disabling bframes :rolleyes:

celtic_druid
29th February 2004, 10:13
Well if you are trying to convert an existing file then I can't see why you would be playing around with the encoding options. That would only make a difference if you were converting to an AVI not from one.

Simplest way to solve your problem is trim(1,0)

Big2hd
29th February 2004, 18:37
The easiest way to get rid of it is disabling bframes

Simplest way to solve your problem is trim(1,0)

Thx Sounds good but how would I go about doing either one?(i looked in xvid options to disable bframes and I'm still not quite sure what trim (1,0) means.)

bond
29th February 2004, 18:50
Originally posted by Big2hd
-enabling bov-p and packed bitstreamnormally you shouldnt get the b-frame decoder lag with packed bitstream enabled

crusty
29th February 2004, 22:29
Sounds good but how would I go about doing either one?(i looked in xvid options to disable bframes and I'm still not quite sure what trim (1,0) means.)
Disable B-frames by pushing the 'more' button next to the profile@level setting, and then go to B-VOPS. IIRC, you can either untick B-VOPs or set the max consecutive B-VOPs to 0.

trim(1,0) is a setting in your avisynth script. It removes the first frame of your clip.

But the B-frame lag message is just that, a message. I've never experienced any problem because of it.
If you really want to get rid of it, make sure 'packed bitstream' is enabled in the [profile]-->more-->[profile] tab. (be warned that this might cause problems playing the files on some standalone hardware players)

citronym
1st March 2004, 07:30
IIRC, encoding with bframes creates a 1 frame lag, so vdub simply has nothing to show for the first frame. Advance to the second frame, and the message will be gone. It is certainly isnt an "error" message.

pc

celtic_druid
1st March 2004, 12:28
As I said the XviD encoding options don't matter unless you are actually encoding a file. Now if you were encoding using XviD and enabled packed bitstream then you wouldn't be seeing the message. But from what you have said you have an already encoded AVI which obviously had packed bitstream disabled.

Like I said when converting simply use trim(1,0) to get rid of it and in future if you want bframes, then have packed bitstream enabled when encoding if you don't want to see the message again.

Matthew
5th March 2004, 03:16
Perhaps it's better to retain the number of frames, for audio sync purposes.

A=AVISource("H:\act2\act2.avi").Trim(1,1)
B=AVISource("H:\act2\act2.avi").Trim(1,0)
unalignedsplice(A,B)

Should do the trick. It replaces the error message (frame 0) with frame 1.

zeiss
8th May 2004, 03:56
2+ months later...

one reason this message *can* matter (a little) is because if you convert the avi, say, to mpeg, then the bad frame is exported too. if you are converting the avi to dvd, say, the menu image for the first chapter on the DVD (autoset for the first frame of the film)will be a big warning message, which looks a little tacky.

also, i tried cutting the film at various keyframes in vdub, and whereever i cut it, i got the same message. does this mean the lag is propagated throughout the film, as citronym might be saying, or that i just coincidentally picked sucky places to cut?

if i encoded it to mpeg, and then cut the first frame, i seemed to be fine.

(i'm clearly new to detailed encoding, sorry if this message is a little unsophisticated).

manono
8th May 2004, 09:56
Hi-

If you're using an .avs to frameserve into your MPEG-2 encoder (CCE?), then I think that Matthew had the right idea about replacing that B-Frame Decoder Lag frame with the next frame. That way you keep the same number of frames without having to worry about audio asynch, which you'd have if you trimmed off the first frame. But I also think there's an easier way to do it. Just add:

FreezeFrame(0,1,1)

to the end of your script. That'll replace the first frame with the second frame. And if the video begins with some black frames, no one will ever know the difference. Even if it doesn't, the first 2 frames will be the same-no big deal.

And if you're not using an AviSynth script to frameserve into your encoder, well, you should. DVD2SVCD is a good program to use to do all this easily. There's an AVI2SVCD (or DVD) section to it. Just make sure you set it to show you the .avs before the encoding begins, so you can add that line to it.

Here's some information on FreezeFrame (http://www.avisynth.org/index.php?page=FreezeFrame).
And here's Doom9's guide for AVI2SVCD/DVD (http://www.doom9.org/mpg/dvd2svcd-avi.htm).

zenon222
18th January 2005, 17:52
is it possible to fix this 1st frame problem w/o re-encoding the whole m2v from avi when making a DVD?

also how should i re-synch the audio specifically when converting from 25->23fps? i find the audio is always slightly 'not perfectly synched' even after stretching it... i tried adding a 10ms delay to compensate for the 1st frame error message which seemed to help, but i still don't think its 'perfect'.

I'm using d2s and added this to my avisynth script:
TextSub("D:\DVDRIP~1\disc1.ssa")
BilinearResize(720,480)
AssumeFPS(23.976)

sorry for this slightly turning into an audio question, but if i add FreezeFrame(0,1,1) and re-encode again i want to make sure everything will finally be 'perfect'. i also read somewhere here about suppressing all b-frames or something like that to help audio synch probs??:confused:

TIA.

Bogalvator
19th January 2005, 03:38
Turning on "Packed bitstream" will solve your B-frame issue. Not sure if it can solved without a re-encode.

Please explain in more detail how you are adjusting the audio (i.e. program used and parameters etc)

Note that I never heard of or experienced any audio sync issues when using b-frames........

zenon222
19th January 2005, 04:25
I was using AC3 machine, but now I have soft encode so from here on out I'll be using besweet GUI to convert and stretch the ac3 file into 6 wav's (25->23.976) and then encode back to ac3 with soft encode.

what's the avisynth command to turn on "Packed bitstream"?

I am currently re-encoding the video and the FreezeFrame(0,1,1) command worked like a champ! was i correct in assuming that the 1st frame is 'added' (new movie is 1 frame longer than original) or does it just 'contain the wrong data'? ie:the frame just has an error message rather than the frame of video it should have

btw after this i then enable the pulldown and drop frame flags on the video with pulldown.exe to get 29fps

Leak
19th January 2005, 08:44
Originally posted by zenon222
what's the avisynth command to turn on "Packed bitstream"?

None. It's an option in XviD's config dialog.