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 784C347CD9 for ; Tue, 16 Apr 2024 00:30:14 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3D83B68D11B; Tue, 16 Apr 2024 03:30:11 +0300 (EEST) Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 8F64C68BD38 for ; Tue, 16 Apr 2024 03:30:04 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id C8AEF1C0003 for ; Tue, 16 Apr 2024 00:30:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1713227404; 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=FI+aNinKf5KbeqZY6figS9YUh0uYIxo8JgzyBMcfpzs=; b=juJBUacyDIPLsCTq4dOahklcpo9Y9RpBY+MSw0NhY9xF06O52MJ2RCn/JAbNKZV01tQSJg YiKVsy+PCMVzkvQG4Qftjbf+u0S/XywCK2op9o1qubgeqEcY1GAcw9RjqEPalUO0dKGQli Vlbvo28BZ1ZKpuaR8nyG83DZHPWBzB9MgDqEpDaHT3pvYfkQQSplZNBshfNqEhZtuULiby lKvM/P2How1BHLC1Hnw4pMutw93OKsipZfa1o1DXZzGd0UM8sOHfmY5OgAI628NvS+dPS1 9ip8euaLA5tJyjYUDKSYbVPNMOuGuDBUB+Adsw1NTsmZNsgleuOZCQaYSeVYig== Date: Tue, 16 Apr 2024 02:30:03 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20240416003003.GF6420@pb2> References: <71fccb5a1e28dfd23e3dd710c86c8a3a662bbd61.camel@haerdin.se> <20240412232509.GB6420@pb2> <626c28faebc9264433b95c44c6030ae62d5e54dd.camel@haerdin.se> MIME-Version: 1.0 In-Reply-To: <626c28faebc9264433b95c44c6030ae62d5e54dd.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="===============2474254603381048150==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============2474254603381048150== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="3gi8361MVO7sMZpx" Content-Disposition: inline --3gi8361MVO7sMZpx Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Apr 15, 2024 at 10:35:44AM +0200, Tomas H=E4rdin wrote: > l=F6r 2024-04-13 klockan 01:25 +0200 skrev Michael Niedermayer: > > 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 > >=20 > > > =A0fftools/ffmpeg_demux.c=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 |=A0= =A0=A0 5 +++ > > > =A0fftools/ffmpeg_mux_init.c=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 |=A0=A0 56 > > > ++++++++++++++++++++++++++---------- > > > =A0tests/ref/fate/matroska-stereo_mode |=A0=A0=A0 6 +-- > > > =A03 files changed, 49 insertions(+), 18 deletions(-) > > > cd526b2292b6d7e3fb5739a04cf17fbe5f207f16=A0 0001-ffmpeg-Carry- > > > streamid-as-metadata-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). > > > --- > > > =A0fftools/ffmpeg_demux.c=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 |=A0= 5 +++ > > > =A0fftools/ffmpeg_mux_init.c=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 | 56 +++++= ++++++++++++++++---- > > > ---- > > > =A0tests/ref/fate/matroska-stereo_mode |=A0 6 ++-- > > > =A03 files changed, 49 insertions(+), 18 deletions(-) > >=20 > > breaks: > >=20 > > ./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/video1 -t 1 -y -ab 128k=A0 /tmp/x.ts > >=20 > > [mpegts @ 0x558d5e3b2140] Duplicate stream id 480 >=20 > It's hardly strange if you map the same stream to the output twice that > you get duplicate streamids ok but asking for a stream to be mapped twice is a valid case. Ideally FFmpeg should not fail, it should resolve all parameters within what is valid. It could fail if the user explcicitly asks for invalid parameters ... thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Does the universe only have a finite lifespan? No, its going to go on forever, its just that you wont like living in it. -- Hiranya Peiri --3gi8361MVO7sMZpx Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZh3GhAAKCRBhHseHBAsP q/rSAKCI4VdpdgufIbmXja0QinWIOUqXjwCgmznZg1ClEC8EnD5EAQY7NSmrlgo= =tLA/ -----END PGP SIGNATURE----- --3gi8361MVO7sMZpx-- --===============2474254603381048150== 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". --===============2474254603381048150==--