Repository navigation
Upload a video in pieces, one sequence for each part of its track between gaps - #988
Merged
Merged
Conversation
This was referenced Dec 1, 2026
caglarpir
force-pushed
the
upload-video-in-pieces
branch
6 times, most recently
from
December 2, 2026 08:36
a321c24 to
422c26f
Compare
…ween gaps A video whose description has MAPGPSTrackGaps, where the GPS was lost, was uploaded whole as one sequence. Its frames in a gap were placed on the straight line across it, and the sequence was drawn with a line across the gap. Each part of the track between the gaps is now uploaded as a sequence of its own: a piece of the video cut from the sync sample before the first point of the part to the one after its last (transform_mp4_cut), with a CAMM track of the part, timed from the start of the piece. Nothing is encoded again, each piece reads only its own samples of the video, and the video in the gaps is not uploaded. The video is uploaded whole, as before, if it cannot be cut (such as when its video tracks have no sync sample at the same time), or if its sync samples are so far apart that the pieces would upload more of it than all of it. The whole video is built only then. process checks each part as it checks a video, and leaves out a part that fails, such as a stationary one, or one with a single point, with a warning: the gaps on either side of it become one. The video fails only if no part passes. The file size and timestamp checks stay on the whole video, and a video without gaps is checked as before. The upload history records each piece on its own, by the fingerprint of the video and the span of the part, and the video once all its pieces are. An upload that stopped after some of the pieces uploads only the others the next time, since a piece uploaded again would be a sequence of its own again. check_upload_history finds the video once all its pieces are uploaded. --delete_after_upload deletes a video uploaded in pieces only once all its pieces have finished in the run: one that fails, or is skipped as uploaded before, keeps the video. Each piece yields its own result, with its index and the keys of all the pieces; the last result comes once the video is closed, as Windows deletes no open file. The progress events of a piece carry video_piece_idx, video_piece_keys and a sequence_md5sum of their own, and so does the upload_error event of a piece that fails, whose message names the piece, as the log does. The upload summary counts a video uploaded in pieces once, with the number of sequences it was uploaded as.
caglarpir
force-pushed
the
upload-video-in-pieces
branch
from
December 2, 2026 08:45
422c26f to
f75ca4d
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.
A video whose description has
MAPGPSTrackGaps(#986) was uploaded as one sequence. Its frames in a gap, where the GPS was lost, were placed on a straight line across it, and the sequence was drawn with a line across the gap. It is now uploaded in pieces, one sequence for each part of the track between gaps.transform_mp4_cut, Add transform_mp4_cut to build the upload of a part of a video #985) and carries a CAMM track of its part. Nothing is re-encoded, each piece reads only its own samples, and the video in the gaps is not uploaded.processchecks each part as it checks a video. A part that fails, such as a stationary one, or a part with a single point, is left out with a warning. The file size and timestamp checks stay on the whole video.check_upload_historyfinds the video once all its pieces are uploaded.--delete_after_upload(Add --delete_after_upload to delete files once their uploads finished #972) deletes a video uploaded in pieces only once all its pieces have finished in the run. If one fails, or is skipped as uploaded before, the video is kept. This doesn't depend on the upload history, which may be off. The last result comes once the video is closed, as Windows deletes no open file.video_piece_idxandvideo_piece_keys. The progress events of a piece carryvideo_piece_idx,video_piece_keys, and asequence_md5sumof their own, and so does theupload_errorevent (Send each failed upload over IPC with its error #984) of a piece that fails. Itserror_messagenames the piece, as the log does:video.mp4 (piece 2 of 2): ....Example: a 52 s phone video with a 21.5 s gap between its two GPX segments.
A video without gaps uploads byte for byte as on main.