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 86C304B65E for ; Mon, 10 Jun 2024 19:23:19 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4C88A68D7BF; Mon, 10 Jun 2024 22:23:16 +0300 (EEST) Received: from iq.passwd.hu (iq.passwd.hu [217.27.212.140]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3F89068D6FF for ; Mon, 10 Jun 2024 22:23:09 +0300 (EEST) Received: from localhost (localhost [127.0.0.1]) by iq.passwd.hu (Postfix) with ESMTP id 137A5E99E5 for ; Mon, 10 Jun 2024 21:23:09 +0200 (CEST) X-Virus-Scanned: amavisd-new at passwd.hu Received: from iq.passwd.hu ([127.0.0.1]) by localhost (iq.passwd.hu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 5KztqhT4udBK for ; Mon, 10 Jun 2024 21:23:07 +0200 (CEST) Received: from iq (iq [217.27.212.140]) by iq.passwd.hu (Postfix) with ESMTPS id 3094BE97AB for ; Mon, 10 Jun 2024 21:23:07 +0200 (CEST) Date: Mon, 10 Jun 2024 21:23:07 +0200 (CEST) From: Marton Balint To: FFmpeg development discussions and patches In-Reply-To: <171757686020.28895.16834592342050862228@lain.khirnov.net> Message-ID: References: <20240603214847.19205-1-cus@passwd.hu> <171757686020.28895.16834592342050862228@lain.khirnov.net> MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH] fftools/ffmpeg_demux: gracefully ignore mismatching channel layouts for -channel_layout option 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-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Wed, 5 Jun 2024, Anton Khirnov wrote: > Quoting Marton Balint (2024-06-03 23:48:47) >> The very old behaviour of -channel_layout was to simply warn the user about >> channel layouts which does not have a matching channel count, and ignore them, >> instead of reporting an error. >> >> The recent fix re-added support for overriding -channel_layout, but it rejected >> mismatching layouts. There is no easy way for the user to specify a channel >> layout only for streams with matching number of channels, so this patch >> restores the very old behaviour of ignoring mismatching layouts. See the >> discussion in ticket #11016. > > I'm ambivalent about this. On one hand it probably doesn't hurt, for now > at least, on the other it seems quite ad-hoc. Previously it worked this > way mostly by accident, whereas if we now restore this behaviour > deliberately we'll be committing to supporting it for the foreseeable > future. > Yeah, I am a bit unsure about it as well. What made me implement this is that there is really no easy way I could think of to simulate the old behaviour. An alternative idea might be to introduce a new option "-try_channel_map" which only gives a warning. Ideally if we could use a stream specifier something like -channel_map:a:eval:eq(st.codecpar.ch_layout.nb_channels,1) mono that should solve this in a generic way, but this requires massive new features in the eval API and in the opt API as well. Regards, Marton _______________________________________________ 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".