From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 19FC945FDA for ; Fri, 28 Apr 2023 11:42:27 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 63528687FF0; Fri, 28 Apr 2023 14:42:25 +0300 (EEST) Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id DD18468AD39 for ; Fri, 28 Apr 2023 14:42:18 +0300 (EEST) Received: (Authenticated sender: michael@niedermayer.cc) by mail.gandi.net (Postfix) with ESMTPSA id 4A67B60004 for ; Fri, 28 Apr 2023 11:42:17 +0000 (UTC) Date: Fri, 28 Apr 2023 13:42:17 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20230428114217.GE275832@pb2> References: <20230427142601.2613-1-anton@khirnov.net> <20230427142601.2613-16-anton@khirnov.net> MIME-Version: 1.0 In-Reply-To: <20230427142601.2613-16-anton@khirnov.net> Subject: Re: [FFmpeg-devel] [PATCH 16/21] fftools/ffmpeg: rework audio-decode timestamp handling X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: multipart/mixed; boundary="===============0633292865170836254==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============0633292865170836254== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="3rxX7Uty8SZY8iU1" Content-Disposition: inline --3rxX7Uty8SZY8iU1 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Apr 27, 2023 at 04:25:56PM +0200, Anton Khirnov wrote: > Stop using InputStream.dts for generating missing timestamps for decoded > frames, because it contains pre-decoding timestamps and there may be > arbitrary amount of delay between input packets and output frames (e.g. > dependent on the thread count when frame threading is used). It is also > in AV_TIME_BASE (i.e. microseconds), which may introduce unnecessary > rounding issues. >=20 > New code maintains a timebase that is the inverse of the LCM of all the > samplerates seen so far, and thus can accurately represent every audio if the LCM fits in int32 This can hit some pathologic cases though consider a 192khz stream that starts with a damaged packet thats read as 11= =2E197 khz lcm of 192000 and 11197 > 2^31 so the whole stream will then be stuck with = 11.197khz that seems like a bad choice the code should favor standard sample rates as well as the higher sample ra= te if the lcm is not representable also if lets say there are 48khz and 48.001khz where again lcm doesnt work= =20 then a multiple of 48khz may be a better choice than either itself also what happens if the audio timestamps are known more precissely than the audio sample rate ? thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Opposition brings concord. Out of discord comes the fairest harmony. -- Heraclitus --3rxX7Uty8SZY8iU1 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZEuxFAAKCRBhHseHBAsP qw8aAJ9PTbH+BAYVrk5Gfy2xCSkNvCyVgwCfYW4Dqvqmp2zi2wklfcyozlAtXEc= =oBOe -----END PGP SIGNATURE----- --3rxX7Uty8SZY8iU1-- --===============0633292865170836254== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". --===============0633292865170836254==--