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 C925F4CDA1 for ; Fri, 13 Jun 2025 12:52:10 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id E83D968B349; Fri, 13 Jun 2025 15:52:06 +0300 (EEST) References: <19ff1126f1e93cdb4fdcf50fee499c02c5e85ea7.camel@haerdin.se> In-Reply-To: <19ff1126f1e93cdb4fdcf50fee499c02c5e85ea7.camel@haerdin.se> Date: Fri, 13 Jun 2025 14:51:45 +0200 To: FFmpeg development discussions and patches MIME-Version: 1.0 Message-ID: List-Id: FFmpeg development discussions and patches List-Post: From: Kieran Kunhya via ffmpeg-devel Precedence: list Cc: Kieran Kunhya X-Mailman-Version: 2.1.29 X-BeenThere: ffmpeg-devel@ffmpeg.org List-Subscribe: , List-Unsubscribe: , List-Archive: Reply-To: FFmpeg development discussions and patches List-Help: Subject: Re: [FFmpeg-devel] [RFC] Moving edit list handling out of demuxers Content-Type: multipart/mixed; boundary="===============4982737566862696098==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============4982737566862696098== Content-Type: message/rfc822 Content-Disposition: inline Return-Path: X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-yw1-f171.google.com (mail-yw1-f171.google.com [209.85.128.171]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 8250168B349 for ; Fri, 13 Jun 2025 15:52:00 +0300 (EEST) Received: by mail-yw1-f171.google.com with SMTP id 00721157ae682-70e102eada9so19968587b3.2 for ; Fri, 13 Jun 2025 05:52:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20230601; t=1749819118; x=1750423918; darn=ffmpeg.org; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=b+lITrvHLSBTpa4topftDPUGb2bW6J66rq3Yi3jUFs0=; b=FtYQuVoAW2irh8E/f6OT41lshK59z/SfTwbQPFwDCV8agkC9KN/Ejtys6/bPN5ndY4 WEVLQj5z87uUO90Kz5dkvRXYvqD1UlbYZYusY2YutOo1SFNkg8oEYeD8jtn02NzcWobb aVhXMkk+eojUiq1ctuelY5weKcMeU+PU3XTWqE8SS3OBgHwUDVM9xnHiJFvkgA8AWpRe Ppg62nzKnqQ2MMlXBWaxMkLFJrvy8j6QxychSoMFi0oYJ0UieWa/HFNJseq+tehgFeNn 2ikQ88w0Y2cgHKSa6mhSkztZgzjRm1V6HtHZTrFJ407fDZlzXq5KMgFvX8ERni1bq5JP vxIA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1749819118; x=1750423918; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=b+lITrvHLSBTpa4topftDPUGb2bW6J66rq3Yi3jUFs0=; b=ZlY4bzrzofdfyaAqiI2CaFY7MQsjGZ9+WdLB3SMN83VVwNQKpGtx5A4Cf7tqtqGNGe 9CoEUJfbhmC2JKxkf4rTwHDbvV2hBzxXmuGnyHVIq5nB8PiHl6bHks8zzrI9AR9Mutau Dh3TUbl5r3E3LhcPUDk+QYqRJZFhXhdAKYU68cnfxMLBV5V0hXk6WiASKVavVs6dpZae 5Lq6kATJM/RJbQj3n5s/eQC1SbXaIiQMICc5Z9YNF0L3QVlSsVg74tXiJrk6X78fWUMT jn1MvhOZ8j2iqKsxMYFo265lv9qkDLDHhpLSihXlab7Ga8gCk9/CKBLi9x/lOxCwOcuV oHIA== X-Gm-Message-State: AOJu0Yw7ECiqwNUV5mYsAZli+nuxQFgusdhXf1mCUhNY3cbAAYfkDgzP UyBMZ+oErFg2I9BGsB2wZotmDbkX6kKzp7qBRzTB6DDmJ1u4FStl8tMWYf33lpb2RYr+kAxqvOz oiG4pFMQPrbo3ucFuDqDJ416NOcmjH36gxQ== X-Gm-Gg: ASbGncuvpGoXGCq4vodvfo0r1aPGUzMqL2QHjE2nRdDvMJKkWs2DMsfADCHvmMr17tk zlck4yT4tCYQcGV4a2dcEiw6domSdTnBpvboePqjnDug7XVa70UKL79y6Arc/h3VwMTtdYbCQzO KKZkfyyrEzTQcua3doIvDeO13rxZSEh6GTVpqATofxxA== X-Google-Smtp-Source: AGHT+IGYxIVLS+qZZgJyIBgrin6Z3GQlG7jqjxGQIEN8bqtbxPubxP4F5jQ0SBJR4d8L3v/Uabb9LqzvPrMALNnLbJA= X-Received: by 2002:a05:690c:4c0f:b0:70e:2d3d:ace6 with SMTP id 00721157ae682-7116365214dmr47529847b3.15.1749819118243; Fri, 13 Jun 2025 05:51:58 -0700 (PDT) MIME-Version: 1.0 References: <19ff1126f1e93cdb4fdcf50fee499c02c5e85ea7.camel@haerdin.se> In-Reply-To: <19ff1126f1e93cdb4fdcf50fee499c02c5e85ea7.camel@haerdin.se> From: Kieran Kunhya Date: Fri, 13 Jun 2025 14:51:45 +0200 X-Gm-Features: AX0GCFvrNvF3KChxUqfDWw5NceGayD5_qp76PNKgNgNc9oo8kcasQQ47VVxTl1M Message-ID: Subject: Re: [FFmpeg-devel] [RFC] Moving edit list handling out of demuxers To: FFmpeg development discussions and patches Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 On Fri, 13 Jun 2025, 12:56 Tomas H=C3=A4rdin, wrote: > Hi > > 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: > > 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 > > 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. > > As I see it, the way forward is: > > 1) introduce API for edit lists, so that users can decide themselves > what to do > 2) implement basic support for edit lists in the ffmpeg CLI > 3) remove edit list hacks from all demuxers, especially mov.c > > The main issue I see with this is that it risks turning ffmpeg into an > NLE tool, which would be a waste of developer effort better spent on > melt and related tools (kdenlive, shotcut etc). The present level of > edit list support could be reimplemented by just fiddling with the -ss > and -t options. That is, the ffmpeg CLI could automatically derive -ss > and -t from the edit list extracted by lavf. > > 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. > > 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. > > Thoughts? Derek did this in 2018: https://ffmpeg.org/pipermail/ffmpeg-devel/2018-March/227437.html Kieran --===============4982737566862696098== 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". --===============4982737566862696098==--