View Full Version : Audio synch problems
surreal120
18th January 2006, 16:26
I'm having some audio synch problems encoding NTSC material to x264. I'm using DGIndex with Forced Film to set up my .d2v file. After encoding with GKnot, the audio is about a second or so out of synch with the video (enough to be noticeable) if I use 3 bframes, but 2 bframes seems to be in synch (although I'm starting to get suspicious that it isn't "really" in synch even at 2 bframes... maybe just my mind playing tricks on me at this point:)). Increasing the number of reference frames seems to be having an affect as well, but I'm not totally sure about this - I haven't tried controlling for that variable yet in my testing. Also, I have an AMD 3700+ processor and 1GB performance memory, so I don't think the problem is that my system just can't keep up somehow.
I also tried encoding for the first time using MeGUI instead of GKnot and got completely different results. I used MeGUI to create a raw x264 stream -> AVC2AVI to make avi file -> MeGUI muxer tool (also tried NanDub). The audio was totally out of synch, lagging the video by a mile. (I don't know a lot about muxing/joining, but it semed like the interleaving process that NanDub normally does just wasn't happening - but I'm a real newb with this so maybe I'm just being stupid).
Anyway, I'm sure I'm just doing something dumb somewhere. I assume the problem has something to do with my NTSC source, but I'm still really confused.
lenouch
18th January 2006, 17:00
I would suggest to not use avi container. When, you got your h264 stream, you have to directly mux it with an audio track, using mkvmergegui.
I had the same problem a few days ago. It was solved when I stopped using .avi with x264 ;)
surreal120
18th January 2006, 17:34
Lenouch, I just downloaded MKVToolNix, but I can't get mkvmergegui to open my RAW .264 file (does not seem to be a supported file type). Do I need to have MeGUI output to a different format? Or do I use the .avi file from AVC2AVI?
Sirber
18th January 2006, 17:37
Audio sync is not related to the video codec...
Doom9
18th January 2006, 17:43
if I use 3 bframes, but 2 bframes seems to be in synch (although I'm starting to get suspicious that it isn't "really" in synch even at 2 bframes... maybe just my mind playing tricks on me at this pointThe thing is.. with each b-frame you add, the synch will get worse - at least as long as you use the AVI container.. this is because with AVC in AVI you lose frames when you start using b-frames.
I'm not quite sure I understand your MeGUI setup though. If you want x264 in AVI output, you have to use mencoder.. but AVI output means you always have this desynch. If you search this forum you'll find out just how exactly you can determine how many frames you're losing, and you can compensate with that in Nandub. The two alternatives would be using no B-frames (then you don't lose any frames), or using another container to boot. Since you're using GKnot I think you have either MP3 or AC3 audio, so the optimal choice here would be MKV. Since you already have the video encoded, you can mux it to an MP4 using MeGUI's MP4 muxer, then use that MP4 as input to mkvmerge and mux together video and audio (MeGUI's mkv muxer allows you to do that but of course mkvmerge alone can also do it).
[)370|\|470!2
18th January 2006, 17:43
MkvToolNix doesn't support raw h264 afaik, only mp4, which is a bit lame imo.
Cuz if i got video into mp4 already, why bother convert it into something else?
Concerning avi and vfw: i'm using VirtualDub(Mod) for creating AVC's, lots of ntsc
dvds too, sync problems have never happened. :) Just make sure you're not forcing film in DGIndex on mixed/combed content(when it's less than 100% FILM,
means, that it is).
Koti
18th January 2006, 18:13
Concerning audio with x264 vfw and avi.
http://forum.doom9.org/showthread.php?t=95083
http://forum.doom9.org/showthread.php?t=96746
[)370|\|470!2
18th January 2006, 18:24
Hmm... 125ms delay? I can live with that xD
Doom9
18th January 2006, 19:10
Hmm... 125ms delay? I can live with that xDYou start noticing asynch somewhere in between 50ms and 60ms ;)
surreal120
18th January 2006, 19:44
Tried converting to an .mkv and... it works!! I had no idea about the frame dropping issue with avi containers. Thanks lenouch and Doom9 for your help!
:thanks:
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.