Re: [LAU] OT - Audio and Video Synch

From: Len Ovens <len@email-addr-hidden>
Date: Sat Oct 19 2013 - 01:38:26 EEST

On Fri, 18 Oct 2013, James Stone wrote:

> I am wanting to get some audio and video recorded - sample accurately
> - so there is minimal delay between audio and video, and no drift. Can
> any format do this? Do you have recommendations about how to record a
> file which will play back with perfect audio and video sync on all
> players (file size is not an issue)?

The same player might have non-sync video/audio depending on the audio
output path. One would expect the player to compensate for the delays
cause by decoding, but then the audio may go straight to the alsa device
or through pulse which adds latency or through jack (where you can set the
latency so one time might have a different delay than another) or through
gs first then through who knows what. Some of the sound servers may have
variable latency depending on cpu load too.

That is not even touching the video chain (outside of my knowledge), but
you get the idea. On any reasonably fast computer one can set up an
audio/video chain that will work in sync, but change any one part of that
chain and sync may be no more. So if you are looking from a distribution
POV, you have no control of what the audience will play your video on. If
you are using it in an institution, then all the machines may be the same
as well as the OS/SW and so there is a better chance. Keeping the decoding
work as low as possible and using sample rates and frame rates that match
the sound serve/audio IF and work as close to the GPU setup as possible
reduces things like resampling/resizing and reduces cpu load and brings
different speed HW closer to matching. For example, if your audio is using
opus as an codec, then 48k sample rate in the sound server/audio IF will
result in no resample to match the codec ouput. But if the audio card is
set to 44.1k then the audio must be resampled. However, many of the videos
available on the Inet have audio at 44.1k and so running the audio IF at
48k would mean a resample step for them.

So it would seem it would be impossible to make sure that audio and video
are always in sync on every machine. The recording and encoding sw can
shift the audio with respect to the video. Then check it out on the
machine/OS that most of your target audience uses.

I don't know how the windows audio server works, however, the intel HDA
audio interface assumes 48k (or 96k or 192k... though even at these speeds
it seems the bus runs at 48k with just more parallel data). So I would
guess the default windows setup would be 48k. I don't really know though.

--
Len Ovens
www.ovenwerks.net
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-user
Received on Sat Oct 19 16:15:04 2013

This archive was generated by hypermail 2.1.8 : Sat Oct 19 2013 - 16:15:04 EEST