|
|
| Landrew |
| Posted: Oct 29 2010, 04:39 PM |
 |
|
Advanced Member
  
Group: Members
Posts: 102
Member No.: 17383
Joined: 1-December 05

|
I noticed something interesting the other day. When I load an h264 clip into vdub using avisynth with DirectShowSource, the video lags the audio, and what's more it is different each time I process the same clip. Sometimes 1 frame, sometimes 3 frames, etc. Testing yields variations between 1 and 4 frames lag. In contrast, with vdub's directshow import filter, I consistent results every time, with the audio within one frame of sync.
As a programmer, just got me wondering what is going on under the hood. Something peculiar about how DirectShow works, that Avery did a nice job of overcoming perhaps?
Cheers, Andrew |
 |
| phaeron |
| Posted: Oct 30 2010, 09:54 PM |
 |
|

Virtualdub Developer
  
Group: Administrator
Posts: 7773
Member No.: 61
Joined: 30-July 02

|
Probably just a difference in buffering algorithm. The DirectShow input plugin only does local buffering, whereas DirectShowSource does more. I believe it actually has two levels of buffering, a little bit locally and then the Avisynth frame cache. If the DirectShow filter doesn't do precise seeking and thus returns different frames for the same requested position, and extra action isn't taken to flush the frame cache when that happens, then you could get some really nasty effects. On the other hand, DSS can work when a filter is broken and produces frames out of order, which my plugin definitely doesn't help. |
 |
|