Source-linked AI summary
Video Compression for Spatiotemporal Earth System Data
Oscar J. Pellicer-Valero, Cesar Aybar, Gustau Camps Valls
TL;DR
Large Earth system datasets are increasingly difficult to access and use. This paper presents xarrayvideo, a library that compresses multichannel spatiotemporal data using standard video codecs. It reports high-fidelity compression and no performance loss on tested downstream tasks, while identifying added loading time and full-memory loading as limitations.
Problem
Growing Earth system datasets create storage and processing hurdles that can limit access and use.
Source: §I · p. 2Method
xarrayvideo compresses multichannel spatiotemporal Earth system data by encoding it with standard video codecs through ffmpeg.
Source: §I · pp. 2–3Results
Compression ratios reach 250x with PSNR up to 65.9 dB at 1 bpppb, and compressed data achieves identical performance to original data on tested downstream tasks.
Source: §V · pp. 9–10Takeaways & Limitations
The released compressed DynamicEarthNet and DeepExtremeCubes datasets provide smaller, more manageable versions for distribution and use.
Source: §V · p. 10Loading cubes takes extra processing time compared with uncompressed data, and cubes must be fully loaded into memory.
Source: §V · p. 10
Abstract
from arXiv · showhide
Large-scale Earth system datasets, from high-resolution remote sensing imagery to spatiotemporal climate model outputs, exhibit characteristics analogous to those of standard videos. Their inherent spatial, temporal, and spectral redundancies can thus be readily exploited by established video compression techniques. Here, we present xarrayvideo, a Python library for compressing multichannel spatiotemporal datasets by encoding them as videos. Our approach achieves compression ratios of up to 250x while maintaining high fidelity by leveraging standard, well-optimized video codecs through ffmpeg. We demonstrate the library's effectiveness on four real-world multichannel spatiotemporal datasets: DynamicEarthNet (very high resolution Planet images), DeepExtremeCubes (high resolution Sentinel-2 images), ERA5 (weather reanalysis data), and the SimpleS2 dataset (high resolution multichannel Sentinel-2 images), achieving Peak Signal-to-Noise Ratios (PSNRs) of 55.86, 40.60, 46.58, and 43.23 dB at 0.1 bits per pixel per band (bpppb) and 65.91, 54.28, 62.90, and 55.04 dB at 1 bpppb. We are redistributing two of these datasets, DeepExtremeCubes (2.3 Tb) and DynamicEarthNet (525 Gb), in the machine-learning-ready and cloud-ready TACO format through HuggingFace at significantly reduced sizes (270 Gb and 8.5 Gb, respectively) without compromising quality (PSNR 55.77-56.65 and 60.15). No performance loss is observed when the compressed versions of these datasets are used in their respective deep learning-based downstream tasks (next step reflectance prediction and landcover segmentation). In conclusion, xarrayvideo presents an efficient solution for handling the rapidly growing size of Earth observation datasets, making advanced compression techniques accessible and practical to the Earth science community. The library is available for use at https://github.com/IPL-UV/xarrayvideo
I. INTRODUCTION
Earth system datasets are growing rapidly, putting their use beyond reach for many researchers. The paper introduces xarrayvideo, which uses standard video codecs to compress multichannel spatiotemporal data, and presents benchmarks and compressed dataset releases as evidence of its utility.
I. INTRODUCTION
- Earth system datasets are growing in size, creating storage, transmission, and processing hurdles that restrict access and use.The paper notes that only experts can realistically download and use some datasets as they grow to multi-terabyte scale.Source: §I · p. 2
- Existing image-compression approaches often treat frames independently and do not exploit temporal correlations in multichannel time series.The authors describe compression of multichannel videos as underexplored.Source: §I · p. 2
- xarrayvideo uses widely available, optimized video codecs through ffmpeg to compress multichannel spatiotemporal data, with compatibility for the geospatial xarray ecosystem.The paper contrasts this approach with neural methods that can require specialized knowledge, hardware, and substantial computation.Source: §I · pp. 2–3
- The authors benchmark compression on four geospatial datasets, evaluate compressed data on downstream tasks, and release compressed DeepExtremeCubes and DynamicEarthNet in TACO format.The reported releases reduce DeepExtremeCubes from 2.3 Tb to 270 Gb and DynamicEarthNet from 525 Gb to 8.5 Gb.Source: §I · p. 3
II. MATERIALS AND METHODS
The section outlines the library, datasets used in the intercomparisons, and evaluation metrics.
II. MATERIALS AND METHODS
- The section reviews the library, intercomparison data spanning remote sensing, reanalysis, and climate spatiotemporal data, and evaluation metrics.Source: §II · p. 3
A. Spatiotemporal data compression — Library overview
xarrayvideo maps xarray variables to video files using configurable codec settings, with an option to transform data using PCA before encoding.
A. Spatiotemporal data compression — Library overview
- The mapping configuration specifies input variables and coordinates, codec settings, and output bit depth for each video.The example uses 12 bits for satellite bands and 8 bits for labels.Source: A. Spatiotemporal data compression —… · p. 3
- The example mapping encodes R, G, B, and NIR with libx265, splitting the four bands across two videos because the encoder supports up to three bands.The single labels variable is encoded separately with lossless ffv1; the example also retains other variables in x.nc.Source: A. Spatiotemporal data compression —… · p. 3
- xarrayvideo supports optional PCA transformation before encoding, with the number of principal components determining what is retained in the output videos.Setting the number of components to three can combine four bands into one video containing their first three PCs.Source: A. Spatiotemporal data compression —… · pp. 3–4
B. Benchmark datasets
The evaluation uses four representative datasets spanning satellite imagery, reanalysis, and custom multispectral data.
B. Benchmark datasets
- The benchmark covers DynamicEarthNet, DeepExtremeCubes, ERA5, and SimpleS2 across satellite image sequences, weather reanalysis, and custom Sentinel-2 data.Source: B. Benchmark datasets · p. 4
1) DynamicEarthNet:
The benchmark uses three multichannel satellite datasets to assess video compression across varied image sizes, bands, and temporal spans.
1) DynamicEarthNet:
- DynamicEarthNet benchmarking used five cubes from a 75-cube collection, each with 730 daily timesteps, 1024 × 1024 pixels, and four bands.The cubes cover January 2018 to December 2019 at daily 3 m resolution and include monthly land-cover labels.Source: 1) DynamicEarthNet · p. 4
2) DeepExtremeCubes:
- DeepExtremeCubes benchmarking used ten randomly selected 128 × 128 cubes from about 40,000 Sentinel-2 cubes, testing lossy RGB and infrared bands and lossless masks.Each cube has 495 five-daily timesteps; the dataset also includes static and temporal variables.Source: 2) DeepExtremeCubes · p. 4
3) SimpleS2:
- SimpleS2 testing used four cloud-excluded Sentinel-2 cubes, each with 108 monthly timesteps, 1280 × 1280 pixels, and ten bands.The data spans October 2015 to September 2024 at 10 m resolution; remaining gaps were interpolated between months.Source: 3) SimpleS2 · p. 4
4) ERA5:
The ERA5 benchmark samples global weather reanalysis data, while evaluation combines compression rate, reconstruction quality, and processing time.
4) ERA5:
- The ERA5 benchmark uses 284 timesteps of wind magnitude, temperature, and precipitation at 13 pressure levels from a global cube resampled to six-hour intervals.The source spans 1959–2023 and has 93,544 timesteps, 721 × 1440 grid cells, and 13 levels.Source: 4) ERA5 · p. 4
C. Evaluation metrics
- Evaluation measures size in bits per pixel per band, quality with PSNR, SSIM, and spectral angle, and computational efficiency with compression and decompression times.At 1 bpppb, a 32-bit floating-point image is compressed 32-fold; PSNR uses each channel’s maximum intensity in the original sequence.Source: C. Evaluation metrics · p. 4
III. EXPERIMENTAL RESULTS
The experiments compare video and image codecs across Earth-system datasets; for DynamicEarthNet, video codecs and higher bit depths generally provide better compression quality, with x265 offering the best overall speed-quality balance.
III. EXPERIMENTAL RESULTS
- The experiments compare codecs, bit depths, and PCA’s effect on compression across four representative multichannel geospatial datasets.The datasets span high-resolution remote sensing imagery and spatiotemporal reanalysis data.Source: §III · p. 5
A. Very high-resolution satellite images — DynamicEarthNet
- x265 and vp9 provide similar quality and generally outperform JPEG2000 across metrics except perhaps SSIM, while higher bit depths usually improve quality.The reported codec ordering applies except at the higher 4–5 bpppb range, where 16-bit JPEG2000 can outperform video codecs.Source: A. Very high-resolution satellite… · p. 5, Table I · p. 5
- 79.96 s, 849.97 s, and 158.89 s are the median compression times for x265, vp9, and JPEG2000, respectively.x265 is over 10 times faster than vp9 in compression, similarly quick in decompression, and achieves identical quality, making it the authors’ best overall choice.Source: A. Very high-resolution satellite… · p. 5, Table I · p. 5
- At 54 dB PSNR and 2.1 Gb, the compressed DynamicEarthNet data matches the original’s segmentation scores, while the 8.5 Gb version also achieves identical scores.The table reports pretrained models applied without modification with weekly sampling; the 2.1 Gb version corresponds to 249× compression.Source: Table II · p. 5, A. Very high-resolution satellite… · p. 5
B. DeepExtremeCubes — High resolution satellite images
DeepExtremeCubes is harder to compress than DynamicEarthNet, but video codecs perform across RGB and infrared bands, and high-quality compressed data preserves downstream reflectance-prediction performance.
B. DeepExtremeCubes — High resolution satellite images
- Cloud cover, missing data, imperfect slice registration, and 128 × 128 image size make DeepExtremeCubes compression more difficult than DynamicEarthNet.Artifacts are visible around 47 dB PSNR and 94× compression, with extreme blurring at the lowest-quality settings.Source: B. DeepExtremeCubes — High resolution… · pp. 5–6
- RGB is expected to compress better than infrared, but the difference is very small, and infrared performs better on spectral angle.This supports using standard video codecs for bands beyond RGB.Source: B. DeepExtremeCubes — High resolution… · p. 6
- The ffv1 codec losslessly compresses three 8-bit masks to 0.235 bpppb, or 34× compression, with compression and decompression times of 0.28 s and 0.14 s.For RGB and infrared, libx265 at 12 bits decompresses in about 0.34 s; the DynamicEarthNet codec and bit-depth trends also apply.Source: B. DeepExtremeCubes — High resolution… · p. 6
- The 56 dB PSNR DeepExtremeCubes version matches original reflectance-prediction performance at 8.5× compression, while the 47 dB version has a small but non-negligible impact.The prediction task estimates B02, B03, B04, and B8A reflectances at the next timestep using a convolutional LSTM.Source: B. DeepExtremeCubes — High resolution… · p. 6
C. SimpleS2 — High resolution multispectral images
The SimpleS2 experiments test PCA-based compression strategies alongside standard codec configurations. PCA provided negligible or worse compression quality, while non-PCA images appeared similar to DeepExtremeCubes at twice the compression ratio.
C. SimpleS2 — High resolution multispectral images
- PCA had negligible or even detrimental compression quality on SimpleS2.The experiments also compared discarding the least important PC with retaining all PCs at quality settings scaled to their importance.Source: C. SimpleS2 — High resolution… · pp. 6–7
- Figure 4 plots PSNR, SSIM, and Spectral Angle against bpppb for multiple codecs and bit depths.It also shows sample RGB images, with the original and x265 12-bit quality settings side by side.Source: Figure 4 · p. 8
- Non-PCA SimpleS2 images showed similar visual quality to DeepExtremeCubes at 2x better compression ratio.The authors attribute the ratio difference likely to the absence of clouds and other artifacts in SimpleS2.Source: C. SimpleS2 — High resolution… · p. 8
D. ERA5 — Reanalysis weather data
ERA5 results vary by variable and compression rate: video codecs perform better at lower rates, while JPEG2000 leads at higher rates. The discussion relates these patterns to prior compression work and reports negligible downstream-task impact for the tested compressed data.
D. ERA5 — Reanalysis weather data
- JPEG2000 outperformed x265 and vp9 at high bpppb on ERA5, while video codecs performed better at lower bpppb.At 1 bpppb with JPEG2000, PSNR was approximately 80 dB for Temperature, 70 dB for Wind speed, and 60 dB for Relative humidity.Source: D. ERA5 — Reanalysis weather data · p. 8, Figure 5 · p. 9
IV. DISCUSSION
- Das et al. reported 53.18 dB PSNR at 1 bpppb, below the paper’s approximated x265 values for four datasets.A direct comparison was impossible because the video used by Das et al. seemed publicly unavailable.Source: §IV · pp. 8–9
- A direct comparison with Cra5 [28] is difficult because its reported variables, metrics, resolution, and latitude-weighting differ.The paper approximates Cra5’s t850 result as 53.38 dB PSNR and estimates x265 would reach that PSNR at 0.0368 bpppb; Cra5 used an NVIDIA GPU A100-SXM4-80GB for decoding.Source: §IV · p. 9
- For two tested downstream tasks, compressed data had negligible impact on performance metrics for models trained on original data.The tasks were next-step reflectance prediction and landcover segmentation; the authors report similar findings for Cra5 weather forecasting [28].Source: §IV · p. 9
V. CONCLUSION
The paper presents xarrayvideo as a video-codec library for compressing multichannel spatiotemporal Earth system data. Across four datasets, it reports compression up to 250x while retaining high fidelity, and compressed data matched original-data performance in tested downstream tasks.
V. CONCLUSION
- Across four datasets, xarrayvideo achieved compression ratios up to 250x and PSNR up to 65.9 dB at 1 bpppb.The evaluated datasets were DynamicEarthNet, DeepExtremeCubes, ERA5, and SimpleS2.Source: §V · p. 9
- The compressed versions achieved identical performance to original data on the tested downstream deep learning tasks.The paper cites compressed releases of 8.5 Gb for DynamicEarthNet and 270 Gb for DeepExtremeCubes as practical examples.Source: §V · p. 10
- xarrayvideo requires extra processing time to load cubes and requires the data cubes to be fully loaded into memory.The authors identify loading specific video frames as future work to enhance scalability for extremely large datasets.Source: §V · p. 10
- Future work includes broader testing, codecs designed for multispectral or hyperspectral data, and hybrid neural and traditional video compression.The authors also propose compression settings better suited to geophysical variables.Source: §V · p. 10