Repository navigation
Key video uploads without reading the video for a checksum - #987
Merged
caglarpir merged 1 commit intoDec 1, 2026
Merged
Conversation
The key of an upload, which resumes it where it stopped, was the MD5 of the stream uploaded. For a video, that meant reading all its samples once for the key, before sending any, and once more to upload them: 2.8 GB twice for a 3.2 GB GoPro .360, which matters most from an SD card. A stream chained from slices of files, as a video with its CAMM track is (transform_mp4), is now keyed by the fingerprints of the files (64 KiB from their start, middle and end, as in the upload history), where the slices are in them, and the bytes of the rest: the ftyp and moov boxes and the CAMM samples. The video is read once, to upload it. Other uploads keep their checksum. A copy of the video still resumes the upload of the original. An upload interrupted with an earlier version starts over, and so does one of a video edited since, even only in metadata that is not uploaded. A video changed in place outside the three blocks, with its samples where they were, keys as before: its interrupted upload resumes with the bytes sent before the change, and --reupload finishes its earlier upload again, so the docs now say that such a video takes --noresume to upload it anew.
caglarpir
force-pushed
the
session-key-without-reading-video
branch
from
December 1, 2026 15:32
a993c00 to
d7d84bc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The key of an upload, which resumes it where it stopped, is the MD5 of the stream uploaded. For a video, that meant reading all its samples once for the key, before sending anything, and once more to upload them. For a 3.2 GB GoPro .360, the key read 2.8 GB. That took 12 s from a laptop SSD before the upload started, and longer from an SD card.
A stream chained from slices of files, as a video with its CAMM track is, is now keyed by three things:
The key now reads 192 KiB. Zip files, images and other uploads keep their checksum.
--reuploadfinishes its earlier upload again. Only byte patches inside the samples do that: re-encoders change the sample table, metadata writers don't touch the samples, and remuxers move them. The docs now say that such a video takes--reupload --noresume, which uploads it from the start.Independent of #988: its pieces are chained streams too, so they are keyed the same way. Two pieces of a video whose track does not move can have the same moov and CAMM bytes, so where their samples are is what tells them apart; a test now covers the offsets and sizes in the key.