From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id E40004EE4D for ; Fri, 13 Jun 2025 14:21:29 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 9C73068C77C; Fri, 13 Jun 2025 17:21:25 +0300 (EEST) Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id B072568BD36 for ; Fri, 13 Jun 2025 17:21:19 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id EBA7C1FD35 for ; Fri, 13 Jun 2025 14:21:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1749824479; 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=FHP53ZJQw1oPDSc59sqV+yi3BrBR0rtQhaDpDNWmMaA=; b=bpW8h2zG5qezw+JVB0kO02lnB8ZiaeOA68aup1mhgQcjx6r9hoGJ1GuEkY7oAv/8AahcBp //riTEOE/ZWuuK4zhjJOMkbrdeHhK9g80MtLMLO2I8bz769aerRq102RnP4lByuRR/wI20 QRg8eNOPs3Z6HrnLnNPkbQHh1hqrRGBMQk7APo0l617f9O5PVEmr1NeebTwQO/4A+Fik4Q AEIz13LQRpH635p6oqHPZhKaB66GXnmQCM+mfOIK1D/Pvs04sBbA9i3mwmwXGJQZGROnUn hTU2vJxoFKXy1VatqnaYX0X3pcLGyAxU5BYjRG2ng2CSkH4mQ7yppexKE6sP2w== Date: Fri, 13 Jun 2025 16:21:18 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20250613142118.GC29660@pb2> References: <19ff1126f1e93cdb4fdcf50fee499c02c5e85ea7.camel@haerdin.se> MIME-Version: 1.0 In-Reply-To: <19ff1126f1e93cdb4fdcf50fee499c02c5e85ea7.camel@haerdin.se> X-GND-State: clean X-GND-Score: -70 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtddugddukedujecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfitefpfffkpdcuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnegfrhhlucfvnfffucdlfedtmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddtudenucfhrhhomhepofhitghhrggvlhcupfhivgguvghrmhgrhigvrhcuoehmihgthhgrvghlsehnihgvuggvrhhmrgihvghrrdgttgeqnecuggftrfgrthhtvghrnhepudetvdfhudeuudegudefgfehhfevvdfggfffkefhvdfgvdetffdtjeekheetfeehnecukfhppeeguddrieeirdeijedruddufeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeeguddrieeirdeijedruddufedphhgvlhhopehlohgtrghlhhhoshhtpdhmrghilhhfrhhomhepmhhitghhrggvlhesnhhivgguvghrmhgrhigvrhdrtggtpdhnsggprhgtphhtthhopedupdhrtghpthhtohepfhhfmhhpvghgqdguvghvvghlsehffhhmphgvghdrohhrgh X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [RFC] Moving edit list handling out of demuxers 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="===============7666908749074979843==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============7666908749074979843== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="oR1HZj+EhXf92qeL" Content-Disposition: inline --oR1HZj+EhXf92qeL Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Tomas On Fri, Jun 13, 2025 at 12:55:56PM +0200, Tomas H=E4rdin wrote: > Hi >=20 > In my fiddling with fragmented indexes in mov.c I ran cross > mov_fix_index(), which has been in the codebase since September 2016. > The intent of this function is to implement limited support for edit > lists (elst). More rudely one could say it implements half-assed > support for edit lists. Besides the way it's implemented being > incredibly cursed, I feel strongly that this is not something that a > demuxer should do, partly because it's not something a demuxer *can* > do. There are a number of reasons why: >=20 > 1) demuxers are not part of the presentation layer > 2) the demuxer must lie about what the file actually contains > 3) the ISOBMFF spec mandates being able to cut on samples, not just > frames. for audio, there is no way to do that from a demuxer > 4) similarly, there is no way (I think) to implement "dwell" segments >=20 > The second point becomes painfully clear when one looks at > mov_fix_index(). FFStream.index_entries is completely replaced. The > function is not idempotent. For the kind of work I'm doing right now > this is a huge problem. >=20 > As I see it, the way forward is: >=20 > 1) introduce API for edit lists, so that users can decide themselves > what to do +1 > 2) implement basic support for edit lists in the ffmpeg CLI +1 > 3) remove edit list hacks from all demuxers, especially mov.c +1 (with ABI +2 bump) >=20 > The main issue I see with this is that it risks turning ffmpeg into an > NLE tool, If ffmpeg could do NLE, that would not be a bad thing And a full implementation of edit lists may be equivalent to this. I think thats a win not a loss [...] > If this stuff is done correctly then it should be possible to remux MOV > to MXF while keeping the edit lists and the original uncut essence. And > of course back again to MOV if so desired. yeah >=20 > I haven't sketched out any API yet, but it would probably closely > mirror how elst works in MOV. Care should be taken that MXF operational > pattern 3a can also fit into this API. Possibly even OP3c. >=20 > Thoughts? it would be cool if someone implemented this, its not trivial as all sides need to support it. demuxer, muxer, player, ffmpeg thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB What is money laundering? Its paying someone and not telling the government. --oR1HZj+EhXf92qeL Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCaEwz2gAKCRBhHseHBAsP qxVgAKCKyvbVN2Nz8zwdarkAkcHYpzX9vgCdFdUM9kcusiMujkHjd4F5kCFc908= =q9R8 -----END PGP SIGNATURE----- --oR1HZj+EhXf92qeL-- --===============7666908749074979843== 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". --===============7666908749074979843==--