From owner-freebsd-multimedia Mon Dec 22 10:01:05 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id KAA10711 for multimedia-outgoing; Mon, 22 Dec 1997 10:01:05 -0800 (PST) (envelope-from owner-freebsd-multimedia) Received: from labinfo.iet.unipi.it (labinfo.iet.unipi.it [131.114.9.5]) by hub.freebsd.org (8.8.7/8.8.7) with SMTP id KAA10683 for ; Mon, 22 Dec 1997 10:00:50 -0800 (PST) (envelope-from luigi@labinfo.iet.unipi.it) Received: from localhost (luigi@localhost) by labinfo.iet.unipi.it (8.6.5/8.6.5) id RAA02664; Mon, 22 Dec 1997 17:32:40 +0100 From: Luigi Rizzo Message-Id: <199712221632.RAA02664@labinfo.iet.unipi.it> Subject: Re: MPEG audio/video sync & Re: These mtv video pauses are murder To: rhh@ct.picker.com (Randall Hopper) Date: Mon, 22 Dec 1997 17:32:40 +0100 (MET) Cc: hasty@rah.star-gate.com, multimedia@FreeBSD.ORG In-Reply-To: <19971222121942.13340@ct.picker.com> from "Randall Hopper" at Dec 22, 97 12:19:23 pm X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-freebsd-multimedia@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > Luigi Rizzo: > |I suppose the problem if any will be in the capture phase. We have a > |way to timestamp (using the cpu clock) incoming video frames (do you > |use that ?), but e.g. for audio you cannot rely on the sample rate > > I do store off a timestamp for each frame of data (video frame + > accumulated audio to that point). This is used to know how many frames we > missed, which is how many times the preceeding frame is replicated in the > mpeg_encode input stream to normalize the video back up to the full FPS rate. well my point was that the right (I would even say "the only") approach to get timing info in a video+audio steam is to use the audio sample clock. It makes life easier in the reproduction phase since it is much easier then to keep video in sync. Probably my previous posting was confused enough to obscure the above point. Cheers Luigi -----------------------------+-------------------------------------- Luigi Rizzo | Dip. di Ingegneria dell'Informazione email: luigi@iet.unipi.it | Universita' di Pisa tel: +39-50-568533 | via Diotisalvi 2, 56126 PISA (Italy) fax: +39-50-568522 | http://www.iet.unipi.it/~luigi/ _____________________________|______________________________________