Re: Accurate timer



On a sunny day (Sun, 3 Sep 2006 22:59:22 +0100) it happened Tony Houghton
<this.address.is.fake@xxxxxxxxxxx> wrote in
<20060903225922.48b7e556@xxxxxxxxxxxxxxxxx>:

I'm trying to write a video player which will use vsync to time the
video playback and subtly adjust audio playback rate through resampling
to keep it in sync. I need a fairly accurate clock to measure any drift
between audio and video.

Some thing to take into acount are that although the video card may
update the screen at an exact frequency, that same screen is _not_ refreshed
by the software at that same frequency, because of task switching the
software may be halted for several milliseconds every now and then.

Doing a true 'slave' to an external V sync is not simple on a system that
is not a real time system.
Is that what you are doing?

Normally I would let the audio DA and DMA set the speed, and have the update
of the video screen set to that, resampling audio sucks in my view anyways.

In hardware one would control the system clock (Amiga) to be able to slave
a display.

PC is not really (without extra hardware) a suitable platform for slaving
to external sources with high accuracy.

Maybe I misunderstood what you are doing?

If you just want audio video sync, look at the mplayer source.
.



Relevant Pages

  • Re: DTV audio / vidio sync
    ... stay in sync. ... make delay adjustments differentially, any delay of some part of the A/V ...
    (sci.engr.television.broadcast)
  • Re: Why is everything on E4 always out if lipsync ?
    ... After playing a video there was always a lip sync ... i.e. why is it necessary to code audio & video separately. ... or shortage of memory for buffering to cause loss of sync. ...
    (uk.tech.digital-tv)
  • Re: Unsychronous recording from DV cameras
    ... What you need is correct timestamps, something DirectShow does not provide in the design and always make audio/video sync a gamble. ... The only time audio/video is accurately in sync is when the source send packet with audio video muxed. ...
    (microsoft.public.win32.programmer.directx.video)
  • Re: Audio/video is not in sync
    ... There are a number of shows on my cable system that the audio ... MCE viewing, I have noticed that if the channel doesn't tune in immediately, ... there may be some audio and video skew. ... If the CPU is more than 50% busy you may have sync issues. ...
    (microsoft.public.windows.mediacenter)
  • Re: Why is everything on E4 always out if lipsync ?
    ... >>> out of sync I just switch the box off, then back on and it fixes it. ... i.e. why is it necessary to code audio & video separately. ... system needs to decode a frame and then queue this ...
    (uk.tech.digital-tv)