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 483534AF21 for ; Fri, 18 Jul 2025 23:24:36 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 783F368DEF0; Sat, 19 Jul 2025 02:24:32 +0300 (EEST) Received: from relay15.mail.gandi.net (relay15.mail.gandi.net [217.70.178.235]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id C7CE368DA25 for ; Sat, 19 Jul 2025 02:24:24 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 1CB884318E for ; Fri, 18 Jul 2025 23:24:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1752881064; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=AE6S23HpNo/YbjdPgDllBIWSeD/7dBYHVU8QWfIzJvM=; b=nf2iFuJlhLphrqZdhU6JlepCCln2qAfgpBqRTWyKXxViYv8buXu6zeeXOGEBZjnvKSdXGH W1Ms8q0EnUok+lbN/l+t3MeWnFC7b141GrXJIovr4uK4hT83VC7ZxxV/PwVEi5XaQHDaGp UIELQvlqNw8XY0xLqxxMIuMv3p8R1azET9zdQ4J/0orfb8NsAbHYd7qv/7qKURP9J4S7M5 AB6kP4VwrLbQ67xPHkjV0JP6AFeVXSwSDkM+BpdJyA+Rcijo8LVpmO4WNY7Ij3E74dmsLi CQ77cTIxr6/LyQcdUEA3YnP21S33s28fzPtiGbgrSR/KjljW/1widUhBQ4+B6Q== Date: Sat, 19 Jul 2025 01:24:23 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20250718232423.GO29660@pb2> References: <20250710102543.1002696-1-vpalmisano@gmail.com> <20250710122008.GP29660@pb2> <20250712000330.GX29660@pb2> <20250714214713.GO29660@pb2> MIME-Version: 1.0 In-Reply-To: X-GND-State: clean X-GND-Score: -70 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdefgdeigeejjecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfitefpfffkpdcuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnegfrhhlucfvnfffucdlfedtmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddtvdenucfhrhhomhepofhitghhrggvlhcupfhivgguvghrmhgrhigvrhcuoehmihgthhgrvghlsehnihgvuggvrhhmrgihvghrrdgttgeqnecuggftrfgrthhtvghrnhepieegkedtjeduffejhfetgeejtdegteetgfegtdfhjefgvefhteegkeejtddvhfevnecukfhppeeguddrieeirdeihedrudejieenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeeguddrieeirdeihedrudejiedphhgvlhhopehlohgtrghlhhhoshhtpdhmrghilhhfrhhomhepmhhitghhrggvlhesnhhivgguvghrmhgrhigvrhdrtggtpdhnsggprhgtphhtthhopedupdhrtghpthhtohepfhhfmhhpvghgqdguvghvvghlsehffhhmphgvghdrohhrgh Subject: Re: [FFmpeg-devel] [PATCH] 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: multipart/mixed; boundary="===============7471545526270176879==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============7471545526270176879== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="dr7NtjUz0R5SWUZx" Content-Disposition: inline --dr7NtjUz0R5SWUZx Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Vittorio On Tue, Jul 15, 2025 at 09:44:48AM +0200, Vittorio Palmisano wrote: [...] > > > + if (!av_strcasecmp(wctx->format, "srt")) { > > > + buf =3D > > > + 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 =3D av_asprintf("{\"start\":%ld,\"end\":%ld,\"text\":\"%s\"}\n", > > > start_t, end_t, text_cleaned); > > > + } else > > > + buf =3D 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 >=20 > avcodec_encode_subtitle should be used to generate a subtitle track, righ= t? 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 demu= xing also needs opening encoder and encoding subtitles so i think its probably better to leave the hardcoded simple writers your patch uses already thx [...] --=20 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. --dr7NtjUz0R5SWUZx Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCaHrXoAAKCRBhHseHBAsP q0aFAJ4lK4GV9hHplaFyccuNOQuvwwc1igCcDQDaoTtmT+tk5MISUecNeyiXlWQ= =I8tl -----END PGP SIGNATURE----- --dr7NtjUz0R5SWUZx-- --===============7471545526270176879== 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". --===============7471545526270176879==--