Repository navigation
Conversation
The upload service stores an upload in chunks of 20 MB, and Mapillary keeps the handle of each chunk, about 210 bytes, with the sequence. A video of about 100 GB, which process allows (MAX_SEQUENCE_FILESIZE is 110 GiB), has a handle of over 1 MB, and its sequence is then too large to be stored with the positions of its frames: the video uploads, but fails to process on Mapillary. A video whose upload would be larger than MAX_VIDEO_UPLOAD_SIZE (32 GiB, MAPILLARY_TOOLS_MAX_VIDEO_UPLOAD_SIZE) is now uploaded in pieces of about equal length, as a video with gaps in its track is: each piece is cut from the video from the sync sample before its first point to the one after its last (transform_mp4_cut), with the CAMM track of its points, and is a sequence of its own. So is a part of a track between gaps whose piece would be larger. A piece that is still larger, such as where the bitrate is higher, is split again. Nothing is encoded again. The video between the last point of a piece and the first point of the next one may be in neither. A video that cannot be cut, or whose sync samples are so far apart that its pieces would upload a tenth more than it, is uploaded whole, as before, with a warning. A video file larger than the limit whose upload is not, as it leaves out the audio, is uploaded whole too. The upload history records each piece by its span, as for a video with gaps: an upload that stopped after some of the pieces uploads only the others the next time, with the same limit. At 32 GiB, the handle of a piece is at most about 370 kB, which leaves most of the room for the positions of its frames.
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 upload service stores an upload in chunks of 20 MB, and Mapillary keeps the handle of each chunk, about 210 bytes, with the sequence. A video of about 100 GB, which
processallows (MAX_SEQUENCE_FILESIZEis 110 GiB), has a handle of over 1 MB, and its sequence is then too large to be stored with the positions of its frames: the video uploads, but fails to process on Mapillary.A video whose upload would be larger than
MAPILLARY_TOOLS_MAX_VIDEO_UPLOAD_SIZE(32 GiB) is now uploaded in pieces of about equal length, as a video with gaps in its track is (#988): each piece is cut at sync samples, from the one before its first point to the one after its last (transform_mp4_cut), with the CAMM track of its points, and is a sequence of its own. So is a part of a track between gaps whose piece would be larger. A piece that is still larger, such as where the bitrate is higher, is split again. Nothing is encoded again.INFturns it off.At 32 GiB the handle of a piece is at most about 370 kB, which leaves most of the room for the positions of its frames.
Test plan
tests/unit/test_upload_video_pieces.py: pieces of about equal length, parts between gaps split further, whole when the upload (without audio) is no larger, whole when the sync samples are too far apart, no limit, and resume from the upload history. Doctests for_split_part.pytest tests/unit(2224 passed),pytest tests/integrationwith the executable (141 passed),ruff check,ruff format --check,usort diff,mypy mapillary_tools tests/cli.