View Full Version : x264vfw Interlaced sync issues (Bug?)
HulkHoganRules
23rd February 2014, 21:13
I've had no video/audio sync issues with progressive content and x264vfw. I've captured the same interlaced content with Lagarith, UT Video and they sync fine. It's only x264vfw giving me problems with interlaced content.
I'm using a capture card to capture composite video from a SNES using a program called AmaRecTV. This leaves me having to capture 480i so I can restore the 240p of the SNES later on.
I found a fix for it though. I have to enable "zero latency" in x264vfw and then the sync will pretty much match Lagarith and UT Video. I just have to ask, why is this the case as I don't have to do it with progressive video? I know it's not AmaRec as if I import the Lagarith file into VirtualDub and compress with x264vfw, I get the same sync issues and still have to enable zero latency to even get it close to Lagarith timing. Maybe a bug? I tried all options like enabling --tff in the command line, no change at all.
Thanks
MasterNobody
23rd February 2014, 21:55
As I already answered many times ago VFW-interface have "one frame in one frame out" rule so any buffering in codec will result in output delay (and so video/audio desync) and frame drops at the end. There is warning in x264vfw when you use such options which will result in such delay if you didn't disabled them by changing log level. There are few ways to workaround such delay:
1) Disable features that need such buffering by using "Zero Latency" option and so trade off some quality;
2) Use "Output mode" set to "File" instead of "VFW" and mux audio and video after encoding;
3) If you use VirtualDub than you can use "VirtualDub Hack" option that enables some extension over VFW-interface but need support from calling application.
BUT nothing of this should depend from type of content (progressive/interlaced). So you should have same delay with progressive content or you use different options.
HulkHoganRules
23rd February 2014, 22:36
As I already answered many times ago VFW-interface have "one frame in one frame out" rule so any buffering in codec will result in output delay (and so video/audio desync) and frame drops at the end. There is warning in x264vfw when you use such options which will result in such delay if you didn't disabled them by changing log level. There are few ways to workaround such delay:
1) Disable features that need such buffering by using "Zero Latency" option and so trade off some quality;
2) Use "Output mode" set to "File" instead of "VFW" and mux audio and video after encoding;
3) If you use VirtualDub than you can use "VirtualDub Hack" option that enables some extension over VFW-interface but need support from calling application.
BUT nothing of this should depend from type of content (progressive/interlaced). So you should have same delay with progressive content or you use different options.
Thanks for the help. I guess I will always stick to using Zero Latency.
I would like to stress again that the delay is only with interlaced. I've captured Street Fighter IV content at 1080p and see no such delay. I've played that game for years and I know the exact timing of when each move should be giving out audio relative to the video and it matches.
MasterNobody
24th February 2014, 06:11
I would like to stress again that the delay is only with interlaced.
If you so sure that is source depended and desync not exist in the source in first place than upload short samples of progressive and interlaced source and screenshots of options you used for encoding so that I can try to reproduce this behavior.
osgZach
1st March 2014, 00:20
If recording to lagarith and UT works for you, then I would try loading the file in Avisynth instead of directly in Vdub. You can do your deinterlacing in Avisynth and once you have a script, just encode it with MeGUI or another program that can feed AVS to x264 CLI encoder. I'm not sure I understand your Vdub workflow though, when you say you are trying to re-encode w/x264vfw in Vdub, are you still keeping it interlaced? Or are you deinterlacing it in Vdub and then trying to encode the progressive output via x264vfw?
In any case, you do have to make sure to enable the Vdub hack.. I would try it when recording directly in Amarec if you haven't as well. I've found even in other programs it can help sometimes.
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.