From patchwork Sun Feb 13 13:46:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Wolfgang_M=C3=BCller?= X-Patchwork-Id: 34262 Delivered-To: ffmpegpatchwork2@gmail.com Received: by 2002:a05:6838:14aa:0:0:0:0 with SMTP id bz10csp4753918nkb; Sun, 13 Feb 2022 05:47:20 -0800 (PST) X-Google-Smtp-Source: ABdhPJwKNF2JOCA780AFHUYbsx7K7GKQJAoQTTtHids+5QW18k0mTU4ft4xFVqOYl4Zx286me7Pf X-Received: by 2002:a50:cc94:: with SMTP id q20mr6616969edi.411.1644760040555; Sun, 13 Feb 2022 05:47:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644760040; cv=none; d=google.com; s=arc-20160816; b=Yyiuhw2ifuODaR+i7LviL8NTXVz1zp7Dpu3FQ+yDvKw8KGTwuMgwZxeVPMsG8opOzZ ZmH5MZZQ78Ac+jggbRHhlwv/Fm/T9jeQixgAz4kHgHQSsxyymb+lJT4RwtionyZBVVzQ cQ08LKs1JT7KhSvmGLgMm2mOP9Il1pUzA/qthYHDSYH38kmYduGj/mK7ojuYAnd1e9MV N7vnd4/aKeG/cK9pPpUQJUIIplNWLIeGTwpo5geh1GSZnHK3cQ7eU8lp5PfrqLCiPZMO 8T1/B6bnMKWlBN2INiia+kz0Fb8x/shZXRVm9modHeXn8S4k5HSHKbKlEFqmgS4r/zUM nOwA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:mime-version:message-id:date:to:from :delivered-to; bh=F5LM7tBL/t//lAgzKlIL+QyxvH/pr9XQ8lRvdQaXgeA=; b=ULhP4coshjEv2QE0I6W2a4zzfDi6LJKDf4yK9TfNiPf1sweqmidksn+LYWNcXr6L6f 1KFCcAPUvSHBN9oU9whQY1URRGqbM/DjNI+/Qtlo74xl3gTnYlByrEkDzwxN0bHJRqD+ objRtiniG3tv5Fcnlvi6tQdVg6N2hU2XH2IYNfNgM5gqXZqhQrGR2VFE+wNkyN2TpYAs WsUjrDS+BOhLCdacfNyXz7EuEDMpN7FhEgijXQhtazR5IG8xYZg7DLxLxe0deU8epxJ8 WplSYetNmE+qUhJgszvmzXVXA5vkzzD7sd4ch/gjX2ZIop+byXeUXIGLqoxXFTaB6a4+ R7PQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id i2si1758672edx.265.2022.02.13.05.47.19; Sun, 13 Feb 2022 05:47:20 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 30E5168B17F; Sun, 13 Feb 2022 15:47:15 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from coleridge.oriole.systems (coleridge.oriole.systems [89.238.76.34]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8E68F68B0A8 for ; Sun, 13 Feb 2022 15:47:08 +0200 (EET) From: =?utf-8?q?Wolfgang_M=C3=BCller?= To: ffmpeg-devel@ffmpeg.org Date: Sun, 13 Feb 2022 14:46:33 +0100 Message-Id: <20220213134633.52291-1-wolf@oriole.systems> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Subject: [FFmpeg-devel] [PATCH] avformat/id3v2: Add Grouping frame to id3v2.4 metadata table 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: =?utf-8?q?Wolfgang_M=C3=BCller?= Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" X-TUID: cM7wWfTp3A+Q The ID3v2.4.0 standard defines TIT1 as the "Content group description" tag [1]. This frame is usually referred to as the "Grouping" tag and in de-facto use under that name by Vorbis and APEv2 [2]. This commit introduces a mapping from "TIT1" to "grouping" in the id3v2.4 metadata conversion table. This will enable software to access it using that name. In particular, MPD will now read this tag correctly when using the ffmpeg decoder plugin. [1] https://id3.org/id3v2.4.0-frames (4.2.1) [2] https://picard-docs.musicbrainz.org/en/appendices/tag_mapping.html#grouping-3 Signed-off-by: Wolfgang Müller --- As evident from the commit message, I ran into this using MPD with the ffmpeg decoder plugin. MPD relies on these mappings heavily, and I found it the easiest place to fix this particular issue, especially if other pieces of software can also gain from this. libavformat/id3v2.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavformat/id3v2.c b/libavformat/id3v2.c index ff27c062e5..0f9bedea02 100644 --- a/libavformat/id3v2.c +++ b/libavformat/id3v2.c @@ -69,6 +69,7 @@ const AVMetadataConv ff_id3v2_4_metadata_conv[] = { { "TSOA", "album-sort" }, { "TSOP", "artist-sort" }, { "TSOT", "title-sort" }, + { "TIT1", "grouping" }, { 0 } };