[FFmpeg-devel] [PATCH] ALSA for libavdevice

Nicolas George nicolas.george
Mon Dec 15 15:23:46 CET 2008


Le quintidi 25 frimaire, an CCXVII, Reimar D?ffinger a ?crit?:
> I don't think someone who publishes a file they privately recorded expects
> that they will also tell everyone to the millisecond precisely _when_ they
> recorded it (is this actually the case? I'd think the timestamps would
> have to start at 0).
> IP timestamps AFAICT are optional, and in addition only precise to the
> millisecond. As I understood it, these timestamps will possibly be precise
> to the microsecond, which makes sidechannel attacks not completely
> implausible.

There are several different points to consider:

- The timestamps needs to be at least as accurate as the sample rate. This
  is somewhat less than the current microsecond precision, but not much.
  Michael suggested keeping the nanoseconds or using sample rate * 128,
  which are more accurate than the microsecond.

- The least significant digits of the timestamps record the time where the
  IRQ of the sound card came, which makes them a lot less usable for side
  channel attacks.

- If the timestamps start at 0, then a new API is necessary to find out what
  that 0 is, or we lose the possibility to measure the amount of delay
  induced by the sound card buffer. Without that possibility, the library is
  unusable in low-latency cases or to synchronize with other sources.

- Other libavdevice demuxers already expose the very same timestamps, some
  have been doing it for quite a long time, and no one complained yet.

- The default settings in ffmpeg do not keep the original timestamps of an
  audio stream to the output file anyway.

For all these reason, I think exposing the system time like this in the
demuxer is not a problem at all and is in fact necessary, and the only
question left is the actual unit to use.

Regards,

-- 
  Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20081215/fb10aaa8/attachment.pgp>



More information about the ffmpeg-devel mailing list