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 EC66A4A10A for ; Thu, 21 Mar 2024 12:11:40 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A225868D536; Thu, 21 Mar 2024 14:11:39 +0200 (EET) Received: from haasn.dev (haasn.dev [78.46.187.166]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 987D968D4A6 for ; Thu, 21 Mar 2024 14:11:32 +0200 (EET) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=haasn.xyz; s=mail; t=1711023092; bh=aojAUy6q83smvCnQHrtjN1BZyqcaWnymAokNiIr7Tls=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=E+/kyNimaBBJXi1ew692CCDtmeAlIo7M/w+mG3XHReY6dVqtxnva1uYuqvPdI2j1Q tVc+9GL8yVfqCbTszxaXHs2bhkMEGDEzqo6sM8R2dyLDTqwEWz+Q8SznzZq/RuXKI/ TDY31q5H7DY1xACeEM2fP1dYfaESjF5MyAZ3MQJc= Received: from haasn.dev (unknown [10.30.0.2]) by haasn.dev (Postfix) with ESMTP id 6CFD7418F4; Thu, 21 Mar 2024 13:11:32 +0100 (CET) Date: Thu, 21 Mar 2024 13:11:32 +0100 Message-ID: <20240321131132.GB15980@haasn.xyz> From: Niklas Haas To: FFmpeg development discussions and patches In-Reply-To: <171101621793.7287.2859730890037554804@lain.khirnov.net> References: <20240319191642.95217-1-ffmpeg@haasn.xyz> <171101621793.7287.2859730890037554804@lain.khirnov.net> MIME-Version: 1.0 Content-Disposition: inline Subject: Re: [FFmpeg-devel] [PATCH 1/4] fftools/ffmpeg_enc: strip DOVI config record for AV1 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 Cc: Niklas Haas Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Thu, 21 Mar 2024 11:16:57 +0100 Anton Khirnov wrote: > Quoting Niklas Haas (2024-03-19 20:16:39) > > From: Niklas Haas > > > > AV1 streams don't use configuration records, so delete them when > > encoding to AV1. Ideally this would be, as the comment suggests, handled > > at the frame-level (and stripped by the av1 encoder), but given the > > status quo of copying the packet-level data here directly, we should > > definitely make an effort to strip it. > > --- > > fftools/ffmpeg_enc.c | 25 ++++++++++++++----------- > > 1 file changed, 14 insertions(+), 11 deletions(-) > > I'm very much not a fan of having codec-specific code in ffmpeg CLI. It > implies that every single caller must now be aware of this > (undocumented?) interaction of this specific side data with this > specific codec ID. Note: This is an existing bug, not introduced by this series. This series just makes it obvious. The status quo is that, beacuse of this logic in ffmpeg_enc.c, we incorrectly forward dolby vision configuration records when transcoding to AV1. Or, indeed, when transcoding to *any* format - since current FFmpeg also does not propagate dolby vision RPUs, we generate broken files pretty much always when transcoding dolby vision. So we definitely need to strip the metadata from the stream muxer *somewhere*. Where else comes to mind? This also gets into another topic I wanted to touch on, which is that the presence of dynamic dolby vision metadata currently hinders the ability of libavfilter to treat the video primaries/gamma as a negotiable colorspace property (the way it is done currently for YUV matrix/range). This is because when interpreted as such, DV metadata fundamentally changes the colorspace of the incoming video stream. Ideally we would like some way to negotiate DV metadata on the query_formats() level. Ideally, we'd want something like AVCOL_SPC_DOLBYVISION, but we can't easily introduce that without breaking ISO/IEC 23091 compatibility.. ------- P.s. I accidentally sent a duplicate of this email from a different (wrong) mail address, please ignore. _______________________________________________ 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".