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 D6BB04ABF3 for ; Wed, 15 May 2024 12:59:48 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 859A968D67D; Wed, 15 May 2024 15:59:45 +0300 (EEST) 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 3B1AE68D4AF for ; Wed, 15 May 2024 15:59:38 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 476D3240009 for ; Wed, 15 May 2024 12:59:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1715777977; 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=NqAq4FvDJ/TXGiGVNyJa3duyLeIDN0G/gxB/5W0Q3AU=; b=f4ZV1L63ceL74q2R3vIb9RY7lUgMWy8tCiJkvS9vDem0nRtEDskjabt1XtyjSrLJuyRan2 VcKy+uYbKK9H0KKSi8T/m6zPTA2jueqn88QLcUaDgfbSmwP0eTR/++uLGPW9a8cI/ZraNW zoetQIFopP1q89LLTTYMGqh/EZ1ibzerMMtSWXGXrpxy0plmtTj4Dxa1D/K2riQCwphhwR 34udJXEs+oEBWJNXs5r3CIfQi07rIdWmbJlJ5Tu5Y0C/ACj7BeHNcQ7Z4UshXM7eLqi+pD 2WB0+g7wzRk9s+m/ZrznRoQYqfU7P9/yNMyg/X9F5SThUUAvRC5q3+MjhGsAvw== Date: Wed, 15 May 2024 14:59:36 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20240515125936.GN6420@pb2> References: MIME-Version: 1.0 In-Reply-To: X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] FFMPEG support for x265 vbv-end and vbv-end-fr-adj 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="===============9149790631693895198==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============9149790631693895198== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="cDkl4w9jihxbJr/+" Content-Disposition: inline --cDkl4w9jihxbJr/+ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, May 01, 2024 at 09:10:51PM +0000, Tom Vaughan wrote: > When I attempt to pass vbv-end and vbv-end-fr-adj parameters to x265, FFM= PEG fails. >=20 > x265 [error]: vbv-end-fr-adj cannot be enabled when total number of frame= s is unknown >=20 > x265 needs to know how many frames it is encoding so that it knows when t= he vbv-end logic needs to kick in. In this case it would be after 96% of th= e source video is encoded. Despite specifying a duration of 30 seconds ( -t= 30 ) on both input and output (using a 60 second source video), x265 does = not know the total number of frames (but FFMPEG surely does). >=20 > ffmpeg -i test_uhdsdr_1min.mov -t 30 -an -sn -dn -c:v libx265 -b:v 12000k= -maxrate 8M -bufsize 18M -x265-params vbv-init=3D0.9:vbv-end=3D0.9:vbv-end= -fr-adj=3D.96:rc-lookahead=3D48:qg-size=3D32:scenecut=3D0:no-open-gop=3D1:f= rame-threads=3D0:repeat-headers=3D1:nr-inter=3D400:nr-intra=3D100:psy-rd=3D= 0:cbqpoffs=3D0:crqpoffs=3D3 -t 30 test_uhdsdr_96.mp4 you can specify total_frames along with vbv-end-fr there is in general not a 1:1 correspondance between duration and the numbe= r of frames the frame rate may vary, there may be skiped frames or damaged frames that where lost and so on. in case of some 2 pass mode it should be possible to get the exact number o= f frames in the 2nd pass. Otherwise my gut feelng is that a time based instead of a frame number based threshold would have been easier to work with if you are thinking that the total frame number should be set automatically and not by hand. I agree, its just not easy to do that in all cases. It could maybe be done in specific cases but in the general case it would need 2 passes to be reliable. thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Dictatorship: All citizens are under surveillance, all their steps and actions recorded, for the politicians to enforce control. Democracy: All politicians are under surveillance, all their steps and actions recorded, for the citizens to enforce control. --cDkl4w9jihxbJr/+ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZkSxtQAKCRBhHseHBAsP q9KaAJ4q16lMYODJlV02/sjZiVO2Jnh5UwCeIJm3xv87BXxBit3O7Lb4Bog86Mg= =X0xh -----END PGP SIGNATURE----- --cDkl4w9jihxbJr/+-- --===============9149790631693895198== 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". --===============9149790631693895198==--