Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Michael Niedermayer <michael@niedermayer.cc>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: Re: [FFmpeg-devel] [PATCH] Whisper audio filter
Date: Sat, 19 Jul 2025 01:24:23 +0200
Message-ID: <20250718232423.GO29660@pb2> (raw)
In-Reply-To: <CADv15W_jJCZS3kLL72WLhHZXdNXXor-AHNUDShkhbrH+25aPkQ@mail.gmail.com>


[-- Attachment #1.1: Type: text/plain, Size: 1625 bytes --]

Hi Vittorio

On Tue, Jul 15, 2025 at 09:44:48AM +0200, Vittorio Palmisano wrote:
[...]

> > > + if (!av_strcasecmp(wctx->format, "srt")) {
> > > + buf =
> > > + av_asprintf
> > > + ("%d\n%02ld:%02ld:%02ld.%03ld --> %02ld:%02ld:%02ld.%03ld\n%s\n\n",
> > > + wctx->index, start_t / 3600000,
> > > + (start_t / 60000) % 60, (start_t / 1000) % 60,
> > > + start_t % 1000, end_t / 3600000, (end_t / 60000) % 60,
> > > + (end_t / 1000) % 60, end_t % 1000, text_cleaned);
> > > + } else if (!av_strcasecmp(wctx->format, "json")) {
> > > + buf = av_asprintf("{\"start\":%ld,\"end\":%ld,\"text\":\"%s\"}\n",
> > > start_t, end_t, text_cleaned);
> > > + } else
> > > + buf = av_strdup(text_cleaned);
> >
> > Do you think it would make sense to use avcodec_encode_subtitle() ?
> > It would avoid hardcoding these "writers" and could use any we support
> 
> avcodec_encode_subtitle should be used to generate a subtitle track, right?

I suspect this may become too complex, but for reference

this would also need
avformat_alloc_output_context2() / avformat_write_header()
loop
    av_interleaved_write_frame()
av_write_trailer()

see doc/examples/remux.c, this shows demuxing and muxing, we dont need demuxing
also needs opening encoder and encoding subtitles

so i think its probably better to leave the hardcoded simple writers
your patch uses already

thx

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Some people wanted to paint the bikeshed green, some blue and some pink.
People argued and fought, when they finally agreed, only rust was left.

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

[-- Attachment #2: Type: text/plain, Size: 251 bytes --]

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

  parent reply	other threads:[~2025-07-18 23:24 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-09  7:23 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-18 23:24                         ` Michael Niedermayer [this message]
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=20250718232423.GO29660@pb2 \
    --to=michael@niedermayer.cc \
    --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