PDA

View Full Version : x264 - audio delay?


SirCanealot
28th May 2005, 02:15
Hi, all.

I'm currently encoding something from miniDV to x264, blah-blah, blah, blah.

Basically, I'm wondering what I shoul do about the audio delay that x264 leaves you with when encoding via VirtualDub(mod) when using B-Frames. The problem isn't too bad if you only use one B-Frame, but it becomes quite bad at 2-3.

I figured I could delay the audio in VirtualDub, but I couldn't work out what the exact values should be (no maths skills! :D).

Or is there a better way of getting rid of the audio delay these days?

There MUST be a simple solution - I mean, lots of people use H.264.

If audio delay is the best thing to do, would someone mind telling me what values I should punch into VirtualDub per B-Frame when running at 24 and 30fps?

Thanks, all~

ChronoCross
28th May 2005, 03:07
remember that x264 takes more system power to decode. what are your system specs and what are you using to decode the video? What are you using for audio?

Koti
28th May 2005, 06:49
1000ms/23.976=41.708 delay per frame - using 3b's in x264 avi results the 1st keyframe at a 3 frame delay
41.708*3=125ms

This seems to work for me for correction of audio synch in avi with x264 bframes but could be wrong , anyone else ?

(ps) I used avimux (http://www-user.tu-chemnitz.de/~noe/Video-Zeug/AVIMux%20GUI/index-eng.html) to mux audio

bond
28th May 2005, 11:01
first of all you will always get a 1 frame delay in .avi when using b-frames, no matter how many b-frames in a row you use

when using b-frames as references/b-pyramid you will get always 2 frames delay in .avi, no matter how many b-frames you use

Koti
29th May 2005, 04:43
http://img273.echo.cx/img273/3250/avimux8yo.png (http://www.imageshack.us)

All files were with x264 w/ b-refs (except the one with 1 B frame)
Reported 1st keyframe by AVIMux seems to equal # of b's selected in encode.
This is where I got the idea of number of b's = Delay

ps: haven't muxed any audio with x264 with over 3 bframes in avi since b-refs were introduced.

(edit) Upon further thought I am thinking back to before b-refs and muxing avi. B-refs would have fixed the delay as how Bond mentioned.

(more edit) Yep I was spacin :stupid: - back to my beer :D :D
Thx :)