From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id C19154BB37 for ; Wed, 23 Jul 2025 10:19:43 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id E8E1568D62B; Wed, 23 Jul 2025 13:19:39 +0300 (EEST) Received: from mail-qt1-f170.google.com (mail-qt1-f170.google.com [209.85.160.170]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 123F568D572 for ; Wed, 23 Jul 2025 13:19:33 +0300 (EEST) Received: by mail-qt1-f170.google.com with SMTP id d75a77b69052e-4ab60e97cf8so81435721cf.0 for ; Wed, 23 Jul 2025 03:19:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1753265971; x=1753870771; darn=ffmpeg.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=BqyadzEJzEeHTmPOC856493nfZuazmIxp9Dw54fisFk=; b=PRY2LDUzveByFc7fdJFtvGbCkGXuGSfkTEGnU1M5JK/F/xBoJVMjPOR9KIf3722H+X TjBzEhWBgqlDa7Pb6j2+9mwszLGeFsoplh7S82XnPU+nCRHJ4z5ojePfI0xJmDODirdg 3IxrZ3XVhYUkzUobhj2wVIpQah79Z+V3QrdgbuBBbVZBY5x8nfUQb2QjHMUuAHWz12Bq DoyKA3eHmV8cIjCfw7ptooft4/WNkbVMbpQhfCMQZuZECFBVLgnfut8Qr4lvCJUTIe9g +LSgFNMk6uhNOg+0y/AzMMmGqMDS858TOWKWGOOxJVMrdXA6yFDbFitk4FrnFrnNcbYh HcJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1753265971; x=1753870771; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=BqyadzEJzEeHTmPOC856493nfZuazmIxp9Dw54fisFk=; b=hzesRcisUEyszyJkhSiR/mVxxT2WW5h/rmwyS2rv6PqyXZjXnVee2mCZrD9lcouuMX UFAuNJElvqqixIHn7Qg/luixTBJ8ww94cW5yxt0xOO4x/cabwvnxANHrSZoQ4yuJjK2s UpUyfBxQzJiBiPBxDYRBnKnwHujvOWNazxzUh7QdWNDf6bq3G2plf+0/HYdW0J1pfNXL 4Eyb5lOByaYbE2M1c0IPrunIJmMa59UMXJU2Zp0ZG06bS/OyqH0IePZxhpEYip/gOyiA MtACmiGtiBhy/EiomT7BBuxSjadkhk5yeFCQVLqKZPO5vJ3ZLKgSfpMbA/g45hTAtpDS UrWg== X-Gm-Message-State: AOJu0Yw492UE/o0U0OLPU2aavSLP6eLYy7BgrCXjRIz99Ii80wuj4SuD 2hFgFmsU6G8EpcuCRRedVvmkHnMbhFz3yCEcSfDUCv74zRZzcu0sr7rItPf+gKzksYZW+pagtl4 pRz6yHuVUKLqxIB3EyQkVedLrQnHSuiSRpYkp X-Gm-Gg: ASbGncu8tr4rpX2LX4n8PPk70SG8YaOLLv18gDjROTbonv8YFPH/AQ+HOuek6CINv9e JKfug0h4I0VCPKW2fT80La70PSe6vJ7oPj7wp1b8MDEjbSMFvme1xkbFZtfqSE9w94WUA0ezf28 4+z3T4gXPg8rNr0ZWOpwYVw7rlA/r4vjo/2HNLXnJQfmfoirqYQN2v/PkzEc2zTWuDsYBVHcGor mUZ35w= X-Google-Smtp-Source: AGHT+IE3ZNqMzqbAwyVFk3IhLfx8tY66N4ot4SKKHa7DLDX9YjaY77yD/RC7ubAzxTrHBbUkmggWICvj0azhQXNuE70= X-Received: by 2002:ac8:7f4d:0:b0:4ae:73dc:38a8 with SMTP id d75a77b69052e-4ae73dc3e69mr11502171cf.45.1753265971055; Wed, 23 Jul 2025 03:19:31 -0700 (PDT) MIME-Version: 1.0 References: <20250719001553.GP29660@pb2> <20250719125526.389239-1-vpalmisano@gmail.com> <20250720012209.GW29660@pb2> In-Reply-To: From: Vittorio Palmisano Date: Wed, 23 Jul 2025 12:19:05 +0200 X-Gm-Features: Ac12FXy5kPgcAcp-BZTwP43J3h-FpgJuT6khR_IOuMgt9dvcIuGTJYTizjgJQmo Message-ID: To: FFmpeg development discussions and patches Subject: Re: [FFmpeg-devel] [PATCH] libavfilter: Whisper audio filter 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: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: > > To understand why this is a problem, consider some audio input device > > which samples at 16khz. This hardware contains lets say for simplicity a 16khz > > crystal and samples based on that. But depending on temperature of this > > crystal it will really sample lets say between 15990 and 16010khz. So > > simply counting samples alone is not enough. the frame->pts need to be > > used too. I'm trying to use the frame->pts value but I don't understand how to calculate the absolute time in milliseconds. Adding some logs I've found that: frame->time_base=1/48000 frame->sample_rate=16000 Using `1000 * frame->pts * frame->time_base` returns wrong results. The only way to get the correct value seems `1000 * frame->pts / frame->sample_rate` -- /Vittorio Palmisano/ _______________________________________________ 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".