Back Forum Reply New

X264 encoding with VFW gets desynched

Hi,
i've encoded and avi with the latest buil of x264 on Virtualdub. I encode in .mkv but the audio in the output .mkv results desynched, more exactly results anticipated by various msecs.
What's the reason?

settings?

Same reason anything else gets desynched. You have the wrong framerate, didn't correct for a delay in the audio, or both. This has nothing to do with x264, which can only add a fraction of a second delay in a single encode (unless you're re-encoding from another x264 avi for some bizarre reason?).

what is format of audio mp3,aac something elese, if you use aac you should be get desynch and did you apply delay value.

@Sirber
These are the settings

@shon3i
The format is Ac3

@foxyshadis
I'm not a newbe, so please stop doing such useless posts... thanks.

If you have fps 23.976 then in min/max IDR interval put 24/240 becouse 23.976 is almost 24 not 23, but that is less important.Is in that ac3 filename show some delay 23ms or something like that, other optinos seem to be fine, and you can incrase litle ref frames, min 3.

Your a n00b if your using vfw with x264. anyway if your making a mkv using virtualdub mod it may not be compatible as the mkv libs it's using are outdated by a few years. you should be outputting to avi then merging using mkvtoolnix. also vdubmod doesn't output vfr very well.

@shon3i
No, the delay is more than 23ms. Ok i'll increase ref frames anyway.

@ChronoCross
Using VFW has nothing to do with noob, 'cause it's a my precise choice using Vdub, even because Megui crashes on my system when i try to input the .avs.
Anyway, i suspected it was a Vdub question regarding mkv and vfr. Even if i remux the resulting mkv with mkvtoolnix the results is (obviously) the same.
So apart from vdub (possibly outdated) and MeGui (that doesn't work on my system), what are other x264 GUIs available?

Anyway, i suspected it was a Vdub question regarding mkv and vfr.

if thats true then this is the wrong section to be posting in.

since you posted here i have to assume you atleast suspect it may be x264 related aswell. since you are using VFW the thread you should probably have posted to is this one if you think its a bug
showthread.php?t=108569

i will say though looking at your settings the first thing i would suggest is to change the max consecutive B frames to 1 and try again. or even 2 with use as reference unticked.

EDIT: i have reported this thread to bond so he can decide what should happen to it and where it should be.

2 guis.

also, 1 ref is not much. Get 8 or 12 with mixed refs

b-frame = 1 frame lag = 40 ms. b-pyramid = 2 frame lag = 80 ms. If this doesn't describe your symptoms then you screwed up elsewhere.

look at his settings and you see he has max B frames set to 4 and use as reference(b-pyramid) ticked aswell.

I saw, I'm just laying it out so he knows.

there are two possible reasons for desync:
1) if constant desync: wrong audio/video delay
2) if increasing desync: wrong video framerate

programs so i'll try then, thanks.

@dragongodz
I had the suspect first of x264 and as last chance of vdub, for this reason i posted here. Anyway atm i don't know for sure it's a vdub related question, 'cause i don't know other vfw apps to do comparison.

could you try with max b frames set to 1 anyway and see if that shows the same behaviour or not ?

Yes, i can do it. Vdub with bframe=1. Not exactly now, but as soon as.

Are you actually using vfr, with dedup or tdec mode 5, with fps set to the average fps? Or importing a vfr file with directshowsource without using convertfps? Those absolutely won't work in avi, and mkv in vdub is basically just avi wrapped in mkv (which can support vfr, but only without b-frames). Ripping to a raw stream or creating one from the start is basically the only way to fix it, and you'd still have to have the correct timecodes to do it.

However, if you aren't using dedup or tdec mode 5, or dss, vfr wouldn't have anything to do with it.

It's a simple avi with fixed frame rate, so i think it can be what you say
(which can support vfr, but only without b-frames)
I'll test vdub with no-bframe (1b frame) to see its behaviour.


Originally Posted by bondthere are two possible reasons for desync:
1) if constant desync: wrong audio/video delay
2) if increasing desync: wrong video framerate

lt;- so which one is the case for you?
¥
Back Forum Reply New