[time-nuts] OT: Time syncing media in HTML5 - from BBC Research
magnus at rubidium.dyndns.org
Wed Feb 1 20:29:08 UTC 2012
On 01/02/12 10:35, Attila Kinali wrote:
> On Wed, 01 Feb 2012 01:13:13 +0100
> Magnus Danielson<magnus at rubidium.dyndns.org> wrote:
>> 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).
This used to be true. Some file formats fails to have sufficient support
to maintain lipsync in practice.
> 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.
Resampling and frame-storing is something you want to avoid, and
maintaing lipsync over it can be uhm. interesting. Any reampling lowers
quality and if you do it, you need to handle Dolby-E separately.
> Interesting field indeed, but not easy to get into (there is hardly
> any good documentation around).
It's not that hard to understand. One needs to read the right standards
It is indeed an interesting field, and greatly missunderstood as well.
More information about the time-nuts