Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Vittorio Palmisano <vpalmisano@gmail.com>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH] libavfilter: Whisper audio filter
Date: Wed, 23 Jul 2025 12:51:18 +0200
Message-ID: <CADv15W_da6HBhy1J0Mw0Q9XK_1yvKeDfues6jfq8n9eN+9O4Wg@mail.gmail.com> (raw)
In-Reply-To: <CADv15W_Y=wBiD3x2FgxRfBUPVOaXvjRKZ5phUjynEBOq4oF4vQ@mail.gmail.com>

Update: the correct time base is stored inside inlink->time_base, not
in frame->time_base

On Wed, Jul 23, 2025 at 12:19 PM Vittorio Palmisano
<vpalmisano@gmail.com> wrote:
>
> > > 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/



-- 
/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".

  reply	other threads:[~2025-07-23 10:51 UTC|newest]

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-09  7:23 [FFmpeg-devel] [PATCH] " Vittorio Palmisano
2025-07-09 13:36 ` Marvin Scholz
2025-07-09 15:24 ` Zhao Zhili
2025-07-10  8:43   ` Vittorio Palmisano
2025-07-10  9:47     ` Zhao Zhili
2025-07-10 12:41   ` Michael Niedermayer
2025-07-09 23:37 ` Michael Niedermayer
2025-07-10  8:34   ` Vittorio Palmisano
2025-07-10 10:05     ` Marvin Scholz
2025-07-10 10:20       ` Vittorio Palmisano
2025-07-10 10:25         ` Vittorio Palmisano
2025-07-10 12:20           ` Michael Niedermayer
2025-07-11  8:41             ` Vittorio Palmisano
2025-07-11  9:07               ` Vittorio Palmisano
2025-07-11 19:05                 ` Marvin Scholz
2025-07-12  0:03               ` Michael Niedermayer
2025-07-13 11:16                 ` Vittorio Palmisano
2025-07-14 10:34                   ` Vittorio Palmisano
2025-07-14 21:47                     ` Michael Niedermayer
2025-07-15  7:44                       ` Vittorio Palmisano
2025-07-17  8:51                         ` Vittorio Palmisano
2025-07-19  0:15                           ` Michael Niedermayer
2025-07-19 12:55                             ` [FFmpeg-devel] [PATCH] libavfilter: " Vittorio Palmisano
2025-07-20  1:22                               ` Michael Niedermayer
2025-07-23  8:43                                 ` Vittorio Palmisano
2025-07-23 10:19                                   ` Vittorio Palmisano
2025-07-23 10:51                                     ` Vittorio Palmisano [this message]
2025-07-19 12:58                             ` [FFmpeg-devel] [PATCH] " Vittorio Palmisano
2025-07-18 23:24                         ` Michael Niedermayer
2025-07-10 11:31     ` Michael Niedermayer
2025-07-10 12:07       ` Nicolas George
2025-07-10 12:10         ` Nicolas George
2025-07-09 23:41 ` Michael Niedermayer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CADv15W_da6HBhy1J0Mw0Q9XK_1yvKeDfues6jfq8n9eN+9O4Wg@mail.gmail.com \
    --to=vpalmisano@gmail.com \
    --cc=ffmpeg-devel@ffmpeg.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git