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 84A7E49526 for ; Fri, 12 Apr 2024 23:25:21 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 4E16868D316; Sat, 13 Apr 2024 02:25:18 +0300 (EEST) Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2AECD68D0E9 for ; Sat, 13 Apr 2024 02:25:11 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 0A20620003 for ; Fri, 12 Apr 2024 23:25:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1712964310; 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=l9628wz3hsy64cciSnfGEiaHnGriIJXOJTBDHNR2/+c=; b=JcexmIEBjADZ2nbJsy+N6fX4P5ChGFrIxp5iWWxkIcarUwrbiKel0Giv/WoBS4oJyYkHlA BpbaGs6zmAu9Kli4Tlblsgx+oXY2TDYcUvo8HkaqH45GoaKoH8+zN+F02dQr7MDnJb1LCj DBiMzJ8X7AG7KPjytH+OnoknKLWeWwcXzEnixW15b+GkejgKYFl1SU5vN/Ey1t/LI8kv5m sRAxTxENKgVysOLM2QmtC8pIaP4VGbQ7jPXszgS9TRafjuGPlM/41Yog+IUajKJszWWuyn hmhb7hjnC6F2Myzr9O2TmkHOVKg6nelsnkgrO8ECa4Y9ghzSTVrWAHlwj6POxQ== Date: Sat, 13 Apr 2024 01:25:09 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20240412232509.GB6420@pb2> References: <71fccb5a1e28dfd23e3dd710c86c8a3a662bbd61.camel@haerdin.se> MIME-Version: 1.0 In-Reply-To: <71fccb5a1e28dfd23e3dd710c86c8a3a662bbd61.camel@haerdin.se> X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH] ffmpeg: Carry streamid as metadata key 'id' 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="===============3062039532765551241==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============3062039532765551241== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="bMaUHE3rgw9nJ555" Content-Disposition: inline --bMaUHE3rgw9nJ555 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Apr 12, 2024 at 11:40:47AM +0200, Tomas H=E4rdin wrote: > This idea could be extended to other fields not presently considered to > be metadata, that would be handy to treat as such. >=20 > I use the key "id" because ffprobe outputs id=3D for streamid. Another > option could be to collect these types of metadata that go into > AVStream fields under a namespace like FFMPEG: or AVSTREAM: or > something, then delete all of them using AV_DICT_IGNORE_SUFFIX near the > end of of_open() since they're for internal ffmpeg use. >=20 > The FATE change is just because av_dict() changes the order of things > when elements are deleted. >=20 > /Tomas > fftools/ffmpeg_demux.c | 5 +++ > fftools/ffmpeg_mux_init.c | 56 ++++++++++++++++++++++++++---= ------- > tests/ref/fate/matroska-stereo_mode | 6 +-- > 3 files changed, 49 insertions(+), 18 deletions(-) > cd526b2292b6d7e3fb5739a04cf17fbe5f207f16 0001-ffmpeg-Carry-streamid-as-m= etadata-key-id.patch > From 7799f1b2eb8ab02e58118565f3e889fbe0d568a7 Mon Sep 17 00:00:00 2001 > From: =3D?UTF-8?q?Tomas=3D20H=3DC3=3DA4rdin?=3D > Date: Fri, 12 Apr 2024 10:34:12 +0200 > Subject: [PATCH] ffmpeg: Carry streamid as metadata key 'id' >=20 > This allows using -map_metadata and -metadata to copy/set streamids (PIDs= ). > --- > fftools/ffmpeg_demux.c | 5 +++ > fftools/ffmpeg_mux_init.c | 56 +++++++++++++++++++++-------- > tests/ref/fate/matroska-stereo_mode | 6 ++-- > 3 files changed, 49 insertions(+), 18 deletions(-) breaks: =2E/ffmpeg -i ~/videos/mm-short.mpg -vstats_file /tmp/vstats -bitexact -map= 0:1 -map 0:1 -map 0:2 -threads 6 -vcodec libx264 -vcodec libx264 -pass 1 -= b:v:0 300k -b:v:1 900k -passlogfile:v:1 /tmp/video2 -passlogfile:v:0 /tmp/v= ideo1 -t 1 -y -ab 128k /tmp/x.ts [mpegts @ 0x558d5e3b2140] Duplicate stream id 480 [out#0/mpegts @ 0x558d5e3b2000] Could not write header (incorrect codec par= ameters ?): Invalid argument [vf#0:0 @ 0x558d5e400400] Error sending frames to consumers: Invalid argume= nt [vf#0:0 @ 0x558d5e400400] Task finished with error code: -22 (Invalid argum= ent) [vf#0:0 @ 0x558d5e400400] Terminating thread with return code -22 (Invalid = argument) [out#0/mpegts @ 0x558d5e3b2000] Nothing was written into output file, becau= se at least one of its streams received no packets. [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The misfortune of the wise is better than the prosperity of the fool. -- Epicurus --bMaUHE3rgw9nJ555 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZhnC0QAKCRBhHseHBAsP q4gmAJ415qzyePGsR4qHfqUflm3BDal4VwCdFmc4HGLQ5SIOqRto5ltVYZrGdVk= =4fsY -----END PGP SIGNATURE----- --bMaUHE3rgw9nJ555-- --===============3062039532765551241== 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". --===============3062039532765551241==--