AVENC uses modern video compression as a transport and chunked-access layer for meteorological GRIB data. The objective is to move huge datasets fast, keep decode selective (space/time/stream subsets), and reuse robust video tooling from FFmpeg and streaming ecosystems.
Scientific source format remains GRIB. MP4 carries compressed fields and reconstruction metadata. The browser viewer currently downloads the whole MP4; metadata inspection can use HTTP Range.
bin/grib2avencPacks one or multiple GRIB files into MP4 streams.
av1_lossless12_auto_400AVENCv2|...; legacy v1 remains readable)bin/avenc2gribInverse tool: reconstruct to GRIB, extract one stream/group, or output Float32 subsets.
Typical encoding commands:
bin/grib2avenc input.grib output.mp4
bin/grib2avenc --compact source/*.grib compact.mp4
bin/grib2avenc --high source/*.grib high.mp4
Typical decoding/extraction commands:
bin/avenc2grib --list output.mp4
bin/avenc2grib output.mp4 restored.grib
bin/avenc2grib --group stream:0 output.mp4 one_stream.grib
MP4 payload includes reconstruction metadata: grouping, geometry, coordinate info, stream options, and frame-level quantization min/max values. This makes the MP4 self-contained for decode/reconstruction workflows.
4:2:0 is typically the fastest and most compatible path in hardware/software encoders.4:2:0 due to subsampling.import xarray as xr
from avenc_xarray import register_avenc_engine
register_avenc_engine()
ds = xr.open_dataset("benchmark/era_all.mp4", engine="avenc",
decode_times=False, avenc2grib_bin="bin/avenc2grib")
chunk = ds["2d"].isel(time=slice(0, 100), lat=slice(300, 320), lon=slice(1200, 1220)).values
print(chunk.shape)
For full technical details, options, benchmarks, design notes, and test commands, see
README.md at repository root.