Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: "Dennis Sädtler via ffmpeg-devel" <ffmpeg-devel@ffmpeg.org>
To: ffmpeg-devel@ffmpeg.org
Cc: "Dennis Sädtler" <dennis@obsproject.com>
Subject: Re: [FFmpeg-devel] [PATCH] movenc: Add an option for hiding fragments at the end
Date: Sat, 1 Jun 2024 14:38:09 +0200
Message-ID: <79bb4504-d8d9-ddb2-fb7d-03daeef3cbd6@obsproject.com> (raw)
In-Reply-To: <20240531085358.45478-1-martin@martin.st>

On 2024-05-31 10:53, Martin Storsjö wrote:
> This allows ending up with a normal, non-fragmented file when
> the file is finished, while keeping the file readable if writing
> is aborted abruptly at any point. (Normally when writing a
> mov/mp4 file, the unfinished file is completely useless unless it
> is finished properly.)
>
> This results in a file where the mdat atom contains (and hides)
> all the moof atoms that were part of the fragmented file structure
> initially.
> ---
> This is, incidentally, how Apple devices do (or at least did, at some
> point) their writing of files when recording, at least with some
> of their userspace APIs.
> ---
Should the ftyp atom also be updated to remove brands no longer required 
for non-fragmented files?
I'm not sure how important that is in real-world scenarios, so it might 
not be worth it to deal with some of the additional changes required 
e.g. to deal with the new ftyp possibly being a different size.

Since coincidentally I've implemented the exact same feature in a 
different application a couple weeks ago I'll also throw in the fun fact 
that files produced this way can be smaller than regular MP4s for long 
and/or large files.
This is due to the lack of interleaving of A/V samples resulting in the 
file having much fewer but larger chunks, which means the moov atom - 
mainly the stco/co64 and stsc boxes - can be much smaller.

Also good to know that Apple thought of this as well. I had no idea 
about that, but that further justifies adopting this method for 
achieving resilient but compatible recordings in my mind.

~ Dennis
_______________________________________________
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".

  parent reply	other threads:[~2024-06-01 12:38 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-31  8:53 Martin Storsjö
2024-05-31 12:18 ` Timo Rothenpieler
2024-05-31 12:38   ` Martin Storsjö
2024-06-01 12:38 ` Dennis Sädtler via ffmpeg-devel [this message]
2024-06-02 19:36   ` Martin Storsjö
2024-06-02 20:45     ` Dennis Sädtler via ffmpeg-devel
2024-06-03  7:51       ` Martin Storsjö
2024-06-03  9:38         ` Dennis Sädtler via ffmpeg-devel

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=79bb4504-d8d9-ddb2-fb7d-03daeef3cbd6@obsproject.com \
    --to=ffmpeg-devel@ffmpeg.org \
    --cc=dennis@obsproject.com \
    /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