Log in

View Full Version : Massive audio delay in x264 codec!!!


Kostarum Rex Persia
28th June 2005, 23:27
Hi,I have a big problem.When i was compressed some video material(any video material) I always have a massive audio delay(4-5 seconds).Why is that?

acidsex
28th June 2005, 23:38
Its not your codec (x624) that causes a delay. What did you use to encode your x264 file and what audio codec did you use?

Kostarum Rex Persia
29th June 2005, 00:26
Its not your codec (x624) that causes a delay. What did you use to encode your x264 file and what audio codec did you use?

I use XMPEG 5.03 to encode,and DivX WMA Audio Compressor at 96 kbps stereo.Anyway,even when I use MP3 for audio compress,I get the same result,audio delay 4-5 seconds.

I notice that when I compress with Nero Digital h.264 format,the output video file is perfect,audio is normal.

berrinam
29th June 2005, 08:30
You haven't really given much information in terms of finding the error. There could be many sources of error, but as Nero Recode (I presume that is what you mean) works, the input is fine. Basically, XMPEG could be doing something hugely wrong, or you could be configuring some settings wrong, or not configuring some settings that are needed, eg: framerate, audio delay.

bond
29th June 2005, 10:26
1) post your exact settings (especially if you used b-pyramid/b-reference and what number of b-frames)

2) might be a problem of XMPEG 5.03, therefore try x264vfw in virtualdub and also x264cli (eg via megui) too

3) might be a problem of the .avi container not being able to handle b-frames/references nicely (therefore compare the .mp4 output of megui with your .avi files too)

4) whats the framerate of your input source?

lexor
29th June 2005, 14:13
well I don't know what the source is but when I tried to recompress some episodes I have captured (and encoded to xvid with vbr mp3 in avi container) just to see how much quality recompress would loose, I got a huge audio delay as well, though VDub does warn that it doesn't handle vbr mp3 in avi correctly, so it's really my fault, proper encode from DVD source gives no delay though.

Kostarum Rex Persia
29th June 2005, 16:22
1) post your exact settings (especially if you used b-pyramid/b-reference and what number of b-frames)

2) might be a problem of XMPEG 5.03, therefore try x264vfw in virtualdub and also x264cli (eg via megui) too

3) might be a problem of the .avi container not being able to handle b-frames/references nicely (therefore compare the .mp4 output of megui with your .avi files too)

4) whats the framerate of your input source?

I use 350-500 kbps,b-frames 3,reference frames 1 or 3,and all other settings are default.I must say that I havn't this problem 20 days ago.Framerate of input source is 25 FPS.

bond
29th June 2005, 18:54
try 2) and 3) too

also lexor's post is a possible explanation

Kostarum Rex Persia
30th June 2005, 22:15
I tried 2) and 3),but that not solve my problem.I again saying that before 20 days I didn't have that audio delay.What do you think,what is the reason of this mess,codecs or something else?

berrinam
30th June 2005, 22:20
Does it only happen with x264 or have you tried other video codecs (ie XviD)?

bond
1st July 2005, 13:43
seems there is a problem with avi files and DirectShowSource()+ffdshow+Xvid source.
check if the desync also appears in the .avs file.

Kostarum Rex Persia
1st July 2005, 23:16
Does it only happen with x264 or have you tried other video codecs (ie XviD)?

No,it's only happen with x264 codec,Xvid,DivX and other are OK.I don't use ffdshow.

Wilbert
2nd July 2005, 18:22
@Kostarum,

What AviSynth version are you using? What's the size of your DirectShowSource.dll?

bond
5th July 2005, 14:13
Kostarum Rex Persia , can you upload a small sample showing this desync?


all-in-all: my possible explanations for desync issues:

1) source is already not in sync

2) the avisynth script is written in a way sync is lost

3) when using x264vfw for encoding: delay as vfw/avi cant handle b-frames/references

4) when using an .avi input with b-frames, avisource(): delay as the decoding is done via vfw not being able to handle b-frames/references

5) directshowsource() + ffdshow: http://forum.doom9.org/showthread.php?t=96708

6) combinations of the above

daveoggy
6th August 2005, 09:12
I was experiencing the same problem as descibed here.

When I checked the filter graph my video decoder was 'Nero Digital' - I don't even know where this came from unless it was installed along with Nero Burning ROM - I had made the assumption that the x264 codec was doing the decoding!

Anyway to solve this problem I installed ffdshow making sure to enable H264 decoding and the audio problem was resolved.

I noticed that Kostarum Rex Persia said he isn't using ffdshow so maybe this would resolve his issues as well.

Kostarum Rex Persia
6th August 2005, 17:59
Well,yes,from 5 days ago I use the latest build of FFDSHOW.As you assumed,the problem of audio delay is gone now.Thank you.