|
|
| john blox |
Posted: May 27 2003, 06:18 PM |
 |
|
Unregistered

|
I've been using the virtualdub option Video | Framrate | Change so video and audio durations match to get mpeg1 files back in sync for conversion to avi. However though this 'almost' gets it back in sync I found that actually typing in this new framrate value (option above) - 0.005 is actually more accurate. This has worked on quite a few files, so I am wondering if there is an error in the virtual dub calculation as to what value to use to get the frames to match. It became particularly noticeable on a file where a door is knocked at the end showing the out of syncness that using this -0.005 adjustment to the calculated 'duration match' fps fixed. Anyone else notice this? is it a bug?
This seems to be the case in all versions past and present of virtualdub.
|
 |
| phaeron |
| Posted: May 28 2003, 02:51 AM |
 |
|

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

|
That particular option will only work to resync if the two streams correspond to the same amount of "scene time" -- in other words, if when synced the two streams have different lengths, making them the same length obviously won't work. There is no guarantee, of course, that an MPEG-1 will be constructed with streams that reference the exact amount of source content. You can verify the calculation yourself by checking the length of the streams in File > File Information; an MPEG-1 audio frame decodes to 1152 audio samples.
In 1.4, this calculation was done to microsecond accuracy, so it is possible for a little bit of roundoff error to creep in. In 1.5+ the calculation produces a more accurate rational framerate that should be more than 5 digits accurate. |
 |