From: Michael Niedermayer <michael@niedermayer.cc> To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> Subject: Re: [FFmpeg-devel] [RFC] Moving edit list handling out of demuxers Date: Fri, 13 Jun 2025 16:21:18 +0200 Message-ID: <20250613142118.GC29660@pb2> (raw) In-Reply-To: <19ff1126f1e93cdb4fdcf50fee499c02c5e85ea7.camel@haerdin.se> [-- Attachment #1.1: Type: text/plain, Size: 2487 bytes --] Hi Tomas On Fri, Jun 13, 2025 at 12:55:56PM +0200, Tomas Härdin 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 +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) > > 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 > > 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? it would be cool if someone implemented this, its not trivial as all sides need to support it. demuxer, muxer, player, ffmpeg thx [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB What is money laundering? Its paying someone and not telling the government. [-- Attachment #1.2: signature.asc --] [-- Type: application/pgp-signature, Size: 195 bytes --] [-- Attachment #2: Type: text/plain, Size: 251 bytes --] _______________________________________________ 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".
next prev parent reply other threads:[~2025-06-13 14:21 UTC|newest] Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top 2025-06-13 10:55 Tomas Härdin 2025-06-13 12:51 ` Kieran Kunhya via ffmpeg-devel 2025-06-13 13:28 ` Derek Buitenhuis 2025-06-13 14:34 ` Tomas Härdin 2025-06-13 14:41 ` Derek Buitenhuis 2025-06-13 14:21 ` Michael Niedermayer [this message] 2025-06-13 14:53 ` Tomas Härdin 2025-06-13 14:57 ` Gyan Doshi 2025-06-17 20:42 ` Tomas Härdin 2025-06-13 16:19 ` Michael Niedermayer 2025-06-17 21:15 ` Tomas Härdin 2025-06-18 3:55 ` Michael Niedermayer 2025-06-18 10:02 ` Michael Niedermayer 2025-06-18 10:09 ` Nicolas George 2025-06-18 15:50 ` Tomas Härdin 2025-06-13 16:22 ` Michael Niedermayer 2025-06-13 14:37 ` Gyan Doshi 2025-06-17 21:33 ` Tomas Härdin 2025-06-18 4:15 ` Gyan Doshi 2025-06-18 7:17 ` Nicolas George 2025-06-13 16:57 ` Nicolas George
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20250613142118.GC29660@pb2 \ --to=michael@niedermayer.cc \ --cc=ffmpeg-devel@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git