[time-nuts] OT: Time syncing media in HTML5 - from BBC Research
attila at kinali.ch
Wed Feb 1 09:35:34 UTC 2012
On Wed, 01 Feb 2012 01:13:13 +0100
Magnus Danielson <magnus at rubidium.dyndns.org> wrote:
> > http://www.bbc.co.uk/blogs/researchanddevelopment/2012/01/implementing-startoffsettime-f.shtml
> This is really a side-track to the normal time-nuts issues, but it is
> interesting to note that there are several formats for audio and video,
> lacking the key aspect of time coordination between the signals even if
> they is brought in the same transport stream. A bit annoying. The
> "development" now allows us even more ways to loose "lip sync" than ever
I havent read the blog yet (no time), but time sync is not an issue
with video playback normally. Usually you sync your video stream clock
to the audio output clock (ie the sample rate of your sound card). This
gives you a smooth audio playback while keeping good sync of the video
playback (jitter less than 30ms). This is done, because small jitter
in audio is much more noticable than in video. And to just make it clear:
all video file formats have a more or less working audio and video syncing
facility using some form of timestamps (both audio and video samples
are time stamped).
Now, it gets more complicated if the "file" is not completely available
but streamed in real time from somewhere else. Now your playback has to
be synced to the clock of the source. This means that you have to sync
the sound card to a clock recovered from the rate you get your data.
There are two major obstacles here: how to recover the clock and how
to sync a sound card which does not support clock syncing?
The first is done using some sort of PLL based on the input rate of data.
The second by resampling the audio stream on the fly.
Interesting field indeed, but not easy to get into (there is hardly
any good documentation around).
The trouble with you, Shev, is you don't say anything until you've saved
up a whole truckload of damned heavy brick arguments and then you dump
them all out and never look at the bleeding body mangled beneath the heap
-- Tirin, The Dispossessed, U. Le Guin
More information about the time-nuts