[Feature] Handling of video sequences (spanned/multi-file video from drones, action cameras, GoPro, etc.) #22281
bgonz808
started this conversation in
Feature Request
Replies: 1 comment
|
I'm a bit hesitant about this request, in part because it seems pretty specific and mostly because, as you say, there isn't really a standard to deal with here. If the files have metadata that links them together explicitly then this could essentially be an extension of #2479, but if not I don't think we'd really want to get into matching based on heuristics and filenames, that gets hairy fast. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
I have searched the existing feature requests, both open and closed, to make sure this is not a duplicate request.
The feature
First of all, this suite is amazing, cannot say enough good things about the experience in learning and in self-hosting photos and videos via this service 🫡
Background:
Likely well-known camera behavior, describing for posterity... embedded devices often break up their videos into separate video files, splitting at ~4GB chunks, which is consideration of the widespread use of FAT32 filesystem and its inherent limitations. Each file must be smaller than 2^32 - 1 bytes (4GiB 4 billion binary bytes). Some cameras split at smaller than 4 billion decimal bytes (maybe guardband against all sources of confusion between 4GB and 4GiB).
Why I care, and presume others may too:
My largest videos are actually spanned multi-part videos, so raw footage comprises of many nearly exactly 3.7GiB videos, and makes it difficult to know which "logical" video I would be interested in considering first for deletion, given the spanning. And if I were to delete the chunk, I might also foreseeably want to remove all related chunks (and free up more space)
As of Immich 1.142.1:

Running some quick and dirty detection locally:

Wanted to ask the community if there were any ongoing discussions or stances taken regarding how to fully support spanned video files? I've only this past week begun familiarizing myself, albeit slowly, with the actual codebase, and it looks like one way support this is linking assets to each other based on the asset model for later recall, and I realize I'd be in over my head to do so safely. Extended data model for
assetcould enable viewing and deletion features that are aware of multi-file (spanned) video sequences. This extension would also require schema migration support.However a good enough starting point could be leaving the data model untouched, but extending only the Large Files Utility #18040, #12717 to support showing "logical" videos and providing their "logical" size to the page somehow?
Ideas:
0.99 * 4_000_000_000(smaller than 4 billion decimal bytes) and up to4_294_967_295(UINT32_MAX bytes)GXcciiii.MP4wherecis chunk number andiis video ID)for i in len(chunks)-1: assert chunk[i].mtime + chunk[i].duration == chunk[i+1].mtime(not sure if file mtime or timecode from container can be trusted)I'm certain I'm missing something else important, but here's what I have so far on the idea. Thanks for reading. Thanks to @niwla23, @bo0tzz, @jrasm91 et al on the Large Files PR changes and reviewing that resurfaced this idea.
Platform
All reactions