Use compressed mp4 file when available to save 98% on storage, and 99% in memory #1035
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.
What this does
This will setup ReRun to use the MP4 file if it is available to take advantage of MP4 compression, instead of converting every frame into a full pixel map. It will fallback to full pixels if the file is not found.
99% memory reduction in memory on the client.
How it was tested
I ran the code locally with a dataset that has mp4 files. Then commented out the part that adds the mp4, to ensure the fallback works.
Examples:
visualize
, it now runs with 98-99% less memory than previously.How to checkout & try? (for the reviewer)
With a lerobot dataset to see disk space saved, run
To see memory saved, run rerun (pre-req rerun-sdk) and open the .rrd file.