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 5BD354817B for ; Sun, 10 Mar 2024 23:37:18 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 7C10D68CE20; Mon, 11 Mar 2024 01:37:16 +0200 (EET) Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6BAFF68C7E9 for ; Mon, 11 Mar 2024 01:37:09 +0200 (EET) Received: by mail.gandi.net (Postfix) with ESMTPSA id ABD68240002 for ; Sun, 10 Mar 2024 23:37:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1710113828; 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=algHdaeW0tJ3WWKO2gMhFJ95Ul8L5oDJJFBTXuj58L8=; b=UxmrseNGOMRvNtrsrBxObgQF1HK/8HItlbALUobZuiirpM64W6CwnpJ9NruxSgZg+ygaGs QlMbQyGVe+4FDRQHrqOm4w+PXmAHlDYYFlnyGsjRpyI6j8u9Z8TcV6+W4zP/A96zJicsc+ 4eyLIl1q64p/W9s/yi1cdmmEBE7FRG8hDBtBWZ7ZD1w0p6lPh8ZC8eUYljrdms9/avSozW bEwJ+1FbLa39N1TzF1bGODxAeszkxurNJYx036izPgino0Mo3qP4AZ0EdoryIlDbUv1Mer hxKRt/vi1lST0Z6gAXyWDAXi+SNHALMA6hcIC4k2Pa2m6xcpvi4XJg1BGcpn6g== Date: Mon, 11 Mar 2024 00:37:07 +0100 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20240310233707.GS6420@pb2> References: <20240306110319.17339-1-anton@khirnov.net> <20240306110319.17339-2-anton@khirnov.net> <20240307203739.GI6420@pb2> <170987607651.7287.4766174024309496140@lain.khirnov.net> <20240310033629.GM6420@pb2> <171005119864.662.10837664362214202636@lain.khirnov.net> <20240310192147.GQ6420@pb2> <171010947057.7287.8642196154964262055@lain.khirnov.net> <7d011f1c-f131-412c-85ce-318c71efba0f@gmail.com> <171011095238.7287.16406128798977096207@lain.khirnov.net> MIME-Version: 1.0 In-Reply-To: <171011095238.7287.16406128798977096207@lain.khirnov.net> X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH 02/18] fftools/ffmpeg_filter: refactor setting input timebase 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="===============7354521761240783046==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============7354521761240783046== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="B98P4KKrZSTk5HmE" Content-Disposition: inline --B98P4KKrZSTk5HmE Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Mar 10, 2024 at 11:49:12PM +0100, Anton Khirnov wrote: > Quoting James Almer (2024-03-10 23:29:27) > > On 3/10/2024 7:24 PM, Anton Khirnov wrote: > > > Quoting Michael Niedermayer (2024-03-10 20:21:47) > > >> On Sun, Mar 10, 2024 at 07:13:18AM +0100, Anton Khirnov wrote: > > >>> Quoting Michael Niedermayer (2024-03-10 04:36:29) > > >>>> On Fri, Mar 08, 2024 at 06:34:36AM +0100, Anton Khirnov wrote: > > >>>>> Quoting Michael Niedermayer (2024-03-07 21:37:39) > > >>>>>> On Wed, Mar 06, 2024 at 12:03:03PM +0100, Anton Khirnov wrote: > > >>>>>>> Treat it analogously to stream parameters like format/dimension= s/etc. > > >>>>>>> This is functionally different from previous code in 2 ways: > > >>>>>>> * for non-CFR video, the frame timebase (set by the decoder) is= used > > >>>>>>> rather than the demuxer timebase > > >>>>>>> * for sub2video, AV_TIME_BASE_Q is used, which is hardcoded by = the > > >>>>>>> subtitle decoding API > > >>>>>>> > > >>>>>>> These changes should avoid unnecessary and potentially lossy ti= mestamp > > >>>>>>> conversions from decoder timebase into the demuxer one. > > >>>>>>> > > >>>>>>> Changes the timebases used in sub2video tests. > > >>>>>>> --- > > >>>>>>> fftools/ffmpeg_filter.c | 17 ++- > > >>>>>>> tests/ref/fate/sub2video_basic | 182 +++++++++++++----= --------- > > >>>>>>> tests/ref/fate/sub2video_time_limited | 8 +- > > >>>>>>> 3 files changed, 106 insertions(+), 101 deletions(-) > > >>>>>> > > >>>>>> breaks: > > >>>>>> > > >>>>>> ./ffmpeg -i \[a-s\]_full_metal_panic_fumoffu_-_01_-_the_man_from= _the_south_-_a_hostage_with_no_compromises__rs2_\[1080p_bd-rip\]\[BBB48A25\= ].mkv -filter_complex '[0:s:1]scale=3D800:600' -t 15 -qscale 2 -y a.avi > > >>>>>> > > >>>>> > > >>>>> Use a constant framerate. > > >>>> > > >>>> why not automatically choose a supported timebase ? > > >>>> > > >>>> "[mpeg4 @ 0x55973c869f00] timebase 1/1000000 not supported by MPEG= 4 standard, the maximum admitted value for the timebase denominator is 655= 35" > > >>> > > >>> Because I don't want ffmpeg CLI to have codec-specific code for a c= odec > > >>> that's been obsolete for 15+ years. One could also potentially do it > > >>> inside the encoder itself, but it is nontrivial since the computati= ons > > >>> are spread across a number of places in mpeg4videoenc.c and > > >>> mpegvideo_enc.c. And again, it seems like a waste of time - there i= s no > > >>> reason to encode mpeg4 today. > > >> > > >> This is not mpeg4 specific, its just a new additional case that fails > > >=20 > > > The case you reported is mpeg4 specific. > > >=20 > > >> ./ffmpeg -i mm-small.mpg test.dv > > >> [dvvideo @ 0x7f868800f100] Found no DV profile for 80x60 yuv420p vid= eo. Valid DV profiles are: > > >=20 > > > There is no mechanism for an encoder to export supported time bases. > >=20 > > Could it be added as an extension to AVProfile, or AVCodec? >=20 > The two cases are actually pretty different: > * mpeg4 has a constraint on the range of timebases, and actually does > some perverted computations with the timestamps > * DV just needs your video to be CFR, with a list of supported > framerates; dvenc should probably read AVCodecContext.framerate > instead of time_base >=20 > But most importantly, is there an actual current use case for either of > those encoders? They have both been obsolete for close to two decades. > It seems silly to add new API that won't actually be useful to anyone. iam not sugesting to add API specific to mpeg4, rather that maybe it can be done as part of some more generic solution thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Good people do not need laws to tell them to act responsibly, while bad people will find a way around the laws. -- Plato --B98P4KKrZSTk5HmE Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZe5EIwAKCRBhHseHBAsP qyZ4AJ9/ilQdFgjcSq1/1huHDOQqUVvXXQCeI/XvIKBgg8/L8W6yNpbG1IfAh6g= =GJTU -----END PGP SIGNATURE----- --B98P4KKrZSTk5HmE-- --===============7354521761240783046== 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". --===============7354521761240783046==--