Log in

View Full Version : Audio/Video out-of-sync


huang_ch
12th August 2006, 04:13
I'm encoding some videos from XVID to X264, but I found something strange, if I use libavcodec in ffdshow to decode XVID, there always some out-of-sync happens, but if I use XVID directly or XVID through FFDSHOW, the out-of-sync never happens. Does anyone meet this issue before? Is there any solution to solve this problem? Because 2 of my videos seems to be not decoded fully correctly by XVID, but correctly by libavcodec.

lexor
12th August 2006, 16:04
you probably should have asked in xvid subforum, I don't see what this has to do with x264 since it's your xvid playback thats broken

huang_ch
13th August 2006, 03:05
My major problem is not XVID broken, but just why libavcodec will give an out-of-sync result while XVID not. I just hope someone here meet similar issue. :)

ChronoCross
13th August 2006, 19:51
Unfortunately I've never seen this issue. You should try updating your ffdshow (libavcodec)

huang_ch
15th August 2006, 14:13
I've updated to Aug 5 build ffdshow, it still out-of-sync...

bond
15th August 2006, 18:33
is the desync constant or increasing? do you have also a desync when only playing the stream (not encoding with x264)?

moved to xvid

Plamen234
16th August 2006, 13:46
You can try this:
write a new .avi (for example) with uncompressed audio (ex. mp3 -> wav). Then encode it into x264 with wav stream. Here you can check if sync's ok. And finally write a new .avi "direct stream copy"-ing the video and compressing the audio into mp3

huang_ch
19th August 2006, 08:16
to bond,
I don't have desync when playing, but only encoding.
to Plamen234,
Since the video has a sub, so I've carefully compare the result and found that the desync is not the problem of audio, because the audio & sub is sync, so I think the problem is in the video part not audio part.

bond
19th August 2006, 15:32
what about my second question?

huang_ch
20th August 2006, 02:52
is the desync constant or increasing?
I think it's increasing, but the desync is not very large itself, at the last several minutes of the video (>18min of a 22~24min video), the desync is about 2~4 seconds.

do you have also a desync when only playing the stream (not encoding with x264)?
No, there's no desync while playing, indeed, I never met any desync while playing with FFDSHOW/XVID, except for those currupt videos. :)

bond
20th August 2006, 15:54
if the desync is increasing, its a wrong framerate issue

if you are using directshowsource, try setting the fps

huang_ch
21st August 2006, 05:46
Thanks bond, I'll have a try on this.